mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
Eliminate __P().
This commit is contained in:
@@ -106,25 +106,25 @@ static int passwd_from_file;
|
||||
static bool default_auth;
|
||||
|
||||
/* Hook for a link status */
|
||||
void (*auth_linkup_hook)__P((void)) = NULL;
|
||||
void (*auth_linkdown_hook)__P((void)) = NULL;
|
||||
void (*auth_linkup_hook)(void) = NULL;
|
||||
void (*auth_linkdown_hook)(void) = NULL;
|
||||
|
||||
/* Hook to enable a plugin to control the idle time limit */
|
||||
int (*idle_time_hook) __P((struct ppp_idle *)) = NULL;
|
||||
int (*idle_time_hook)(struct ppp_idle *) = NULL;
|
||||
|
||||
/* Hook for a plugin to say whether we can possibly authenticate any peer */
|
||||
int (*pap_check_hook) __P((void)) = NULL;
|
||||
int (*pap_check_hook)(void) = NULL;
|
||||
|
||||
/* Hook for a plugin to check the PAP user and password */
|
||||
int (*pap_auth_hook) __P((char *user, char *passwd/*, char **msgp,
|
||||
int (*pap_auth_hook)(char *user, char *passwd/*, char **msgp,
|
||||
struct wordlist **paddrs,
|
||||
struct wordlist **popts*/)) = NULL;
|
||||
struct wordlist **popts*/) = NULL;
|
||||
|
||||
/* Hook for a plugin to know about the PAP user logout */
|
||||
void (*pap_logout_hook) __P((void)) = NULL;
|
||||
void (*pap_logout_hook)(void) = NULL;
|
||||
|
||||
/* Hook for a plugin to get the PAP password for authenticating us */
|
||||
int (*pap_passwd_hook) __P((char *user, char *passwd)) = NULL;
|
||||
int (*pap_passwd_hook)(char *user, char *passwd) = NULL;
|
||||
|
||||
/*
|
||||
* This is used to ensure that we don't start an auth-up/down
|
||||
@@ -157,23 +157,23 @@ char remote_name[MAXNAMELEN]; /* Peer's name for authentication */
|
||||
#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 null_login __P((int));
|
||||
static int get_pap_passwd __P((char *));
|
||||
static int have_pap_secret __P((int *));
|
||||
static int have_chap_secret __P((char *, char *, int, int *));
|
||||
static void network_phase(int);
|
||||
static void check_idle(void *);
|
||||
static void connect_time_expired(void *);
|
||||
static int null_login(int);
|
||||
static int get_pap_passwd(char *);
|
||||
static int have_pap_secret(int *);
|
||||
static int have_chap_secret(char *, char *, int, int *);
|
||||
#if 0
|
||||
static int ip_addr_check __P((u_int32_t, struct permitted_ip *));
|
||||
static int ip_addr_check(u_int32_t, struct permitted_ip *);
|
||||
#endif
|
||||
static void free_wordlist __P((struct wordlist *));
|
||||
static void auth_script __P((enum script_state s));
|
||||
static void set_allowed_addrs __P((int, struct wordlist *, struct wordlist *));
|
||||
static void free_wordlist(struct wordlist *);
|
||||
static void auth_script(enum script_state s);
|
||||
static void set_allowed_addrs(int, struct wordlist *, struct wordlist *);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char rcsid[] = RCSID;
|
||||
/*
|
||||
* Options.
|
||||
*/
|
||||
static int setcbcp __P((char **));
|
||||
static int setcbcp(char **);
|
||||
|
||||
static option_t cbcp_option_list[] = {
|
||||
{ "callback", o_special, setcbcp,
|
||||
@@ -46,14 +46,14 @@ static option_t cbcp_option_list[] = {
|
||||
/*
|
||||
* 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,
|
||||
@@ -79,11 +79,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);
|
||||
|
||||
/* option processing */
|
||||
static int
|
||||
@@ -211,7 +211,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;
|
||||
|
||||
@@ -40,8 +40,8 @@ static const char rcsid[] = RCSID;
|
||||
/*
|
||||
* Command-line options.
|
||||
*/
|
||||
static int setbsdcomp __P((char **));
|
||||
static int setdeflate __P((char **));
|
||||
static int setbsdcomp(char **);
|
||||
static int setdeflate(char **);
|
||||
|
||||
static option_t ccp_option_list[] = {
|
||||
{ "noccp", o_bool, &ccp_protent.enabled_flag,
|
||||
@@ -82,17 +82,17 @@ static option_t ccp_option_list[] = {
|
||||
/*
|
||||
* 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,
|
||||
@@ -123,18 +123,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,
|
||||
@@ -1068,7 +1068,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;
|
||||
|
||||
@@ -74,13 +74,13 @@ static option_t chap_option_list[] = {
|
||||
/*
|
||||
* 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,
|
||||
@@ -104,17 +104,17 @@ 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 *, u_char, int));
|
||||
static void ChapReceiveFailure __P((chap_state *, u_char *, u_char, 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 *));
|
||||
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 *, u_char, int);
|
||||
static void ChapReceiveFailure(chap_state *, u_char *, u_char, int);
|
||||
static void ChapSendStatus(chap_state *, int);
|
||||
static void ChapSendChallenge(chap_state *);
|
||||
static void ChapSendResponse(chap_state *);
|
||||
static void ChapGenChallenge(chap_state *);
|
||||
|
||||
/*
|
||||
* ChapInit - Initialize a CHAP unit.
|
||||
@@ -803,7 +803,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;
|
||||
|
||||
@@ -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
|
||||
|
||||
#ifdef MSLANMAN
|
||||
|
||||
@@ -119,17 +119,14 @@ char temp2[STR_LEN];
|
||||
#define SIGTYPE void
|
||||
#endif
|
||||
|
||||
#undef __P
|
||||
#undef __V
|
||||
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#define __V(x) x
|
||||
#define __P(x) x
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#define __V(x) (va_alist) va_dcl
|
||||
#define __P(x) ()
|
||||
#define const
|
||||
#endif
|
||||
|
||||
@@ -187,20 +184,20 @@ int clear_report_next = 0;
|
||||
|
||||
int say_next = 0, hup_next = 0;
|
||||
|
||||
void *dup_mem __P((void *b, size_t c));
|
||||
void *copy_of __P((char *s));
|
||||
void break_sequence __P((void));
|
||||
static int get_string __P((register char *string));
|
||||
static int put_string __P((register char *s));
|
||||
static int write_char __P((int c));
|
||||
static int put_char __P((int c));
|
||||
static int get_char __P((void));
|
||||
void chat_send __P((register char *s));
|
||||
/* static char *character __P((int c)); */
|
||||
void chat_expect __P((register char *s));
|
||||
static char *clean __P((register char *s, int sending));
|
||||
char *expect_strtok __P((char *, char *));
|
||||
int chatmain __P((int, int, char *));
|
||||
void *dup_mem(void *b, size_t c);
|
||||
void *copy_of(char *s);
|
||||
void break_sequence(void);
|
||||
static int get_string(register char *string);
|
||||
static int put_string(register char *s);
|
||||
static int write_char(int c);
|
||||
static int put_char(int c);
|
||||
static int get_char(void);
|
||||
void chat_send(register char *s);
|
||||
/* static char *character(int c); */
|
||||
void chat_expect(register char *s);
|
||||
static char *clean(register char *s, int sending);
|
||||
char *expect_strtok(char *, char *);
|
||||
int chatmain(int, int, char *);
|
||||
|
||||
|
||||
void *dup_mem(b, c)
|
||||
|
||||
@@ -61,7 +61,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.
|
||||
|
||||
@@ -34,14 +34,14 @@
|
||||
|
||||
static const char rcsid[] = RCSID;
|
||||
|
||||
static void fsm_timeout __P((void *));
|
||||
static void fsm_rconfreq __P((fsm *, u_char, 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 *, u_char, 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)
|
||||
|
||||
@@ -496,7 +496,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;
|
||||
|
||||
if (id != f->reqid || f->seen_ack) /* Expected id? */
|
||||
|
||||
@@ -51,10 +51,10 @@ ipcp_options ipcp_hisoptions[NUM_PPP]; /* Options that we ack'd */
|
||||
bool disable_defaultip = 0; /* Don't use hostname for default IP adrs */
|
||||
|
||||
/* Hook for a plugin to know when IP protocol has come up */
|
||||
void (*ip_up_hook) __P((void)) = NULL;
|
||||
void (*ip_up_hook)(void) = NULL;
|
||||
|
||||
/* Hook for a plugin to know when IP protocol has come down */
|
||||
void (*ip_down_hook) __P((void)) = NULL;
|
||||
void (*ip_down_hook)(void) = NULL;
|
||||
|
||||
/* local vars */
|
||||
static int default_route_set[NUM_PPP]; /* Have set up a default route */
|
||||
@@ -65,16 +65,16 @@ static int ipcp_is_up; /* have called np_up() */
|
||||
/*
|
||||
* 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_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_finished(fsm *); /* Don't need lower layer */
|
||||
|
||||
fsm ipcp_fsm[NUM_PPP]; /* IPCP fsm structure */
|
||||
|
||||
@@ -99,9 +99,9 @@ static fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */
|
||||
/*
|
||||
* Command-line options.
|
||||
*/
|
||||
static int setvjslots __P((char **));
|
||||
static int setdnsaddr __P((char **));
|
||||
static int setwinsaddr __P((char **));
|
||||
static int setvjslots(char **);
|
||||
static int setdnsaddr(char **);
|
||||
static int setwinsaddr(char **);
|
||||
|
||||
static option_t ipcp_option_list[] = {
|
||||
{ "noip", o_bool, &ipcp_protent.enabled_flag,
|
||||
@@ -164,19 +164,19 @@ static option_t ipcp_option_list[] = {
|
||||
/*
|
||||
* 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 create_resolv __P((u_int32_t, u_int32_t));
|
||||
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);
|
||||
static void create_resolv(u_int32_t, u_int32_t);
|
||||
|
||||
struct protent ipcp_protent = {
|
||||
PPP_IPCP,
|
||||
@@ -198,7 +198,7 @@ struct protent ipcp_protent = {
|
||||
ip_active_pkt
|
||||
};
|
||||
|
||||
static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t));
|
||||
static void ipcp_clear_addrs(int, u_int32_t, u_int32_t);
|
||||
|
||||
/*
|
||||
* Lengths of configuration options.
|
||||
@@ -1604,7 +1604,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;
|
||||
|
||||
@@ -42,7 +42,7 @@ static int lcp_echo_interval = 0; /* Interval between LCP echo-requests */
|
||||
static int lcp_echo_fails = 0; /* Tolerance to unanswered echo-requests */
|
||||
static bool lax_recv = 0; /* accept control chars in asyncmap */
|
||||
|
||||
static int setescape __P((char **));
|
||||
static int setescape(char **);
|
||||
|
||||
static option_t lcp_option_list[] = {
|
||||
/* LCP options */
|
||||
@@ -127,31 +127,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 */
|
||||
@@ -176,11 +176,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,
|
||||
@@ -1631,7 +1631,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;
|
||||
|
||||
@@ -53,10 +53,6 @@
|
||||
|
||||
#include <net/ppp-comp.h>
|
||||
|
||||
#if defined(ultrix) || defined(NeXT)
|
||||
char *strdup __P((char *));
|
||||
#endif
|
||||
|
||||
static const char rcsid[] = RCSID;
|
||||
|
||||
/*
|
||||
@@ -126,30 +122,30 @@ bool log_to_file; /* log_to_fd is a file opened by us */
|
||||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
static int setdevname __P((char *));
|
||||
static int setipaddr __P((char *));
|
||||
static int setspeed __P((char *));
|
||||
static int noopt __P((char **));
|
||||
static int setdomain __P((char **));
|
||||
static int setnetmask __P((char **));
|
||||
static int setxonxoff __P((char **));
|
||||
static int readfile __P((char **));
|
||||
static int callfile __P((char **));
|
||||
static void usage __P((void));
|
||||
static int setlogfile __P((char **));
|
||||
static int setdevname(char *);
|
||||
static int setipaddr(char *);
|
||||
static int setspeed(char *);
|
||||
static int noopt(char **);
|
||||
static int setdomain(char **);
|
||||
static int setnetmask(char **);
|
||||
static int setxonxoff(char **);
|
||||
static int readfile(char **);
|
||||
static int callfile(char **);
|
||||
static void usage(void);
|
||||
static int setlogfile(char **);
|
||||
#ifdef PLUGIN
|
||||
static int loadplugin __P((char **));
|
||||
static int loadplugin(char **);
|
||||
#endif
|
||||
|
||||
#ifdef PPP_FILTER
|
||||
static int setpassfilter __P((char **));
|
||||
static int setactivefilter __P((char **));
|
||||
static int setpassfilter(char **);
|
||||
static int setactivefilter(char **);
|
||||
#endif
|
||||
|
||||
static option_t *find_option __P((char *name));
|
||||
static int process_option __P((option_t *, char **));
|
||||
static int n_arguments __P((option_t *));
|
||||
static int number_option __P((char *, u_int32_t *, int));
|
||||
static option_t *find_option(char *name);
|
||||
static int process_option(option_t *, char **);
|
||||
static int n_arguments(option_t *);
|
||||
static int number_option(char *, u_int32_t *, int);
|
||||
|
||||
/*
|
||||
* Structure to store extra lists of options.
|
||||
@@ -619,7 +615,7 @@ process_option(opt, argv)
|
||||
u_int32_t v;
|
||||
int iv, a;
|
||||
char *sv;
|
||||
int (*parser) __P((char **));
|
||||
int (*parser)(char **);
|
||||
|
||||
if ((opt->flags & OPT_PREPASS) == 0 && prepass)
|
||||
return 1;
|
||||
@@ -725,7 +721,7 @@ process_option(opt, argv)
|
||||
|
||||
case o_special_noarg:
|
||||
case o_special:
|
||||
parser = (int (*) __P((char **))) opt->addr;
|
||||
parser = (int (*)(char **)) opt->addr;
|
||||
if (!(*parser)(argv))
|
||||
return 0;
|
||||
break;
|
||||
@@ -1502,7 +1498,7 @@ loadplugin(argv)
|
||||
char *arg = *argv;
|
||||
void *handle;
|
||||
const char *err;
|
||||
void (*init) __P((void));
|
||||
void (*init)(void);
|
||||
|
||||
handle = dlopen(arg, RTLD_GLOBAL | RTLD_NOW);
|
||||
if (handle == 0) {
|
||||
|
||||
@@ -93,8 +93,8 @@ int doing_callback; /* != 0 if we are doing callback */
|
||||
char *callback_script; /* script for doing callback */
|
||||
dialerfp pppd_dialer;
|
||||
|
||||
int (*holdoff_hook) __P((void)) = NULL;
|
||||
int (*new_phase_hook) __P((int)) = NULL;
|
||||
int (*holdoff_hook)(void) = NULL;
|
||||
int (*new_phase_hook)(int) = NULL;
|
||||
|
||||
static int fd_ppp = -1; /* fd for talking PPP */
|
||||
static int pty_master; /* fd for master side of pty */
|
||||
@@ -121,17 +121,17 @@ int link_stats_valid;
|
||||
|
||||
/* Prototypes for procedures local to this file. */
|
||||
|
||||
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 holdoff_end __P((void *));
|
||||
static int device_script __P((int, int, char *));
|
||||
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 holdoff_end(void *);
|
||||
static int device_script(int, int, char *);
|
||||
|
||||
extern char *ttyname __P((int));
|
||||
extern char *getlogin __P((void));
|
||||
int pppdmain __P((int, char *[]));
|
||||
extern char *ttyname(int);
|
||||
extern char *getlogin(void);
|
||||
int pppdmain(int, char *[]);
|
||||
|
||||
/*
|
||||
* PPP Data Link Layer "protocol" table.
|
||||
@@ -738,7 +738,7 @@ update_link_stats(u)
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -753,7 +753,7 @@ static struct timeval timenow; /* Current time */
|
||||
*/
|
||||
void
|
||||
ppptimeout(func, arg, time)
|
||||
void (*func) __P((void *));
|
||||
void (*func)(void *);
|
||||
void *arg;
|
||||
int time;
|
||||
{
|
||||
@@ -790,7 +790,7 @@ ppptimeout(func, arg, time)
|
||||
*/
|
||||
void
|
||||
pppuntimeout(func, arg)
|
||||
void (*func) __P((void *));
|
||||
void (*func)(void *);
|
||||
void *arg;
|
||||
{
|
||||
struct callout **copp, *freep;
|
||||
|
||||
@@ -91,8 +91,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 *);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -53,13 +53,13 @@ static option_t pap_option_list[] = {
|
||||
/*
|
||||
* 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,
|
||||
@@ -83,13 +83,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 *, u_char, u_char, 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 *, u_char, u_char, char *, int);
|
||||
|
||||
|
||||
/*
|
||||
@@ -568,7 +568,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;
|
||||
|
||||
@@ -46,15 +46,11 @@
|
||||
|
||||
static const char rcsid[] = RCSID;
|
||||
|
||||
#if defined(SUNOS4)
|
||||
extern char *strerror();
|
||||
#endif
|
||||
|
||||
static void pr_log __P((void *, char *, ...));
|
||||
static void logit __P((int, char *, va_list));
|
||||
static void vslp_printer __P((void *, char *, ...));
|
||||
static void format_packet __P((u_char *, int, void (*) (void *, char *, ...),
|
||||
void *));
|
||||
static void pr_log(void *, char *, ...);
|
||||
static void logit(int, char *, va_list);
|
||||
static void vslp_printer(void *, char *, ...);
|
||||
static void format_packet(u_char *, int, void (*) (void *, char *, ...),
|
||||
void *);
|
||||
|
||||
struct buffer_info {
|
||||
char *ptr;
|
||||
@@ -394,7 +390,7 @@ static 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;
|
||||
@@ -471,7 +467,7 @@ void
|
||||
print_string(p_arg, len, printer, arg)
|
||||
void *p_arg;
|
||||
int len;
|
||||
void (*printer) __P((void *, char *, ...));
|
||||
void (*printer)(void *, char *, ...);
|
||||
void *arg;
|
||||
{
|
||||
int c;
|
||||
|
||||
Reference in New Issue
Block a user