diff --git a/ipppd/ipppd.h b/ipppd/ipppd.h index 7e8f29f1..b2d9598c 100644 --- a/ipppd/ipppd.h +++ b/ipppd/ipppd.h @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ipppd.h,v 1.9 1998/03/08 13:01:34 hipp Exp $ + * $Id: ipppd.h,v 1.10 1998/03/12 15:07:17 hipp Exp $ */ /* @@ -187,34 +187,20 @@ extern int hostroute; /* Add a route to the host at the other end? */ */ struct protent { u_short protocol; /* PPP protocol number */ - /* Initialization procedure */ - void (*init) __P((int unit)); - /* Process a received packet */ - void (*input) __P((int unit, u_char *pkt, int len)); - /* Process a received protocol-reject */ - void (*protrej) __P((int unit)); - /* Lower layer has come up */ - void (*lowerup) __P((int unit)); - /* Lower layer has gone down */ - void (*lowerdown) __P((int unit)); - /* Open the protocol */ - void (*open) __P((int unit)); - /* Close the protocol */ - void (*close) __P((int unit, char *reason)); - /* Print a packet in readable form */ - int (*printpkt) __P((u_char *pkt, int len, - void (*printer) __P((void *, char *, ...)), - void *arg)); - /* Process a received data packet */ - void (*datainput) __P((int unit, u_char *pkt, int len)); - int enabled_flag; /* 0 iff protocol is disabled */ + void (*init) (int unit); + void (*input) (int unit, u_char *pkt, int len); + void (*protrej) (int unit); + void (*lowerup) (int unit); + void (*lowerdown) (int unit); + void (*open) (int unit); + void (*close) (int unit, char *reason); + int (*printpkt) (u_char *pkt, int len, void (*printer) (void *, char *, ...), void *arg); + void (*datainput) (int unit, u_char *pkt, int len); + int enabled_flag; /* 0 iff protocol is disabled */ char *name; /* Text name of protocol */ - /* Check requested options, assign defaults */ - void (*check_options) __P((void)); - /* Configure interface for demand-dial */ - int (*demand_conf) __P((int unit)); - /* Say whether to bring up link for this pkt */ - int (*active_pkt) __P((u_char *pkt, int len)); + void (*check_options) (void); + int (*demand_conf) (int unit); + int (*active_pkt) (u_char *pkt, int len); }; /* Table of pointers to supported protocols */ @@ -223,22 +209,15 @@ extern struct protent *protocols[]; /* * Prototypes. */ -void quit __P((void)); /* Cleanup and exit */ -void timeout __P((void (*)(), caddr_t, int)); - /* Look-alike of kernel's timeout() */ -void untimeout __P((void (*)(), caddr_t)); - /* Look-alike of kernel's untimeout() */ -void output_ppp __P((int, u_char *, int)); - /* Output a PPP packet */ -void demuxprotrej __P((int,u_short)); - /* Demultiplex a Protocol-Reject */ -int check_passwd __P((int, char *, int, char *, int, char **, int *)); - /* Check peer-supplied username/password */ -int get_secret __P((int, char *, char *, char *, int *, int)); - /* get "secret" for chap */ -u_int32_t GetMask __P((u_int32_t)); /* get netmask for address */ -void die __P((int)); -void check_access __P((FILE *, char *)); +void quit(void); /* Cleanup and exit */ +void timeout(void (*)(), caddr_t, int); /* Look-alike of kernel's timeout() */ +void untimeout (void (*)(), caddr_t); /* Look-alike of kernel's untimeout() */ +void demuxprotrej (int,u_short); /* Demultiplex a Protocol-Reject */ +int check_passwd (int, char *, int, char *, int, char **, int *); /* Check peer-supplied username/password */ +int get_secret (int, char *, char *, char *, int *, int); /* get "secret" for chap */ +u_int32_t GetMask (u_int32_t); /* get netmask for address */ +void die (int); +void check_access (FILE *, char *); int ccp_getunit(int); int ipcp_getunit(int); @@ -268,18 +247,18 @@ int options_for_tty(void); int options_from_user(void); int parse_args(int argc,char **argv); int run_program(char *prog,char **args,int must_exist,int tu); -void establish_ppp __P((int)); -void calltimeout __P((void)); -struct timeval *timeleft __P((struct timeval *)); -void reap_kids __P((void)); -void cleanup __P((int, caddr_t,int)); -void close_fd __P((int)); -void die __P((int)); -void novm __P((char *)); -void log_packet __P((u_char *, int, char *,int)); +void establish_ppp (int); +void calltimeout (void); +struct timeval *timeleft (struct timeval *); +void reap_kids (void); +void cleanup (int, caddr_t,int); +void close_fd (int); +void die (int); +void novm (char *); +void log_packet (u_char *, int, char *,int); void sys_init(void); void note_debug_level (void); -void output (int unit, unsigned char *p, int len); +void output_ppp (int unit, unsigned char *p, int len); void wait_input (struct timeval *timo); int read_packet (unsigned char *buf,int tu); void ppp_send_config (int unit,int mtu,u_int32_t asyncmap,int pcomp,int accomp); @@ -308,10 +287,10 @@ void setifip(int); extern void enable_mp(int,int); void remove_sys_options(void); u_int32_t magic(void); -int fmtmsg __P((char *, int, char *, ...)); /* sprintf++ */ -int vfmtmsg __P((char *, int, char *, va_list)); /* vsprintf++ */ -void option_error __P((char *fmt, ...)); -void usage __P((void)); /* Print a usage message */ +int fmtmsg (char *, int, char *, ...); /* sprintf++ */ +int vfmtmsg (char *, int, char *, va_list); /* vsprintf++ */ +void option_error (char *fmt, ...); +void usage (void); /* Print a usage message */ /* * This structure is used to store information about certain diff --git a/ipppd/route.h b/ipppd/route.h index c0625f1f..c0b001d6 100644 --- a/ipppd/route.h +++ b/ipppd/route.h @@ -6,27 +6,6 @@ #ifndef IPPPD_ROUTE_H #define IPPPD_ROUTE_H -struct rtentry -{ - unsigned long rt_pad1; - struct sockaddr rt_dst; /* target address */ - struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */ - struct sockaddr rt_genmask; /* target network mask (IP) */ - unsigned short rt_flags; - short rt_pad2; - unsigned long rt_pad3; - unsigned char rt_tos; - unsigned char rt_class; - short rt_pad4; - short rt_metric; /* +1 for binary compatibility! */ - char *rt_dev; /* forcing the device at add */ - unsigned long rt_mtu; /* per route MTU/Window */ - #define rt_mss rt_mtu /* Compatibility :-( */ - unsigned long rt_window; /* Window clamping */ - unsigned short rt_irtt; /* Initial RTT */ -}; - - #define RTF_UP 0x0001 /* route usable */ #define RTF_GATEWAY 0x0002 /* destination is a gateway */ #define RTF_HOST 0x0004 /* host entry (net otherwise) */ diff --git a/ipppd/sys-linux.c b/ipppd/sys-linux.c index 520f5fed..432e2416 100644 --- a/ipppd/sys-linux.c +++ b/ipppd/sys-linux.c @@ -22,7 +22,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -char sys_rcsid[] = "$Id: sys-linux.c,v 1.8 1998/03/08 13:01:43 hipp Exp $"; +char sys_rcsid[] = "$Id: sys-linux.c,v 1.9 1998/03/12 15:07:19 hipp Exp $"; #define _LINUX_STRING_H_ @@ -1509,9 +1509,8 @@ void setifip(int ipcp_unit) /************************ IPX SUPPORT *********************************/ -#if !defined(__GLIBC__) -/* includes , which - breaks glibc 2.x support. Prevent that... */ +#if defined(__GLIBC__) && (__GLIBC__ > 1) +/* includes , which breaks glibc 2.x support. Prevent that... */ # define _LINUX_SOCKET_H #endif