defs.h revision 20365
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.5 1996/12/03 21:38:42 nate Exp $
19 *
20 *	TODO:
21 */
22
23#ifndef _DEFS_H_
24#define	_DEFS_H_
25
26#include <machine/endian.h>
27#include <sys/types.h>
28#include <unistd.h>
29#include <stdlib.h>
30#include <stdio.h>
31#include <string.h>
32#include <termios.h>
33#include "mbuf.h"
34#include "log.h"
35
36/*
37 *  Check follwiing definitions for your machine envirinment
38 */
39#define	LOGFILE		"/var/log/ppp.log"	/* Name of log file */
40#ifdef __FreeBSD__
41#define	MODEM_DEV	"/dev/cuaa1"		/* name of tty device */
42#else
43#define	MODEM_DEV	"/dev/tty01"		/* name of tty device */
44#endif
45#define MODEM_SPEED	B38400			/* tty speed */
46#define	SERVER_PORT	3000			/* Base server port no. */
47
48#define	REDIAL_PERIOD	30			/* Default Hold time to redial */
49
50#define	CONFFILE 	"ppp.conf"
51#define	LINKFILE 	"ppp.linkup"
52#define	ETHERFILE	"ppp.etherup"
53#define	SECRETFILE	"ppp.secret"
54
55/*
56 *  Definition of working mode
57 */
58#define MODE_INTER	1	/* Interactive mode */
59#define MODE_AUTO	2	/* Auto calling mode */
60#define	MODE_DIRECT	4	/* Direct connection mode */
61#define	MODE_DEDICATED	8	/* Dedicated line mode */
62#define	MODE_DDIAL	16	/* Dedicated dialing line mode */
63#define	MODE_ALIAS	32	/* Packet aliasing (masquerading) */
64
65#define	EX_NORMAL	0
66#define	EX_START	1
67#define	EX_SOCK		2
68#define	EX_MODEM	3
69#define	EX_DIAL		4
70#define	EX_DEAD		5
71#define	EX_DONE		6
72#define	EX_REBOOT	7
73#define	EX_ERRDEAD	8
74#define	EX_HANGUP	10
75#define	EX_TERM		11
76
77int mode;
78
79int modem;
80int tun_in, tun_out;
81int netfd;
82char *dstsystem;
83
84#ifndef TRUE
85#define	TRUE 	(1)
86#endif
87#ifndef FALSE
88#define	FALSE 	(0)
89#endif
90
91#endif	/* _DEFS_H_ */
92