defs.h revision 6060
1255570Strasz/*
2255570Strasz *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
3255570Strasz *
4255570Strasz *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
5255570Strasz *
6255570Strasz * Redistribution and use in source and binary forms are permitted
7255570Strasz * provided that the above copyright notice and this paragraph are
8255570Strasz * duplicated in all such forms and that any documentation,
9255570Strasz * advertising materials, and other materials related to such
10255570Strasz * distribution and use acknowledge that the software was developed
11255570Strasz * by the Internet Initiative Japan.  The name of the
12255570Strasz * IIJ may not be used to endorse or promote products derived
13255570Strasz * from this software without specific prior written permission.
14255570Strasz * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15255570Strasz * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16255570Strasz * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17255570Strasz *
18255570Strasz * $Id:$
19255570Strasz *
20255570Strasz *	TODO:
21255570Strasz */
22255570Strasz
23255570Strasz#ifndef _DEFS_H_
24255570Strasz#define	_DEFS_H_
25255570Strasz
26255570Strasz#include <machine/endian.h>
27255570Strasz#include <sys/types.h>
28255570Strasz#include <unistd.h>
29255570Strasz#include <stdlib.h>
30271734Sallanjude#include <stdio.h>
31255570Strasz#include <string.h>
32255570Strasz#include "mbuf.h"
33255570Strasz#include "log.h"
34255570Strasz
35255570Strasz/*
36255570Strasz *  Check follwiing definitions for your machine envirinment
37255570Strasz */
38255570Strasz#define	LOGFILE		"/var/log/ppp.log"	/* Name of log file */
39257540Strasz#define	MODEM_DEV	"/dev/cua01"		/* name of tty device */
40255570Strasz#define MODEM_SPEED	B38400			/* tty speed */
41255570Strasz#define	SERVER_PORT	3000			/* Base server port no. */
42255570Strasz
43255570Strasz#define	REDIAL_PERIOD	30			/* Hold time to redial */
44255570Strasz
45255570Strasz#define	CONFFILE 	"ppp.conf"
46255570Strasz#define	LINKFILE 	"ppp.linkup"
47255570Strasz#define	ETHERFILE	"ppp.etherup"
48255570Strasz#define	SECRETFILE	"ppp.secret"
49255570Strasz
50269968Strasz/*
51269968Strasz *  Definition of working mode
52269968Strasz */
53269968Strasz#define MODE_INTER	1	/* Interactive mode */
54269968Strasz#define MODE_AUTO	2	/* Auto calling mode */
55269968Strasz#define	MODE_DIRECT	4	/* Direct connection mode */
56269968Strasz#define	MODE_DEDICATED	8	/* Dedicated line mode */
57269968Strasz
58269968Strasz#define	EX_NORMAL	0
59269968Strasz#define	EX_START	1
60269968Strasz#define	EX_SOCK		2
61255570Strasz#define	EX_MODEM	3
62257540Strasz#define	EX_DIAL		4
63255570Strasz#define	EX_DEAD		5
64255570Strasz#define	EX_DONE		6
65255570Strasz#define	EX_REBOOT	7
66255570Strasz#define	EX_ERRDEAD	8
67255570Strasz#define	EX_HANGUP	10
68255570Strasz#define	EX_TERM		11
69255570Strasz
70255570Straszint mode;
71255570Strasz
72255570Straszint modem;
73255570Straszint tun_in, tun_out;
74255570Straszint netfd;
75255570Straszchar *dstsystem;
76255570Strasz
77255570Strasz#endif	/* _DEFS_H_ */
78255570Strasz