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:$ 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 "mbuf.h" 33 #include "log.h" 34 35 /* 36 * Check follwiing definitions for your machine envirinment 37 */ 38 #define LOGFILE "/var/log/ppp.log" /* Name of log file */ 39 #define MODEM_DEV "/dev/cua01" /* name of tty device */ 40 #define MODEM_SPEED B38400 /* tty speed */ 41 #define SERVER_PORT 3000 /* Base server port no. */ 42 43 #define REDIAL_PERIOD 30 /* Hold time to redial */ 44 45 #define CONFFILE "ppp.conf" 46 #define LINKFILE "ppp.linkup" 47 #define ETHERFILE "ppp.etherup" 48 #define SECRETFILE "ppp.secret" 49 50 /* 51 * Definition of working mode 52 */ 53 #define MODE_INTER 1 /* Interactive mode */ 54 #define MODE_AUTO 2 /* Auto calling mode */ 55 #define MODE_DIRECT 4 /* Direct connection mode */ 56 #define MODE_DEDICATED 8 /* Dedicated line mode */ 57 58 #define EX_NORMAL 0 59 #define EX_START 1 60 #define EX_SOCK 2 61 #define EX_MODEM 3 62 #define EX_DIAL 4 63 #define EX_DEAD 5 64 #define EX_DONE 6 65 #define EX_REBOOT 7 66 #define EX_ERRDEAD 8 67 #define EX_HANGUP 10 68 #define EX_TERM 11 69 70 int mode; 71 72 int modem; 73 int tun_in, tun_out; 74 int netfd; 75 char *dstsystem; 76 77 #endif /* _DEFS_H_ */ 78