Stop using old-style function-definitions.

This commit is contained in:
Ralf Corsepius
2008-08-26 10:24:22 +00:00
parent 8e92db9f73
commit 62c37537bd
14 changed files with 705 additions and 705 deletions

View File

@@ -236,8 +236,8 @@ option_t auth_options[] = {
* Do what's necessary to bring the physical layer up. * Do what's necessary to bring the physical layer up.
*/ */
void void
link_required(unit) link_required(
int unit; int unit )
{ {
} }
@@ -246,8 +246,8 @@ link_required(unit)
* physical layer down. * physical layer down.
*/ */
void void
link_terminated(unit) link_terminated(
int unit; int unit)
{ {
if (pppd_phase == PHASE_DEAD) if (pppd_phase == PHASE_DEAD)
return; return;
@@ -262,8 +262,8 @@ link_terminated(unit)
* LCP has gone down; it will either die or try to re-establish. * LCP has gone down; it will either die or try to re-establish.
*/ */
void void
link_down(unit) link_down(
int unit; int unit)
{ {
int i; int i;
struct protent *protp; struct protent *protp;
@@ -292,8 +292,8 @@ link_down(unit)
* Proceed to the Dead, Authenticate or Network phase as appropriate. * Proceed to the Dead, Authenticate or Network phase as appropriate.
*/ */
void void
link_established(unit) link_established(
int unit; int unit )
{ {
int auth; int auth;
lcp_options *wo = &lcp_wantoptions[unit]; lcp_options *wo = &lcp_wantoptions[unit];
@@ -359,8 +359,8 @@ link_established(unit)
* Proceed to the network phase. * Proceed to the network phase.
*/ */
static void static void
network_phase(unit) network_phase(
int unit; int unit )
{ {
#ifdef CBCP_SUPPORT #ifdef CBCP_SUPPORT
lcp_options *go = &lcp_gotoptions[unit]; lcp_options *go = &lcp_gotoptions[unit];
@@ -395,7 +395,7 @@ network_phase(unit)
} }
void void
start_networks() start_networks(void)
{ {
int i; int i;
struct protent *protp; struct protent *protp;
@@ -418,8 +418,9 @@ start_networks()
* The peer has failed to authenticate himself using `protocol'. * The peer has failed to authenticate himself using `protocol'.
*/ */
void void
auth_peer_fail(unit, protocol) auth_peer_fail(
int unit, protocol; int unit,
int protocol)
{ {
/* /*
* Authentication failure: take the link down * Authentication failure: take the link down
@@ -432,10 +433,11 @@ auth_peer_fail(unit, protocol)
* The peer has been successfully authenticated using `protocol'. * The peer has been successfully authenticated using `protocol'.
*/ */
void void
auth_peer_success(unit, protocol, name, namelen) auth_peer_success(
int unit, protocol; int unit,
char *name; int protocol,
int namelen; char *name,
int namelen)
{ {
int bit; int bit;
@@ -471,8 +473,9 @@ auth_peer_success(unit, protocol, name, namelen)
* We have failed to authenticate ourselves to the peer using `protocol'. * We have failed to authenticate ourselves to the peer using `protocol'.
*/ */
void void
auth_withpeer_fail(unit, protocol) auth_withpeer_fail(
int unit, protocol; int unit,
int protocol )
{ {
if (passwd_from_file) if (passwd_from_file)
BZERO(passwd, MAXSECRETLEN); BZERO(passwd, MAXSECRETLEN);
@@ -490,8 +493,9 @@ auth_withpeer_fail(unit, protocol)
* We have successfully authenticated ourselves with the peer using `protocol'. * We have successfully authenticated ourselves with the peer using `protocol'.
*/ */
void void
auth_withpeer_success(unit, protocol) auth_withpeer_success(
int unit, protocol; int unit,
int protocol )
{ {
int bit; int bit;
@@ -522,8 +526,9 @@ auth_withpeer_success(unit, protocol)
* np_up - a network protocol has come up. * np_up - a network protocol has come up.
*/ */
void void
np_up(unit, proto) np_up(
int unit, proto; int unit,
int proto )
{ {
int tlim; int tlim;
@@ -556,8 +561,9 @@ np_up(unit, proto)
* np_down - a network protocol has gone down. * np_down - a network protocol has gone down.
*/ */
void void
np_down(unit, proto) np_down(
int unit, proto; int unit,
int proto)
{ {
if (--num_np_up == 0) { if (--num_np_up == 0) {
UNTIMEOUT(check_idle, NULL); UNTIMEOUT(check_idle, NULL);
@@ -569,8 +575,9 @@ np_down(unit, proto)
* np_finished - a network protocol has finished using the link. * np_finished - a network protocol has finished using the link.
*/ */
void void
np_finished(unit, proto) np_finished(
int unit, proto; int unit,
int proto )
{ {
if (--num_np_open <= 0) { if (--num_np_open <= 0) {
/* no further use for the link: shut up shop. */ /* no further use for the link: shut up shop. */
@@ -583,8 +590,8 @@ np_finished(unit, proto)
* enough that we can shut it down. * enough that we can shut it down.
*/ */
static void static void
check_idle(arg) check_idle(
void *arg; void *arg )
{ {
struct ppp_idle idle; struct ppp_idle idle;
time_t itime; time_t itime;
@@ -613,8 +620,8 @@ check_idle(arg)
* connect_time_expired - log a message and close the connection. * connect_time_expired - log a message and close the connection.
*/ */
static void static void
connect_time_expired(arg) connect_time_expired(
void *arg; void *arg)
{ {
info("Connect time expired"); info("Connect time expired");
lcp_close(0, "Connect time expired"); /* Close connection */ lcp_close(0, "Connect time expired"); /* Close connection */
@@ -625,7 +632,7 @@ connect_time_expired(arg)
* auth_check_options - called to check authentication options. * auth_check_options - called to check authentication options.
*/ */
int int
auth_check_options() auth_check_options(void)
{ {
lcp_options *wo = &lcp_wantoptions[0]; lcp_options *wo = &lcp_wantoptions[0];
int status = 1; int status = 1;
@@ -700,8 +707,8 @@ auth_check_options()
* to use for authenticating ourselves and/or the peer. * to use for authenticating ourselves and/or the peer.
*/ */
void void
auth_reset(unit) auth_reset(
int unit; int unit)
{ {
lcp_options *go = &lcp_gotoptions[unit]; lcp_options *go = &lcp_gotoptions[unit];
lcp_options *ao = &lcp_allowoptions[0]; lcp_options *ao = &lcp_allowoptions[0];
@@ -733,13 +740,13 @@ auth_reset(unit)
* In either case, msg points to an appropriate message. * In either case, msg points to an appropriate message.
*/ */
int int
check_passwd(unit, auser, userlen, apasswd, passwdlen, msg) check_passwd(
int unit; int unit,
char *auser; char *auser,
int userlen; int userlen,
char *apasswd; char *apasswd,
int passwdlen; int passwdlen,
char **msg; char **msg)
{ {
char passwd[64], user[64]; char passwd[64], user[64];
@@ -772,8 +779,8 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg)
* and return 1. * and return 1.
*/ */
static int static int
null_login(unit) null_login(
int unit; int unit)
{ {
return 0; return 0;
} }
@@ -786,8 +793,8 @@ null_login(unit)
* Assumes passwd points to MAXSECRETLEN bytes of space (if non-null). * Assumes passwd points to MAXSECRETLEN bytes of space (if non-null).
*/ */
static int static int
get_pap_passwd(passwd) get_pap_passwd(
char *passwd; char *passwd)
{ {
int ret = (int)0; int ret = (int)0;
@@ -807,8 +814,8 @@ get_pap_passwd(passwd)
* secrets that we could possibly use for authenticating the peer. * secrets that we could possibly use for authenticating the peer.
*/ */
static int static int
have_pap_secret(lacks_ipp) have_pap_secret(
int *lacks_ipp; int *lacks_ipp)
{ {
return 1; return 1;
@@ -833,11 +840,11 @@ have_pap_secret(lacks_ipp)
* know the identity yet. * know the identity yet.
*/ */
static int static int
have_chap_secret(client, server, need_ip, lacks_ipp) have_chap_secret(
char *client; char *client,
char *server; char *server,
int need_ip; int need_ip,
int *lacks_ipp; int *lacks_ipp)
{ {
return 0; return 0;
} }
@@ -849,13 +856,13 @@ have_chap_secret(client, server, need_ip, lacks_ipp)
* (We could be either client or server). * (We could be either client or server).
*/ */
int int
get_secret(unit, client, server, secret, secret_len, am_server) get_secret(
int unit; int unit,
char *client; char *client,
char *server; char *server,
unsigned char *secret; unsigned char *secret,
int *secret_len; int *secret_len,
int am_server; int am_server)
{ {
int len; int len;
char secbuf[MAXWORDLEN]; char secbuf[MAXWORDLEN];
@@ -884,10 +891,10 @@ get_secret(unit, client, server, secret, secret_len, am_server)
* and leaves the following words in extra_options. * and leaves the following words in extra_options.
*/ */
static void static void
set_allowed_addrs(unit, addrs, opts) set_allowed_addrs(
int unit; int unit,
struct wordlist *addrs; struct wordlist *addrs,
struct wordlist *opts; struct wordlist *opts)
{ {
int n; int n;
struct wordlist *ap, **pap; struct wordlist *ap, **pap;
@@ -1028,9 +1035,9 @@ set_allowed_addrs(unit, addrs, opts)
* a given IP address. Returns 1 if authorized, 0 otherwise. * a given IP address. Returns 1 if authorized, 0 otherwise.
*/ */
int int
auth_ip_addr(unit, addr) auth_ip_addr(
int unit; int unit,
uint32_t addr; uint32_t addr)
{ {
#if 0 #if 0
int ok; int ok;
@@ -1056,9 +1063,9 @@ auth_ip_addr(unit, addr)
#if 0 #if 0
static int static int
ip_addr_check(addr, addrs) ip_addr_check(
uint32_t addr; uint32_t addr,
struct permitted_ip *addrs; struct permitted_ip *addrs)
{ {
for (; ; ++addrs) for (; ; ++addrs)
if ((addr & addrs->mask) == addrs->base) if ((addr & addrs->mask) == addrs->base)
@@ -1072,8 +1079,8 @@ ip_addr_check(addr, addrs)
* addr is in network byte order. * addr is in network byte order.
*/ */
int int
bad_ip_adrs(addr) bad_ip_adrs(
uint32_t addr; uint32_t addr)
{ {
addr = ntohl(addr); addr = ntohl(addr);
return (addr >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET return (addr >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET
@@ -1084,8 +1091,8 @@ bad_ip_adrs(addr)
* free_wordlist - release memory allocated for a wordlist. * free_wordlist - release memory allocated for a wordlist.
*/ */
static void static void
free_wordlist(wp) free_wordlist(
struct wordlist *wp; struct wordlist *wp)
{ {
struct wordlist *next; struct wordlist *next;
@@ -1101,8 +1108,8 @@ free_wordlist(wp)
* interface-name peer-name real-user tty speed * interface-name peer-name real-user tty speed
*/ */
static void static void
auth_script(s) auth_script(
enum script_state s; enum script_state s)
{ {
switch (s) { switch (s) {
case s_up: case s_up:

View File

@@ -175,8 +175,8 @@ static int all_rejected[NUM_PPP]; /* we rejected all peer's options */
* Option parsing. * Option parsing.
*/ */
static int static int
setbsdcomp(argv) setbsdcomp(
char **argv; char **argv)
{ {
int rbits, abits; int rbits, abits;
char *str, *endp; char *str, *endp;
@@ -211,8 +211,8 @@ setbsdcomp(argv)
} }
static int static int
setdeflate(argv) setdeflate(
char **argv; char **argv)
{ {
int rbits, abits; int rbits, abits;
char *str, *endp; char *str, *endp;
@@ -252,8 +252,8 @@ setdeflate(argv)
* ccp_init - initialize CCP. * ccp_init - initialize CCP.
*/ */
static void static void
ccp_init(unit) ccp_init(
int unit; int unit)
{ {
fsm *f = &ccp_fsm[unit]; fsm *f = &ccp_fsm[unit];
@@ -288,8 +288,8 @@ ccp_init(unit)
* ccp_open - CCP is allowed to come up. * ccp_open - CCP is allowed to come up.
*/ */
static void static void
ccp_open(unit) ccp_open(
int unit; int unit)
{ {
fsm *f = &ccp_fsm[unit]; fsm *f = &ccp_fsm[unit];
@@ -311,9 +311,9 @@ ccp_open(unit)
* ccp_close - Terminate CCP. * ccp_close - Terminate CCP.
*/ */
static void static void
ccp_close(unit, reason) ccp_close(
int unit; int unit,
char *reason; char *reason)
{ {
ccp_flags_set(unit, 0, 0); ccp_flags_set(unit, 0, 0);
fsm_close(&ccp_fsm[unit], reason); fsm_close(&ccp_fsm[unit], reason);
@@ -323,8 +323,8 @@ ccp_close(unit, reason)
* ccp_lowerup - we may now transmit CCP packets. * ccp_lowerup - we may now transmit CCP packets.
*/ */
static void static void
ccp_lowerup(unit) ccp_lowerup(
int unit; int unit)
{ {
fsm_lowerup(&ccp_fsm[unit]); fsm_lowerup(&ccp_fsm[unit]);
} }
@@ -333,8 +333,8 @@ ccp_lowerup(unit)
* ccp_lowerdown - we may not transmit CCP packets. * ccp_lowerdown - we may not transmit CCP packets.
*/ */
static void static void
ccp_lowerdown(unit) ccp_lowerdown(
int unit; int unit)
{ {
fsm_lowerdown(&ccp_fsm[unit]); fsm_lowerdown(&ccp_fsm[unit]);
} }
@@ -343,10 +343,10 @@ ccp_lowerdown(unit)
* ccp_input - process a received CCP packet. * ccp_input - process a received CCP packet.
*/ */
static void static void
ccp_input(unit, p, len) ccp_input(
int unit; int unit,
u_char *p; u_char *p,
int len; int len)
{ {
fsm *f = &ccp_fsm[unit]; fsm *f = &ccp_fsm[unit];
int oldstate; int oldstate;
@@ -372,11 +372,11 @@ ccp_input(unit, p, len)
* Handle a CCP-specific code. * Handle a CCP-specific code.
*/ */
static int static int
ccp_extcode(f, code, id, p, len) ccp_extcode(
fsm *f; fsm *f,
int code, id; int code, int id,
u_char *p; u_char *p,
int len; int len)
{ {
switch (code) { switch (code) {
case CCP_RESETREQ: case CCP_RESETREQ:
@@ -405,8 +405,8 @@ ccp_extcode(f, code, id, p, len)
* ccp_protrej - peer doesn't talk CCP. * ccp_protrej - peer doesn't talk CCP.
*/ */
static void static void
ccp_protrej(unit) ccp_protrej(
int unit; int unit)
{ {
ccp_flags_set(unit, 0, 0); ccp_flags_set(unit, 0, 0);
fsm_lowerdown(&ccp_fsm[unit]); fsm_lowerdown(&ccp_fsm[unit]);
@@ -416,8 +416,8 @@ ccp_protrej(unit)
* ccp_resetci - initialize at start of negotiation. * ccp_resetci - initialize at start of negotiation.
*/ */
static void static void
ccp_resetci(f) ccp_resetci(
fsm *f; fsm *f)
{ {
ccp_options *go = &ccp_gotoptions[f->unit]; ccp_options *go = &ccp_gotoptions[f->unit];
u_char opt_buf[16]; u_char opt_buf[16];
@@ -474,8 +474,8 @@ ccp_resetci(f)
* ccp_cilen - Return total length of our configuration info. * ccp_cilen - Return total length of our configuration info.
*/ */
static int static int
ccp_cilen(f) ccp_cilen(
fsm *f; fsm *f)
{ {
ccp_options *go = &ccp_gotoptions[f->unit]; ccp_options *go = &ccp_gotoptions[f->unit];
@@ -489,10 +489,10 @@ ccp_cilen(f)
* ccp_addci - put our requests in a packet. * ccp_addci - put our requests in a packet.
*/ */
static void static void
ccp_addci(f, p, lenp) ccp_addci(
fsm *f; fsm *f,
u_char *p; u_char *p,
int *lenp; int *lenp)
{ {
int res; int res;
ccp_options *go = &ccp_gotoptions[f->unit]; ccp_options *go = &ccp_gotoptions[f->unit];
@@ -581,10 +581,10 @@ ccp_addci(f, p, lenp)
* 1 iff the packet was OK. * 1 iff the packet was OK.
*/ */
static int static int
ccp_ackci(f, p, len) ccp_ackci(
fsm *f; fsm *f,
u_char *p; u_char *p,
int len; int len)
{ {
ccp_options *go = &ccp_gotoptions[f->unit]; ccp_options *go = &ccp_gotoptions[f->unit];
u_char *p0 = p; u_char *p0 = p;
@@ -654,10 +654,10 @@ ccp_ackci(f, p, len)
* Returns 1 iff the nak was OK. * Returns 1 iff the nak was OK.
*/ */
static int static int
ccp_nakci(f, p, len) ccp_nakci(
fsm *f; fsm *f,
u_char *p; u_char *p,
int len; int len)
{ {
ccp_options *go = &ccp_gotoptions[f->unit]; ccp_options *go = &ccp_gotoptions[f->unit];
ccp_options no; /* options we've seen already */ ccp_options no; /* options we've seen already */
@@ -720,10 +720,10 @@ ccp_nakci(f, p, len)
* ccp_rejci - reject some of our suggested compression methods. * ccp_rejci - reject some of our suggested compression methods.
*/ */
static int static int
ccp_rejci(f, p, len) ccp_rejci(
fsm *f; fsm *f,
u_char *p; u_char *p,
int len; int len)
{ {
ccp_options *go = &ccp_gotoptions[f->unit]; ccp_options *go = &ccp_gotoptions[f->unit];
ccp_options try; /* options to request next time */ ccp_options try; /* options to request next time */
@@ -798,11 +798,11 @@ ccp_rejci(f, p, len)
* appropriately. * appropriately.
*/ */
static int static int
ccp_reqci(f, p, lenp, dont_nak) ccp_reqci(
fsm *f; fsm *f,
u_char *p; u_char *p,
int *lenp; int *lenp,
int dont_nak; int dont_nak)
{ {
int ret, newret, res; int ret, newret, res;
u_char *p0, *retp; u_char *p0, *retp;
@@ -977,8 +977,9 @@ ccp_reqci(f, p, lenp, dont_nak)
* Make a string name for a compression method (or 2). * Make a string name for a compression method (or 2).
*/ */
static char * static char *
method_name(opt, opt2) method_name(
ccp_options *opt, *opt2; ccp_options *opt,
ccp_options *opt2)
{ {
static char result[64]; static char result[64];
@@ -1018,8 +1019,8 @@ method_name(opt, opt2)
* CCP has come up - inform the kernel driver and log a message. * CCP has come up - inform the kernel driver and log a message.
*/ */
static void static void
ccp_up(f) ccp_up(
fsm *f; fsm *f)
{ {
ccp_options *go = &ccp_gotoptions[f->unit]; ccp_options *go = &ccp_gotoptions[f->unit];
ccp_options *ho = &ccp_hisoptions[f->unit]; ccp_options *ho = &ccp_hisoptions[f->unit];
@@ -1045,8 +1046,8 @@ ccp_up(f)
* CCP has gone down - inform the kernel driver. * CCP has gone down - inform the kernel driver.
*/ */
static void static void
ccp_down(f) ccp_down(
fsm *f; fsm *f)
{ {
if (ccp_localstate[f->unit] & RACK_PENDING) if (ccp_localstate[f->unit] & RACK_PENDING)
UNTIMEOUT(ccp_rack_timeout, f); UNTIMEOUT(ccp_rack_timeout, f);
@@ -1065,11 +1066,11 @@ static char *ccp_codenames[] = {
}; };
static int static int
ccp_printpkt(p, plen, printer, arg) ccp_printpkt(
u_char *p; u_char *p,
int plen; int plen,
void (*printer)(void *, char *, ...); void (*printer)(void *, char *, ...),
void *arg; void *arg)
{ {
u_char *p0, *optend; u_char *p0, *optend;
int code, id, len; int code, id, len;
@@ -1177,10 +1178,10 @@ ccp_printpkt(p, plen, printer, arg)
* compression :-(, otherwise we issue the reset-request. * compression :-(, otherwise we issue the reset-request.
*/ */
static void static void
ccp_datainput(unit, pkt, len) ccp_datainput(
int unit; int unit,
u_char *pkt; u_char *pkt,
int len; int len)
{ {
fsm *f; fsm *f;
@@ -1212,8 +1213,8 @@ ccp_datainput(unit, pkt, len)
* Timeout waiting for reset-ack. * Timeout waiting for reset-ack.
*/ */
static void static void
ccp_rack_timeout(arg) ccp_rack_timeout(
void *arg; void *arg)
{ {
fsm *f = arg; fsm *f = arg;

View File

@@ -120,8 +120,8 @@ static void ChapGenChallenge(chap_state *);
* ChapInit - Initialize a CHAP unit. * ChapInit - Initialize a CHAP unit.
*/ */
static void static void
ChapInit(unit) ChapInit(
int unit; int unit)
{ {
chap_state *cstate = &chap[unit]; chap_state *cstate = &chap[unit];
@@ -140,10 +140,10 @@ ChapInit(unit)
* *
*/ */
void void
ChapAuthWithPeer(unit, our_name, digest) ChapAuthWithPeer(
int unit; int unit,
char *our_name; char *our_name,
int digest; int digest)
{ {
chap_state *cstate = &chap[unit]; chap_state *cstate = &chap[unit];
@@ -170,10 +170,10 @@ ChapAuthWithPeer(unit, our_name, digest)
* ChapAuthPeer - Authenticate our peer (start server). * ChapAuthPeer - Authenticate our peer (start server).
*/ */
void void
ChapAuthPeer(unit, our_name, digest) ChapAuthPeer(
int unit; int unit,
char *our_name; char *our_name,
int digest; int digest)
{ {
chap_state *cstate = &chap[unit]; chap_state *cstate = &chap[unit];
@@ -197,8 +197,8 @@ ChapAuthPeer(unit, our_name, digest)
* ChapChallengeTimeout - Timeout expired on sending challenge. * ChapChallengeTimeout - Timeout expired on sending challenge.
*/ */
static void static void
ChapChallengeTimeout(arg) ChapChallengeTimeout(
void *arg; void *arg)
{ {
chap_state *cstate = (chap_state *) arg; chap_state *cstate = (chap_state *) arg;
@@ -224,8 +224,8 @@ ChapChallengeTimeout(arg)
* ChapResponseTimeout - Timeout expired on sending response. * ChapResponseTimeout - Timeout expired on sending response.
*/ */
static void static void
ChapResponseTimeout(arg) ChapResponseTimeout(
void *arg; void *arg)
{ {
chap_state *cstate = (chap_state *) arg; chap_state *cstate = (chap_state *) arg;
@@ -241,8 +241,8 @@ ChapResponseTimeout(arg)
* ChapRechallenge - Time to challenge the peer again. * ChapRechallenge - Time to challenge the peer again.
*/ */
static void static void
ChapRechallenge(arg) ChapRechallenge(
void *arg; void *arg)
{ {
chap_state *cstate = (chap_state *) arg; chap_state *cstate = (chap_state *) arg;
@@ -262,8 +262,8 @@ ChapRechallenge(arg)
* Start up if we have pending requests. * Start up if we have pending requests.
*/ */
static void static void
ChapLowerUp(unit) ChapLowerUp(
int unit; int unit)
{ {
chap_state *cstate = &chap[unit]; chap_state *cstate = &chap[unit];
@@ -288,8 +288,8 @@ ChapLowerUp(unit)
* Cancel all timeouts. * Cancel all timeouts.
*/ */
static void static void
ChapLowerDown(unit) ChapLowerDown(
int unit; int unit)
{ {
chap_state *cstate = &chap[unit]; chap_state *cstate = &chap[unit];
@@ -312,8 +312,8 @@ ChapLowerDown(unit)
* ChapProtocolReject - Peer doesn't grok CHAP. * ChapProtocolReject - Peer doesn't grok CHAP.
*/ */
static void static void
ChapProtocolReject(unit) ChapProtocolReject(
int unit; int unit)
{ {
chap_state *cstate = &chap[unit]; chap_state *cstate = &chap[unit];
@@ -331,10 +331,10 @@ ChapProtocolReject(unit)
* ChapInput - Input CHAP packet. * ChapInput - Input CHAP packet.
*/ */
static void static void
ChapInput(unit, inpacket, packet_len) ChapInput(
int unit; int unit,
u_char *inpacket; u_char *inpacket,
int packet_len; int packet_len)
{ {
chap_state *cstate = &chap[unit]; chap_state *cstate = &chap[unit];
u_char *inp; u_char *inp;
@@ -394,11 +394,11 @@ ChapInput(unit, inpacket, packet_len)
* ChapReceiveChallenge - Receive Challenge and send Response. * ChapReceiveChallenge - Receive Challenge and send Response.
*/ */
static void static void
ChapReceiveChallenge(cstate, inp, id, len) ChapReceiveChallenge(
chap_state *cstate; chap_state *cstate,
u_char *inp; u_char *inp,
int id; int id,
int len; int len)
{ {
int rchallenge_len; int rchallenge_len;
u_char *rchallenge; u_char *rchallenge;
@@ -487,11 +487,11 @@ ChapReceiveChallenge(cstate, inp, id, len)
* ChapReceiveResponse - Receive and process response. * ChapReceiveResponse - Receive and process response.
*/ */
static void static void
ChapReceiveResponse(cstate, inp, id, len) ChapReceiveResponse(
chap_state *cstate; chap_state *cstate,
u_char *inp; u_char *inp,
int id; int id,
int len; int len)
{ {
u_char *remmd, remmd_len; u_char *remmd, remmd_len;
int secret_len, old_state; int secret_len, old_state;
@@ -601,11 +601,11 @@ ChapReceiveResponse(cstate, inp, id, len)
* ChapReceiveSuccess - Receive Success * ChapReceiveSuccess - Receive Success
*/ */
static void static void
ChapReceiveSuccess(cstate, inp, id, len) ChapReceiveSuccess(
chap_state *cstate; chap_state *cstate,
u_char *inp; u_char *inp,
u_char id; u_char id,
int len; int len)
{ {
if (cstate->clientstate == CHAPCS_OPEN) if (cstate->clientstate == CHAPCS_OPEN)
@@ -636,11 +636,11 @@ ChapReceiveSuccess(cstate, inp, id, len)
* ChapReceiveFailure - Receive failure. * ChapReceiveFailure - Receive failure.
*/ */
static void static void
ChapReceiveFailure(cstate, inp, id, len) ChapReceiveFailure(
chap_state *cstate; chap_state *cstate,
u_char *inp; u_char *inp,
u_char id; u_char id,
int len; int len)
{ {
if (cstate->clientstate != CHAPCS_RESPONSE) { if (cstate->clientstate != CHAPCS_RESPONSE) {
/* don't know what this is */ /* don't know what this is */
@@ -665,8 +665,8 @@ ChapReceiveFailure(cstate, inp, id, len)
* ChapSendChallenge - Send an Authenticate challenge. * ChapSendChallenge - Send an Authenticate challenge.
*/ */
static void static void
ChapSendChallenge(cstate) ChapSendChallenge(
chap_state *cstate; chap_state *cstate)
{ {
u_char *outp; u_char *outp;
int chal_len, name_len; int chal_len, name_len;
@@ -700,9 +700,9 @@ ChapSendChallenge(cstate)
* ChapSendStatus - Send a status response (ack or nak). * ChapSendStatus - Send a status response (ack or nak).
*/ */
static void static void
ChapSendStatus(cstate, code) ChapSendStatus(
chap_state *cstate; chap_state *cstate,
int code; int code)
{ {
u_char *outp; u_char *outp;
int outlen, msglen; int outlen, msglen;
@@ -734,8 +734,8 @@ ChapSendStatus(cstate, code)
*/ */
static void static void
ChapGenChallenge(cstate) ChapGenChallenge(
chap_state *cstate; chap_state *cstate)
{ {
int chal_len; int chal_len;
u_char *ptr = cstate->challenge; u_char *ptr = cstate->challenge;
@@ -761,8 +761,8 @@ ChapGenChallenge(cstate)
*/ */
/* ARGSUSED */ /* ARGSUSED */
static void static void
ChapSendResponse(cstate) ChapSendResponse(
chap_state *cstate; chap_state *cstate)
{ {
u_char *outp; u_char *outp;
int outlen, md_len, name_len; int outlen, md_len, name_len;
@@ -800,11 +800,11 @@ static char *ChapCodenames[] = {
}; };
static int static int
ChapPrintPkt(p, plen, printer, arg) ChapPrintPkt(
u_char *p; u_char *p,
int plen; int plen,
void (*printer)(void *, char *, ...); void (*printer)(void *, char *, ...),
void *arg; void *arg)
{ {
int code, id, len; int code, id, len;
int clen, nlen; int clen, nlen;

View File

@@ -200,9 +200,9 @@ char *expect_strtok(char *, char *);
int chatmain(int, int, char *); int chatmain(int, int, char *);
void *dup_mem(b, c) void *dup_mem(
void *b; void *b,
size_t c; size_t c)
{ {
void *ans = malloc (c); void *ans = malloc (c);
if (!ans) if (!ans)
@@ -212,8 +212,8 @@ size_t c;
return ans; return ans;
} }
void *copy_of (s) void *copy_of(
char *s; char *s)
{ {
return dup_mem(s, strlen (s) + 1); return dup_mem(s, strlen (s) + 1);
} }
@@ -273,7 +273,7 @@ int chatmain(int fd, int mode, char *pScript)
return ( exit_code ); return ( exit_code );
} }
void break_sequence() void break_sequence(void)
{ {
tcsendbreak(ttyfd, 0); tcsendbreak(ttyfd, 0);
} }
@@ -281,9 +281,9 @@ void break_sequence()
/* /*
* 'Clean up' this string. * 'Clean up' this string.
*/ */
static char *clean(s, sending) static char *clean(
register char *s; char *s,
int sending; /* set to 1 when sending (putting) this string. */ int sending ) /* set to 1 when sending (putting) this string. */
{ {
char temp[STR_LEN], env_str[STR_LEN], cur_chr; char temp[STR_LEN], env_str[STR_LEN], cur_chr;
register char *s1, *phchar; register char *s1, *phchar;
@@ -453,8 +453,8 @@ int sending; /* set to 1 when sending (putting) this string. */
/* /*
* A modified version of 'strtok'. This version skips \ sequences. * A modified version of 'strtok'. This version skips \ sequences.
*/ */
char *expect_strtok (s, term) char *expect_strtok (
char *s, *term; char *s, char *term)
{ {
static char *str = ""; static char *str = "";
int escape_flag = 0; int escape_flag = 0;
@@ -507,8 +507,8 @@ char *expect_strtok (s, term)
/* /*
* Process the expect string * Process the expect string
*/ */
void chat_expect (s) void chat_expect (
char *s; char *s)
{ {
char *expect; char *expect;
char *reply; char *reply;
@@ -588,8 +588,8 @@ char *s;
* the data. * the data.
*/ */
static char *character(c) static char *character(
int c; int c)
{ {
static char string[10]; static char string[10];
char *meta; char *meta;
@@ -611,8 +611,8 @@ int c;
/* /*
* process the reply string * process the reply string
*/ */
void chat_send (s) void chat_send (
register char *s; char *s)
{ {
/* char file_data[STR_LEN]; */ /* char file_data[STR_LEN]; */
@@ -687,7 +687,7 @@ register char *s;
} }
} }
static int get_char() static int get_char(void)
{ {
int status; int status;
char c; char c;
@@ -706,16 +706,16 @@ static int get_char()
return -1; return -1;
} }
static int put_char(c) static int put_char(
int c; int c)
{ {
char ch = c; char ch = c;
return(write(ttyfd, &ch, 1)); return(write(ttyfd, &ch, 1));
} }
static int write_char (c) static int write_char (
int c; int c)
{ {
if (put_char(c) < 1) { if (put_char(c) < 1) {
return (0); return (0);
@@ -723,8 +723,8 @@ int c;
return (1); return (1);
} }
static int put_string (s) static int put_string (
register char *s; char *s)
{ {
char *out,*free_ptr=0; char *out,*free_ptr=0;
@@ -776,8 +776,8 @@ register char *s;
/* /*
* 'Wait for' this string to appear on this file descriptor. * 'Wait for' this string to appear on this file descriptor.
*/ */
static int get_string(in_string) static int get_string(
register char *in_string; char *in_string)
{ {
int c, len, minlen; int c, len, minlen;
register char *s = temp2, *end = s + STR_LEN; register char *s = temp2, *end = s + STR_LEN;

View File

@@ -67,7 +67,7 @@ static int active_packet(unsigned char *, int);
* demand_conf - configure the interface for doing dial-on-demand. * demand_conf - configure the interface for doing dial-on-demand.
*/ */
void void
demand_conf() demand_conf(void)
{ {
int i; int i;
struct protent *protp; struct protent *protp;
@@ -106,7 +106,7 @@ demand_conf()
* demand_block - set each network protocol to block further packets. * demand_block - set each network protocol to block further packets.
*/ */
void void
demand_block() demand_block(void)
{ {
int i; int i;
struct protent *protp; struct protent *protp;
@@ -122,7 +122,7 @@ demand_block()
* with an error. * with an error.
*/ */
void void
demand_discard() demand_discard(void)
{ {
struct packet *pkt, *nextpkt; struct packet *pkt, *nextpkt;
int i; int i;
@@ -149,7 +149,7 @@ demand_discard()
* demand_unblock - set each enabled network protocol to pass packets. * demand_unblock - set each enabled network protocol to pass packets.
*/ */
void void
demand_unblock() demand_unblock(void)
{ {
int i; int i;
struct protent *protp; struct protent *protp;
@@ -203,9 +203,9 @@ static u_short fcstab[256] = {
* Return value is 1 if we need to bring up the link, 0 otherwise. * Return value is 1 if we need to bring up the link, 0 otherwise.
*/ */
int int
loop_chars(p, n) loop_chars(
unsigned char *p; unsigned char *p,
int n; int n)
{ {
int c, rv; int c, rv;
@@ -255,9 +255,9 @@ loop_chars(p, n)
* bring up the link. * bring up the link.
*/ */
int int
loop_frame(frame, len) loop_frame(
unsigned char *frame; unsigned char *frame,
int len; int len)
{ {
struct packet *pkt; struct packet *pkt;
@@ -288,8 +288,8 @@ loop_frame(frame, len)
* loopback, now that the real serial link is up. * loopback, now that the real serial link is up.
*/ */
void void
demand_rexmit(proto) demand_rexmit(
int proto; int proto)
{ {
struct packet *pkt, *prev, *nextpkt; struct packet *pkt, *prev, *nextpkt;
@@ -319,9 +319,9 @@ demand_rexmit(proto)
* that is, whether it is worth bringing up the link for. * that is, whether it is worth bringing up the link for.
*/ */
static int static int
active_packet(p, len) active_packet(
unsigned char *p; unsigned char *p,
int len; int len)
{ {
int proto, i; int proto, i;
struct protent *protp; struct protent *protp;

View File

@@ -54,8 +54,8 @@ int peer_mru[NUM_PPP];
* Initialize fsm state. * Initialize fsm state.
*/ */
void void
fsm_init(f) fsm_init(
fsm *f; fsm *f)
{ {
f->state = INITIAL; f->state = INITIAL;
f->flags = 0; f->flags = 0;
@@ -72,8 +72,8 @@ fsm_init(f)
* fsm_lowerup - The lower layer is up. * fsm_lowerup - The lower layer is up.
*/ */
void void
fsm_lowerup(f) fsm_lowerup(
fsm *f; fsm *f)
{ {
switch( f->state ){ switch( f->state ){
case INITIAL: case INITIAL:
@@ -102,8 +102,8 @@ fsm_lowerup(f)
* Cancel all timeouts and inform upper layers. * Cancel all timeouts and inform upper layers.
*/ */
void void
fsm_lowerdown(f) fsm_lowerdown(
fsm *f; fsm *f)
{ {
switch( f->state ){ switch( f->state ){
case CLOSED: case CLOSED:
@@ -145,8 +145,8 @@ fsm_lowerdown(f)
* fsm_open - Link is allowed to come up. * fsm_open - Link is allowed to come up.
*/ */
void void
fsm_open(f) fsm_open(
fsm *f; fsm *f)
{ {
switch( f->state ){ switch( f->state ){
case INITIAL: case INITIAL:
@@ -186,9 +186,9 @@ fsm_open(f)
* the CLOSED state. * the CLOSED state.
*/ */
void void
fsm_close(f, reason) fsm_close(
fsm *f; fsm *f,
char *reason; char *reason)
{ {
f->term_reason = reason; f->term_reason = reason;
f->term_reason_len = (reason == NULL? 0: strlen(reason)); f->term_reason_len = (reason == NULL? 0: strlen(reason));
@@ -229,8 +229,8 @@ fsm_close(f, reason)
* fsm_timeout - Timeout expired. * fsm_timeout - Timeout expired.
*/ */
static void static void
fsm_timeout(arg) fsm_timeout(
void *arg; void *arg)
{ {
fsm *f = (fsm *) arg; fsm *f = (fsm *) arg;
@@ -282,10 +282,10 @@ fsm_timeout(arg)
* fsm_input - Input packet. * fsm_input - Input packet.
*/ */
void void
fsm_input(f, inpacket, l) fsm_input(
fsm *f; fsm *f,
u_char *inpacket; u_char *inpacket,
int l; int l)
{ {
u_char *inp; u_char *inp;
u_char code, id; u_char code, id;
@@ -361,11 +361,11 @@ fsm_input(f, inpacket, l)
* fsm_rconfreq - Receive Configure-Request. * fsm_rconfreq - Receive Configure-Request.
*/ */
static void static void
fsm_rconfreq(f, id, inp, len) fsm_rconfreq(
fsm *f; fsm *f,
u_char id; u_char id,
u_char *inp; u_char *inp,
int len; int len)
{ {
int code, reject_if_disagree; int code, reject_if_disagree;
@@ -433,11 +433,11 @@ fsm_rconfreq(f, id, inp, len)
* fsm_rconfack - Receive Configure-Ack. * fsm_rconfack - Receive Configure-Ack.
*/ */
static void static void
fsm_rconfack(f, id, inp, len) fsm_rconfack(
fsm *f; fsm *f,
int id; int id,
u_char *inp; u_char *inp,
int len; int len)
{ {
if (id != f->reqid || f->seen_ack) /* Expected id? */ if (id != f->reqid || f->seen_ack) /* Expected id? */
return; /* Nope, toss... */ return; /* Nope, toss... */
@@ -490,11 +490,11 @@ fsm_rconfack(f, id, inp, len)
* fsm_rconfnakrej - Receive Configure-Nak or Configure-Reject. * fsm_rconfnakrej - Receive Configure-Nak or Configure-Reject.
*/ */
static void static void
fsm_rconfnakrej(f, code, id, inp, len) fsm_rconfnakrej(
fsm *f; fsm *f,
int code, id; int code, int id,
u_char *inp; u_char *inp,
int len; int len)
{ {
int (*proc)(fsm *, u_char *, int); int (*proc)(fsm *, u_char *, int);
int ret; int ret;
@@ -547,11 +547,11 @@ fsm_rconfnakrej(f, code, id, inp, len)
* fsm_rtermreq - Receive Terminate-Req. * fsm_rtermreq - Receive Terminate-Req.
*/ */
static void static void
fsm_rtermreq(f, id, p, len) fsm_rtermreq(
fsm *f; fsm *f,
int id; int id,
u_char *p; u_char *p,
int len; int len)
{ {
switch (f->state) { switch (f->state) {
case ACKRCVD: case ACKRCVD:
@@ -580,8 +580,8 @@ fsm_rtermreq(f, id, p, len)
* fsm_rtermack - Receive Terminate-Ack. * fsm_rtermack - Receive Terminate-Ack.
*/ */
static void static void
fsm_rtermack(f) fsm_rtermack(
fsm *f; fsm *f)
{ {
switch (f->state) { switch (f->state) {
case CLOSING: case CLOSING:
@@ -614,10 +614,10 @@ fsm_rtermack(f)
* fsm_rcoderej - Receive an Code-Reject. * fsm_rcoderej - Receive an Code-Reject.
*/ */
static void static void
fsm_rcoderej(f, inp, len) fsm_rcoderej(
fsm *f; fsm *f,
u_char *inp; u_char *inp,
int len; int len)
{ {
u_char code, id; u_char code, id;
@@ -640,8 +640,8 @@ fsm_rcoderej(f, inp, len)
* Treat this as a catastrophic error (RXJ-). * Treat this as a catastrophic error (RXJ-).
*/ */
void void
fsm_protreject(f) fsm_protreject(
fsm *f; fsm *f)
{ {
switch( f->state ){ switch( f->state ){
case CLOSING: case CLOSING:
@@ -690,9 +690,9 @@ fsm_protreject(f)
* fsm_sconfreq - Send a Configure-Request. * fsm_sconfreq - Send a Configure-Request.
*/ */
static void static void
fsm_sconfreq(f, retransmit) fsm_sconfreq(
fsm *f; fsm *f,
int retransmit; int retransmit)
{ {
u_char *outp; u_char *outp;
int cilen; int cilen;
@@ -740,11 +740,11 @@ fsm_sconfreq(f, retransmit)
* Used for all packets sent to our peer by this module. * Used for all packets sent to our peer by this module.
*/ */
void void
fsm_sdata(f, code, id, data, datalen) fsm_sdata(
fsm *f; fsm *f,
u_char code, id; u_char code, u_char id,
u_char *data; u_char *data,
int datalen; int datalen)
{ {
u_char *outp; u_char *outp;
int outlen; int outlen;

View File

@@ -217,8 +217,8 @@ static void ipcp_clear_addrs(int, uint32_t, uint32_t);
* Make a string representation of a network IP address. * Make a string representation of a network IP address.
*/ */
char * char *
ip_ntoa(ipaddr) ip_ntoa(
uint32_t ipaddr; uint32_t ipaddr)
{ {
static char b[64]; static char b[64];
@@ -234,8 +234,8 @@ uint32_t ipaddr;
* setvjslots - set maximum number of connection slots for VJ compression * setvjslots - set maximum number of connection slots for VJ compression
*/ */
static int static int
setvjslots(argv) setvjslots(
char **argv; char **argv)
{ {
int value; int value;
@@ -254,8 +254,8 @@ setvjslots(argv)
* setdnsaddr - set the dns address(es) * setdnsaddr - set the dns address(es)
*/ */
static int static int
setdnsaddr(argv) setdnsaddr(
char **argv; char **argv)
{ {
uint32_t dns; uint32_t dns;
struct hostent *hp; struct hostent *hp;
@@ -286,8 +286,8 @@ setdnsaddr(argv)
* the caller to the existing WINS server on a Windows NT platform. * the caller to the existing WINS server on a Windows NT platform.
*/ */
static int static int
setwinsaddr(argv) setwinsaddr(
char **argv; char **argv)
{ {
uint32_t wins; uint32_t wins;
struct hostent *hp; struct hostent *hp;
@@ -317,8 +317,8 @@ setwinsaddr(argv)
* ipcp_init - Initialize IPCP. * ipcp_init - Initialize IPCP.
*/ */
static void static void
ipcp_init(unit) ipcp_init(
int unit; int unit)
{ {
fsm *f = &ipcp_fsm[unit]; fsm *f = &ipcp_fsm[unit];
ipcp_options *wo = &ipcp_wantoptions[unit]; ipcp_options *wo = &ipcp_wantoptions[unit];
@@ -360,8 +360,8 @@ ipcp_init(unit)
* ipcp_open - IPCP is allowed to come up. * ipcp_open - IPCP is allowed to come up.
*/ */
static void static void
ipcp_open(unit) ipcp_open(
int unit; int unit)
{ {
fsm_open(&ipcp_fsm[unit]); fsm_open(&ipcp_fsm[unit]);
} }
@@ -371,9 +371,9 @@ ipcp_open(unit)
* ipcp_close - Take IPCP down. * ipcp_close - Take IPCP down.
*/ */
static void static void
ipcp_close(unit, reason) ipcp_close(
int unit; int unit,
char *reason; char *reason)
{ {
fsm_close(&ipcp_fsm[unit], reason); fsm_close(&ipcp_fsm[unit], reason);
} }
@@ -383,8 +383,8 @@ ipcp_close(unit, reason)
* ipcp_lowerup - The lower layer is up. * ipcp_lowerup - The lower layer is up.
*/ */
static void static void
ipcp_lowerup(unit) ipcp_lowerup(
int unit; int unit)
{ {
fsm_lowerup(&ipcp_fsm[unit]); fsm_lowerup(&ipcp_fsm[unit]);
} }
@@ -394,8 +394,8 @@ ipcp_lowerup(unit)
* ipcp_lowerdown - The lower layer is down. * ipcp_lowerdown - The lower layer is down.
*/ */
static void static void
ipcp_lowerdown(unit) ipcp_lowerdown(
int unit; int unit)
{ {
fsm_lowerdown(&ipcp_fsm[unit]); fsm_lowerdown(&ipcp_fsm[unit]);
} }
@@ -405,10 +405,10 @@ ipcp_lowerdown(unit)
* ipcp_input - Input IPCP packet. * ipcp_input - Input IPCP packet.
*/ */
static void static void
ipcp_input(unit, p, len) ipcp_input(
int unit; int unit,
u_char *p; u_char *p,
int len; int len)
{ {
fsm_input(&ipcp_fsm[unit], p, len); fsm_input(&ipcp_fsm[unit], p, len);
} }
@@ -420,8 +420,8 @@ ipcp_input(unit, p, len)
* Pretend the lower layer went down, so we shut up. * Pretend the lower layer went down, so we shut up.
*/ */
static void static void
ipcp_protrej(unit) ipcp_protrej(
int unit; int unit)
{ {
fsm_lowerdown(&ipcp_fsm[unit]); fsm_lowerdown(&ipcp_fsm[unit]);
} }
@@ -432,8 +432,8 @@ ipcp_protrej(unit)
* Called by fsm_sconfreq, Send Configure Request. * Called by fsm_sconfreq, Send Configure Request.
*/ */
static void static void
ipcp_resetci(f) ipcp_resetci(
fsm *f; fsm *f)
{ {
ipcp_options *wo = &ipcp_wantoptions[f->unit]; ipcp_options *wo = &ipcp_wantoptions[f->unit];
ipcp_options *go = &ipcp_gotoptions[f->unit]; ipcp_options *go = &ipcp_gotoptions[f->unit];
@@ -456,8 +456,8 @@ ipcp_resetci(f)
* Called by fsm_sconfreq, Send Configure Request. * Called by fsm_sconfreq, Send Configure Request.
*/ */
static int static int
ipcp_cilen(f) ipcp_cilen(
fsm *f; fsm *f)
{ {
ipcp_options *go = &ipcp_gotoptions[f->unit]; ipcp_options *go = &ipcp_gotoptions[f->unit];
ipcp_options *wo = &ipcp_wantoptions[f->unit]; ipcp_options *wo = &ipcp_wantoptions[f->unit];
@@ -498,10 +498,10 @@ ipcp_cilen(f)
* Called by fsm_sconfreq, Send Configure Request. * Called by fsm_sconfreq, Send Configure Request.
*/ */
static void static void
ipcp_addci(f, ucp, lenp) ipcp_addci(
fsm *f; fsm *f,
u_char *ucp; u_char *ucp,
int *lenp; int *lenp)
{ {
ipcp_options *go = &ipcp_gotoptions[f->unit]; ipcp_options *go = &ipcp_gotoptions[f->unit];
int len = *lenp; int len = *lenp;
@@ -576,10 +576,10 @@ ipcp_addci(f, ucp, lenp)
* 1 - Ack was good. * 1 - Ack was good.
*/ */
static int static int
ipcp_ackci(f, p, len) ipcp_ackci(
fsm *f; fsm *f,
u_char *p; u_char *p,
int len; int len)
{ {
ipcp_options *go = &ipcp_gotoptions[f->unit]; ipcp_options *go = &ipcp_gotoptions[f->unit];
u_short cilen, citype, cishort; u_short cilen, citype, cishort;
@@ -686,10 +686,10 @@ bad:
* 1 - Nak was good. * 1 - Nak was good.
*/ */
static int static int
ipcp_nakci(f, p, len) ipcp_nakci(
fsm *f; fsm *f,
u_char *p; u_char *p,
int len; int len)
{ {
ipcp_options *go = &ipcp_gotoptions[f->unit]; ipcp_options *go = &ipcp_gotoptions[f->unit];
u_char cimaxslotindex, cicflag; u_char cimaxslotindex, cicflag;
@@ -873,10 +873,10 @@ bad:
* Callback from fsm_rconfnakrej. * Callback from fsm_rconfnakrej.
*/ */
static int static int
ipcp_rejci(f, p, len) ipcp_rejci(
fsm *f; fsm *f,
u_char *p; u_char *p,
int len; int len)
{ {
ipcp_options *go = &ipcp_gotoptions[f->unit]; ipcp_options *go = &ipcp_gotoptions[f->unit];
u_char cimaxslotindex, ciflag, cilen; u_char cimaxslotindex, ciflag, cilen;
@@ -989,11 +989,11 @@ bad:
* CONFNAK; returns CONFREJ if it can't return CONFACK. * CONFNAK; returns CONFREJ if it can't return CONFACK.
*/ */
static int static int
ipcp_reqci(f, inp, len, reject_if_disagree) ipcp_reqci(
fsm *f; fsm *f,
u_char *inp; /* Requested CIs */ u_char *inp, /* Requested CIs */
int *len; /* Length of requested CIs */ int *len, /* Length of requested CIs */
int reject_if_disagree; int reject_if_disagree)
{ {
ipcp_options *wo = &ipcp_wantoptions[f->unit]; ipcp_options *wo = &ipcp_wantoptions[f->unit];
ipcp_options *ho = &ipcp_hisoptions[f->unit]; ipcp_options *ho = &ipcp_hisoptions[f->unit];
@@ -1280,7 +1280,7 @@ endswitch:
* and assign appropriate defaults. * and assign appropriate defaults.
*/ */
static void static void
ip_check_options() ip_check_options(void)
{ {
struct hostent *hp; struct hostent *hp;
uint32_t local; uint32_t local;
@@ -1311,8 +1311,8 @@ ip_check_options()
* IPCP were up, for use with dial-on-demand. * IPCP were up, for use with dial-on-demand.
*/ */
static int static int
ip_demand_conf(u) ip_demand_conf(
int u; int u)
{ {
ipcp_options *wo = &ipcp_wantoptions[u]; ipcp_options *wo = &ipcp_wantoptions[u];
@@ -1353,8 +1353,8 @@ ip_demand_conf(u)
* Configure the IP network interface appropriately and bring it up. * Configure the IP network interface appropriately and bring it up.
*/ */
static void static void
ipcp_up(f) ipcp_up(
fsm *f; fsm *f)
{ {
uint32_t mask; uint32_t mask;
ipcp_options *ho = &ipcp_hisoptions[f->unit]; ipcp_options *ho = &ipcp_hisoptions[f->unit];
@@ -1504,8 +1504,8 @@ ipcp_up(f)
* and delete routes through it. * and delete routes through it.
*/ */
static void static void
ipcp_down(f) ipcp_down(
fsm *f; fsm *f)
{ {
IPCPDEBUG(("ipcp: down")); IPCPDEBUG(("ipcp: down"));
/* XXX a bit IPv4-centric here, we only need to get the stats /* XXX a bit IPv4-centric here, we only need to get the stats
@@ -1539,10 +1539,10 @@ ipcp_down(f)
* proxy arp entries, etc. * proxy arp entries, etc.
*/ */
static void static void
ipcp_clear_addrs(unit, ouraddr, hisaddr) ipcp_clear_addrs(
int unit; int unit,
uint32_t ouraddr; /* local address */ uint32_t ouraddr, /* local address */
uint32_t hisaddr; /* remote address */ uint32_t hisaddr /* remote address */)
{ {
if (proxy_arp_set[unit]) { if (proxy_arp_set[unit]) {
cifproxyarp(unit, hisaddr); cifproxyarp(unit, hisaddr);
@@ -1560,8 +1560,8 @@ ipcp_clear_addrs(unit, ouraddr, hisaddr)
* ipcp_finished - possibly shut down the lower layers. * ipcp_finished - possibly shut down the lower layers.
*/ */
static void static void
ipcp_finished(f) ipcp_finished(
fsm *f; fsm *f)
{ {
np_finished(f->unit, PPP_IP); np_finished(f->unit, PPP_IP);
} }
@@ -1570,8 +1570,8 @@ ipcp_finished(f)
* create_resolv - create the replacement resolv.conf file * create_resolv - create the replacement resolv.conf file
*/ */
static void static void
create_resolv(peerdns1, peerdns2) create_resolv(
uint32_t peerdns1, peerdns2; uint32_t peerdns1, uint32_t peerdns2)
{ {
/* initialize values */ /* initialize values */
rtems_bsdnet_nameserver_count = 0; rtems_bsdnet_nameserver_count = 0;
@@ -1601,11 +1601,11 @@ static char *ipcp_codenames[] = {
}; };
static int static int
ipcp_printpkt(p, plen, printer, arg) ipcp_printpkt(
u_char *p; u_char *p,
int plen; int plen,
void (*printer)(void *, char *, ...); void (*printer)(void *, char *, ...),
void *arg; void *arg)
{ {
int code, id, len, olen; int code, id, len, olen;
u_char *pstart, *optend; u_char *pstart, *optend;
@@ -1743,9 +1743,9 @@ ipcp_printpkt(p, plen, printer, arg)
#define get_tcpflags(x) (((unsigned char *)(x))[13]) #define get_tcpflags(x) (((unsigned char *)(x))[13])
static int static int
ip_active_pkt(pkt, len) ip_active_pkt(
u_char *pkt; u_char *pkt,
int len; int len)
{ {
u_char *tcp; u_char *tcp;
int hlen; int hlen;

View File

@@ -223,8 +223,8 @@ int lcp_loopbackfail = DEFLOOPBACKFAIL;
* setescape - add chars to the set we escape on transmission. * setescape - add chars to the set we escape on transmission.
*/ */
static int static int
setescape(argv) setescape(
char **argv; char **argv)
{ {
int n, ret; int n, ret;
char *p, *endp; char *p, *endp;
@@ -254,8 +254,8 @@ setescape(argv)
* lcp_init - Initialize LCP. * lcp_init - Initialize LCP.
*/ */
static void static void
lcp_init(unit) lcp_init(
int unit; int unit)
{ {
fsm *f = &lcp_fsm[unit]; fsm *f = &lcp_fsm[unit];
lcp_options *wo = &lcp_wantoptions[unit]; lcp_options *wo = &lcp_wantoptions[unit];
@@ -310,8 +310,8 @@ lcp_init(unit)
* lcp_open - LCP is allowed to come up. * lcp_open - LCP is allowed to come up.
*/ */
void void
lcp_open(unit) lcp_open(
int unit; int unit)
{ {
fsm *f = &lcp_fsm[unit]; fsm *f = &lcp_fsm[unit];
lcp_options *wo = &lcp_wantoptions[unit]; lcp_options *wo = &lcp_wantoptions[unit];
@@ -329,9 +329,9 @@ lcp_open(unit)
* lcp_close - Take LCP down. * lcp_close - Take LCP down.
*/ */
void void
lcp_close(unit, reason) lcp_close(
int unit; int unit,
char *reason; char *reason)
{ {
fsm *f = &lcp_fsm[unit]; fsm *f = &lcp_fsm[unit];
@@ -356,8 +356,8 @@ lcp_close(unit, reason)
* lcp_lowerup - The lower layer is up. * lcp_lowerup - The lower layer is up.
*/ */
void void
lcp_lowerup(unit) lcp_lowerup(
int unit; int unit)
{ {
lcp_options *wo = &lcp_wantoptions[unit]; lcp_options *wo = &lcp_wantoptions[unit];
@@ -381,8 +381,8 @@ lcp_lowerup(unit)
* lcp_lowerdown - The lower layer is down. * lcp_lowerdown - The lower layer is down.
*/ */
void void
lcp_lowerdown(unit) lcp_lowerdown(
int unit; int unit)
{ {
fsm_lowerdown(&lcp_fsm[unit]); fsm_lowerdown(&lcp_fsm[unit]);
} }
@@ -392,10 +392,10 @@ lcp_lowerdown(unit)
* lcp_input - Input LCP packet. * lcp_input - Input LCP packet.
*/ */
static void static void
lcp_input(unit, p, len) lcp_input(
int unit; int unit,
u_char *p; u_char *p,
int len; int len)
{ {
fsm *f = &lcp_fsm[unit]; fsm *f = &lcp_fsm[unit];
@@ -407,11 +407,11 @@ lcp_input(unit, p, len)
* lcp_extcode - Handle a LCP-specific code. * lcp_extcode - Handle a LCP-specific code.
*/ */
static int static int
lcp_extcode(f, code, id, inp, len) lcp_extcode(
fsm *f; fsm *f,
int code, id; int code, int id,
u_char *inp; u_char *inp,
int len; int len)
{ {
u_char *magp; u_char *magp;
@@ -448,10 +448,10 @@ lcp_extcode(f, code, id, inp, len)
* Figure out which protocol is rejected and inform it. * Figure out which protocol is rejected and inform it.
*/ */
static void static void
lcp_rprotrej(f, inp, len) lcp_rprotrej(
fsm *f; fsm *f,
u_char *inp; u_char *inp,
int len; int len)
{ {
int i; int i;
struct protent *protp; struct protent *protp;
@@ -491,8 +491,8 @@ lcp_rprotrej(f, inp, len)
*/ */
/*ARGSUSED*/ /*ARGSUSED*/
static void static void
lcp_protrej(unit) lcp_protrej(
int unit; int unit)
{ {
/* /*
* Can't reject LCP! * Can't reject LCP!
@@ -506,10 +506,10 @@ lcp_protrej(unit)
* lcp_sprotrej - Send a Protocol-Reject for some protocol. * lcp_sprotrej - Send a Protocol-Reject for some protocol.
*/ */
void void
lcp_sprotrej(unit, p, len) lcp_sprotrej(
int unit; int unit,
u_char *p; u_char *p,
int len; int len)
{ {
/* /*
* Send back the protocol and the information field of the * Send back the protocol and the information field of the
@@ -527,8 +527,8 @@ lcp_sprotrej(unit, p, len)
* lcp_resetci - Reset our CI. * lcp_resetci - Reset our CI.
*/ */
static void static void
lcp_resetci(f) lcp_resetci(
fsm *f; fsm *f)
{ {
lcp_wantoptions[f->unit].magicnumber = magic(); lcp_wantoptions[f->unit].magicnumber = magic();
lcp_wantoptions[f->unit].numloops = 0; lcp_wantoptions[f->unit].numloops = 0;
@@ -542,8 +542,8 @@ lcp_resetci(f)
* lcp_cilen - Return length of our CI. * lcp_cilen - Return length of our CI.
*/ */
static int static int
lcp_cilen(f) lcp_cilen(
fsm *f; fsm *f)
{ {
lcp_options *go = &lcp_gotoptions[f->unit]; lcp_options *go = &lcp_gotoptions[f->unit];
@@ -573,10 +573,10 @@ lcp_cilen(f)
* lcp_addci - Add our desired CIs to a packet. * lcp_addci - Add our desired CIs to a packet.
*/ */
static void static void
lcp_addci(f, ucp, lenp) lcp_addci(
fsm *f; fsm *f,
u_char *ucp; u_char *ucp,
int *lenp; int *lenp)
{ {
lcp_options *go = &lcp_gotoptions[f->unit]; lcp_options *go = &lcp_gotoptions[f->unit];
u_char *start_ucp = ucp; u_char *start_ucp = ucp;
@@ -646,10 +646,10 @@ lcp_addci(f, ucp, lenp)
* 1 - Ack was good. * 1 - Ack was good.
*/ */
static int static int
lcp_ackci(f, p, len) lcp_ackci(
fsm *f; fsm *f,
u_char *p; u_char *p,
int len; int len)
{ {
lcp_options *go = &lcp_gotoptions[f->unit]; lcp_options *go = &lcp_gotoptions[f->unit];
u_char cilen, citype, cichar; u_char cilen, citype, cichar;
@@ -776,10 +776,10 @@ bad:
* 1 - Nak was good. * 1 - Nak was good.
*/ */
static int static int
lcp_nakci(f, p, len) lcp_nakci(
fsm *f; fsm *f,
u_char *p; u_char *p,
int len; int len)
{ {
lcp_options *go = &lcp_gotoptions[f->unit]; lcp_options *go = &lcp_gotoptions[f->unit];
lcp_options *wo = &lcp_wantoptions[f->unit]; lcp_options *wo = &lcp_wantoptions[f->unit];
@@ -1088,10 +1088,10 @@ bad:
* 1 - Reject was good. * 1 - Reject was good.
*/ */
static int static int
lcp_rejci(f, p, len) lcp_rejci(
fsm *f; fsm *f,
u_char *p; u_char *p,
int len; int len)
{ {
lcp_options *go = &lcp_gotoptions[f->unit]; lcp_options *go = &lcp_gotoptions[f->unit];
u_char cichar; u_char cichar;
@@ -1222,11 +1222,11 @@ bad:
* CONFNAK; returns CONFREJ if it can't return CONFACK. * CONFNAK; returns CONFREJ if it can't return CONFACK.
*/ */
static int static int
lcp_reqci(f, inp, lenp, reject_if_disagree) lcp_reqci(
fsm *f; fsm *f,
u_char *inp; /* Requested CIs */ u_char *inp, /* Requested CIs */
int *lenp; /* Length of requested CIs */ int *lenp, /* Length of requested CIs */
int reject_if_disagree; int reject_if_disagree)
{ {
lcp_options *go = &lcp_gotoptions[f->unit]; lcp_options *go = &lcp_gotoptions[f->unit];
lcp_options *ho = &lcp_hisoptions[f->unit]; lcp_options *ho = &lcp_hisoptions[f->unit];
@@ -1538,8 +1538,8 @@ endswitch:
* lcp_up - LCP has come UP. * lcp_up - LCP has come UP.
*/ */
static void static void
lcp_up(f) lcp_up(
fsm *f; fsm *f)
{ {
lcp_options *wo = &lcp_wantoptions[f->unit]; lcp_options *wo = &lcp_wantoptions[f->unit];
lcp_options *ho = &lcp_hisoptions[f->unit]; lcp_options *ho = &lcp_hisoptions[f->unit];
@@ -1579,8 +1579,8 @@ lcp_up(f)
* Alert other protocols. * Alert other protocols.
*/ */
static void static void
lcp_down(f) lcp_down(
fsm *f; fsm *f)
{ {
lcp_options *go = &lcp_gotoptions[f->unit]; lcp_options *go = &lcp_gotoptions[f->unit];
@@ -1600,8 +1600,8 @@ lcp_down(f)
* lcp_starting - LCP needs the lower layer up. * lcp_starting - LCP needs the lower layer up.
*/ */
static void static void
lcp_starting(f) lcp_starting(
fsm *f; fsm *f)
{ {
link_required(f->unit); link_required(f->unit);
} }
@@ -1611,8 +1611,8 @@ lcp_starting(f)
* lcp_finished - LCP has finished with the lower layer. * lcp_finished - LCP has finished with the lower layer.
*/ */
static void static void
lcp_finished(f) lcp_finished(
fsm *f; fsm *f)
{ {
link_terminated(f->unit); link_terminated(f->unit);
} }
@@ -1628,11 +1628,11 @@ static char *lcp_codenames[] = {
}; };
static int static int
lcp_printpkt(p, plen, printer, arg) lcp_printpkt(
u_char *p; u_char *p,
int plen; int plen,
void (*printer)(void *, char *, ...); void (*printer)(void *, char *, ...),
void *arg; void *arg)
{ {
int code, id, len, olen; int code, id, len, olen;
u_char *pstart, *optend; u_char *pstart, *optend;
@@ -1808,8 +1808,8 @@ lcp_printpkt(p, plen, printer, arg)
*/ */
static static
void LcpLinkFailure (f) void LcpLinkFailure (
fsm *f; fsm *f)
{ {
if (f->state == OPENED) { if (f->state == OPENED) {
info("No response to %d echo-requests", lcp_echos_pending); info("No response to %d echo-requests", lcp_echos_pending);
@@ -1824,8 +1824,8 @@ void LcpLinkFailure (f)
*/ */
static void static void
LcpEchoCheck (f) LcpEchoCheck (
fsm *f; fsm *f)
{ {
LcpSendEchoRequest (f); LcpSendEchoRequest (f);
if (f->state != OPENED) if (f->state != OPENED)
@@ -1845,8 +1845,8 @@ LcpEchoCheck (f)
*/ */
static void static void
LcpEchoTimeout (arg) LcpEchoTimeout (
void *arg; void *arg)
{ {
if (lcp_echo_timer_running != 0) { if (lcp_echo_timer_running != 0) {
lcp_echo_timer_running = 0; lcp_echo_timer_running = 0;
@@ -1859,11 +1859,11 @@ LcpEchoTimeout (arg)
*/ */
static void static void
lcp_received_echo_reply (f, id, inp, len) lcp_received_echo_reply (
fsm *f; fsm *f,
int id; int id,
u_char *inp; u_char *inp,
int len; int len)
{ {
uint32_t magic; uint32_t magic;
@@ -1888,8 +1888,8 @@ lcp_received_echo_reply (f, id, inp, len)
*/ */
static void static void
LcpSendEchoRequest (f) LcpSendEchoRequest (
fsm *f; fsm *f)
{ {
uint32_t lcp_magic; uint32_t lcp_magic;
u_char pkt[4], *pktp; u_char pkt[4], *pktp;
@@ -1921,8 +1921,8 @@ LcpSendEchoRequest (f)
*/ */
static void static void
lcp_echo_lowerup (unit) lcp_echo_lowerup (
int unit; int unit)
{ {
fsm *f = &lcp_fsm[unit]; fsm *f = &lcp_fsm[unit];
@@ -1941,8 +1941,8 @@ lcp_echo_lowerup (unit)
*/ */
static void static void
lcp_echo_lowerdown (unit) lcp_echo_lowerdown (
int unit; int unit)
{ {
fsm *f = &lcp_fsm[unit]; fsm *f = &lcp_fsm[unit];

View File

@@ -38,7 +38,7 @@ static const char rcsid[] = RCSID;
* and current time, currently. * and current time, currently.
*/ */
void void
magic_init() magic_init(void)
{ {
long seed; long seed;
struct timeval t; struct timeval t;
@@ -52,7 +52,7 @@ magic_init()
* magic - Returns the next magic number. * magic - Returns the next magic number.
*/ */
uint32_t uint32_t
magic() magic(void)
{ {
return (uint32_t) mrand48(); return (uint32_t) mrand48();
} }

View File

@@ -302,9 +302,9 @@ See pppd(8) for more options.\n\
* processing a few options, so error messages are suppressed. * processing a few options, so error messages are suppressed.
*/ */
int int
parse_args(argc, argv) parse_args(
int argc; int argc,
char **argv; char **argv)
{ {
char *arg; char *arg;
option_t *opt; option_t *opt;
@@ -392,11 +392,11 @@ scan_args(argc, argv)
* and interpret them. * and interpret them.
*/ */
int int
options_from_file(filename, must_exist, check_prot, priv) options_from_file(
char *filename; char *filename,
int must_exist; int must_exist,
int check_prot; int check_prot,
int priv; int priv)
{ {
FILE *f; FILE *f;
int i, newline, ret, err; int i, newline, ret, err;
@@ -478,7 +478,7 @@ err:
* and if so, interpret options from it. * and if so, interpret options from it.
*/ */
int int
options_from_user() options_from_user(void)
{ {
return 0; return 0;
} }
@@ -488,7 +488,7 @@ options_from_user()
* device, and if so, interpret options from it. * device, and if so, interpret options from it.
*/ */
int int
options_for_tty() options_for_tty(void)
{ {
char *dev, *path, *p; char *dev, *path, *p;
int ret; int ret;
@@ -517,9 +517,9 @@ options_for_tty()
* options_from_list - process a string of options in a wordlist. * options_from_list - process a string of options in a wordlist.
*/ */
int int
options_from_list(w, priv) options_from_list(
struct wordlist *w; struct wordlist *w,
int priv; int priv)
{ {
char *argv[MAXARGS]; char *argv[MAXARGS];
option_t *opt; option_t *opt;
@@ -579,8 +579,7 @@ err:
* This could be optimized by using a hash table. * This could be optimized by using a hash table.
*/ */
static option_t * static option_t *
find_option(name) find_option(char *name)
char *name;
{ {
option_t *opt; option_t *opt;
struct option_list *list; struct option_list *list;
@@ -608,9 +607,9 @@ find_option(name)
* process_option - process one new-style option. * process_option - process one new-style option.
*/ */
static int static int
process_option(opt, argv) process_option(
option_t *opt; option_t *opt,
char **argv; char **argv)
{ {
uint32_t v; uint32_t v;
int iv, a; int iv, a;
@@ -743,8 +742,8 @@ process_option(opt, argv)
* n_arguments - tell how many arguments an option takes * n_arguments - tell how many arguments an option takes
*/ */
static int static int
n_arguments(opt) n_arguments(
option_t *opt; option_t *opt)
{ {
return (opt->type == o_bool || opt->type == o_special_noarg return (opt->type == o_bool || opt->type == o_special_noarg
|| (opt->flags & OPT_NOARG))? 0: 1; || (opt->flags & OPT_NOARG))? 0: 1;
@@ -754,8 +753,8 @@ n_arguments(opt)
* add_options - add a list of options to the set we grok. * add_options - add a list of options to the set we grok.
*/ */
void void
add_options(opt) add_options(
option_t *opt; option_t *opt)
{ {
struct option_list *list; struct option_list *list;
@@ -771,7 +770,7 @@ add_options(opt)
* usage - print out a message telling how to use the program. * usage - print out a message telling how to use the program.
*/ */
static void static void
usage() usage(void)
{ {
if (pppd_phase == PHASE_INITIALIZE) if (pppd_phase == PHASE_INITIALIZE)
fprintf(stderr, usage_string, VERSION, PATCHLEVEL, IMPLEMENTATION, fprintf(stderr, usage_string, VERSION, PATCHLEVEL, IMPLEMENTATION,
@@ -813,11 +812,11 @@ option_error __V((char *fmt, ...))
* \<newline> is ignored. * \<newline> is ignored.
*/ */
int int
getword(f, word, newlinep, filename) getword(
FILE *f; FILE *f,
char *word; char *word,
int *newlinep; int *newlinep,
char *filename; char *filename)
{ {
int c, len, escape; int c, len, escape;
int quoted, comment; int quoted, comment;
@@ -1056,10 +1055,10 @@ getword(f, word, newlinep, filename)
* number_option - parse an unsigned numeric parameter for an option. * number_option - parse an unsigned numeric parameter for an option.
*/ */
static int static int
number_option(str, valp, base) number_option(
char *str; char *str,
uint32_t *valp; uint32_t *valp,
int base; int base)
{ {
char *ptr; char *ptr;
@@ -1079,9 +1078,9 @@ number_option(str, valp, base)
* if there is an error. * if there is an error.
*/ */
int int
int_option(str, valp) int_option(
char *str; char *str,
int *valp; int *valp)
{ {
uint32_t v; uint32_t v;
@@ -1100,8 +1099,8 @@ int_option(str, valp)
* readfile - take commands from a file. * readfile - take commands from a file.
*/ */
static int static int
readfile(argv) readfile(
char **argv; char **argv)
{ {
return options_from_file(*argv, 1, 1, privileged_option); return options_from_file(*argv, 1, 1, privileged_option);
} }
@@ -1111,8 +1110,8 @@ readfile(argv)
* Name may not contain /../, start with / or ../, or end in /.. * Name may not contain /../, start with / or ../, or end in /..
*/ */
static int static int
callfile(argv) callfile(
char **argv; char **argv)
{ {
char *fname, *arg, *p; char *fname, *arg, *p;
int l, ok; int l, ok;
@@ -1154,8 +1153,8 @@ callfile(argv)
* setpdebug - Set libpcap debugging level. * setpdebug - Set libpcap debugging level.
*/ */
static int static int
setpdebug(argv) setpdebug(
char **argv; char **argv)
{ {
return int_option(*argv, &dflag); return int_option(*argv, &dflag);
} }
@@ -1164,8 +1163,8 @@ setpdebug(argv)
* setpassfilter - Set the pass filter for packets * setpassfilter - Set the pass filter for packets
*/ */
static int static int
setpassfilter(argv) setpassfilter(
char **argv; char **argv)
{ {
pc.linktype = DLT_PPP; pc.linktype = DLT_PPP;
pc.snapshot = PPP_HDRLEN; pc.snapshot = PPP_HDRLEN;
@@ -1180,8 +1179,8 @@ setpassfilter(argv)
* setactivefilter - Set the active filter for packets * setactivefilter - Set the active filter for packets
*/ */
static int static int
setactivefilter(argv) setactivefilter(
char **argv; char **argv)
{ {
pc.linktype = DLT_PPP; pc.linktype = DLT_PPP;
pc.snapshot = PPP_HDRLEN; pc.snapshot = PPP_HDRLEN;
@@ -1197,8 +1196,8 @@ setactivefilter(argv)
* noopt - Disable all options. * noopt - Disable all options.
*/ */
static int static int
noopt(argv) noopt(
char **argv; char **argv)
{ {
BZERO((char *) &lcp_wantoptions[0], sizeof (struct lcp_options)); BZERO((char *) &lcp_wantoptions[0], sizeof (struct lcp_options));
BZERO((char *) &lcp_allowoptions[0], sizeof (struct lcp_options)); BZERO((char *) &lcp_allowoptions[0], sizeof (struct lcp_options));
@@ -1212,8 +1211,8 @@ noopt(argv)
* setdomain - Set domain name to append to hostname * setdomain - Set domain name to append to hostname
*/ */
static int static int
setdomain(argv) setdomain(
char **argv; char **argv)
{ {
if (!privileged_option) { if (!privileged_option) {
option_error("using the domain option requires root privilege"); option_error("using the domain option requires root privilege");
@@ -1234,8 +1233,8 @@ setdomain(argv)
* setspeed - Set the speed. * setspeed - Set the speed.
*/ */
static int static int
setspeed(arg) setspeed(
char *arg; char *arg)
{ {
long spd; long spd;
uint32_t ret = 1; uint32_t ret = 1;
@@ -1289,8 +1288,8 @@ setspeed(arg)
* setdevname - Set the device name. * setdevname - Set the device name.
*/ */
static int static int
setdevname(cp) setdevname(
char *cp; char *cp)
{ {
struct stat statbuf; struct stat statbuf;
char dev[MAXPATHLEN]; char dev[MAXPATHLEN];
@@ -1345,8 +1344,8 @@ setdevname(cp)
* setipaddr - Set the IP address * setipaddr - Set the IP address
*/ */
static int static int
setipaddr(arg) setipaddr(
char *arg; char *arg)
{ {
struct hostent *hp; struct hostent *hp;
char *colon; char *colon;
@@ -1413,8 +1412,8 @@ setipaddr(arg)
* setnetmask - set the netmask to be used on the interface. * setnetmask - set the netmask to be used on the interface.
*/ */
static int static int
setnetmask(argv) setnetmask(
char **argv; char **argv)
{ {
uint32_t mask, b; uint32_t mask, b;
int n, ok; int n, ok;
@@ -1458,8 +1457,8 @@ setnetmask(argv)
} }
static int static int
setxonxoff(argv) setxonxoff(
char **argv; char **argv)
{ {
lcp_wantoptions[0].asyncmap |= 0x000A0000; /* escape ^S and ^Q */ lcp_wantoptions[0].asyncmap |= 0x000A0000; /* escape ^S and ^Q */
lcp_wantoptions[0].neg_asyncmap = 1; lcp_wantoptions[0].neg_asyncmap = 1;
@@ -1469,8 +1468,8 @@ setxonxoff(argv)
} }
static int static int
setlogfile(argv) setlogfile(
char **argv; char **argv)
{ {
int fd, err; int fd, err;
@@ -1492,8 +1491,8 @@ setlogfile(argv)
#ifdef PLUGIN #ifdef PLUGIN
static int static int
loadplugin(argv) loadplugin(
char **argv; char **argv)
{ {
char *arg = *argv; char *arg = *argv;
void *handle; void *handle;

View File

@@ -160,9 +160,9 @@ struct protent *protocols[] = {
}; };
int int
pppdmain(argc, argv) pppdmain(
int argc; int argc,
char *argv[]; char *argv[])
{ {
int i, fdflags, t; int i, fdflags, t;
char *connector; char *connector;
@@ -478,8 +478,8 @@ pppdmain(argc, argv)
* holdoff_end - called via a timeout when the holdoff period ends. * holdoff_end - called via a timeout when the holdoff period ends.
*/ */
static void static void
holdoff_end(arg) holdoff_end(
void *arg; void *arg)
{ {
new_phase(PHASE_DORMANT); new_phase(PHASE_DORMANT);
} }

View File

@@ -99,7 +99,7 @@ static int get_ether_addr(uint32_t, struct sockaddr_dl *);
* sys_init - System-dependent initialization. * sys_init - System-dependent initialization.
*/ */
void void
sys_init() sys_init(void)
{ {
/* Get an internet socket for doing socket ioctl's on. */ /* Get an internet socket for doing socket ioctl's on. */
if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
@@ -112,7 +112,7 @@ sys_init()
* This should call die() because it's called from die(). * This should call die() because it's called from die().
*/ */
void void
sys_cleanup() sys_cleanup(void)
{ {
struct ifreq ifr; struct ifreq ifr;
@@ -136,7 +136,7 @@ sys_cleanup()
* sys_close - Clean up in a child process before execing. * sys_close - Clean up in a child process before execing.
*/ */
void void
sys_close() sys_close(void)
{ {
close(sockfd); close(sockfd);
if (loop_slave >= 0) { if (loop_slave >= 0) {
@@ -149,7 +149,7 @@ sys_close()
* sys_check_options - check the options that the user specified * sys_check_options - check the options that the user specified
*/ */
int int
sys_check_options() sys_check_options(void)
{ {
return 1; return 1;
} }
@@ -159,7 +159,7 @@ sys_check_options()
* (in fact we check whether we can do an ioctl on ppp0). * (in fact we check whether we can do an ioctl on ppp0).
*/ */
int int
ppp_available() ppp_available(void)
{ {
int s, ok; int s, ok;
struct ifreq ifr; struct ifreq ifr;
@@ -178,8 +178,8 @@ ppp_available()
* establish_ppp - Turn the serial port into a ppp interface. * establish_ppp - Turn the serial port into a ppp interface.
*/ */
int int
establish_ppp(fd) establish_ppp(
int fd; int fd)
{ {
int taskid = (int)rtems_pppd_taskid; int taskid = (int)rtems_pppd_taskid;
int pppdisc = PPPDISC; int pppdisc = PPPDISC;
@@ -252,7 +252,7 @@ establish_ppp(fd)
* restore_loop - reattach the ppp unit to the loopback. * restore_loop - reattach the ppp unit to the loopback.
*/ */
void void
restore_loop() restore_loop(void)
{ {
int x; int x;
@@ -281,8 +281,8 @@ restore_loop()
* This shouldn't call die() because it's called from die(). * This shouldn't call die() because it's called from die().
*/ */
void void
disestablish_ppp(fd) disestablish_ppp(
int fd; int fd)
{ {
int taskid = (int)0; int taskid = (int)0;
@@ -307,7 +307,7 @@ disestablish_ppp(fd)
* Check whether the link seems not to be 8-bit clean. * Check whether the link seems not to be 8-bit clean.
*/ */
void void
clean_check() clean_check(void)
{ {
int x; int x;
char *s; char *s;
@@ -343,8 +343,8 @@ clean_check()
* For *BSD, we assume that speed_t values numerically equal bits/second. * For *BSD, we assume that speed_t values numerically equal bits/second.
*/ */
void void
set_up_tty(fd, local) set_up_tty(
int fd, local; int fd, int local)
{ {
struct termios tios; struct termios tios;
@@ -412,8 +412,8 @@ set_up_tty(fd, local)
* restore_tty - restore the terminal to the saved settings. * restore_tty - restore the terminal to the saved settings.
*/ */
void void
restore_tty(fd) restore_tty(
int fd; int fd)
{ {
if (restore_term) { if (restore_term) {
if (!default_device) { if (!default_device) {
@@ -440,8 +440,8 @@ restore_tty(fd)
* This is called from die(), so it shouldn't call die(). * This is called from die(), so it shouldn't call die().
*/ */
void void
setdtr(fd, on) setdtr(
int fd, on; int fd, int on )
{ {
int modembits = TIOCM_DTR; int modembits = TIOCM_DTR;
@@ -453,11 +453,11 @@ int fd, on;
* to the uid given. Assumes slave_name points to >= 12 bytes of space. * to the uid given. Assumes slave_name points to >= 12 bytes of space.
*/ */
int int
get_pty(master_fdp, slave_fdp, slave_name, uid) get_pty(
int *master_fdp; int *master_fdp,
int *slave_fdp; int *slave_fdp,
char *slave_name; char *slave_name,
int uid; int uid)
{ {
return 1; return 1;
} }
@@ -469,7 +469,7 @@ get_pty(master_fdp, slave_fdp, slave_name, uid)
* Here we use a pty. * Here we use a pty.
*/ */
int int
open_ppp_loopback() open_ppp_loopback(void)
{ {
return loop_master; return loop_master;
} }
@@ -479,10 +479,10 @@ open_ppp_loopback()
* output - Output PPP packet. * output - Output PPP packet.
*/ */
void void
output(unit, p, len) output(
int unit; int unit,
u_char *p; u_char *p,
int len; int len)
{ {
if (debug); if (debug);
dbglog("sent %P", p, len); dbglog("sent %P", p, len);
@@ -510,8 +510,8 @@ ppp_delay(void)
* if timo is NULL). * if timo is NULL).
*/ */
void void
wait_input(timo) wait_input(
struct timeval *timo; struct timeval *timo)
{ {
rtems_event_set events; rtems_event_set events;
rtems_interval ticks = 0; rtems_interval ticks = 0;
@@ -534,8 +534,8 @@ wait_input(timo)
* read_packet - get a PPP packet from the serial device. * read_packet - get a PPP packet from the serial device.
*/ */
int int
read_packet(buf) read_packet(
u_char *buf; u_char *buf)
{ {
int len; int len;
@@ -555,7 +555,7 @@ read_packet(buf)
* Return value is 1 if we need to bring up the link, 0 otherwise. * Return value is 1 if we need to bring up the link, 0 otherwise.
*/ */
int int
get_loop_output() get_loop_output(void)
{ {
int rv = 0; int rv = 0;
int n; int n;
@@ -579,10 +579,12 @@ get_loop_output()
* the ppp interface. * the ppp interface.
*/ */
void void
ppp_send_config(unit, mtu, asyncmap, pcomp, accomp) ppp_send_config(
int unit, mtu; int unit,
uint32_t asyncmap; int mtu,
int pcomp, accomp; uint32_t asyncmap,
int pcomp,
int accomp)
{ {
u_int x; u_int x;
struct ifreq ifr; struct ifreq ifr;
@@ -609,9 +611,9 @@ ppp_send_config(unit, mtu, asyncmap, pcomp, accomp)
* ppp_set_xaccm - set the extended transmit ACCM for the interface. * ppp_set_xaccm - set the extended transmit ACCM for the interface.
*/ */
void void
ppp_set_xaccm(unit, accm) ppp_set_xaccm(
int unit; int unit,
ext_accm accm; ext_accm accm)
{ {
if (ioctl(ppp_fd, PPPIOCSXASYNCMAP, accm) < 0 && errno != ENOTTY) if (ioctl(ppp_fd, PPPIOCSXASYNCMAP, accm) < 0 && errno != ENOTTY)
warn("ioctl(set extended ACCM): %m"); warn("ioctl(set extended ACCM): %m");
@@ -623,10 +625,11 @@ ppp_set_xaccm(unit, accm)
* the ppp interface. * the ppp interface.
*/ */
void void
ppp_recv_config(unit, mru, asyncmap, pcomp, accomp) ppp_recv_config(
int unit, mru; int unit,
uint32_t asyncmap; int mru,
int pcomp, accomp; uint32_t asyncmap,
int pcomp, int accomp)
{ {
int x; int x;
@@ -648,9 +651,8 @@ ppp_recv_config(unit, mru, asyncmap, pcomp, accomp)
* (e.g. code size should be reduced), or -1 if the method is unknown. * (e.g. code size should be reduced), or -1 if the method is unknown.
*/ */
int int
ccp_test(unit, opt_ptr, opt_len, for_transmit) ccp_test(
int unit, opt_len, for_transmit; int unit, u_char *opt_ptr, int opt_len, int for_transmit)
u_char *opt_ptr;
{ {
struct ppp_option_data data; struct ppp_option_data data;
@@ -666,8 +668,8 @@ ccp_test(unit, opt_ptr, opt_len, for_transmit)
* ccp_flags_set - inform kernel about the current state of CCP. * ccp_flags_set - inform kernel about the current state of CCP.
*/ */
void void
ccp_flags_set(unit, isopen, isup) ccp_flags_set(
int unit, isopen, isup; int unit, int isopen, int isup)
{ {
int x; int x;
@@ -687,8 +689,8 @@ ccp_flags_set(unit, isopen, isup)
* 0 otherwise. This is necessary because of patent nonsense. * 0 otherwise. This is necessary because of patent nonsense.
*/ */
int int
ccp_fatal_error(unit) ccp_fatal_error(
int unit; int unit)
{ {
int x; int x;
@@ -703,9 +705,9 @@ ccp_fatal_error(unit)
* get_idle_time - return how long the link has been idle. * get_idle_time - return how long the link has been idle.
*/ */
int int
get_idle_time(u, ip) get_idle_time(
int u; int u,
struct ppp_idle *ip; struct ppp_idle *ip)
{ {
return ioctl(ppp_fd, PPPIOCGIDLE, ip) >= 0; return ioctl(ppp_fd, PPPIOCGIDLE, ip) >= 0;
} }
@@ -714,9 +716,9 @@ get_idle_time(u, ip)
* get_ppp_stats - return statistics for the link. * get_ppp_stats - return statistics for the link.
*/ */
int int
get_ppp_stats(u, stats) get_ppp_stats(
int u; int u,
struct pppd_stats *stats; struct pppd_stats *stats)
{ {
struct ifpppstatsreq req; struct ifpppstatsreq req;
@@ -737,8 +739,8 @@ get_ppp_stats(u, stats)
* set_filters - transfer the pass and active filters to the kernel. * set_filters - transfer the pass and active filters to the kernel.
*/ */
int int
set_filters(pass, active) set_filters(
struct bpf_program *pass, *active; struct bpf_program *pass, struct bpf_program *active)
{ {
int ret = 1; int ret = 1;
@@ -762,8 +764,8 @@ set_filters(pass, active)
* sifvjcomp - config tcp header compression * sifvjcomp - config tcp header compression
*/ */
int int
sifvjcomp(u, vjcomp, cidcomp, maxcid) sifvjcomp(
int u, vjcomp, cidcomp, maxcid; int u, int vjcomp, int cidcomp, int maxcid)
{ {
u_int x; u_int x;
@@ -788,8 +790,8 @@ sifvjcomp(u, vjcomp, cidcomp, maxcid)
* sifup - Config the interface up and enable IP packets to pass. * sifup - Config the interface up and enable IP packets to pass.
*/ */
int int
sifup(u) sifup(
int u; int u)
{ {
struct ifreq ifr; struct ifreq ifr;
@@ -811,10 +813,10 @@ sifup(u)
* sifnpmode - Set the mode for handling packets for a given NP. * sifnpmode - Set the mode for handling packets for a given NP.
*/ */
int int
sifnpmode(u, proto, mode) sifnpmode(
int u; int u,
int proto; int proto,
enum NPmode mode; enum NPmode mode)
{ {
struct npioctl npi; struct npioctl npi;
@@ -831,8 +833,8 @@ sifnpmode(u, proto, mode)
* sifdown - Config the interface down and disable IP. * sifdown - Config the interface down and disable IP.
*/ */
int int
sifdown(u) sifdown(
int u; int u)
{ {
struct ifreq ifr; struct ifreq ifr;
int rv; int rv;
@@ -872,9 +874,9 @@ sifdown(u)
* sifaddr - Config the interface IP addresses and netmask. * sifaddr - Config the interface IP addresses and netmask.
*/ */
int int
sifaddr(u, o, h, m) sifaddr(
int u; int u,
uint32_t o, h, m; uint32_t o, uint32_t h, uint32_t m )
{ {
struct ifaliasreq ifra; struct ifaliasreq ifra;
struct ifreq ifr; struct ifreq ifr;
@@ -912,9 +914,9 @@ sifaddr(u, o, h, m)
* through the interface if possible. * through the interface if possible.
*/ */
int int
cifaddr(u, o, h) cifaddr(
int u; int u,
uint32_t o, h; uint32_t o, uint32_t h )
{ {
struct ifaliasreq ifra; struct ifaliasreq ifra;
@@ -937,9 +939,9 @@ cifaddr(u, o, h)
* sifdefaultroute - assign a default route through the address given. * sifdefaultroute - assign a default route through the address given.
*/ */
int int
sifdefaultroute(u, l, g) sifdefaultroute(
int u; int u,
uint32_t l, g; uint32_t l, uint32_t g)
{ {
return dodefaultroute(g, 's'); return dodefaultroute(g, 's');
} }
@@ -948,9 +950,9 @@ sifdefaultroute(u, l, g)
* cifdefaultroute - delete a default route through the address given. * cifdefaultroute - delete a default route through the address given.
*/ */
int int
cifdefaultroute(u, l, g) cifdefaultroute(
int u; int u,
uint32_t l, g; uint32_t l, uint32_t g)
{ {
return dodefaultroute(g, 'c'); return dodefaultroute(g, 'c');
} }
@@ -959,9 +961,9 @@ cifdefaultroute(u, l, g)
* dodefaultroute - talk to a routing socket to add/delete a default route. * dodefaultroute - talk to a routing socket to add/delete a default route.
*/ */
static int static int
dodefaultroute(g, cmd) dodefaultroute(
uint32_t g; uint32_t g,
int cmd; int cmd)
{ {
/* int status; */ /* int status; */
struct sockaddr_in address; struct sockaddr_in address;
@@ -1023,9 +1025,9 @@ static struct {
static int arpmsg_valid; static int arpmsg_valid;
int int
sifproxyarp(unit, hisaddr) sifproxyarp(
int unit; int unit,
uint32_t hisaddr; uint32_t hisaddr)
{ {
int routes; int routes;
@@ -1073,9 +1075,9 @@ sifproxyarp(unit, hisaddr)
* cifproxyarp - Delete the proxy ARP entry for the peer. * cifproxyarp - Delete the proxy ARP entry for the peer.
*/ */
int int
cifproxyarp(unit, hisaddr) cifproxyarp(
int unit; int unit,
uint32_t hisaddr; uint32_t hisaddr)
{ {
int routes; int routes;
@@ -1108,9 +1110,9 @@ cifproxyarp(unit, hisaddr)
* sifproxyarp - Make a proxy ARP entry for the peer. * sifproxyarp - Make a proxy ARP entry for the peer.
*/ */
int int
sifproxyarp(unit, hisaddr) sifproxyarp(
int unit; int unit,
uint32_t hisaddr; uint32_t hisaddr)
{ {
struct arpreq arpreq; struct arpreq arpreq;
struct { struct {
@@ -1148,9 +1150,9 @@ sifproxyarp(unit, hisaddr)
* cifproxyarp - Delete the proxy ARP entry for the peer. * cifproxyarp - Delete the proxy ARP entry for the peer.
*/ */
int int
cifproxyarp(unit, hisaddr) cifproxyarp(
int unit; int unit,
uint32_t hisaddr; uint32_t hisaddr)
{ {
struct arpreq arpreq; struct arpreq arpreq;
@@ -1174,9 +1176,9 @@ cifproxyarp(unit, hisaddr)
#define MAX_IFS 32 #define MAX_IFS 32
static int static int
get_ether_addr(ipaddr, hwaddr) get_ether_addr(
uint32_t ipaddr; uint32_t ipaddr,
struct sockaddr_dl *hwaddr; struct sockaddr_dl *hwaddr)
{ {
struct ifreq *ifr, *ifend, *ifp; struct ifreq *ifr, *ifend, *ifp;
uint32_t ina, mask; uint32_t ina, mask;
@@ -1259,8 +1261,8 @@ get_ether_addr(ipaddr, hwaddr)
* user-specified netmask. * user-specified netmask.
*/ */
uint32_t uint32_t
GetMask(addr) GetMask(
uint32_t addr; uint32_t addr)
{ {
uint32_t mask, nmask, ina; uint32_t mask, nmask, ina;
struct ifreq *ifr, *ifend, ifreq; struct ifreq *ifr, *ifend, ifreq;
@@ -1332,7 +1334,7 @@ int have_route_to(uint32_t addr)
* Use the hostid as part of the random number seed. * Use the hostid as part of the random number seed.
*/ */
int int
get_host_seed() get_host_seed(void)
{ {
return 17; return 17;
} }

View File

@@ -96,8 +96,7 @@ static void upap_sresp(upap_state *, u_char, u_char, char *, int);
* upap_init - Initialize a UPAP unit. * upap_init - Initialize a UPAP unit.
*/ */
static void static void
upap_init(unit) upap_init(int unit)
int unit;
{ {
upap_state *u = &upap[unit]; upap_state *u = &upap[unit];
@@ -121,9 +120,10 @@ upap_init(unit)
* Set new state and send authenticate's. * Set new state and send authenticate's.
*/ */
void void
upap_authwithpeer(unit, user, password) upap_authwithpeer(
int unit; int unit,
char *user, *password; char *user,
char *password)
{ {
upap_state *u = &upap[unit]; upap_state *u = &upap[unit];
@@ -151,8 +151,7 @@ upap_authwithpeer(unit, user, password)
* Set new state. * Set new state.
*/ */
void void
upap_authpeer(unit) upap_authpeer(int unit)
int unit;
{ {
upap_state *u = &upap[unit]; upap_state *u = &upap[unit];
@@ -173,8 +172,7 @@ upap_authpeer(unit)
* upap_timeout - Retransmission timer for sending auth-reqs expired. * upap_timeout - Retransmission timer for sending auth-reqs expired.
*/ */
static void static void
upap_timeout(arg) upap_timeout(void *arg)
void *arg;
{ {
upap_state *u = (upap_state *) arg; upap_state *u = (upap_state *) arg;
@@ -197,8 +195,7 @@ upap_timeout(arg)
* upap_reqtimeout - Give up waiting for the peer to send an auth-req. * upap_reqtimeout - Give up waiting for the peer to send an auth-req.
*/ */
static void static void
upap_reqtimeout(arg) upap_reqtimeout(void *arg)
void *arg;
{ {
upap_state *u = (upap_state *) arg; upap_state *u = (upap_state *) arg;
@@ -216,8 +213,7 @@ upap_reqtimeout(arg)
* Start authenticating if pending. * Start authenticating if pending.
*/ */
static void static void
upap_lowerup(unit) upap_lowerup(int unit)
int unit;
{ {
upap_state *u = &upap[unit]; upap_state *u = &upap[unit];
@@ -243,8 +239,7 @@ upap_lowerup(unit)
* Cancel all timeouts. * Cancel all timeouts.
*/ */
static void static void
upap_lowerdown(unit) upap_lowerdown(int unit)
int unit;
{ {
upap_state *u = &upap[unit]; upap_state *u = &upap[unit];
@@ -264,8 +259,7 @@ upap_lowerdown(unit)
* This shouldn't happen. In any case, pretend lower layer went down. * This shouldn't happen. In any case, pretend lower layer went down.
*/ */
static void static void
upap_protrej(unit) upap_protrej(int unit)
int unit;
{ {
upap_state *u = &upap[unit]; upap_state *u = &upap[unit];
@@ -285,10 +279,10 @@ upap_protrej(unit)
* upap_input - Input UPAP packet. * upap_input - Input UPAP packet.
*/ */
static void static void
upap_input(unit, inpacket, l) upap_input(
int unit; int unit,
u_char *inpacket; u_char *inpacket,
int l; int l)
{ {
upap_state *u = &upap[unit]; upap_state *u = &upap[unit];
u_char *inp; u_char *inp;
@@ -343,11 +337,11 @@ upap_input(unit, inpacket, l)
* upap_rauth - Receive Authenticate. * upap_rauth - Receive Authenticate.
*/ */
static void static void
upap_rauthreq(u, inp, id, len) upap_rauthreq(
upap_state *u; upap_state *u,
u_char *inp; u_char *inp,
int id; int id,
int len; int len)
{ {
u_char ruserlen, rpasswdlen; u_char ruserlen, rpasswdlen;
char *ruser, *rpasswd; char *ruser, *rpasswd;
@@ -422,11 +416,11 @@ upap_rauthreq(u, inp, id, len)
* upap_rauthack - Receive Authenticate-Ack. * upap_rauthack - Receive Authenticate-Ack.
*/ */
static void static void
upap_rauthack(u, inp, id, len) upap_rauthack(
upap_state *u; upap_state *u,
u_char *inp; u_char *inp,
int id; int id,
int len; int len)
{ {
u_char msglen; u_char msglen;
char *msg; char *msg;
@@ -462,11 +456,11 @@ upap_rauthack(u, inp, id, len)
* upap_rauthnak - Receive Authenticate-Nakk. * upap_rauthnak - Receive Authenticate-Nakk.
*/ */
static void static void
upap_rauthnak(u, inp, id, len) upap_rauthnak(
upap_state *u; upap_state *u,
u_char *inp; u_char *inp,
int id; int id,
int len; int len)
{ {
u_char msglen; u_char msglen;
char *msg; char *msg;
@@ -503,8 +497,7 @@ upap_rauthnak(u, inp, id, len)
* upap_sauthreq - Send an Authenticate-Request. * upap_sauthreq - Send an Authenticate-Request.
*/ */
static void static void
upap_sauthreq(u) upap_sauthreq(upap_state *u)
upap_state *u;
{ {
u_char *outp; u_char *outp;
int outlen; int outlen;
@@ -536,11 +529,11 @@ upap_sauthreq(u)
* upap_sresp - Send a response (ack or nak). * upap_sresp - Send a response (ack or nak).
*/ */
static void static void
upap_sresp(u, code, id, msg, msglen) upap_sresp(
upap_state *u; upap_state *u,
u_char code, id; u_char code, u_char id,
char *msg; char *msg,
int msglen; int msglen)
{ {
u_char *outp; u_char *outp;
int outlen; int outlen;
@@ -565,11 +558,11 @@ static char *upap_codenames[] = {
}; };
static int static int
upap_printpkt(p, plen, printer, arg) upap_printpkt(
u_char *p; u_char *p,
int plen; int plen,
void (*printer)(void *, char *, ...); void (*printer)(void *, char *, ...),
void *arg; void *arg)
{ {
int code, id, len; int code, id, len;
int mlen, ulen, wlen; int mlen, ulen, wlen;

View File

@@ -93,11 +93,11 @@ slprintf __V((char *buf, int buflen, char *fmt, ...))
#define OUTCHAR(c) (buflen > 0? (--buflen, *buf++ = (c)): 0) #define OUTCHAR(c) (buflen > 0? (--buflen, *buf++ = (c)): 0)
int int
vslprintf(buf, buflen, fmt, args) vslprintf(
char *buf; char *buf,
int buflen; int buflen,
char *fmt; char *fmt,
va_list args; va_list args)
{ {
int c, i, n; int c, i, n;
int width, prec, fillch; int width, prec, fillch;
@@ -371,11 +371,11 @@ char line[256]; /* line to be logged accumulated here */
char *linep; char *linep;
void void
log_packet(p, len, prefix, level) log_packet(
u_char *p; u_char *p,
int len; int len,
char *prefix; char *prefix,
int level; int level)
{ {
strlcpy(line, prefix, sizeof(line)); strlcpy(line, prefix, sizeof(line));
linep = line + strlen(line); linep = line + strlen(line);
@@ -387,11 +387,11 @@ log_packet(p, len, prefix, level)
* calling `printer(arg, format, ...)' to output it. * calling `printer(arg, format, ...)' to output it.
*/ */
static void static void
format_packet(p, len, printer, arg) format_packet(
u_char *p; u_char *p,
int len; int len,
void (*printer)(void *, char *, ...); void (*printer)(void *, char *, ...),
void *arg; void *arg)
{ {
int i, n; int i, n;
u_short proto; u_short proto;
@@ -464,11 +464,11 @@ pr_log __V((void *arg, char *fmt, ...))
* printer. * printer.
*/ */
void void
print_string(p_arg, len, printer, arg) print_string(
void *p_arg; void *p_arg,
int len; int len,
void (*printer)(void *, char *, ...); void (*printer)(void *, char *, ...),
void *arg; void *arg)
{ {
int c; int c;
unsigned char *p = (unsigned char *)p_arg; unsigned char *p = (unsigned char *)p_arg;
@@ -503,10 +503,10 @@ print_string(p_arg, len, printer, arg)
* logit - does the hard work for fatal et al. * logit - does the hard work for fatal et al.
*/ */
static void static void
logit(level, fmt, args) logit(
int level; int level,
char *fmt; char *fmt,
va_list args; va_list args)
{ {
int n; int n;
char buf[256]; char buf[256];
@@ -662,8 +662,7 @@ static char lock_file[MAXPATHLEN];
* lock - create a lock file for the named device * lock - create a lock file for the named device
*/ */
int int
lock(dev) lock(char *dev)
char *dev;
{ {
#ifdef LOCKLIB #ifdef LOCKLIB
int result; int result;
@@ -780,8 +779,7 @@ lock(dev)
* between when the parent died and the child rewrote the lockfile). * between when the parent died and the child rewrote the lockfile).
*/ */
int int
relock(pid) relock(int pid)
int pid;
{ {
#ifdef LOCKLIB #ifdef LOCKLIB
/* XXX is there a way to do this? */ /* XXX is there a way to do this? */
@@ -816,7 +814,7 @@ relock(pid)
* unlock - remove our lockfile * unlock - remove our lockfile
*/ */
void void
unlock() unlock(void)
{ {
if (lock_file[0]) { if (lock_file[0]) {
#ifdef LOCKLIB #ifdef LOCKLIB