defs.h revision 32021
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.28 1997/11/22 03:37: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#define SCRIPT_LEN 512 /* Size of login scripts */ 47#define LINE_LEN SCRIPT_LEN /* Size of login scripts */ 48#define MAXARGS 40 /* How many args per config line */ 49 50#define CONFFILE "ppp.conf" 51#define LINKUPFILE "ppp.linkup" 52#define LINKDOWNFILE "ppp.linkdown" 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#define MODE_BACKGROUND 64 /* Background mode. */ 65 66#define MODE_DAEMON (2|4|8|16|64) 67#define MODE_OUTGOING_DAEMON (2|8|16|64) 68 69#define EX_SIG -1 70#define EX_NORMAL 0 71#define EX_START 1 72#define EX_SOCK 2 73#define EX_MODEM 3 74#define EX_DIAL 4 75#define EX_DEAD 5 76#define EX_DONE 6 77#define EX_REBOOT 7 78#define EX_ERRDEAD 8 79#define EX_HANGUP 10 80#define EX_TERM 11 81#define EX_NODIAL 12 82#define EX_NOLOGIN 13 83 84extern int mode; 85extern int BGFiledes[2]; 86extern int modem; 87extern int tun_in; 88extern int tun_out; 89extern int netfd; 90 91extern void SetLabel(const char *); 92extern const char *GetLabel(void); 93extern void randinit(void); 94extern int GetShortHost(void); 95extern void DropClient(int); 96