defs.h revision 30715
1/*
2 *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
3 *
4 *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
5 *
6 * Redistribution and use in source and binary forms are permitted
7 * provided that the above copyright notice and this paragraph are
8 * duplicated in all such forms and that any documentation,
9 * advertising materials, and other materials related to such
10 * distribution and use acknowledge that the software was developed
11 * by the Internet Initiative Japan.  The name of the
12 * IIJ may not be used to endorse or promote products derived
13 * from this software without specific prior written permission.
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 *
18 * $Id: defs.h,v 1.21 1997/10/24 22:36:29 brian Exp $
19 *
20 *	TODO:
21 */
22
23/*
24 *  Check following definitions for your machine environment
25 */
26#ifdef __FreeBSD__
27# define  MODEM_DEV		"/dev/cuaa1"	/* name of tty device */
28# define  BASE_MODEM_DEV	"cuaa1"		/* name of base tty device */
29#else
30# ifdef __OpenBSD__
31#  define MODEM_DEV		"/dev/cua01"	/* name of tty device */
32#  define BASE_MODEM_DEV	"cua01"		/* name of base tty device */
33# else
34#  define MODEM_DEV		"/dev/tty01"	/* name of tty device */
35#  define BASE_MODEM_DEV	"tty01"		/* name of base tty device */
36# endif
37#endif
38
39#define MODEM_SPEED	B38400	/* tty speed */
40#define	SERVER_PORT	3000	/* Base server port no. */
41#define	MODEM_CTSRTS	1	/* Default (true): use CTS/RTS signals */
42#define	RECONNECT_TIMER	3	/* Default timer for carrier loss */
43#define	RECONNECT_TRIES	0	/* Default retries on carrier loss */
44#define	REDIAL_PERIOD	30	/* Default Hold time to redial */
45#define	NEXT_REDIAL_PERIOD 3	/* Default Hold time to next number redial */
46
47#define	CONFFILE 	"ppp.conf"
48#define	LINKUPFILE 	"ppp.linkup"
49#define	LINKDOWNFILE 	"ppp.linkdown"
50#define	SECRETFILE	"ppp.secret"
51
52/*
53 *  Definition of working mode
54 */
55#define MODE_INTER	1	/* Interactive mode */
56#define MODE_AUTO	2	/* Auto calling mode */
57#define	MODE_DIRECT	4	/* Direct connection mode */
58#define	MODE_DEDICATED	8	/* Dedicated line mode */
59#define	MODE_DDIAL	16	/* Dedicated dialing line mode */
60#define	MODE_ALIAS	32	/* Packet aliasing (masquerading) */
61#define MODE_BACKGROUND 64	/* Background mode. */
62
63#define	EX_SIG		-1
64#define	EX_NORMAL	0
65#define	EX_START	1
66#define	EX_SOCK		2
67#define	EX_MODEM	3
68#define	EX_DIAL		4
69#define	EX_DEAD		5
70#define	EX_DONE		6
71#define	EX_REBOOT	7
72#define	EX_ERRDEAD	8
73#define	EX_HANGUP	10
74#define	EX_TERM		11
75#define EX_NODIAL	12
76#define EX_NOLOGIN	13
77
78extern int mode;
79extern int BGFiledes[2];
80extern int modem;
81extern int tun_in;
82extern int tun_out;
83extern int netfd;
84extern char *dstsystem;
85
86#ifdef SIGALRM
87extern u_int nointr_sleep(u_int);
88extern void nointr_usleep(u_int);
89#endif
90
91extern void randinit(void);
92