diff options
author | kevlo <kevlo@FreeBSD.org> | 2007-11-07 10:53:41 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2007-11-07 10:53:41 +0000 |
commit | fa3791e1a7df72dae386c39862c6dad9fb7a5304 (patch) | |
tree | 368b0b244e9ff1e4d1d1e563ee72dc5168999272 /usr.sbin/pppd | |
parent | 350f518402f17e189d71fde9dc889b50554369e6 (diff) | |
download | FreeBSD-src-fa3791e1a7df72dae386c39862c6dad9fb7a5304.zip FreeBSD-src-fa3791e1a7df72dae386c39862c6dad9fb7a5304.tar.gz |
Cleanup of userland __P use
Diffstat (limited to 'usr.sbin/pppd')
-rw-r--r-- | usr.sbin/pppd/auth.c | 34 | ||||
-rw-r--r-- | usr.sbin/pppd/cbcp.c | 28 | ||||
-rw-r--r-- | usr.sbin/pppd/ccp.c | 48 | ||||
-rw-r--r-- | usr.sbin/pppd/chap.c | 44 | ||||
-rw-r--r-- | usr.sbin/pppd/chap.h | 4 | ||||
-rw-r--r-- | usr.sbin/pppd/chap_ms.c | 16 | ||||
-rw-r--r-- | usr.sbin/pppd/chap_ms.h | 2 | ||||
-rw-r--r-- | usr.sbin/pppd/demand.c | 2 | ||||
-rw-r--r-- | usr.sbin/pppd/eui64.h | 3 | ||||
-rw-r--r-- | usr.sbin/pppd/fsm.c | 18 | ||||
-rw-r--r-- | usr.sbin/pppd/fsm.h | 44 | ||||
-rw-r--r-- | usr.sbin/pppd/ipcp.c | 50 | ||||
-rw-r--r-- | usr.sbin/pppd/ipcp.h | 2 | ||||
-rw-r--r-- | usr.sbin/pppd/ipv6cp.c | 50 | ||||
-rw-r--r-- | usr.sbin/pppd/ipv6cp.h | 2 | ||||
-rw-r--r-- | usr.sbin/pppd/ipxcp.c | 40 | ||||
-rw-r--r-- | usr.sbin/pppd/lcp.c | 52 | ||||
-rw-r--r-- | usr.sbin/pppd/lcp.h | 10 | ||||
-rw-r--r-- | usr.sbin/pppd/magic.c | 4 | ||||
-rw-r--r-- | usr.sbin/pppd/magic.h | 4 | ||||
-rw-r--r-- | usr.sbin/pppd/main.c | 52 | ||||
-rw-r--r-- | usr.sbin/pppd/options.c | 246 | ||||
-rw-r--r-- | usr.sbin/pppd/pppd.h | 222 | ||||
-rw-r--r-- | usr.sbin/pppd/sys-bsd.c | 4 | ||||
-rw-r--r-- | usr.sbin/pppd/upap.c | 30 | ||||
-rw-r--r-- | usr.sbin/pppd/upap.h | 4 |
26 files changed, 508 insertions, 507 deletions
diff --git a/usr.sbin/pppd/auth.c b/usr.sbin/pppd/auth.c index 5375aa4..a0062da 100644 --- a/usr.sbin/pppd/auth.c +++ b/usr.sbin/pppd/auth.c @@ -129,26 +129,26 @@ static int passwd_from_file; #define CHAP_WITHPEER 4 #define CHAP_PEER 8 -extern char *crypt __P((const char *, const char *)); +extern char *crypt(const char *, const char *); /* Prototypes for procedures local to this file. */ -static void network_phase __P((int)); -static void check_idle __P((void *)); -static void connect_time_expired __P((void *)); -static int plogin __P((char *, char *, char **, int *)); -static void plogout __P((void)); -static int null_login __P((int)); -static int get_pap_passwd __P((char *)); -static int have_pap_secret __P((void)); -static int have_chap_secret __P((char *, char *, u_int32_t)); -static int ip_addr_check __P((u_int32_t, struct wordlist *)); -static int scan_authfile __P((FILE *, char *, char *, u_int32_t, char *, - struct wordlist **, char *)); -static void free_wordlist __P((struct wordlist *)); -static void auth_set_ip_addr __P((int)); -static void auth_script __P((char *)); -static void set_allowed_addrs __P((int, struct wordlist *)); +static void network_phase(int); +static void check_idle(void *); +static void connect_time_expired(void *); +static int plogin(char *, char *, char **, int *); +static void plogout(void); +static int null_login(int); +static int get_pap_passwd(char *); +static int have_pap_secret(void); +static int have_chap_secret(char *, char *, u_int32_t); +static int ip_addr_check(u_int32_t, struct wordlist *); +static int scan_authfile(FILE *, char *, char *, u_int32_t, char *, + struct wordlist **, char *); +static void free_wordlist(struct wordlist *); +static void auth_set_ip_addr(int); +static void auth_script(char *); +static void set_allowed_addrs(int, struct wordlist *); /* * An Open on LCP has requested a change from Dead to Establish phase. diff --git a/usr.sbin/pppd/cbcp.c b/usr.sbin/pppd/cbcp.c index 27b8865..81a6f41 100644 --- a/usr.sbin/pppd/cbcp.c +++ b/usr.sbin/pppd/cbcp.c @@ -37,14 +37,14 @@ static char rcsid[] = "$FreeBSD$"; /* * Protocol entry points. */ -static void cbcp_init __P((int unit)); -static void cbcp_open __P((int unit)); -static void cbcp_lowerup __P((int unit)); -static void cbcp_input __P((int unit, u_char *pkt, int len)); -static void cbcp_protrej __P((int unit)); -static int cbcp_printpkt __P((u_char *pkt, int len, - void (*printer) __P((void *, char *, ...)), - void *arg)); +static void cbcp_init(int unit); +static void cbcp_open(int unit); +static void cbcp_lowerup(int unit); +static void cbcp_input(int unit, u_char *pkt, int len); +static void cbcp_protrej(int unit); +static int cbcp_printpkt(u_char *pkt, int len, + void (*printer)(void *, char *, ...), + void *arg); struct protent cbcp_protent = { PPP_CBCP, @@ -68,11 +68,11 @@ cbcp_state cbcp[NUM_PPP]; /* internal prototypes */ -static void cbcp_recvreq __P((cbcp_state *us, char *pckt, int len)); -static void cbcp_resp __P((cbcp_state *us)); -static void cbcp_up __P((cbcp_state *us)); -static void cbcp_recvack __P((cbcp_state *us, char *pckt, int len)); -static void cbcp_send __P((cbcp_state *us, u_char code, u_char *buf, int len)); +static void cbcp_recvreq(cbcp_state *us, char *pckt, int len); +static void cbcp_resp(cbcp_state *us); +static void cbcp_up(cbcp_state *us); +static void cbcp_recvack(cbcp_state *us, char *pckt, int len); +static void cbcp_send(cbcp_state *us, u_char code, u_char *buf, int len); /* init state */ static void @@ -183,7 +183,7 @@ static int cbcp_printpkt(p, plen, printer, arg) u_char *p; int plen; - void (*printer) __P((void *, char *, ...)); + void (*printer)(void *, char *, ...); void *arg; { int code, opt, id, len, olen, delay; diff --git a/usr.sbin/pppd/ccp.c b/usr.sbin/pppd/ccp.c index fb21cfd..ba88135 100644 --- a/usr.sbin/pppd/ccp.c +++ b/usr.sbin/pppd/ccp.c @@ -42,17 +42,17 @@ static char rcsid[] = "$FreeBSD$"; /* * Protocol entry points from main code. */ -static void ccp_init __P((int unit)); -static void ccp_open __P((int unit)); -static void ccp_close __P((int unit, char *)); -static void ccp_lowerup __P((int unit)); -static void ccp_lowerdown __P((int)); -static void ccp_input __P((int unit, u_char *pkt, int len)); -static void ccp_protrej __P((int unit)); -static int ccp_printpkt __P((u_char *pkt, int len, - void (*printer) __P((void *, char *, ...)), - void *arg)); -static void ccp_datainput __P((int unit, u_char *pkt, int len)); +static void ccp_init(int unit); +static void ccp_open(int unit); +static void ccp_close(int unit, char *); +static void ccp_lowerup(int unit); +static void ccp_lowerdown(int); +static void ccp_input(int unit, u_char *pkt, int len); +static void ccp_protrej(int unit); +static int ccp_printpkt(u_char *pkt, int len, + void (*printer)(void *, char *, ...), + void *arg); +static void ccp_datainput(int unit, u_char *pkt, int len); struct protent ccp_protent = { PPP_CCP, @@ -81,18 +81,18 @@ ccp_options ccp_hisoptions[NUM_PPP]; /* what we agreed to do */ /* * Callbacks for fsm code. */ -static void ccp_resetci __P((fsm *)); -static int ccp_cilen __P((fsm *)); -static void ccp_addci __P((fsm *, u_char *, int *)); -static int ccp_ackci __P((fsm *, u_char *, int)); -static int ccp_nakci __P((fsm *, u_char *, int)); -static int ccp_rejci __P((fsm *, u_char *, int)); -static int ccp_reqci __P((fsm *, u_char *, int *, int)); -static void ccp_up __P((fsm *)); -static void ccp_down __P((fsm *)); -static int ccp_extcode __P((fsm *, int, int, u_char *, int)); -static void ccp_rack_timeout __P((void *)); -static char *method_name __P((ccp_options *, ccp_options *)); +static void ccp_resetci(fsm *); +static int ccp_cilen(fsm *); +static void ccp_addci(fsm *, u_char *, int *); +static int ccp_ackci(fsm *, u_char *, int); +static int ccp_nakci(fsm *, u_char *, int); +static int ccp_rejci(fsm *, u_char *, int); +static int ccp_reqci(fsm *, u_char *, int *, int); +static void ccp_up(fsm *); +static void ccp_down(fsm *); +static int ccp_extcode(fsm *, int, int, u_char *, int); +static void ccp_rack_timeout(void *); +static char *method_name(ccp_options *, ccp_options *); static fsm_callbacks ccp_callbacks = { ccp_resetci, @@ -954,7 +954,7 @@ static int ccp_printpkt(p, plen, printer, arg) u_char *p; int plen; - void (*printer) __P((void *, char *, ...)); + void (*printer)(void *, char *, ...); void *arg; { u_char *p0, *optend; diff --git a/usr.sbin/pppd/chap.c b/usr.sbin/pppd/chap.c index c3acafb..055dc7b 100644 --- a/usr.sbin/pppd/chap.c +++ b/usr.sbin/pppd/chap.c @@ -58,13 +58,13 @@ static char rcsid[] = "$FreeBSD$"; /* * Protocol entry points. */ -static void ChapInit __P((int)); -static void ChapLowerUp __P((int)); -static void ChapLowerDown __P((int)); -static void ChapInput __P((int, u_char *, int)); -static void ChapProtocolReject __P((int)); -static int ChapPrintPkt __P((u_char *, int, - void (*) __P((void *, char *, ...)), void *)); +static void ChapInit(int); +static void ChapLowerUp(int); +static void ChapLowerDown(int); +static void ChapInput(int, u_char *, int); +static void ChapProtocolReject(int); +static int ChapPrintPkt(u_char *, int, + void (*)(void *, char *, ...), void *); struct protent chap_protent = { PPP_CHAP, @@ -86,20 +86,20 @@ struct protent chap_protent = { chap_state chap[NUM_PPP]; /* CHAP state; one for each unit */ -static void ChapChallengeTimeout __P((void *)); -static void ChapResponseTimeout __P((void *)); -static void ChapReceiveChallenge __P((chap_state *, u_char *, int, int)); -static void ChapRechallenge __P((void *)); -static void ChapReceiveResponse __P((chap_state *, u_char *, int, int)); -static void ChapReceiveSuccess __P((chap_state *, u_char *, int, int)); -static void ChapReceiveFailure __P((chap_state *, u_char *, int, int)); -static void ChapSendStatus __P((chap_state *, int)); -static void ChapSendChallenge __P((chap_state *)); -static void ChapSendResponse __P((chap_state *)); -static void ChapGenChallenge __P((chap_state *)); - -extern double drand48 __P((void)); -extern void srand48 __P((long)); +static void ChapChallengeTimeout(void *); +static void ChapResponseTimeout(void *); +static void ChapReceiveChallenge(chap_state *, u_char *, int, int); +static void ChapRechallenge(void *); +static void ChapReceiveResponse(chap_state *, u_char *, int, int); +static void ChapReceiveSuccess(chap_state *, u_char *, int, int); +static void ChapReceiveFailure(chap_state *, u_char *, int, int); +static void ChapSendStatus(chap_state *, int); +static void ChapSendChallenge(chap_state *); +static void ChapSendResponse(chap_state *); +static void ChapGenChallenge(chap_state *); + +extern double drand48(void); +extern void srand48(long); /* * ChapInit - Initialize a CHAP unit. @@ -815,7 +815,7 @@ static int ChapPrintPkt(p, plen, printer, arg) u_char *p; int plen; - void (*printer) __P((void *, char *, ...)); + void (*printer)(void *, char *, ...); void *arg; { int code, id, len; diff --git a/usr.sbin/pppd/chap.h b/usr.sbin/pppd/chap.h index 4a4f383..be8c90d 100644 --- a/usr.sbin/pppd/chap.h +++ b/usr.sbin/pppd/chap.h @@ -115,8 +115,8 @@ typedef struct chap_state { extern chap_state chap[]; -void ChapAuthWithPeer __P((int, char *, int)); -void ChapAuthPeer __P((int, char *, int)); +void ChapAuthWithPeer(int, char *, int); +void ChapAuthPeer(int, char *, int); extern struct protent chap_protent; diff --git a/usr.sbin/pppd/chap_ms.c b/usr.sbin/pppd/chap_ms.c index c3e1f6e..5fce6e3 100644 --- a/usr.sbin/pppd/chap_ms.c +++ b/usr.sbin/pppd/chap_ms.c @@ -66,18 +66,18 @@ typedef struct { in case this struct gets padded. */ -static void ChallengeResponse __P((u_char *, u_char *, u_char *)); -static void DesEncrypt __P((u_char *, u_char *, u_char *)); -static void MakeKey __P((u_char *, u_char *)); -static u_char Get7Bits __P((u_char *, int)); -static void ChapMS_NT __P((char *, int, char *, int, MS_ChapResponse *)); +static void ChallengeResponse(u_char *, u_char *, u_char *); +static void DesEncrypt(u_char *, u_char *, u_char *); +static void MakeKey(u_char *, u_char *); +static u_char Get7Bits(u_char *, int); +static void ChapMS_NT(char *, int, char *, int, MS_ChapResponse *); #ifdef MSLANMAN -static void ChapMS_LANMan __P((char *, int, char *, int, MS_ChapResponse *)); +static void ChapMS_LANMan(char *, int, char *, int, MS_ChapResponse *); #endif #ifdef USE_CRYPT -static void Expand __P((u_char *, u_char *)); -static void Collapse __P((u_char *, u_char *)); +static void Expand(u_char *, u_char *); +static void Collapse(u_char *, u_char *); #endif static void diff --git a/usr.sbin/pppd/chap_ms.h b/usr.sbin/pppd/chap_ms.h index 7c00883..6ef03c8 100644 --- a/usr.sbin/pppd/chap_ms.h +++ b/usr.sbin/pppd/chap_ms.h @@ -27,7 +27,7 @@ #define MD4_SIGNATURE_SIZE 16 /* 16 bytes in a MD4 message digest */ #define MAX_NT_PASSWORD 256 /* Maximum number of (Unicode) chars in an NT password */ -void ChapMS __P((chap_state *, char *, int, char *, int)); +void ChapMS(chap_state *, char *, int, char *, int); #define __CHAPMS_INCLUDE__ #endif /* __CHAPMS_INCLUDE__ */ diff --git a/usr.sbin/pppd/demand.c b/usr.sbin/pppd/demand.c index 59c0281..b86c81f 100644 --- a/usr.sbin/pppd/demand.c +++ b/usr.sbin/pppd/demand.c @@ -62,7 +62,7 @@ struct packet { struct packet *pend_q; struct packet *pend_qtail; -static int active_packet __P((unsigned char *, int)); +static int active_packet(unsigned char *, int); /* * demand_conf - configure the interface for doing dial-on-demand. diff --git a/usr.sbin/pppd/eui64.h b/usr.sbin/pppd/eui64.h index efdf744..4b4b505 100644 --- a/usr.sbin/pppd/eui64.h +++ b/usr.sbin/pppd/eui64.h @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /* eui64.h - EUI64 routines for IPv6CP. Copyright (C) 1999 Tommi Komulainen <Tommi.Komulainen@iki.fi> @@ -91,7 +92,7 @@ typedef union } while (0) #define eui64_setlo32(e, l) eui64_set32(e, l) -char *eui64_ntoa __P((eui64_t)); /* Returns ascii representation of id */ +char *eui64_ntoa(eui64_t); /* Returns ascii representation of id */ #endif /* __EUI64_H__ */ diff --git a/usr.sbin/pppd/fsm.c b/usr.sbin/pppd/fsm.c index 0c49c70..0b586b7 100644 --- a/usr.sbin/pppd/fsm.c +++ b/usr.sbin/pppd/fsm.c @@ -35,14 +35,14 @@ static char rcsid[] = "$FreeBSD$"; #include "pppd.h" #include "fsm.h" -static void fsm_timeout __P((void *)); -static void fsm_rconfreq __P((fsm *, int, u_char *, int)); -static void fsm_rconfack __P((fsm *, int, u_char *, int)); -static void fsm_rconfnakrej __P((fsm *, int, int, u_char *, int)); -static void fsm_rtermreq __P((fsm *, int, u_char *, int)); -static void fsm_rtermack __P((fsm *)); -static void fsm_rcoderej __P((fsm *, u_char *, int)); -static void fsm_sconfreq __P((fsm *, int)); +static void fsm_timeout(void *); +static void fsm_rconfreq(fsm *, int, u_char *, int); +static void fsm_rconfack(fsm *, int, u_char *, int); +static void fsm_rconfnakrej(fsm *, int, int, u_char *, int); +static void fsm_rtermreq(fsm *, int, u_char *, int); +static void fsm_rtermack(fsm *); +static void fsm_rcoderej(fsm *, u_char *, int); +static void fsm_sconfreq(fsm *, int); #define PROTO_NAME(f) ((f)->callbacks->proto_name) @@ -508,7 +508,7 @@ fsm_rconfnakrej(f, code, id, inp, len) u_char *inp; int len; { - int (*proc) __P((fsm *, u_char *, int)); + int (*proc)(fsm *, u_char *, int); int ret; FSMDEBUG((LOG_INFO, "fsm_rconfnakrej(%s): Rcvd id %d.", diff --git a/usr.sbin/pppd/fsm.h b/usr.sbin/pppd/fsm.h index 7b43b7a..053c833 100644 --- a/usr.sbin/pppd/fsm.h +++ b/usr.sbin/pppd/fsm.h @@ -62,33 +62,33 @@ typedef struct fsm { typedef struct fsm_callbacks { void (*resetci) /* Reset our Configuration Information */ - __P((fsm *)); + (fsm *); int (*cilen) /* Length of our Configuration Information */ - __P((fsm *)); + (fsm *); void (*addci) /* Add our Configuration Information */ - __P((fsm *, u_char *, int *)); + (fsm *, u_char *, int *); int (*ackci) /* ACK our Configuration Information */ - __P((fsm *, u_char *, int)); + (fsm *, u_char *, int); int (*nakci) /* NAK our Configuration Information */ - __P((fsm *, u_char *, int)); + (fsm *, u_char *, int); int (*rejci) /* Reject our Configuration Information */ - __P((fsm *, u_char *, int)); + (fsm *, u_char *, int); int (*reqci) /* Request peer's Configuration Information */ - __P((fsm *, u_char *, int *, int)); + (fsm *, u_char *, int *, int); void (*up) /* Called when fsm reaches OPENED state */ - __P((fsm *)); + (fsm *); void (*down) /* Called when fsm leaves OPENED state */ - __P((fsm *)); + (fsm *); void (*starting) /* Called when we want the lower layer */ - __P((fsm *)); + (fsm *); void (*finished) /* Called when we don't want the lower layer */ - __P((fsm *)); + (fsm *); void (*protreject) /* Called when Protocol-Reject received */ - __P((int)); + (int); void (*retransmit) /* Retransmission is necessary */ - __P((fsm *)); + (fsm *); int (*extcode) /* Called when unknown code received */ - __P((fsm *, int, int, u_char *, int)); + (fsm *, int, int, u_char *, int); char *proto_name; /* String name for protocol (for messages) */ } fsm_callbacks; @@ -128,14 +128,14 @@ typedef struct fsm_callbacks { /* * Prototypes */ -void fsm_init __P((fsm *)); -void fsm_lowerup __P((fsm *)); -void fsm_lowerdown __P((fsm *)); -void fsm_open __P((fsm *)); -void fsm_close __P((fsm *, char *)); -void fsm_input __P((fsm *, u_char *, int)); -void fsm_protreject __P((fsm *)); -void fsm_sdata __P((fsm *, int, int, u_char *, int)); +void fsm_init(fsm *); +void fsm_lowerup(fsm *); +void fsm_lowerdown(fsm *); +void fsm_open(fsm *); +void fsm_close(fsm *, char *); +void fsm_input(fsm *, u_char *, int); +void fsm_protreject(fsm *); +void fsm_sdata(fsm *, int, int, u_char *, int); /* diff --git a/usr.sbin/pppd/ipcp.c b/usr.sbin/pppd/ipcp.c index 576b200..3c8eba8 100644 --- a/usr.sbin/pppd/ipcp.c +++ b/usr.sbin/pppd/ipcp.c @@ -53,17 +53,17 @@ static int proxy_arp_set[NUM_PPP]; /* Have created proxy arp entry */ /* * Callbacks for fsm code. (CI = Configuration Information) */ -static void ipcp_resetci __P((fsm *)); /* Reset our CI */ -static int ipcp_cilen __P((fsm *)); /* Return length of our CI */ -static void ipcp_addci __P((fsm *, u_char *, int *)); /* Add our CI */ -static int ipcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */ -static int ipcp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */ -static int ipcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */ -static int ipcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */ -static void ipcp_up __P((fsm *)); /* We're UP */ -static void ipcp_down __P((fsm *)); /* We're DOWN */ -static void ipcp_script __P((fsm *, char *)); /* Run an up/down script */ -static void ipcp_finished __P((fsm *)); /* Don't need lower layer */ +static void ipcp_resetci(fsm *); /* Reset our CI */ +static int ipcp_cilen(fsm *); /* Return length of our CI */ +static void ipcp_addci(fsm *, u_char *, int *); /* Add our CI */ +static int ipcp_ackci(fsm *, u_char *, int); /* Peer ack'd our CI */ +static int ipcp_nakci(fsm *, u_char *, int); /* Peer nak'd our CI */ +static int ipcp_rejci(fsm *, u_char *, int); /* Peer rej'd our CI */ +static int ipcp_reqci(fsm *, u_char *, int *, int); /* Rcv CI */ +static void ipcp_up(fsm *); /* We're UP */ +static void ipcp_down(fsm *); /* We're DOWN */ +static void ipcp_script(fsm *, char *); /* Run an up/down script */ +static void ipcp_finished(fsm *); /* Don't need lower layer */ fsm ipcp_fsm[NUM_PPP]; /* IPCP fsm structure */ @@ -88,18 +88,18 @@ static fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */ /* * Protocol entry points from main code. */ -static void ipcp_init __P((int)); -static void ipcp_open __P((int)); -static void ipcp_close __P((int, char *)); -static void ipcp_lowerup __P((int)); -static void ipcp_lowerdown __P((int)); -static void ipcp_input __P((int, u_char *, int)); -static void ipcp_protrej __P((int)); -static int ipcp_printpkt __P((u_char *, int, - void (*) __P((void *, char *, ...)), void *)); -static void ip_check_options __P((void)); -static int ip_demand_conf __P((int)); -static int ip_active_pkt __P((u_char *, int)); +static void ipcp_init(int); +static void ipcp_open(int); +static void ipcp_close(int, char *); +static void ipcp_lowerup(int); +static void ipcp_lowerdown(int); +static void ipcp_input(int, u_char *, int); +static void ipcp_protrej(int); +static int ipcp_printpkt(u_char *, int, + void (*) (void *, char *, ...), void *); +static void ip_check_options(void); +static int ip_demand_conf(int); +static int ip_active_pkt(u_char *, int); struct protent ipcp_protent = { PPP_IPCP, @@ -119,7 +119,7 @@ struct protent ipcp_protent = { ip_active_pkt }; -static void ipcp_clear_addrs __P((int)); +static void ipcp_clear_addrs(int); /* * Lengths of configuration options. @@ -1367,7 +1367,7 @@ static int ipcp_printpkt(p, plen, printer, arg) u_char *p; int plen; - void (*printer) __P((void *, char *, ...)); + void (*printer)(void *, char *, ...); void *arg; { int code, id, len, olen; diff --git a/usr.sbin/pppd/ipcp.h b/usr.sbin/pppd/ipcp.h index 2bc795d..73f8b7e 100644 --- a/usr.sbin/pppd/ipcp.h +++ b/usr.sbin/pppd/ipcp.h @@ -65,6 +65,6 @@ extern ipcp_options ipcp_gotoptions[]; extern ipcp_options ipcp_allowoptions[]; extern ipcp_options ipcp_hisoptions[]; -char *ip_ntoa __P((u_int32_t)); +char *ip_ntoa(u_int32_t); extern struct protent ipcp_protent; diff --git a/usr.sbin/pppd/ipv6cp.c b/usr.sbin/pppd/ipv6cp.c index 0be6dc4..3071a9e 100644 --- a/usr.sbin/pppd/ipv6cp.c +++ b/usr.sbin/pppd/ipv6cp.c @@ -146,16 +146,16 @@ static int ipv6cp_is_up; /* * Callbacks for fsm code. (CI = Configuration Information) */ -static void ipv6cp_resetci __P((fsm *)); /* Reset our CI */ -static int ipv6cp_cilen __P((fsm *)); /* Return length of our CI */ -static void ipv6cp_addci __P((fsm *, u_char *, int *)); /* Add our CI */ -static int ipv6cp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */ -static int ipv6cp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */ -static int ipv6cp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */ -static int ipv6cp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */ -static void ipv6cp_up __P((fsm *)); /* We're UP */ -static void ipv6cp_down __P((fsm *)); /* We're DOWN */ -static void ipv6cp_finished __P((fsm *)); /* Don't need lower layer */ +static void ipv6cp_resetci(fsm *); /* Reset our CI */ +static int ipv6cp_cilen(fsm *); /* Return length of our CI */ +static void ipv6cp_addci(fsm *, u_char *, int *); /* Add our CI */ +static int ipv6cp_ackci(fsm *, u_char *, int); /* Peer ack'd our CI */ +static int ipv6cp_nakci(fsm *, u_char *, int); /* Peer nak'd our CI */ +static int ipv6cp_rejci(fsm *, u_char *, int); /* Peer rej'd our CI */ +static int ipv6cp_reqci(fsm *, u_char *, int *, int); /* Rcv CI */ +static void ipv6cp_up(fsm *); /* We're UP */ +static void ipv6cp_down(fsm *); /* We're DOWN */ +static void ipv6cp_finished(fsm *); /* Don't need lower layer */ fsm ipv6cp_fsm[NUM_PPP]; /* IPV6CP fsm structure */ @@ -181,18 +181,18 @@ static fsm_callbacks ipv6cp_callbacks = { /* IPV6CP callback routines */ /* * Protocol entry points from main code. */ -static void ipv6cp_init __P((int)); -static void ipv6cp_open __P((int)); -static void ipv6cp_close __P((int, char *)); -static void ipv6cp_lowerup __P((int)); -static void ipv6cp_lowerdown __P((int)); -static void ipv6cp_input __P((int, u_char *, int)); -static void ipv6cp_protrej __P((int)); -static int ipv6cp_printpkt __P((u_char *, int, - void (*) __P((void *, char *, ...)), void *)); -static void ipv6_check_options __P((void)); -static int ipv6_demand_conf __P((int)); -static int ipv6_active_pkt __P((u_char *, int)); +static void ipv6cp_init(int); +static void ipv6cp_open(int); +static void ipv6cp_close(int, char *); +static void ipv6cp_lowerup(int); +static void ipv6cp_lowerdown(int); +static void ipv6cp_input(int, u_char *, int); +static void ipv6cp_protrej(int); +static int ipv6cp_printpkt(u_char *, int, + void (*)(void *, char *, ...), void *); +static void ipv6_check_options(void); +static int ipv6_demand_conf(int); +static int ipv6_active_pkt(u_char *, int); struct protent ipv6cp_protent = { PPP_IPV6CP, @@ -212,8 +212,8 @@ struct protent ipv6cp_protent = { ipv6_active_pkt }; -static void ipv6cp_clear_addrs __P((int, eui64_t, eui64_t)); -static void ipv6cp_script __P((char *)); +static void ipv6cp_clear_addrs(int, eui64_t, eui64_t); +static void ipv6cp_script(char *); /* * Lengths of configuration options. @@ -1293,7 +1293,7 @@ static int ipv6cp_printpkt(p, plen, printer, arg) u_char *p; int plen; - void (*printer) __P((void *, char *, ...)); + void (*printer)(void *, char *, ...); void *arg; { int code, id, len, olen; diff --git a/usr.sbin/pppd/ipv6cp.h b/usr.sbin/pppd/ipv6cp.h index 2641008..39f9444 100644 --- a/usr.sbin/pppd/ipv6cp.h +++ b/usr.sbin/pppd/ipv6cp.h @@ -126,4 +126,4 @@ extern ipv6cp_options ipv6cp_hisoptions[]; extern struct protent ipv6cp_protent; -extern int setifaceid __P((char **arg)); +extern int setifaceid(char **arg); diff --git a/usr.sbin/pppd/ipxcp.c b/usr.sbin/pppd/ipxcp.c index bdf24d1..ea7f127 100644 --- a/usr.sbin/pppd/ipxcp.c +++ b/usr.sbin/pppd/ipxcp.c @@ -52,16 +52,16 @@ ipxcp_options ipxcp_hisoptions[NUM_PPP]; /* Options that we ack'd */ /* * Callbacks for fsm code. (CI = Configuration Information) */ -static void ipxcp_resetci __P((fsm *)); /* Reset our CI */ -static int ipxcp_cilen __P((fsm *)); /* Return length of our CI */ -static void ipxcp_addci __P((fsm *, u_char *, int *)); /* Add our CI */ -static int ipxcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */ -static int ipxcp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */ -static int ipxcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */ -static int ipxcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */ -static void ipxcp_up __P((fsm *)); /* We're UP */ -static void ipxcp_down __P((fsm *)); /* We're DOWN */ -static void ipxcp_script __P((fsm *, char *)); /* Run an up/down script */ +static void ipxcp_resetci(fsm *); /* Reset our CI */ +static int ipxcp_cilen(fsm *); /* Return length of our CI */ +static void ipxcp_addci(fsm *, u_char *, int *); /* Add our CI */ +static int ipxcp_ackci(fsm *, u_char *, int); /* Peer ack'd our CI */ +static int ipxcp_nakci(fsm *, u_char *, int); /* Peer nak'd our CI */ +static int ipxcp_rejci(fsm *, u_char *, int); /* Peer rej'd our CI */ +static int ipxcp_reqci(fsm *, u_char *, int *, int); /* Rcv CI */ +static void ipxcp_up(fsm *); /* We're UP */ +static void ipxcp_down(fsm *); /* We're DOWN */ +static void ipxcp_script(fsm *, char *); /* Run an up/down script */ fsm ipxcp_fsm[NUM_PPP]; /* IPXCP fsm structure */ @@ -87,15 +87,15 @@ static fsm_callbacks ipxcp_callbacks = { /* IPXCP callback routines */ * Protocol entry points. */ -static void ipxcp_init __P((int)); -static void ipxcp_open __P((int)); -static void ipxcp_close __P((int, char *)); -static void ipxcp_lowerup __P((int)); -static void ipxcp_lowerdown __P((int)); -static void ipxcp_input __P((int, u_char *, int)); -static void ipxcp_protrej __P((int)); -static int ipxcp_printpkt __P((u_char *, int, - void (*) __P((void *, char *, ...)), void *)); +static void ipxcp_init(int); +static void ipxcp_open(int); +static void ipxcp_close(int, char *); +static void ipxcp_lowerup(int); +static void ipxcp_lowerdown(int); +static void ipxcp_input(int, u_char *, int); +static void ipxcp_protrej(int); +static int ipxcp_printpkt(u_char *, int, + void (*)(void *, char *, ...), void *); struct protent ipxcp_protent = { PPP_IPXCP, @@ -1274,7 +1274,7 @@ static int ipxcp_printpkt(p, plen, printer, arg) u_char *p; int plen; - void (*printer) __P((void *, char *, ...)); + void (*printer)(void *, char *, ...); void *arg; { int code, id, len, olen; diff --git a/usr.sbin/pppd/lcp.c b/usr.sbin/pppd/lcp.c index 7400987..a10a460 100644 --- a/usr.sbin/pppd/lcp.c +++ b/usr.sbin/pppd/lcp.c @@ -58,31 +58,31 @@ static u_char nak_buffer[PPP_MRU]; /* where we construct a nak packet */ /* * Callbacks for fsm code. (CI = Configuration Information) */ -static void lcp_resetci __P((fsm *)); /* Reset our CI */ -static int lcp_cilen __P((fsm *)); /* Return length of our CI */ -static void lcp_addci __P((fsm *, u_char *, int *)); /* Add our CI to pkt */ -static int lcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */ -static int lcp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */ -static int lcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */ -static int lcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv peer CI */ -static void lcp_up __P((fsm *)); /* We're UP */ -static void lcp_down __P((fsm *)); /* We're DOWN */ -static void lcp_starting __P((fsm *)); /* We need lower layer up */ -static void lcp_finished __P((fsm *)); /* We need lower layer down */ -static int lcp_extcode __P((fsm *, int, int, u_char *, int)); -static void lcp_rprotrej __P((fsm *, u_char *, int)); +static void lcp_resetci(fsm *); /* Reset our CI */ +static int lcp_cilen(fsm *); /* Return length of our CI */ +static void lcp_addci(fsm *, u_char *, int *); /* Add our CI to pkt */ +static int lcp_ackci(fsm *, u_char *, int); /* Peer ack'd our CI */ +static int lcp_nakci(fsm *, u_char *, int); /* Peer nak'd our CI */ +static int lcp_rejci(fsm *, u_char *, int); /* Peer rej'd our CI */ +static int lcp_reqci(fsm *, u_char *, int *, int); /* Rcv peer CI */ +static void lcp_up(fsm *); /* We're UP */ +static void lcp_down(fsm *); /* We're DOWN */ +static void lcp_starting(fsm *); /* We need lower layer up */ +static void lcp_finished(fsm *); /* We need lower layer down */ +static int lcp_extcode(fsm *, int, int, u_char *, int); +static void lcp_rprotrej(fsm *, u_char *, int); /* * routines to send LCP echos to peer */ -static void lcp_echo_lowerup __P((int)); -static void lcp_echo_lowerdown __P((int)); -static void LcpEchoTimeout __P((void *)); -static void lcp_received_echo_reply __P((fsm *, int, u_char *, int)); -static void LcpSendEchoRequest __P((fsm *)); -static void LcpLinkFailure __P((fsm *)); -static void LcpEchoCheck __P((fsm *)); +static void lcp_echo_lowerup(int); +static void lcp_echo_lowerdown(int); +static void LcpEchoTimeout(void *); +static void lcp_received_echo_reply(fsm *, int, u_char *, int); +static void LcpSendEchoRequest(fsm *); +static void LcpLinkFailure(fsm *); +static void LcpEchoCheck(fsm *); static fsm_callbacks lcp_callbacks = { /* LCP callback routines */ lcp_resetci, /* Reset our Configuration Information */ @@ -107,11 +107,11 @@ static fsm_callbacks lcp_callbacks = { /* LCP callback routines */ * Some of these are called directly. */ -static void lcp_init __P((int)); -static void lcp_input __P((int, u_char *, int)); -static void lcp_protrej __P((int)); -static int lcp_printpkt __P((u_char *, int, - void (*) __P((void *, char *, ...)), void *)); +static void lcp_init(int); +static void lcp_input(int, u_char *, int); +static void lcp_protrej(int); +static int lcp_printpkt(u_char *, int, + void (*)(void *, char *, ...), void *); struct protent lcp_protent = { PPP_LCP, @@ -1555,7 +1555,7 @@ static int lcp_printpkt(p, plen, printer, arg) u_char *p; int plen; - void (*printer) __P((void *, char *, ...)); + void (*printer)(void *, char *, ...); void *arg; { int code, id, len, olen; diff --git a/usr.sbin/pppd/lcp.h b/usr.sbin/pppd/lcp.h index 2a19e26..603a32f 100644 --- a/usr.sbin/pppd/lcp.h +++ b/usr.sbin/pppd/lcp.h @@ -75,11 +75,11 @@ extern u_int32_t xmit_accm[][8]; #define MINMRU 128 /* No MRUs below this */ #define MAXMRU 16384 /* Normally limit MRU to this */ -void lcp_open __P((int)); -void lcp_close __P((int, char *)); -void lcp_lowerup __P((int)); -void lcp_lowerdown __P((int)); -void lcp_sprotrej __P((int, u_char *, int)); /* send protocol reject */ +void lcp_open(int); +void lcp_close(int, char *); +void lcp_lowerup(int); +void lcp_lowerdown(int); +void lcp_sprotrej(int, u_char *, int); /* send protocol reject */ extern struct protent lcp_protent; diff --git a/usr.sbin/pppd/magic.c b/usr.sbin/pppd/magic.c index 1e13d02..b4627b1 100644 --- a/usr.sbin/pppd/magic.c +++ b/usr.sbin/pppd/magic.c @@ -29,8 +29,8 @@ static char rcsid[] = "$FreeBSD$"; #include "pppd.h" #include "magic.h" -extern long mrand48 __P((void)); -extern void srand48 __P((long)); +extern long mrand48(void); +extern void srand48(long); /* * magic_init - Initialize the magic number generator. diff --git a/usr.sbin/pppd/magic.h b/usr.sbin/pppd/magic.h index 82f65cf..c574131 100644 --- a/usr.sbin/pppd/magic.h +++ b/usr.sbin/pppd/magic.h @@ -19,5 +19,5 @@ * $FreeBSD$ */ -void magic_init __P((void)); /* Initialize the magic number generator */ -u_int32_t magic __P((void)); /* Returns the next magic number */ +void magic_init(void); /* Initialize the magic number generator */ +u_int32_t magic(void); /* Returns the next magic number */ diff --git a/usr.sbin/pppd/main.c b/usr.sbin/pppd/main.c index 7bb104d..7850726 100644 --- a/usr.sbin/pppd/main.c +++ b/usr.sbin/pppd/main.c @@ -111,27 +111,27 @@ char *no_ppp_msg = "Sorry - this system lacks PPP kernel support\n"; /* Prototypes for procedures local to this file. */ -static void create_pidfile __P((void)); -static void cleanup __P((void)); -static void close_tty __P((void)); -static void get_input __P((void)); -static void calltimeout __P((void)); -static struct timeval *timeleft __P((struct timeval *)); -static void kill_my_pg __P((int)); -static void hup __P((int)); -static void term __P((int)); -static void chld __P((int)); -static void toggle_debug __P((int)); -static void open_ccp __P((int)); -static void bad_signal __P((int)); -static void holdoff_end __P((void *)); -static int device_script __P((char *, int, int)); -static void reap_kids __P((void)); -static void pr_log __P((void *, char *, ...)); - -extern char *ttyname __P((int)); -extern char *getlogin __P((void)); -int main __P((int, char *[])); +static void create_pidfile(void); +static void cleanup(void); +static void close_tty(void); +static void get_input(void); +static void calltimeout(void); +static struct timeval *timeleft(struct timeval *); +static void kill_my_pg(int); +static void hup(int); +static void term(int); +static void chld(int); +static void toggle_debug(int); +static void open_ccp(int); +static void bad_signal(int); +static void holdoff_end(void *); +static int device_script(char *, int, int); +static void reap_kids(void); +static void pr_log(void *, char *, ...); + +extern char *ttyname(int); +extern char *getlogin(void); +int main(int, char *[]); #ifdef ultrix #undef O_NONBLOCK @@ -849,7 +849,7 @@ close_tty() struct callout { struct timeval c_time; /* time at which to call routine */ void *c_arg; /* argument to routine */ - void (*c_func) __P((void *)); /* routine */ + void (*c_func)(void *); /* routine */ struct callout *c_next; }; @@ -864,7 +864,7 @@ static struct timeval timenow; /* Current time */ */ void timeout(func, arg, time) - void (*func) __P((void *)); + void (*func)(void *); void *arg; int time; { @@ -904,7 +904,7 @@ timeout(func, arg, time) */ void untimeout(func, arg) - void (*func) __P((void *)); + void (*func)(void *); void *arg; { struct callout **copp, *freep; @@ -1288,7 +1288,7 @@ void format_packet(p, len, printer, arg) u_char *p; int len; - void (*printer) __P((void *, char *, ...)); + void (*printer)(void *, char *, ...); void *arg; { int i, n; @@ -1356,7 +1356,7 @@ void print_string(p, len, printer, arg) char *p; int len; - void (*printer) __P((void *, char *, ...)); + void (*printer)(void *, char *, ...); void *arg; { int c; diff --git a/usr.sbin/pppd/options.c b/usr.sbin/pppd/options.c index 00ad006..fa3cf93 100644 --- a/usr.sbin/pppd/options.c +++ b/usr.sbin/pppd/options.c @@ -69,7 +69,7 @@ static char rcsid[] = "$FreeBSD$"; #define TRUE 1 #if defined(ultrix) || defined(NeXT) -char *strdup __P((char *)); +char *strdup(char *); #endif #ifndef GIDSET_TYPE @@ -138,146 +138,146 @@ pcap_t pc; /* Fake struct pcap so we can compile expr */ /* * Prototypes */ -static int setdevname __P((char *, int)); -static int setspeed __P((char *)); -static int setdebug __P((char **)); -static int setkdebug __P((char **)); -static int setpassive __P((char **)); -static int setsilent __P((char **)); -static int noopt __P((char **)); -static int setnovj __P((char **)); -static int setnovjccomp __P((char **)); -static int setvjslots __P((char **)); -static int reqpap __P((char **)); -static int nopap __P((char **)); +static int setdevname(char *, int); +static int setspeed(char *); +static int setdebug(char **); +static int setkdebug(char **); +static int setpassive(char **); +static int setsilent(char **); +static int noopt(char **); +static int setnovj(char **); +static int setnovjccomp(char **); +static int setvjslots(char **); +static int reqpap(char **); +static int nopap(char **); #ifdef OLD_OPTIONS -static int setupapfile __P((char **)); +static int setupapfile(char **); #endif -static int nochap __P((char **)); -static int reqchap __P((char **)); -static int noaccomp __P((char **)); -static int noasyncmap __P((char **)); -static int noip __P((char **)); -static int nomagicnumber __P((char **)); -static int setasyncmap __P((char **)); -static int setescape __P((char **)); -static int setmru __P((char **)); -static int setmtu __P((char **)); +static int nochap(char **); +static int reqchap(char **); +static int noaccomp(char **); +static int noasyncmap(char **); +static int noip(char **); +static int nomagicnumber(char **); +static int setasyncmap(char **); +static int setescape(char **); +static int setmru(char **); +static int setmtu(char **); #ifdef CBCP_SUPPORT -static int setcbcp __P((char **)); +static int setcbcp(char **); #endif -static int nomru __P((char **)); -static int nopcomp __P((char **)); -static int setconnector __P((char **)); -static int setdisconnector __P((char **)); -static int setwelcomer __P((char **)); -static int setmaxcon __P((char **)); -static int setmaxconnect __P((char **)); -static int setdomain __P((char **)); -static int setnetmask __P((char **)); -static int setcrtscts __P((char **)); -static int setnocrtscts __P((char **)); -static int setxonxoff __P((char **)); -static int setnodetach __P((char **)); -static int setupdetach __P((char **)); -static int setmodem __P((char **)); -static int setlocal __P((char **)); -static int setlock __P((char **)); -static int setname __P((char **)); -static int setuser __P((char **)); -static int setremote __P((char **)); -static int setauth __P((char **)); -static int setnoauth __P((char **)); -static int readfile __P((char **)); -static int callfile __P((char **)); -static int setdefaultroute __P((char **)); -static int setnodefaultroute __P((char **)); -static int setproxyarp __P((char **)); -static int setnoproxyarp __P((char **)); -static int setpersist __P((char **)); -static int setnopersist __P((char **)); -static int setdologin __P((char **)); -static int setusehostname __P((char **)); -static int setnoipdflt __P((char **)); -static int setlcptimeout __P((char **)); -static int setlcpterm __P((char **)); -static int setlcpconf __P((char **)); -static int setlcpfails __P((char **)); -static int setipcptimeout __P((char **)); -static int setipcpterm __P((char **)); -static int setipcpconf __P((char **)); -static int setipcpfails __P((char **)); -static int setpaptimeout __P((char **)); -static int setpapreqs __P((char **)); -static int setpapreqtime __P((char **)); -static int setchaptimeout __P((char **)); -static int setchapchal __P((char **)); -static int setchapintv __P((char **)); -static int setipcpaccl __P((char **)); -static int setipcpaccr __P((char **)); -static int setlcpechointv __P((char **)); -static int setlcpechofails __P((char **)); -static int noccp __P((char **)); -static int setbsdcomp __P((char **)); -static int setnobsdcomp __P((char **)); -static int setdeflate __P((char **)); -static int setnodeflate __P((char **)); -static int setnodeflatedraft __P((char **)); -static int setdemand __P((char **)); -static int setpred1comp __P((char **)); -static int setnopred1comp __P((char **)); -static int setipparam __P((char **)); -static int setpapcrypt __P((char **)); -static int setidle __P((char **)); -static int setholdoff __P((char **)); -static int setdnsaddr __P((char **)); -static int resetipv6proto __P((char **)); -static int resetipxproto __P((char **)); -static int setwinsaddr __P((char **)); -static int showversion __P((char **)); -static int showhelp __P((char **)); +static int nomru(char **); +static int nopcomp(char **); +static int setconnector(char **); +static int setdisconnector(char **); +static int setwelcomer(char **); +static int setmaxcon(char **); +static int setmaxconnect(char **); +static int setdomain(char **); +static int setnetmask(char **); +static int setcrtscts(char **); +static int setnocrtscts(char **); +static int setxonxoff(char **); +static int setnodetach(char **); +static int setupdetach(char **); +static int setmodem(char **); +static int setlocal(char **); +static int setlock(char **); +static int setname(char **); +static int setuser(char **); +static int setremote(char **); +static int setauth(char **); +static int setnoauth(char **); +static int readfile(char **); +static int callfile(char **); +static int setdefaultroute(char **); +static int setnodefaultroute(char **); +static int setproxyarp(char **); +static int setnoproxyarp(char **); +static int setpersist(char **); +static int setnopersist(char **); +static int setdologin(char **); +static int setusehostname(char **); +static int setnoipdflt(char **); +static int setlcptimeout(char **); +static int setlcpterm(char **); +static int setlcpconf(char **); +static int setlcpfails(char **); +static int setipcptimeout(char **); +static int setipcpterm(char **); +static int setipcpconf(char **); +static int setipcpfails(char **); +static int setpaptimeout(char **); +static int setpapreqs(char **); +static int setpapreqtime(char **); +static int setchaptimeout(char **); +static int setchapchal(char **); +static int setchapintv(char **); +static int setipcpaccl(char **); +static int setipcpaccr(char **); +static int setlcpechointv(char **); +static int setlcpechofails(char **); +static int noccp(char **); +static int setbsdcomp(char **); +static int setnobsdcomp(char **); +static int setdeflate(char **); +static int setnodeflate(char **); +static int setnodeflatedraft(char **); +static int setdemand(char **); +static int setpred1comp(char **); +static int setnopred1comp(char **); +static int setipparam(char **); +static int setpapcrypt(char **); +static int setidle(char **); +static int setholdoff(char **); +static int setdnsaddr(char **); +static int resetipv6proto(char **); +static int resetipxproto(char **); +static int setwinsaddr(char **); +static int showversion(char **); +static int showhelp(char **); #ifdef PPP_FILTER -static int setpdebug __P((char **)); -static int setpassfilter __P((char **)); -static int setactivefilter __P((char **)); +static int setpdebug(char **); +static int setpassfilter(char **); +static int setactivefilter(char **); #endif #ifdef INET6 -static int setipv6cp_accept_local __P((char **)); -static int setipv6cp_use_ip __P((char **)); +static int setipv6cp_accept_local(char **); +static int setipv6cp_use_ip(char **); #if defined(SOL2) -static int setipv6cp_use_persistent __P((char **)); +static int setipv6cp_use_persistent(char **); #endif -static int setipv6cptimeout __P((char **)); -static int setipv6cpterm __P((char **)); -static int setipv6cpconf __P((char **)); -static int setipv6cpfails __P((char **)); -static int setipv6proto __P((char **)); +static int setipv6cptimeout(char **); +static int setipv6cpterm(char **); +static int setipv6cpconf(char **); +static int setipv6cpfails(char **); +static int setipv6proto(char **); #endif /* INET6 */ #ifdef IPX_CHANGE -static int setipxproto __P((char **)); -static int setipxanet __P((char **)); -static int setipxalcl __P((char **)); -static int setipxarmt __P((char **)); -static int setipxnetwork __P((char **)); -static int setipxnode __P((char **)); -static int setipxrouter __P((char **)); -static int setipxname __P((char **)); -static int setipxcptimeout __P((char **)); -static int setipxcpterm __P((char **)); -static int setipxcpconf __P((char **)); -static int setipxcpfails __P((char **)); +static int setipxproto(char **); +static int setipxanet(char **); +static int setipxalcl(char **); +static int setipxarmt(char **); +static int setipxnetwork(char **); +static int setipxnode(char **); +static int setipxrouter(char **); +static int setipxname(char **); +static int setipxcptimeout(char **); +static int setipxcpterm(char **); +static int setipxcpconf(char **); +static int setipxcpfails(char **); #endif /* IPX_CHANGE */ #ifdef MSLANMAN -static int setmslanman __P((char **)); +static int setmslanman(char **); #endif -static int number_option __P((char *, u_int32_t *, int)); -static int int_option __P((char *, int *)); -static int readable __P((int fd)); +static int number_option(char *, u_int32_t *, int); +static int int_option(char *, int *); +static int readable(int fd); /* * Valid arguments. @@ -285,7 +285,7 @@ static int readable __P((int fd)); static struct cmd { char *cmd_name; int num_args; - int (*cmd_func) __P((char **)); + int (*cmd_func)(char **); } cmds[] = { {"-all", 0, noopt}, /* Don't request/allow any options (useless) */ {"noaccomp", 0, noaccomp}, /* Disable Address/Control compression */ diff --git a/usr.sbin/pppd/pppd.h b/usr.sbin/pppd/pppd.h index 48e2eb0..a547fb7 100644 --- a/usr.sbin/pppd/pppd.h +++ b/usr.sbin/pppd/pppd.h @@ -145,33 +145,33 @@ extern int ms_lanman; /* Nonzero if use LanMan password instead of NT */ struct protent { u_short protocol; /* PPP protocol number */ /* Initialization procedure */ - void (*init) __P((int unit)); + void (*init)(int unit); /* Process a received packet */ - void (*input) __P((int unit, u_char *pkt, int len)); + void (*input)(int unit, u_char *pkt, int len); /* Process a received protocol-reject */ - void (*protrej) __P((int unit)); + void (*protrej)(int unit); /* Lower layer has come up */ - void (*lowerup) __P((int unit)); + void (*lowerup)(int unit); /* Lower layer has gone down */ - void (*lowerdown) __P((int unit)); + void (*lowerdown)(int unit); /* Open the protocol */ - void (*open) __P((int unit)); + void (*open)(int unit); /* Close the protocol */ - void (*close) __P((int unit, char *reason)); + void (*close)(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)); + int (*printpkt)(u_char *pkt, int len, + void (*printer)(void *, char *, ...), + void *arg); /* Process a received data packet */ - void (*datainput) __P((int unit, u_char *pkt, int len)); + 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)); + void (*check_options)(void); /* Configure interface for demand-dial */ - int (*demand_conf) __P((int unit)); + int (*demand_conf)(int unit); /* Say whether to bring up link for this pkt */ - int (*active_pkt) __P((u_char *pkt, int len)); + int (*active_pkt)(u_char *pkt, int len); }; /* Table of pointers to supported protocols */ @@ -182,155 +182,155 @@ extern struct protent *protocols[]; */ /* Procedures exported from main.c. */ -void detach __P((void)); /* Detach from controlling tty */ -void die __P((int)); /* Cleanup and exit */ -void quit __P((void)); /* like die(1) */ -void novm __P((char *)); /* Say we ran out of memory, and die */ -void timeout __P((void (*func)(void *), void *arg, int t)); +void detach(void); /* Detach from controlling tty */ +void die(int); /* Cleanup and exit */ +void quit(void); /* like die(1) */ +void novm(char *); /* Say we ran out of memory, and die */ +void timeout(void (*func)(void *), void *arg, int t); /* Call func(arg) after t seconds */ -void untimeout __P((void (*func)(void *), void *arg)); +void untimeout(void (*func)(void *), void *arg); /* Cancel call to func(arg) */ -int run_program __P((char *prog, char **args, int must_exist)); +int run_program(char *prog, char **args, int must_exist); /* Run program prog with args in child */ -void demuxprotrej __P((int, int)); +void demuxprotrej(int, int); /* Demultiplex a Protocol-Reject */ -void format_packet __P((u_char *, int, void (*) (void *, char *, ...), - void *)); /* Format a packet in human-readable form */ -void log_packet __P((u_char *, int, char *, int)); +void format_packet(u_char *, int, void (*) (void *, char *, ...), + void *); /* Format a packet in human-readable form */ +void log_packet(u_char *, int, char *, int); /* Format a packet and log it with syslog */ -void print_string __P((char *, int, void (*) (void *, char *, ...), - void *)); /* Format a string for output */ -int fmtmsg __P((char *, int, char *, ...)); /* sprintf++ */ -int vfmtmsg __P((char *, int, char *, va_list)); /* vsprintf++ */ -void script_setenv __P((char *, char *)); /* set script env var */ -void script_unsetenv __P((char *)); /* unset script env var */ +void print_string(char *, int, void (*) (void *, char *, ...), + void *); /* Format a string for output */ +int fmtmsg(char *, int, char *, ...); /* sprintf++ */ +int vfmtmsg(char *, int, char *, va_list); /* vsprintf++ */ +void script_setenv(char *, char *); /* set script env var */ +void script_unsetenv(char *); /* unset script env var */ /* Procedures exported from auth.c */ -void link_required __P((int)); /* we are starting to use the link */ -void link_terminated __P((int)); /* we are finished with the link */ -void link_down __P((int)); /* the LCP layer has left the Opened state */ -void link_established __P((int)); /* the link is up; authenticate now */ -void np_up __P((int, int)); /* a network protocol has come up */ -void np_down __P((int, int)); /* a network protocol has gone down */ -void np_finished __P((int, int)); /* a network protocol no longer needs link */ -void auth_peer_fail __P((int, int)); +void link_required(int); /* we are starting to use the link */ +void link_terminated(int); /* we are finished with the link */ +void link_down(int); /* the LCP layer has left the Opened state */ +void link_established(int); /* the link is up; authenticate now */ +void np_up(int, int); /* a network protocol has come up */ +void np_down(int, int); /* a network protocol has gone down */ +void np_finished(int, int); /* a network protocol no longer needs link */ +void auth_peer_fail(int, int); /* peer failed to authenticate itself */ -void auth_peer_success __P((int, int, char *, int)); +void auth_peer_success(int, int, char *, int); /* peer successfully authenticated itself */ -void auth_withpeer_fail __P((int, int)); +void auth_withpeer_fail(int, int); /* we failed to authenticate ourselves */ -void auth_withpeer_success __P((int, int)); +void auth_withpeer_success(int, int); /* we successfully authenticated ourselves */ -void auth_check_options __P((void)); +void auth_check_options(void); /* check authentication options supplied */ -void auth_reset __P((int)); /* check what secrets we have */ -int check_passwd __P((int, char *, int, char *, int, char **, int *)); +void auth_reset(int); /* check what secrets we have */ +int check_passwd(int, char *, int, char *, int, char **, int *); /* Check peer-supplied username/password */ -int get_secret __P((int, char *, char *, char *, int *, int)); +int get_secret(int, char *, char *, char *, int *, int); /* get "secret" for chap */ -int auth_ip_addr __P((int, u_int32_t)); +int auth_ip_addr(int, u_int32_t); /* check if IP address is authorized */ -int bad_ip_adrs __P((u_int32_t)); +int bad_ip_adrs(u_int32_t); /* check if IP address is unreasonable */ -void check_access __P((FILE *, char *)); +void check_access(FILE *, char *); /* check permissions on secrets file */ /* Procedures exported from demand.c */ -void demand_conf __P((void)); /* config interface(s) for demand-dial */ -void demand_block __P((void)); /* set all NPs to queue up packets */ -void demand_unblock __P((void)); /* set all NPs to pass packets */ -void demand_discard __P((void)); /* set all NPs to discard packets */ -void demand_rexmit __P((int)); /* retransmit saved frames for an NP */ -int loop_chars __P((unsigned char *, int)); /* process chars from loopback */ -int loop_frame __P((unsigned char *, int)); /* process frame from loopback */ +void demand_conf(void); /* config interface(s) for demand-dial */ +void demand_block(void); /* set all NPs to queue up packets */ +void demand_unblock(void); /* set all NPs to pass packets */ +void demand_discard(void); /* set all NPs to discard packets */ +void demand_rexmit(int); /* retransmit saved frames for an NP */ +int loop_chars(unsigned char *, int); /* process chars from loopback */ +int loop_frame(unsigned char *, int); /* process frame from loopback */ /* Procedures exported from sys-*.c */ -void sys_init __P((void)); /* Do system-dependent initialization */ -void sys_cleanup __P((void)); /* Restore system state before exiting */ -void sys_check_options __P((void)); /* Check options specified */ -void sys_close __P((void)); /* Clean up in a child before execing */ -int ppp_available __P((void)); /* Test whether ppp kernel support exists */ -void open_ppp_loopback __P((void)); /* Open loopback for demand-dialling */ -void establish_ppp __P((int)); /* Turn serial port into a ppp interface */ -void restore_loop __P((void)); /* Transfer ppp unit back to loopback */ -void disestablish_ppp __P((int)); /* Restore port to normal operation */ -void clean_check __P((void)); /* Check if line was 8-bit clean */ -void set_up_tty __P((int, int)); /* Set up port's speed, parameters, etc. */ -void restore_tty __P((int)); /* Restore port's original parameters */ -void setdtr __P((int, int)); /* Raise or lower port's DTR line */ -void output __P((int, u_char *, int)); /* Output a PPP packet */ -void wait_input __P((struct timeval *)); +void sys_init(void); /* Do system-dependent initialization */ +void sys_cleanup(void); /* Restore system state before exiting */ +void sys_check_options(void); /* Check options specified */ +void sys_close(void); /* Clean up in a child before execing */ +int ppp_available(void); /* Test whether ppp kernel support exists */ +void open_ppp_loopback(void); /* Open loopback for demand-dialling */ +void establish_ppp(int); /* Turn serial port into a ppp interface */ +void restore_loop(void); /* Transfer ppp unit back to loopback */ +void disestablish_ppp(int); /* Restore port to normal operation */ +void clean_check(void); /* Check if line was 8-bit clean */ +void set_up_tty(int, int); /* Set up port's speed, parameters, etc. */ +void restore_tty(int); /* Restore port's original parameters */ +void setdtr(int, int); /* Raise or lower port's DTR line */ +void output(int, u_char *, int); /* Output a PPP packet */ +void wait_input(struct timeval *); /* Wait for input, with timeout */ -void wait_loop_output __P((struct timeval *)); +void wait_loop_output(struct timeval *); /* Wait for pkt from loopback, with timeout */ -void wait_time __P((struct timeval *)); /* Wait for given length of time */ -int read_packet __P((u_char *)); /* Read PPP packet */ -int get_loop_output __P((void)); /* Read pkts from loopback */ -void ppp_send_config __P((int, int, u_int32_t, int, int)); +void wait_time(struct timeval *); /* Wait for given length of time */ +int read_packet(u_char *); /* Read PPP packet */ +int get_loop_output(void); /* Read pkts from loopback */ +void ppp_send_config(int, int, u_int32_t, int, int); /* Configure i/f transmit parameters */ -void ppp_set_xaccm __P((int, ext_accm)); +void ppp_set_xaccm(int, ext_accm); /* Set extended transmit ACCM */ -void ppp_recv_config __P((int, int, u_int32_t, int, int)); +void ppp_recv_config(int, int, u_int32_t, int, int); /* Configure i/f receive parameters */ -int ccp_test __P((int, u_char *, int, int)); +int ccp_test(int, u_char *, int, int); /* Test support for compression scheme */ -void ccp_flags_set __P((int, int, int)); +void ccp_flags_set(int, int, int); /* Set kernel CCP state */ -int ccp_fatal_error __P((int)); /* Test for fatal decomp error in kernel */ -int get_idle_time __P((int, struct ppp_idle *)); +int ccp_fatal_error(int); /* Test for fatal decomp error in kernel */ +int get_idle_time(int, struct ppp_idle *); /* Find out how long link has been idle */ -int sifvjcomp __P((int, int, int, int)); +int sifvjcomp(int, int, int, int); /* Configure VJ TCP header compression */ -int sifup __P((int)); /* Configure i/f up (for IP) */ -int sifnpmode __P((int u, int proto, enum NPmode mode)); +int sifup(int); /* Configure i/f up (for IP) */ +int sifnpmode(int u, int proto, enum NPmode mode); /* Set mode for handling packets for proto */ -int sifdown __P((int)); /* Configure i/f down (for IP) */ -int sifaddr __P((int, u_int32_t, u_int32_t, u_int32_t)); +int sifdown(int); /* Configure i/f down (for IP) */ +int sifaddr(int, u_int32_t, u_int32_t, u_int32_t); /* Configure IP addresses for i/f */ -int cifaddr __P((int, u_int32_t, u_int32_t)); +int cifaddr(int, u_int32_t, u_int32_t); /* Reset i/f IP addresses */ #ifdef INET6 -int sif6addr __P((int, eui64_t, eui64_t)); +int sif6addr(int, eui64_t, eui64_t); /* Configure IPv6 addresses for i/f */ -int cif6addr __P((int, eui64_t, eui64_t)); +int cif6addr(int, eui64_t, eui64_t); /* Remove an IPv6 address from i/f */ #endif -int sifdefaultroute __P((int, u_int32_t, u_int32_t)); +int sifdefaultroute(int, u_int32_t, u_int32_t); /* Create default route through i/f */ -int cifdefaultroute __P((int, u_int32_t, u_int32_t)); +int cifdefaultroute(int, u_int32_t, u_int32_t); /* Delete default route through i/f */ -int sifproxyarp __P((int, u_int32_t)); +int sifproxyarp(int, u_int32_t); /* Add proxy ARP entry for peer */ -int cifproxyarp __P((int, u_int32_t)); +int cifproxyarp(int, u_int32_t); /* Delete proxy ARP entry for peer */ -u_int32_t GetMask __P((u_int32_t)); /* Get appropriate netmask for address */ -int lock __P((char *)); /* Create lock file for device */ -void unlock __P((void)); /* Delete previously-created lock file */ -int daemon __P((int, int)); /* Detach us from terminal session */ -void logwtmp __P((const char *, const char *, const char *)); +u_int32_t GetMask(u_int32_t); /* Get appropriate netmask for address */ +int lock(char *); /* Create lock file for device */ +void unlock(void); /* Delete previously-created lock file */ +int daemon(int, int); /* Detach us from terminal session */ +void logwtmp(const char *, const char *, const char *); /* Write entry to wtmp file */ -int get_host_seed __P((void)); /* Get host-dependent random number seed */ +int get_host_seed(void); /* Get host-dependent random number seed */ #ifdef PPP_FILTER -int set_filters __P((struct bpf_program *pass, struct bpf_program *active)); +int set_filters(struct bpf_program *pass, struct bpf_program *active); /* Set filter programs in kernel */ #endif /* Procedures exported from options.c */ -int parse_args __P((int argc, char **argv)); +int parse_args(int argc, char **argv); /* Parse options from arguments given */ -void usage __P((void)); /* Print a usage message */ -int options_from_file __P((char *filename, int must_exist, int check_prot, - int privileged)); +void usage(void); /* Print a usage message */ +int options_from_file(char *filename, int must_exist, int check_prot, + int privileged); /* Parse options from an options file */ -int options_from_user __P((void)); /* Parse options from user's .ppprc */ -int options_for_tty __P((void)); /* Parse options from /etc/ppp/options.tty */ -void scan_args __P((int argc, char **argv)); +int options_from_user(void); /* Parse options from user's .ppprc */ +int options_for_tty(void); /* Parse options from /etc/ppp/options.tty */ +void scan_args(int argc, char **argv); /* Look for tty name in command-line args */ -int getword __P((FILE *f, char *word, int *newlinep, char *filename)); +int getword(FILE *f, char *word, int *newlinep, char *filename); /* Read a word from a file */ -void option_error __P((char *fmt, ...)); +void option_error(char *fmt, ...); /* Print an error message about an option */ -int setipaddr __P((char *)); /* set IP addresses */ +int setipaddr(char *); /* set IP addresses */ /* diff --git a/usr.sbin/pppd/sys-bsd.c b/usr.sbin/pppd/sys-bsd.c index ccb13c8..cbde7a4 100644 --- a/usr.sbin/pppd/sys-bsd.c +++ b/usr.sbin/pppd/sys-bsd.c @@ -114,8 +114,8 @@ static u_int32_t default_route_gateway; /* gateway addr for default route */ static u_int32_t proxy_arp_addr; /* remote addr for proxy arp */ /* Prototypes for procedures local to this file. */ -static int dodefaultroute __P((u_int32_t, int)); -static int get_ether_addr __P((u_int32_t, struct sockaddr_dl *)); +static int dodefaultroute(u_int32_t, int); +static int get_ether_addr(u_int32_t, struct sockaddr_dl *); /* diff --git a/usr.sbin/pppd/upap.c b/usr.sbin/pppd/upap.c index 627c7d0..af25a58 100644 --- a/usr.sbin/pppd/upap.c +++ b/usr.sbin/pppd/upap.c @@ -37,13 +37,13 @@ static char rcsid[] = "$FreeBSD$"; /* * Protocol entry points. */ -static void upap_init __P((int)); -static void upap_lowerup __P((int)); -static void upap_lowerdown __P((int)); -static void upap_input __P((int, u_char *, int)); -static void upap_protrej __P((int)); -static int upap_printpkt __P((u_char *, int, - void (*) __P((void *, char *, ...)), void *)); +static void upap_init(int); +static void upap_lowerup(int); +static void upap_lowerdown(int); +static void upap_input(int, u_char *, int); +static void upap_protrej(int); +static int upap_printpkt(u_char *, int, + void (*)(void *, char *, ...), void *); struct protent pap_protent = { PPP_PAP, @@ -65,13 +65,13 @@ struct protent pap_protent = { upap_state upap[NUM_PPP]; /* UPAP state; one for each unit */ -static void upap_timeout __P((void *)); -static void upap_reqtimeout __P((void *)); -static void upap_rauthreq __P((upap_state *, u_char *, int, int)); -static void upap_rauthack __P((upap_state *, u_char *, int, int)); -static void upap_rauthnak __P((upap_state *, u_char *, int, int)); -static void upap_sauthreq __P((upap_state *)); -static void upap_sresp __P((upap_state *, int, int, char *, int)); +static void upap_timeout(void *); +static void upap_reqtimeout(void *); +static void upap_rauthreq(upap_state *, u_char *, int, int); +static void upap_rauthack(upap_state *, u_char *, int, int); +static void upap_rauthnak(upap_state *, u_char *, int, int); +static void upap_sauthreq(upap_state *); +static void upap_sresp(upap_state *, int, int, char *, int); /* @@ -551,7 +551,7 @@ static int upap_printpkt(p, plen, printer, arg) u_char *p; int plen; - void (*printer) __P((void *, char *, ...)); + void (*printer)(void *, char *, ...); void *arg; { int code, id, len; diff --git a/usr.sbin/pppd/upap.h b/usr.sbin/pppd/upap.h index 2cfd86c..82ce604 100644 --- a/usr.sbin/pppd/upap.h +++ b/usr.sbin/pppd/upap.h @@ -81,7 +81,7 @@ typedef struct upap_state { extern upap_state upap[]; -void upap_authwithpeer __P((int, char *, char *)); -void upap_authpeer __P((int)); +void upap_authwithpeer(int, char *, char *); +void upap_authpeer(int); extern struct protent pap_protent; |