defs.h revision 31203
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.26 1997/11/17 00:42:39 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 49#define CONFFILE "ppp.conf" 50#define LINKUPFILE "ppp.linkup" 51#define LINKDOWNFILE "ppp.linkdown" 52#define SECRETFILE "ppp.secret" 53 54/* 55 * Definition of working mode 56 */ 57#define MODE_INTER 1 /* Interactive mode */ 58#define MODE_AUTO 2 /* Auto calling mode */ 59#define MODE_DIRECT 4 /* Direct connection mode */ 60#define MODE_DEDICATED 8 /* Dedicated line mode */ 61#define MODE_DDIAL 16 /* Dedicated dialing line mode */ 62#define MODE_ALIAS 32 /* Packet aliasing (masquerading) */ 63#define MODE_BACKGROUND 64 /* Background mode. */ 64 65#define MODE_DAEMON (2|4|8|16|64) 66#define MODE_OUTGOING_DAEMON (2|8|16|64) 67 68#define EX_SIG -1 69#define EX_NORMAL 0 70#define EX_START 1 71#define EX_SOCK 2 72#define EX_MODEM 3 73#define EX_DIAL 4 74#define EX_DEAD 5 75#define EX_DONE 6 76#define EX_REBOOT 7 77#define EX_ERRDEAD 8 78#define EX_HANGUP 10 79#define EX_TERM 11 80#define EX_NODIAL 12 81#define EX_NOLOGIN 13 82 83extern int mode; 84extern int BGFiledes[2]; 85extern int modem; 86extern int tun_in; 87extern int tun_out; 88extern int netfd; 89 90extern void SetLabel(const char *); 91extern const char *GetLabel(void); 92extern void randinit(void); 93extern int GetShortHost(void); 94extern void DropClient(void); 95