summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2008-08-26 10:24:22 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2008-08-26 10:24:22 +0000
commit62c37537bd593d5c1353cffea945ab3575c3f55e (patch)
tree0b006a752c96dbcb4263970fbd9f6e68aee4b083 /cpukit
parent2008-08-25 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-62c37537bd593d5c1353cffea945ab3575c3f55e.tar.bz2
Stop using old-style function-definitions.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/pppd/auth.c157
-rw-r--r--cpukit/pppd/ccp.c137
-rw-r--r--cpukit/pppd/chap.c120
-rw-r--r--cpukit/pppd/chat.c52
-rw-r--r--cpukit/pppd/demand.c30
-rw-r--r--cpukit/pppd/fsm.c106
-rw-r--r--cpukit/pppd/ipcp.c146
-rw-r--r--cpukit/pppd/lcp.c174
-rw-r--r--cpukit/pppd/magic.c4
-rw-r--r--cpukit/pppd/options.c125
-rw-r--r--cpukit/pppd/rtemsmain.c10
-rw-r--r--cpukit/pppd/sys-rtems.c204
-rw-r--r--cpukit/pppd/upap.c89
-rw-r--r--cpukit/pppd/utils.c56
14 files changed, 705 insertions, 705 deletions
diff --git a/cpukit/pppd/auth.c b/cpukit/pppd/auth.c
index ae0a039afe..ecafe4330f 100644
--- a/cpukit/pppd/auth.c
+++ b/cpukit/pppd/auth.c
@@ -236,8 +236,8 @@ option_t auth_options[] = {
* Do what's necessary to bring the physical layer up.
*/
void
-link_required(unit)
- int unit;
+link_required(
+ int unit )
{
}
@@ -246,8 +246,8 @@ link_required(unit)
* physical layer down.
*/
void
-link_terminated(unit)
- int unit;
+link_terminated(
+ int unit)
{
if (pppd_phase == PHASE_DEAD)
return;
@@ -262,8 +262,8 @@ link_terminated(unit)
* LCP has gone down; it will either die or try to re-establish.
*/
void
-link_down(unit)
- int unit;
+link_down(
+ int unit)
{
int i;
struct protent *protp;
@@ -292,8 +292,8 @@ link_down(unit)
* Proceed to the Dead, Authenticate or Network phase as appropriate.
*/
void
-link_established(unit)
- int unit;
+link_established(
+ int unit )
{
int auth;
lcp_options *wo = &lcp_wantoptions[unit];
@@ -359,8 +359,8 @@ link_established(unit)
* Proceed to the network phase.
*/
static void
-network_phase(unit)
- int unit;
+network_phase(
+ int unit )
{
#ifdef CBCP_SUPPORT
lcp_options *go = &lcp_gotoptions[unit];
@@ -395,7 +395,7 @@ network_phase(unit)
}
void
-start_networks()
+start_networks(void)
{
int i;
struct protent *protp;
@@ -418,8 +418,9 @@ start_networks()
* The peer has failed to authenticate himself using `protocol'.
*/
void
-auth_peer_fail(unit, protocol)
- int unit, protocol;
+auth_peer_fail(
+ int unit,
+ int protocol)
{
/*
* Authentication failure: take the link down
@@ -432,10 +433,11 @@ auth_peer_fail(unit, protocol)
* The peer has been successfully authenticated using `protocol'.
*/
void
-auth_peer_success(unit, protocol, name, namelen)
- int unit, protocol;
- char *name;
- int namelen;
+auth_peer_success(
+ int unit,
+ int protocol,
+ char *name,
+ int namelen)
{
int bit;
@@ -471,8 +473,9 @@ auth_peer_success(unit, protocol, name, namelen)
* We have failed to authenticate ourselves to the peer using `protocol'.
*/
void
-auth_withpeer_fail(unit, protocol)
- int unit, protocol;
+auth_withpeer_fail(
+ int unit,
+ int protocol )
{
if (passwd_from_file)
BZERO(passwd, MAXSECRETLEN);
@@ -490,8 +493,9 @@ auth_withpeer_fail(unit, protocol)
* We have successfully authenticated ourselves with the peer using `protocol'.
*/
void
-auth_withpeer_success(unit, protocol)
- int unit, protocol;
+auth_withpeer_success(
+ int unit,
+ int protocol )
{
int bit;
@@ -522,8 +526,9 @@ auth_withpeer_success(unit, protocol)
* np_up - a network protocol has come up.
*/
void
-np_up(unit, proto)
- int unit, proto;
+np_up(
+ int unit,
+ int proto )
{
int tlim;
@@ -556,8 +561,9 @@ np_up(unit, proto)
* np_down - a network protocol has gone down.
*/
void
-np_down(unit, proto)
- int unit, proto;
+np_down(
+ int unit,
+ int proto)
{
if (--num_np_up == 0) {
UNTIMEOUT(check_idle, NULL);
@@ -569,8 +575,9 @@ np_down(unit, proto)
* np_finished - a network protocol has finished using the link.
*/
void
-np_finished(unit, proto)
- int unit, proto;
+np_finished(
+ int unit,
+ int proto )
{
if (--num_np_open <= 0) {
/* no further use for the link: shut up shop. */
@@ -583,8 +590,8 @@ np_finished(unit, proto)
* enough that we can shut it down.
*/
static void
-check_idle(arg)
- void *arg;
+check_idle(
+ void *arg )
{
struct ppp_idle idle;
time_t itime;
@@ -613,8 +620,8 @@ check_idle(arg)
* connect_time_expired - log a message and close the connection.
*/
static void
-connect_time_expired(arg)
- void *arg;
+connect_time_expired(
+ void *arg)
{
info("Connect time expired");
lcp_close(0, "Connect time expired"); /* Close connection */
@@ -625,7 +632,7 @@ connect_time_expired(arg)
* auth_check_options - called to check authentication options.
*/
int
-auth_check_options()
+auth_check_options(void)
{
lcp_options *wo = &lcp_wantoptions[0];
int status = 1;
@@ -700,8 +707,8 @@ auth_check_options()
* to use for authenticating ourselves and/or the peer.
*/
void
-auth_reset(unit)
- int unit;
+auth_reset(
+ int unit)
{
lcp_options *go = &lcp_gotoptions[unit];
lcp_options *ao = &lcp_allowoptions[0];
@@ -733,13 +740,13 @@ auth_reset(unit)
* In either case, msg points to an appropriate message.
*/
int
-check_passwd(unit, auser, userlen, apasswd, passwdlen, msg)
- int unit;
- char *auser;
- int userlen;
- char *apasswd;
- int passwdlen;
- char **msg;
+check_passwd(
+ int unit,
+ char *auser,
+ int userlen,
+ char *apasswd,
+ int passwdlen,
+ char **msg)
{
char passwd[64], user[64];
@@ -772,8 +779,8 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg)
* and return 1.
*/
static int
-null_login(unit)
- int unit;
+null_login(
+ int unit)
{
return 0;
}
@@ -786,8 +793,8 @@ null_login(unit)
* Assumes passwd points to MAXSECRETLEN bytes of space (if non-null).
*/
static int
-get_pap_passwd(passwd)
- char *passwd;
+get_pap_passwd(
+ char *passwd)
{
int ret = (int)0;
@@ -807,8 +814,8 @@ get_pap_passwd(passwd)
* secrets that we could possibly use for authenticating the peer.
*/
static int
-have_pap_secret(lacks_ipp)
- int *lacks_ipp;
+have_pap_secret(
+ int *lacks_ipp)
{
return 1;
@@ -833,11 +840,11 @@ have_pap_secret(lacks_ipp)
* know the identity yet.
*/
static int
-have_chap_secret(client, server, need_ip, lacks_ipp)
- char *client;
- char *server;
- int need_ip;
- int *lacks_ipp;
+have_chap_secret(
+ char *client,
+ char *server,
+ int need_ip,
+ int *lacks_ipp)
{
return 0;
}
@@ -849,13 +856,13 @@ have_chap_secret(client, server, need_ip, lacks_ipp)
* (We could be either client or server).
*/
int
-get_secret(unit, client, server, secret, secret_len, am_server)
- int unit;
- char *client;
- char *server;
- unsigned char *secret;
- int *secret_len;
- int am_server;
+get_secret(
+ int unit,
+ char *client,
+ char *server,
+ unsigned char *secret,
+ int *secret_len,
+ int am_server)
{
int len;
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.
*/
static void
-set_allowed_addrs(unit, addrs, opts)
- int unit;
- struct wordlist *addrs;
- struct wordlist *opts;
+set_allowed_addrs(
+ int unit,
+ struct wordlist *addrs,
+ struct wordlist *opts)
{
int n;
struct wordlist *ap, **pap;
@@ -1028,9 +1035,9 @@ set_allowed_addrs(unit, addrs, opts)
* a given IP address. Returns 1 if authorized, 0 otherwise.
*/
int
-auth_ip_addr(unit, addr)
- int unit;
- uint32_t addr;
+auth_ip_addr(
+ int unit,
+ uint32_t addr)
{
#if 0
int ok;
@@ -1056,9 +1063,9 @@ auth_ip_addr(unit, addr)
#if 0
static int
-ip_addr_check(addr, addrs)
- uint32_t addr;
- struct permitted_ip *addrs;
+ip_addr_check(
+ uint32_t addr,
+ struct permitted_ip *addrs)
{
for (; ; ++addrs)
if ((addr & addrs->mask) == addrs->base)
@@ -1072,8 +1079,8 @@ ip_addr_check(addr, addrs)
* addr is in network byte order.
*/
int
-bad_ip_adrs(addr)
- uint32_t addr;
+bad_ip_adrs(
+ uint32_t addr)
{
addr = ntohl(addr);
return (addr >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET
@@ -1084,8 +1091,8 @@ bad_ip_adrs(addr)
* free_wordlist - release memory allocated for a wordlist.
*/
static void
-free_wordlist(wp)
- struct wordlist *wp;
+free_wordlist(
+ struct wordlist *wp)
{
struct wordlist *next;
@@ -1101,8 +1108,8 @@ free_wordlist(wp)
* interface-name peer-name real-user tty speed
*/
static void
-auth_script(s)
- enum script_state s;
+auth_script(
+ enum script_state s)
{
switch (s) {
case s_up:
diff --git a/cpukit/pppd/ccp.c b/cpukit/pppd/ccp.c
index 5af17e03ea..0958281217 100644
--- a/cpukit/pppd/ccp.c
+++ b/cpukit/pppd/ccp.c
@@ -175,8 +175,8 @@ static int all_rejected[NUM_PPP]; /* we rejected all peer's options */
* Option parsing.
*/
static int
-setbsdcomp(argv)
- char **argv;
+setbsdcomp(
+ char **argv)
{
int rbits, abits;
char *str, *endp;
@@ -211,8 +211,8 @@ setbsdcomp(argv)
}
static int
-setdeflate(argv)
- char **argv;
+setdeflate(
+ char **argv)
{
int rbits, abits;
char *str, *endp;
@@ -252,8 +252,8 @@ setdeflate(argv)
* ccp_init - initialize CCP.
*/
static void
-ccp_init(unit)
- int unit;
+ccp_init(
+ int unit)
{
fsm *f = &ccp_fsm[unit];
@@ -288,8 +288,8 @@ ccp_init(unit)
* ccp_open - CCP is allowed to come up.
*/
static void
-ccp_open(unit)
- int unit;
+ccp_open(
+ int unit)
{
fsm *f = &ccp_fsm[unit];
@@ -311,9 +311,9 @@ ccp_open(unit)
* ccp_close - Terminate CCP.
*/
static void
-ccp_close(unit, reason)
- int unit;
- char *reason;
+ccp_close(
+ int unit,
+ char *reason)
{
ccp_flags_set(unit, 0, 0);
fsm_close(&ccp_fsm[unit], reason);
@@ -323,8 +323,8 @@ ccp_close(unit, reason)
* ccp_lowerup - we may now transmit CCP packets.
*/
static void
-ccp_lowerup(unit)
- int unit;
+ccp_lowerup(
+ int unit)
{
fsm_lowerup(&ccp_fsm[unit]);
}
@@ -333,8 +333,8 @@ ccp_lowerup(unit)
* ccp_lowerdown - we may not transmit CCP packets.
*/
static void
-ccp_lowerdown(unit)
- int unit;
+ccp_lowerdown(
+ int unit)
{
fsm_lowerdown(&ccp_fsm[unit]);
}
@@ -343,10 +343,10 @@ ccp_lowerdown(unit)
* ccp_input - process a received CCP packet.
*/
static void
-ccp_input(unit, p, len)
- int unit;
- u_char *p;
- int len;
+ccp_input(
+ int unit,
+ u_char *p,
+ int len)
{
fsm *f = &ccp_fsm[unit];
int oldstate;
@@ -372,11 +372,11 @@ ccp_input(unit, p, len)
* Handle a CCP-specific code.
*/
static int
-ccp_extcode(f, code, id, p, len)
- fsm *f;
- int code, id;
- u_char *p;
- int len;
+ccp_extcode(
+ fsm *f,
+ int code, int id,
+ u_char *p,
+ int len)
{
switch (code) {
case CCP_RESETREQ:
@@ -405,8 +405,8 @@ ccp_extcode(f, code, id, p, len)
* ccp_protrej - peer doesn't talk CCP.
*/
static void
-ccp_protrej(unit)
- int unit;
+ccp_protrej(
+ int unit)
{
ccp_flags_set(unit, 0, 0);
fsm_lowerdown(&ccp_fsm[unit]);
@@ -416,8 +416,8 @@ ccp_protrej(unit)
* ccp_resetci - initialize at start of negotiation.
*/
static void
-ccp_resetci(f)
- fsm *f;
+ccp_resetci(
+ fsm *f)
{
ccp_options *go = &ccp_gotoptions[f->unit];
u_char opt_buf[16];
@@ -474,8 +474,8 @@ ccp_resetci(f)
* ccp_cilen - Return total length of our configuration info.
*/
static int
-ccp_cilen(f)
- fsm *f;
+ccp_cilen(
+ fsm *f)
{
ccp_options *go = &ccp_gotoptions[f->unit];
@@ -489,10 +489,10 @@ ccp_cilen(f)
* ccp_addci - put our requests in a packet.
*/
static void
-ccp_addci(f, p, lenp)
- fsm *f;
- u_char *p;
- int *lenp;
+ccp_addci(
+ fsm *f,
+ u_char *p,
+ int *lenp)
{
int res;
ccp_options *go = &ccp_gotoptions[f->unit];
@@ -581,10 +581,10 @@ ccp_addci(f, p, lenp)
* 1 iff the packet was OK.
*/
static int
-ccp_ackci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
+ccp_ackci(
+ fsm *f,
+ u_char *p,
+ int len)
{
ccp_options *go = &ccp_gotoptions[f->unit];
u_char *p0 = p;
@@ -654,10 +654,10 @@ ccp_ackci(f, p, len)
* Returns 1 iff the nak was OK.
*/
static int
-ccp_nakci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
+ccp_nakci(
+ fsm *f,
+ u_char *p,
+ int len)
{
ccp_options *go = &ccp_gotoptions[f->unit];
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.
*/
static int
-ccp_rejci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
+ccp_rejci(
+ fsm *f,
+ u_char *p,
+ int len)
{
ccp_options *go = &ccp_gotoptions[f->unit];
ccp_options try; /* options to request next time */
@@ -798,11 +798,11 @@ ccp_rejci(f, p, len)
* appropriately.
*/
static int
-ccp_reqci(f, p, lenp, dont_nak)
- fsm *f;
- u_char *p;
- int *lenp;
- int dont_nak;
+ccp_reqci(
+ fsm *f,
+ u_char *p,
+ int *lenp,
+ int dont_nak)
{
int ret, newret, res;
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).
*/
static char *
-method_name(opt, opt2)
- ccp_options *opt, *opt2;
+method_name(
+ ccp_options *opt,
+ ccp_options *opt2)
{
static char result[64];
@@ -1018,8 +1019,8 @@ method_name(opt, opt2)
* CCP has come up - inform the kernel driver and log a message.
*/
static void
-ccp_up(f)
- fsm *f;
+ccp_up(
+ fsm *f)
{
ccp_options *go = &ccp_gotoptions[f->unit];
ccp_options *ho = &ccp_hisoptions[f->unit];
@@ -1045,8 +1046,8 @@ ccp_up(f)
* CCP has gone down - inform the kernel driver.
*/
static void
-ccp_down(f)
- fsm *f;
+ccp_down(
+ fsm *f)
{
if (ccp_localstate[f->unit] & RACK_PENDING)
UNTIMEOUT(ccp_rack_timeout, f);
@@ -1065,11 +1066,11 @@ static char *ccp_codenames[] = {
};
static int
-ccp_printpkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer)(void *, char *, ...);
- void *arg;
+ccp_printpkt(
+ u_char *p,
+ int plen,
+ void (*printer)(void *, char *, ...),
+ void *arg)
{
u_char *p0, *optend;
int code, id, len;
@@ -1177,10 +1178,10 @@ ccp_printpkt(p, plen, printer, arg)
* compression :-(, otherwise we issue the reset-request.
*/
static void
-ccp_datainput(unit, pkt, len)
- int unit;
- u_char *pkt;
- int len;
+ccp_datainput(
+ int unit,
+ u_char *pkt,
+ int len)
{
fsm *f;
@@ -1212,8 +1213,8 @@ ccp_datainput(unit, pkt, len)
* Timeout waiting for reset-ack.
*/
static void
-ccp_rack_timeout(arg)
- void *arg;
+ccp_rack_timeout(
+ void *arg)
{
fsm *f = arg;
diff --git a/cpukit/pppd/chap.c b/cpukit/pppd/chap.c
index b9fef69432..884421cdb8 100644
--- a/cpukit/pppd/chap.c
+++ b/cpukit/pppd/chap.c
@@ -120,8 +120,8 @@ static void ChapGenChallenge(chap_state *);
* ChapInit - Initialize a CHAP unit.
*/
static void
-ChapInit(unit)
- int unit;
+ChapInit(
+ int unit)
{
chap_state *cstate = &chap[unit];
@@ -140,10 +140,10 @@ ChapInit(unit)
*
*/
void
-ChapAuthWithPeer(unit, our_name, digest)
- int unit;
- char *our_name;
- int digest;
+ChapAuthWithPeer(
+ int unit,
+ char *our_name,
+ int digest)
{
chap_state *cstate = &chap[unit];
@@ -170,10 +170,10 @@ ChapAuthWithPeer(unit, our_name, digest)
* ChapAuthPeer - Authenticate our peer (start server).
*/
void
-ChapAuthPeer(unit, our_name, digest)
- int unit;
- char *our_name;
- int digest;
+ChapAuthPeer(
+ int unit,
+ char *our_name,
+ int digest)
{
chap_state *cstate = &chap[unit];
@@ -197,8 +197,8 @@ ChapAuthPeer(unit, our_name, digest)
* ChapChallengeTimeout - Timeout expired on sending challenge.
*/
static void
-ChapChallengeTimeout(arg)
- void *arg;
+ChapChallengeTimeout(
+ void *arg)
{
chap_state *cstate = (chap_state *) arg;
@@ -224,8 +224,8 @@ ChapChallengeTimeout(arg)
* ChapResponseTimeout - Timeout expired on sending response.
*/
static void
-ChapResponseTimeout(arg)
- void *arg;
+ChapResponseTimeout(
+ void *arg)
{
chap_state *cstate = (chap_state *) arg;
@@ -241,8 +241,8 @@ ChapResponseTimeout(arg)
* ChapRechallenge - Time to challenge the peer again.
*/
static void
-ChapRechallenge(arg)
- void *arg;
+ChapRechallenge(
+ void *arg)
{
chap_state *cstate = (chap_state *) arg;
@@ -262,8 +262,8 @@ ChapRechallenge(arg)
* Start up if we have pending requests.
*/
static void
-ChapLowerUp(unit)
- int unit;
+ChapLowerUp(
+ int unit)
{
chap_state *cstate = &chap[unit];
@@ -288,8 +288,8 @@ ChapLowerUp(unit)
* Cancel all timeouts.
*/
static void
-ChapLowerDown(unit)
- int unit;
+ChapLowerDown(
+ int unit)
{
chap_state *cstate = &chap[unit];
@@ -312,8 +312,8 @@ ChapLowerDown(unit)
* ChapProtocolReject - Peer doesn't grok CHAP.
*/
static void
-ChapProtocolReject(unit)
- int unit;
+ChapProtocolReject(
+ int unit)
{
chap_state *cstate = &chap[unit];
@@ -331,10 +331,10 @@ ChapProtocolReject(unit)
* ChapInput - Input CHAP packet.
*/
static void
-ChapInput(unit, inpacket, packet_len)
- int unit;
- u_char *inpacket;
- int packet_len;
+ChapInput(
+ int unit,
+ u_char *inpacket,
+ int packet_len)
{
chap_state *cstate = &chap[unit];
u_char *inp;
@@ -394,11 +394,11 @@ ChapInput(unit, inpacket, packet_len)
* ChapReceiveChallenge - Receive Challenge and send Response.
*/
static void
-ChapReceiveChallenge(cstate, inp, id, len)
- chap_state *cstate;
- u_char *inp;
- int id;
- int len;
+ChapReceiveChallenge(
+ chap_state *cstate,
+ u_char *inp,
+ int id,
+ int len)
{
int rchallenge_len;
u_char *rchallenge;
@@ -487,11 +487,11 @@ ChapReceiveChallenge(cstate, inp, id, len)
* ChapReceiveResponse - Receive and process response.
*/
static void
-ChapReceiveResponse(cstate, inp, id, len)
- chap_state *cstate;
- u_char *inp;
- int id;
- int len;
+ChapReceiveResponse(
+ chap_state *cstate,
+ u_char *inp,
+ int id,
+ int len)
{
u_char *remmd, remmd_len;
int secret_len, old_state;
@@ -601,11 +601,11 @@ ChapReceiveResponse(cstate, inp, id, len)
* ChapReceiveSuccess - Receive Success
*/
static void
-ChapReceiveSuccess(cstate, inp, id, len)
- chap_state *cstate;
- u_char *inp;
- u_char id;
- int len;
+ChapReceiveSuccess(
+ chap_state *cstate,
+ u_char *inp,
+ u_char id,
+ int len)
{
if (cstate->clientstate == CHAPCS_OPEN)
@@ -636,11 +636,11 @@ ChapReceiveSuccess(cstate, inp, id, len)
* ChapReceiveFailure - Receive failure.
*/
static void
-ChapReceiveFailure(cstate, inp, id, len)
- chap_state *cstate;
- u_char *inp;
- u_char id;
- int len;
+ChapReceiveFailure(
+ chap_state *cstate,
+ u_char *inp,
+ u_char id,
+ int len)
{
if (cstate->clientstate != CHAPCS_RESPONSE) {
/* don't know what this is */
@@ -665,8 +665,8 @@ ChapReceiveFailure(cstate, inp, id, len)
* ChapSendChallenge - Send an Authenticate challenge.
*/
static void
-ChapSendChallenge(cstate)
- chap_state *cstate;
+ChapSendChallenge(
+ chap_state *cstate)
{
u_char *outp;
int chal_len, name_len;
@@ -700,9 +700,9 @@ ChapSendChallenge(cstate)
* ChapSendStatus - Send a status response (ack or nak).
*/
static void
-ChapSendStatus(cstate, code)
- chap_state *cstate;
- int code;
+ChapSendStatus(
+ chap_state *cstate,
+ int code)
{
u_char *outp;
int outlen, msglen;
@@ -734,8 +734,8 @@ ChapSendStatus(cstate, code)
*/
static void
-ChapGenChallenge(cstate)
- chap_state *cstate;
+ChapGenChallenge(
+ chap_state *cstate)
{
int chal_len;
u_char *ptr = cstate->challenge;
@@ -761,8 +761,8 @@ ChapGenChallenge(cstate)
*/
/* ARGSUSED */
static void
-ChapSendResponse(cstate)
- chap_state *cstate;
+ChapSendResponse(
+ chap_state *cstate)
{
u_char *outp;
int outlen, md_len, name_len;
@@ -800,11 +800,11 @@ static char *ChapCodenames[] = {
};
static int
-ChapPrintPkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer)(void *, char *, ...);
- void *arg;
+ChapPrintPkt(
+ u_char *p,
+ int plen,
+ void (*printer)(void *, char *, ...),
+ void *arg)
{
int code, id, len;
int clen, nlen;
diff --git a/cpukit/pppd/chat.c b/cpukit/pppd/chat.c
index 921e1c832e..8b6311221d 100644
--- a/cpukit/pppd/chat.c
+++ b/cpukit/pppd/chat.c
@@ -200,9 +200,9 @@ char *expect_strtok(char *, char *);
int chatmain(int, int, char *);
-void *dup_mem(b, c)
-void *b;
-size_t c;
+void *dup_mem(
+ void *b,
+ size_t c)
{
void *ans = malloc (c);
if (!ans)
@@ -212,8 +212,8 @@ size_t c;
return ans;
}
-void *copy_of (s)
-char *s;
+void *copy_of(
+ char *s)
{
return dup_mem(s, strlen (s) + 1);
}
@@ -273,7 +273,7 @@ int chatmain(int fd, int mode, char *pScript)
return ( exit_code );
}
-void break_sequence()
+void break_sequence(void)
{
tcsendbreak(ttyfd, 0);
}
@@ -281,9 +281,9 @@ void break_sequence()
/*
* 'Clean up' this string.
*/
-static char *clean(s, sending)
-register char *s;
-int sending; /* set to 1 when sending (putting) this string. */
+static char *clean(
+ char *s,
+ int sending ) /* set to 1 when sending (putting) this string. */
{
char temp[STR_LEN], env_str[STR_LEN], cur_chr;
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.
*/
-char *expect_strtok (s, term)
- char *s, *term;
+char *expect_strtok (
+ char *s, char *term)
{
static char *str = "";
int escape_flag = 0;
@@ -507,8 +507,8 @@ char *expect_strtok (s, term)
/*
* Process the expect string
*/
-void chat_expect (s)
-char *s;
+void chat_expect (
+ char *s)
{
char *expect;
char *reply;
@@ -588,8 +588,8 @@ char *s;
* the data.
*/
-static char *character(c)
-int c;
+static char *character(
+ int c)
{
static char string[10];
char *meta;
@@ -611,8 +611,8 @@ int c;
/*
* process the reply string
*/
-void chat_send (s)
-register char *s;
+void chat_send (
+ char *s)
{
/* char file_data[STR_LEN]; */
@@ -687,7 +687,7 @@ register char *s;
}
}
-static int get_char()
+static int get_char(void)
{
int status;
char c;
@@ -706,16 +706,16 @@ static int get_char()
return -1;
}
-static int put_char(c)
-int c;
+static int put_char(
+ int c)
{
char ch = c;
return(write(ttyfd, &ch, 1));
}
-static int write_char (c)
-int c;
+static int write_char (
+ int c)
{
if (put_char(c) < 1) {
return (0);
@@ -723,8 +723,8 @@ int c;
return (1);
}
-static int put_string (s)
-register char *s;
+static int put_string (
+ char *s)
{
char *out,*free_ptr=0;
@@ -776,8 +776,8 @@ register char *s;
/*
* 'Wait for' this string to appear on this file descriptor.
*/
-static int get_string(in_string)
-register char *in_string;
+static int get_string(
+ char *in_string)
{
int c, len, minlen;
register char *s = temp2, *end = s + STR_LEN;
diff --git a/cpukit/pppd/demand.c b/cpukit/pppd/demand.c
index efcab0a2f5..a094a15f50 100644
--- a/cpukit/pppd/demand.c
+++ b/cpukit/pppd/demand.c
@@ -67,7 +67,7 @@ static int active_packet(unsigned char *, int);
* demand_conf - configure the interface for doing dial-on-demand.
*/
void
-demand_conf()
+demand_conf(void)
{
int i;
struct protent *protp;
@@ -106,7 +106,7 @@ demand_conf()
* demand_block - set each network protocol to block further packets.
*/
void
-demand_block()
+demand_block(void)
{
int i;
struct protent *protp;
@@ -122,7 +122,7 @@ demand_block()
* with an error.
*/
void
-demand_discard()
+demand_discard(void)
{
struct packet *pkt, *nextpkt;
int i;
@@ -149,7 +149,7 @@ demand_discard()
* demand_unblock - set each enabled network protocol to pass packets.
*/
void
-demand_unblock()
+demand_unblock(void)
{
int i;
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.
*/
int
-loop_chars(p, n)
- unsigned char *p;
- int n;
+loop_chars(
+ unsigned char *p,
+ int n)
{
int c, rv;
@@ -255,9 +255,9 @@ loop_chars(p, n)
* bring up the link.
*/
int
-loop_frame(frame, len)
- unsigned char *frame;
- int len;
+loop_frame(
+ unsigned char *frame,
+ int len)
{
struct packet *pkt;
@@ -288,8 +288,8 @@ loop_frame(frame, len)
* loopback, now that the real serial link is up.
*/
void
-demand_rexmit(proto)
- int proto;
+demand_rexmit(
+ int proto)
{
struct packet *pkt, *prev, *nextpkt;
@@ -319,9 +319,9 @@ demand_rexmit(proto)
* that is, whether it is worth bringing up the link for.
*/
static int
-active_packet(p, len)
- unsigned char *p;
- int len;
+active_packet(
+ unsigned char *p,
+ int len)
{
int proto, i;
struct protent *protp;
diff --git a/cpukit/pppd/fsm.c b/cpukit/pppd/fsm.c
index c44e7bd930..965323ae49 100644
--- a/cpukit/pppd/fsm.c
+++ b/cpukit/pppd/fsm.c
@@ -54,8 +54,8 @@ int peer_mru[NUM_PPP];
* Initialize fsm state.
*/
void
-fsm_init(f)
- fsm *f;
+fsm_init(
+ fsm *f)
{
f->state = INITIAL;
f->flags = 0;
@@ -72,8 +72,8 @@ fsm_init(f)
* fsm_lowerup - The lower layer is up.
*/
void
-fsm_lowerup(f)
- fsm *f;
+fsm_lowerup(
+ fsm *f)
{
switch( f->state ){
case INITIAL:
@@ -102,8 +102,8 @@ fsm_lowerup(f)
* Cancel all timeouts and inform upper layers.
*/
void
-fsm_lowerdown(f)
- fsm *f;
+fsm_lowerdown(
+ fsm *f)
{
switch( f->state ){
case CLOSED:
@@ -145,8 +145,8 @@ fsm_lowerdown(f)
* fsm_open - Link is allowed to come up.
*/
void
-fsm_open(f)
- fsm *f;
+fsm_open(
+ fsm *f)
{
switch( f->state ){
case INITIAL:
@@ -186,9 +186,9 @@ fsm_open(f)
* the CLOSED state.
*/
void
-fsm_close(f, reason)
- fsm *f;
- char *reason;
+fsm_close(
+ fsm *f,
+ char *reason)
{
f->term_reason = reason;
f->term_reason_len = (reason == NULL? 0: strlen(reason));
@@ -229,8 +229,8 @@ fsm_close(f, reason)
* fsm_timeout - Timeout expired.
*/
static void
-fsm_timeout(arg)
- void *arg;
+fsm_timeout(
+ void *arg)
{
fsm *f = (fsm *) arg;
@@ -282,10 +282,10 @@ fsm_timeout(arg)
* fsm_input - Input packet.
*/
void
-fsm_input(f, inpacket, l)
- fsm *f;
- u_char *inpacket;
- int l;
+fsm_input(
+ fsm *f,
+ u_char *inpacket,
+ int l)
{
u_char *inp;
u_char code, id;
@@ -361,11 +361,11 @@ fsm_input(f, inpacket, l)
* fsm_rconfreq - Receive Configure-Request.
*/
static void
-fsm_rconfreq(f, id, inp, len)
- fsm *f;
- u_char id;
- u_char *inp;
- int len;
+fsm_rconfreq(
+ fsm *f,
+ u_char id,
+ u_char *inp,
+ int len)
{
int code, reject_if_disagree;
@@ -433,11 +433,11 @@ fsm_rconfreq(f, id, inp, len)
* fsm_rconfack - Receive Configure-Ack.
*/
static void
-fsm_rconfack(f, id, inp, len)
- fsm *f;
- int id;
- u_char *inp;
- int len;
+fsm_rconfack(
+ fsm *f,
+ int id,
+ u_char *inp,
+ int len)
{
if (id != f->reqid || f->seen_ack) /* Expected id? */
return; /* Nope, toss... */
@@ -490,11 +490,11 @@ fsm_rconfack(f, id, inp, len)
* fsm_rconfnakrej - Receive Configure-Nak or Configure-Reject.
*/
static void
-fsm_rconfnakrej(f, code, id, inp, len)
- fsm *f;
- int code, id;
- u_char *inp;
- int len;
+fsm_rconfnakrej(
+ fsm *f,
+ int code, int id,
+ u_char *inp,
+ int len)
{
int (*proc)(fsm *, u_char *, int);
int ret;
@@ -547,11 +547,11 @@ fsm_rconfnakrej(f, code, id, inp, len)
* fsm_rtermreq - Receive Terminate-Req.
*/
static void
-fsm_rtermreq(f, id, p, len)
- fsm *f;
- int id;
- u_char *p;
- int len;
+fsm_rtermreq(
+ fsm *f,
+ int id,
+ u_char *p,
+ int len)
{
switch (f->state) {
case ACKRCVD:
@@ -580,8 +580,8 @@ fsm_rtermreq(f, id, p, len)
* fsm_rtermack - Receive Terminate-Ack.
*/
static void
-fsm_rtermack(f)
- fsm *f;
+fsm_rtermack(
+ fsm *f)
{
switch (f->state) {
case CLOSING:
@@ -614,10 +614,10 @@ fsm_rtermack(f)
* fsm_rcoderej - Receive an Code-Reject.
*/
static void
-fsm_rcoderej(f, inp, len)
- fsm *f;
- u_char *inp;
- int len;
+fsm_rcoderej(
+ fsm *f,
+ u_char *inp,
+ int len)
{
u_char code, id;
@@ -640,8 +640,8 @@ fsm_rcoderej(f, inp, len)
* Treat this as a catastrophic error (RXJ-).
*/
void
-fsm_protreject(f)
- fsm *f;
+fsm_protreject(
+ fsm *f)
{
switch( f->state ){
case CLOSING:
@@ -690,9 +690,9 @@ fsm_protreject(f)
* fsm_sconfreq - Send a Configure-Request.
*/
static void
-fsm_sconfreq(f, retransmit)
- fsm *f;
- int retransmit;
+fsm_sconfreq(
+ fsm *f,
+ int retransmit)
{
u_char *outp;
int cilen;
@@ -740,11 +740,11 @@ fsm_sconfreq(f, retransmit)
* Used for all packets sent to our peer by this module.
*/
void
-fsm_sdata(f, code, id, data, datalen)
- fsm *f;
- u_char code, id;
- u_char *data;
- int datalen;
+fsm_sdata(
+ fsm *f,
+ u_char code, u_char id,
+ u_char *data,
+ int datalen)
{
u_char *outp;
int outlen;
diff --git a/cpukit/pppd/ipcp.c b/cpukit/pppd/ipcp.c
index 04926855d4..68d2297370 100644
--- a/cpukit/pppd/ipcp.c
+++ b/cpukit/pppd/ipcp.c
@@ -217,8 +217,8 @@ static void ipcp_clear_addrs(int, uint32_t, uint32_t);
* Make a string representation of a network IP address.
*/
char *
-ip_ntoa(ipaddr)
-uint32_t ipaddr;
+ip_ntoa(
+ uint32_t ipaddr)
{
static char b[64];
@@ -234,8 +234,8 @@ uint32_t ipaddr;
* setvjslots - set maximum number of connection slots for VJ compression
*/
static int
-setvjslots(argv)
- char **argv;
+setvjslots(
+ char **argv)
{
int value;
@@ -254,8 +254,8 @@ setvjslots(argv)
* setdnsaddr - set the dns address(es)
*/
static int
-setdnsaddr(argv)
- char **argv;
+setdnsaddr(
+ char **argv)
{
uint32_t dns;
struct hostent *hp;
@@ -286,8 +286,8 @@ setdnsaddr(argv)
* the caller to the existing WINS server on a Windows NT platform.
*/
static int
-setwinsaddr(argv)
- char **argv;
+setwinsaddr(
+ char **argv)
{
uint32_t wins;
struct hostent *hp;
@@ -317,8 +317,8 @@ setwinsaddr(argv)
* ipcp_init - Initialize IPCP.
*/
static void
-ipcp_init(unit)
- int unit;
+ipcp_init(
+ int unit)
{
fsm *f = &ipcp_fsm[unit];
ipcp_options *wo = &ipcp_wantoptions[unit];
@@ -360,8 +360,8 @@ ipcp_init(unit)
* ipcp_open - IPCP is allowed to come up.
*/
static void
-ipcp_open(unit)
- int unit;
+ipcp_open(
+ int unit)
{
fsm_open(&ipcp_fsm[unit]);
}
@@ -371,9 +371,9 @@ ipcp_open(unit)
* ipcp_close - Take IPCP down.
*/
static void
-ipcp_close(unit, reason)
- int unit;
- char *reason;
+ipcp_close(
+ int unit,
+ char *reason)
{
fsm_close(&ipcp_fsm[unit], reason);
}
@@ -383,8 +383,8 @@ ipcp_close(unit, reason)
* ipcp_lowerup - The lower layer is up.
*/
static void
-ipcp_lowerup(unit)
- int unit;
+ipcp_lowerup(
+ int unit)
{
fsm_lowerup(&ipcp_fsm[unit]);
}
@@ -394,8 +394,8 @@ ipcp_lowerup(unit)
* ipcp_lowerdown - The lower layer is down.
*/
static void
-ipcp_lowerdown(unit)
- int unit;
+ipcp_lowerdown(
+ int unit)
{
fsm_lowerdown(&ipcp_fsm[unit]);
}
@@ -405,10 +405,10 @@ ipcp_lowerdown(unit)
* ipcp_input - Input IPCP packet.
*/
static void
-ipcp_input(unit, p, len)
- int unit;
- u_char *p;
- int len;
+ipcp_input(
+ int unit,
+ u_char *p,
+ int 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.
*/
static void
-ipcp_protrej(unit)
- int unit;
+ipcp_protrej(
+ int unit)
{
fsm_lowerdown(&ipcp_fsm[unit]);
}
@@ -432,8 +432,8 @@ ipcp_protrej(unit)
* Called by fsm_sconfreq, Send Configure Request.
*/
static void
-ipcp_resetci(f)
- fsm *f;
+ipcp_resetci(
+ fsm *f)
{
ipcp_options *wo = &ipcp_wantoptions[f->unit];
ipcp_options *go = &ipcp_gotoptions[f->unit];
@@ -456,8 +456,8 @@ ipcp_resetci(f)
* Called by fsm_sconfreq, Send Configure Request.
*/
static int
-ipcp_cilen(f)
- fsm *f;
+ipcp_cilen(
+ fsm *f)
{
ipcp_options *go = &ipcp_gotoptions[f->unit];
ipcp_options *wo = &ipcp_wantoptions[f->unit];
@@ -498,10 +498,10 @@ ipcp_cilen(f)
* Called by fsm_sconfreq, Send Configure Request.
*/
static void
-ipcp_addci(f, ucp, lenp)
- fsm *f;
- u_char *ucp;
- int *lenp;
+ipcp_addci(
+ fsm *f,
+ u_char *ucp,
+ int *lenp)
{
ipcp_options *go = &ipcp_gotoptions[f->unit];
int len = *lenp;
@@ -576,10 +576,10 @@ ipcp_addci(f, ucp, lenp)
* 1 - Ack was good.
*/
static int
-ipcp_ackci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
+ipcp_ackci(
+ fsm *f,
+ u_char *p,
+ int len)
{
ipcp_options *go = &ipcp_gotoptions[f->unit];
u_short cilen, citype, cishort;
@@ -686,10 +686,10 @@ bad:
* 1 - Nak was good.
*/
static int
-ipcp_nakci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
+ipcp_nakci(
+ fsm *f,
+ u_char *p,
+ int len)
{
ipcp_options *go = &ipcp_gotoptions[f->unit];
u_char cimaxslotindex, cicflag;
@@ -873,10 +873,10 @@ bad:
* Callback from fsm_rconfnakrej.
*/
static int
-ipcp_rejci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
+ipcp_rejci(
+ fsm *f,
+ u_char *p,
+ int len)
{
ipcp_options *go = &ipcp_gotoptions[f->unit];
u_char cimaxslotindex, ciflag, cilen;
@@ -989,11 +989,11 @@ bad:
* CONFNAK; returns CONFREJ if it can't return CONFACK.
*/
static int
-ipcp_reqci(f, inp, len, reject_if_disagree)
- fsm *f;
- u_char *inp; /* Requested CIs */
- int *len; /* Length of requested CIs */
- int reject_if_disagree;
+ipcp_reqci(
+ fsm *f,
+ u_char *inp, /* Requested CIs */
+ int *len, /* Length of requested CIs */
+ int reject_if_disagree)
{
ipcp_options *wo = &ipcp_wantoptions[f->unit];
ipcp_options *ho = &ipcp_hisoptions[f->unit];
@@ -1280,7 +1280,7 @@ endswitch:
* and assign appropriate defaults.
*/
static void
-ip_check_options()
+ip_check_options(void)
{
struct hostent *hp;
uint32_t local;
@@ -1311,8 +1311,8 @@ ip_check_options()
* IPCP were up, for use with dial-on-demand.
*/
static int
-ip_demand_conf(u)
- int u;
+ip_demand_conf(
+ int 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.
*/
static void
-ipcp_up(f)
- fsm *f;
+ipcp_up(
+ fsm *f)
{
uint32_t mask;
ipcp_options *ho = &ipcp_hisoptions[f->unit];
@@ -1504,8 +1504,8 @@ ipcp_up(f)
* and delete routes through it.
*/
static void
-ipcp_down(f)
- fsm *f;
+ipcp_down(
+ fsm *f)
{
IPCPDEBUG(("ipcp: down"));
/* XXX a bit IPv4-centric here, we only need to get the stats
@@ -1539,10 +1539,10 @@ ipcp_down(f)
* proxy arp entries, etc.
*/
static void
-ipcp_clear_addrs(unit, ouraddr, hisaddr)
- int unit;
- uint32_t ouraddr; /* local address */
- uint32_t hisaddr; /* remote address */
+ipcp_clear_addrs(
+ int unit,
+ uint32_t ouraddr, /* local address */
+ uint32_t hisaddr /* remote address */)
{
if (proxy_arp_set[unit]) {
cifproxyarp(unit, hisaddr);
@@ -1560,8 +1560,8 @@ ipcp_clear_addrs(unit, ouraddr, hisaddr)
* ipcp_finished - possibly shut down the lower layers.
*/
static void
-ipcp_finished(f)
- fsm *f;
+ipcp_finished(
+ fsm *f)
{
np_finished(f->unit, PPP_IP);
}
@@ -1570,8 +1570,8 @@ ipcp_finished(f)
* create_resolv - create the replacement resolv.conf file
*/
static void
-create_resolv(peerdns1, peerdns2)
- uint32_t peerdns1, peerdns2;
+create_resolv(
+ uint32_t peerdns1, uint32_t peerdns2)
{
/* initialize values */
rtems_bsdnet_nameserver_count = 0;
@@ -1601,11 +1601,11 @@ static char *ipcp_codenames[] = {
};
static int
-ipcp_printpkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer)(void *, char *, ...);
- void *arg;
+ipcp_printpkt(
+ u_char *p,
+ int plen,
+ void (*printer)(void *, char *, ...),
+ void *arg)
{
int code, id, len, olen;
u_char *pstart, *optend;
@@ -1743,9 +1743,9 @@ ipcp_printpkt(p, plen, printer, arg)
#define get_tcpflags(x) (((unsigned char *)(x))[13])
static int
-ip_active_pkt(pkt, len)
- u_char *pkt;
- int len;
+ip_active_pkt(
+ u_char *pkt,
+ int len)
{
u_char *tcp;
int hlen;
diff --git a/cpukit/pppd/lcp.c b/cpukit/pppd/lcp.c
index 99f5986904..a931c2d1de 100644
--- a/cpukit/pppd/lcp.c
+++ b/cpukit/pppd/lcp.c
@@ -223,8 +223,8 @@ int lcp_loopbackfail = DEFLOOPBACKFAIL;
* setescape - add chars to the set we escape on transmission.
*/
static int
-setescape(argv)
- char **argv;
+setescape(
+ char **argv)
{
int n, ret;
char *p, *endp;
@@ -254,8 +254,8 @@ setescape(argv)
* lcp_init - Initialize LCP.
*/
static void
-lcp_init(unit)
- int unit;
+lcp_init(
+ int unit)
{
fsm *f = &lcp_fsm[unit];
lcp_options *wo = &lcp_wantoptions[unit];
@@ -310,8 +310,8 @@ lcp_init(unit)
* lcp_open - LCP is allowed to come up.
*/
void
-lcp_open(unit)
- int unit;
+lcp_open(
+ int unit)
{
fsm *f = &lcp_fsm[unit];
lcp_options *wo = &lcp_wantoptions[unit];
@@ -329,9 +329,9 @@ lcp_open(unit)
* lcp_close - Take LCP down.
*/
void
-lcp_close(unit, reason)
- int unit;
- char *reason;
+lcp_close(
+ int unit,
+ char *reason)
{
fsm *f = &lcp_fsm[unit];
@@ -356,8 +356,8 @@ lcp_close(unit, reason)
* lcp_lowerup - The lower layer is up.
*/
void
-lcp_lowerup(unit)
- int unit;
+lcp_lowerup(
+ int unit)
{
lcp_options *wo = &lcp_wantoptions[unit];
@@ -381,8 +381,8 @@ lcp_lowerup(unit)
* lcp_lowerdown - The lower layer is down.
*/
void
-lcp_lowerdown(unit)
- int unit;
+lcp_lowerdown(
+ int unit)
{
fsm_lowerdown(&lcp_fsm[unit]);
}
@@ -392,10 +392,10 @@ lcp_lowerdown(unit)
* lcp_input - Input LCP packet.
*/
static void
-lcp_input(unit, p, len)
- int unit;
- u_char *p;
- int len;
+lcp_input(
+ int unit,
+ u_char *p,
+ int len)
{
fsm *f = &lcp_fsm[unit];
@@ -407,11 +407,11 @@ lcp_input(unit, p, len)
* lcp_extcode - Handle a LCP-specific code.
*/
static int
-lcp_extcode(f, code, id, inp, len)
- fsm *f;
- int code, id;
- u_char *inp;
- int len;
+lcp_extcode(
+ fsm *f,
+ int code, int id,
+ u_char *inp,
+ int len)
{
u_char *magp;
@@ -448,10 +448,10 @@ lcp_extcode(f, code, id, inp, len)
* Figure out which protocol is rejected and inform it.
*/
static void
-lcp_rprotrej(f, inp, len)
- fsm *f;
- u_char *inp;
- int len;
+lcp_rprotrej(
+ fsm *f,
+ u_char *inp,
+ int len)
{
int i;
struct protent *protp;
@@ -491,8 +491,8 @@ lcp_rprotrej(f, inp, len)
*/
/*ARGSUSED*/
static void
-lcp_protrej(unit)
- int unit;
+lcp_protrej(
+ int unit)
{
/*
* Can't reject LCP!
@@ -506,10 +506,10 @@ lcp_protrej(unit)
* lcp_sprotrej - Send a Protocol-Reject for some protocol.
*/
void
-lcp_sprotrej(unit, p, len)
- int unit;
- u_char *p;
- int len;
+lcp_sprotrej(
+ int unit,
+ u_char *p,
+ int len)
{
/*
* Send back the protocol and the information field of the
@@ -527,8 +527,8 @@ lcp_sprotrej(unit, p, len)
* lcp_resetci - Reset our CI.
*/
static void
-lcp_resetci(f)
- fsm *f;
+lcp_resetci(
+ fsm *f)
{
lcp_wantoptions[f->unit].magicnumber = magic();
lcp_wantoptions[f->unit].numloops = 0;
@@ -542,8 +542,8 @@ lcp_resetci(f)
* lcp_cilen - Return length of our CI.
*/
static int
-lcp_cilen(f)
- fsm *f;
+lcp_cilen(
+ fsm *f)
{
lcp_options *go = &lcp_gotoptions[f->unit];
@@ -573,10 +573,10 @@ lcp_cilen(f)
* lcp_addci - Add our desired CIs to a packet.
*/
static void
-lcp_addci(f, ucp, lenp)
- fsm *f;
- u_char *ucp;
- int *lenp;
+lcp_addci(
+ fsm *f,
+ u_char *ucp,
+ int *lenp)
{
lcp_options *go = &lcp_gotoptions[f->unit];
u_char *start_ucp = ucp;
@@ -646,10 +646,10 @@ lcp_addci(f, ucp, lenp)
* 1 - Ack was good.
*/
static int
-lcp_ackci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
+lcp_ackci(
+ fsm *f,
+ u_char *p,
+ int len)
{
lcp_options *go = &lcp_gotoptions[f->unit];
u_char cilen, citype, cichar;
@@ -776,10 +776,10 @@ bad:
* 1 - Nak was good.
*/
static int
-lcp_nakci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
+lcp_nakci(
+ fsm *f,
+ u_char *p,
+ int len)
{
lcp_options *go = &lcp_gotoptions[f->unit];
lcp_options *wo = &lcp_wantoptions[f->unit];
@@ -1088,10 +1088,10 @@ bad:
* 1 - Reject was good.
*/
static int
-lcp_rejci(f, p, len)
- fsm *f;
- u_char *p;
- int len;
+lcp_rejci(
+ fsm *f,
+ u_char *p,
+ int len)
{
lcp_options *go = &lcp_gotoptions[f->unit];
u_char cichar;
@@ -1222,11 +1222,11 @@ bad:
* CONFNAK; returns CONFREJ if it can't return CONFACK.
*/
static int
-lcp_reqci(f, inp, lenp, reject_if_disagree)
- fsm *f;
- u_char *inp; /* Requested CIs */
- int *lenp; /* Length of requested CIs */
- int reject_if_disagree;
+lcp_reqci(
+ fsm *f,
+ u_char *inp, /* Requested CIs */
+ int *lenp, /* Length of requested CIs */
+ int reject_if_disagree)
{
lcp_options *go = &lcp_gotoptions[f->unit];
lcp_options *ho = &lcp_hisoptions[f->unit];
@@ -1538,8 +1538,8 @@ endswitch:
* lcp_up - LCP has come UP.
*/
static void
-lcp_up(f)
- fsm *f;
+lcp_up(
+ fsm *f)
{
lcp_options *wo = &lcp_wantoptions[f->unit];
lcp_options *ho = &lcp_hisoptions[f->unit];
@@ -1579,8 +1579,8 @@ lcp_up(f)
* Alert other protocols.
*/
static void
-lcp_down(f)
- fsm *f;
+lcp_down(
+ fsm *f)
{
lcp_options *go = &lcp_gotoptions[f->unit];
@@ -1600,8 +1600,8 @@ lcp_down(f)
* lcp_starting - LCP needs the lower layer up.
*/
static void
-lcp_starting(f)
- fsm *f;
+lcp_starting(
+ fsm *f)
{
link_required(f->unit);
}
@@ -1611,8 +1611,8 @@ lcp_starting(f)
* lcp_finished - LCP has finished with the lower layer.
*/
static void
-lcp_finished(f)
- fsm *f;
+lcp_finished(
+ fsm *f)
{
link_terminated(f->unit);
}
@@ -1628,11 +1628,11 @@ static char *lcp_codenames[] = {
};
static int
-lcp_printpkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer)(void *, char *, ...);
- void *arg;
+lcp_printpkt(
+ u_char *p,
+ int plen,
+ void (*printer)(void *, char *, ...),
+ void *arg)
{
int code, id, len, olen;
u_char *pstart, *optend;
@@ -1808,8 +1808,8 @@ lcp_printpkt(p, plen, printer, arg)
*/
static
-void LcpLinkFailure (f)
- fsm *f;
+void LcpLinkFailure (
+ fsm *f)
{
if (f->state == OPENED) {
info("No response to %d echo-requests", lcp_echos_pending);
@@ -1824,8 +1824,8 @@ void LcpLinkFailure (f)
*/
static void
-LcpEchoCheck (f)
- fsm *f;
+LcpEchoCheck (
+ fsm *f)
{
LcpSendEchoRequest (f);
if (f->state != OPENED)
@@ -1845,8 +1845,8 @@ LcpEchoCheck (f)
*/
static void
-LcpEchoTimeout (arg)
- void *arg;
+LcpEchoTimeout (
+ void *arg)
{
if (lcp_echo_timer_running != 0) {
lcp_echo_timer_running = 0;
@@ -1859,11 +1859,11 @@ LcpEchoTimeout (arg)
*/
static void
-lcp_received_echo_reply (f, id, inp, len)
- fsm *f;
- int id;
- u_char *inp;
- int len;
+lcp_received_echo_reply (
+ fsm *f,
+ int id,
+ u_char *inp,
+ int len)
{
uint32_t magic;
@@ -1888,8 +1888,8 @@ lcp_received_echo_reply (f, id, inp, len)
*/
static void
-LcpSendEchoRequest (f)
- fsm *f;
+LcpSendEchoRequest (
+ fsm *f)
{
uint32_t lcp_magic;
u_char pkt[4], *pktp;
@@ -1921,8 +1921,8 @@ LcpSendEchoRequest (f)
*/
static void
-lcp_echo_lowerup (unit)
- int unit;
+lcp_echo_lowerup (
+ int unit)
{
fsm *f = &lcp_fsm[unit];
@@ -1941,8 +1941,8 @@ lcp_echo_lowerup (unit)
*/
static void
-lcp_echo_lowerdown (unit)
- int unit;
+lcp_echo_lowerdown (
+ int unit)
{
fsm *f = &lcp_fsm[unit];
diff --git a/cpukit/pppd/magic.c b/cpukit/pppd/magic.c
index 92cdbc8521..3d297e5e67 100644
--- a/cpukit/pppd/magic.c
+++ b/cpukit/pppd/magic.c
@@ -38,7 +38,7 @@ static const char rcsid[] = RCSID;
* and current time, currently.
*/
void
-magic_init()
+magic_init(void)
{
long seed;
struct timeval t;
@@ -52,7 +52,7 @@ magic_init()
* magic - Returns the next magic number.
*/
uint32_t
-magic()
+magic(void)
{
return (uint32_t) mrand48();
}
diff --git a/cpukit/pppd/options.c b/cpukit/pppd/options.c
index b22ba2d1dd..eb6cd34d01 100644
--- a/cpukit/pppd/options.c
+++ b/cpukit/pppd/options.c
@@ -302,9 +302,9 @@ See pppd(8) for more options.\n\
* processing a few options, so error messages are suppressed.
*/
int
-parse_args(argc, argv)
- int argc;
- char **argv;
+parse_args(
+ int argc,
+ char **argv)
{
char *arg;
option_t *opt;
@@ -392,11 +392,11 @@ scan_args(argc, argv)
* and interpret them.
*/
int
-options_from_file(filename, must_exist, check_prot, priv)
- char *filename;
- int must_exist;
- int check_prot;
- int priv;
+options_from_file(
+ char *filename,
+ int must_exist,
+ int check_prot,
+ int priv)
{
FILE *f;
int i, newline, ret, err;
@@ -478,7 +478,7 @@ err:
* and if so, interpret options from it.
*/
int
-options_from_user()
+options_from_user(void)
{
return 0;
}
@@ -488,7 +488,7 @@ options_from_user()
* device, and if so, interpret options from it.
*/
int
-options_for_tty()
+options_for_tty(void)
{
char *dev, *path, *p;
int ret;
@@ -517,9 +517,9 @@ options_for_tty()
* options_from_list - process a string of options in a wordlist.
*/
int
-options_from_list(w, priv)
- struct wordlist *w;
- int priv;
+options_from_list(
+ struct wordlist *w,
+ int priv)
{
char *argv[MAXARGS];
option_t *opt;
@@ -579,8 +579,7 @@ err:
* This could be optimized by using a hash table.
*/
static option_t *
-find_option(name)
- char *name;
+find_option(char *name)
{
option_t *opt;
struct option_list *list;
@@ -608,9 +607,9 @@ find_option(name)
* process_option - process one new-style option.
*/
static int
-process_option(opt, argv)
- option_t *opt;
- char **argv;
+process_option(
+ option_t *opt,
+ char **argv)
{
uint32_t v;
int iv, a;
@@ -743,8 +742,8 @@ process_option(opt, argv)
* n_arguments - tell how many arguments an option takes
*/
static int
-n_arguments(opt)
- option_t *opt;
+n_arguments(
+ option_t *opt)
{
return (opt->type == o_bool || opt->type == o_special_noarg
|| (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.
*/
void
-add_options(opt)
- option_t *opt;
+add_options(
+ option_t *opt)
{
struct option_list *list;
@@ -771,7 +770,7 @@ add_options(opt)
* usage - print out a message telling how to use the program.
*/
static void
-usage()
+usage(void)
{
if (pppd_phase == PHASE_INITIALIZE)
fprintf(stderr, usage_string, VERSION, PATCHLEVEL, IMPLEMENTATION,
@@ -813,11 +812,11 @@ option_error __V((char *fmt, ...))
* \<newline> is ignored.
*/
int
-getword(f, word, newlinep, filename)
- FILE *f;
- char *word;
- int *newlinep;
- char *filename;
+getword(
+ FILE *f,
+ char *word,
+ int *newlinep,
+ char *filename)
{
int c, len, escape;
int quoted, comment;
@@ -1056,10 +1055,10 @@ getword(f, word, newlinep, filename)
* number_option - parse an unsigned numeric parameter for an option.
*/
static int
-number_option(str, valp, base)
- char *str;
- uint32_t *valp;
- int base;
+number_option(
+ char *str,
+ uint32_t *valp,
+ int base)
{
char *ptr;
@@ -1079,9 +1078,9 @@ number_option(str, valp, base)
* if there is an error.
*/
int
-int_option(str, valp)
- char *str;
- int *valp;
+int_option(
+ char *str,
+ int *valp)
{
uint32_t v;
@@ -1100,8 +1099,8 @@ int_option(str, valp)
* readfile - take commands from a file.
*/
static int
-readfile(argv)
- char **argv;
+readfile(
+ char **argv)
{
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 /..
*/
static int
-callfile(argv)
- char **argv;
+callfile(
+ char **argv)
{
char *fname, *arg, *p;
int l, ok;
@@ -1154,8 +1153,8 @@ callfile(argv)
* setpdebug - Set libpcap debugging level.
*/
static int
-setpdebug(argv)
- char **argv;
+setpdebug(
+ char **argv)
{
return int_option(*argv, &dflag);
}
@@ -1164,8 +1163,8 @@ setpdebug(argv)
* setpassfilter - Set the pass filter for packets
*/
static int
-setpassfilter(argv)
- char **argv;
+setpassfilter(
+ char **argv)
{
pc.linktype = DLT_PPP;
pc.snapshot = PPP_HDRLEN;
@@ -1180,8 +1179,8 @@ setpassfilter(argv)
* setactivefilter - Set the active filter for packets
*/
static int
-setactivefilter(argv)
- char **argv;
+setactivefilter(
+ char **argv)
{
pc.linktype = DLT_PPP;
pc.snapshot = PPP_HDRLEN;
@@ -1197,8 +1196,8 @@ setactivefilter(argv)
* noopt - Disable all options.
*/
static int
-noopt(argv)
- char **argv;
+noopt(
+ char **argv)
{
BZERO((char *) &lcp_wantoptions[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
*/
static int
-setdomain(argv)
- char **argv;
+setdomain(
+ char **argv)
{
if (!privileged_option) {
option_error("using the domain option requires root privilege");
@@ -1234,8 +1233,8 @@ setdomain(argv)
* setspeed - Set the speed.
*/
static int
-setspeed(arg)
- char *arg;
+setspeed(
+ char *arg)
{
long spd;
uint32_t ret = 1;
@@ -1289,8 +1288,8 @@ setspeed(arg)
* setdevname - Set the device name.
*/
static int
-setdevname(cp)
- char *cp;
+setdevname(
+ char *cp)
{
struct stat statbuf;
char dev[MAXPATHLEN];
@@ -1345,8 +1344,8 @@ setdevname(cp)
* setipaddr - Set the IP address
*/
static int
-setipaddr(arg)
- char *arg;
+setipaddr(
+ char *arg)
{
struct hostent *hp;
char *colon;
@@ -1413,8 +1412,8 @@ setipaddr(arg)
* setnetmask - set the netmask to be used on the interface.
*/
static int
-setnetmask(argv)
- char **argv;
+setnetmask(
+ char **argv)
{
uint32_t mask, b;
int n, ok;
@@ -1458,8 +1457,8 @@ setnetmask(argv)
}
static int
-setxonxoff(argv)
- char **argv;
+setxonxoff(
+ char **argv)
{
lcp_wantoptions[0].asyncmap |= 0x000A0000; /* escape ^S and ^Q */
lcp_wantoptions[0].neg_asyncmap = 1;
@@ -1469,8 +1468,8 @@ setxonxoff(argv)
}
static int
-setlogfile(argv)
- char **argv;
+setlogfile(
+ char **argv)
{
int fd, err;
@@ -1492,8 +1491,8 @@ setlogfile(argv)
#ifdef PLUGIN
static int
-loadplugin(argv)
- char **argv;
+loadplugin(
+ char **argv)
{
char *arg = *argv;
void *handle;
diff --git a/cpukit/pppd/rtemsmain.c b/cpukit/pppd/rtemsmain.c
index 2f0fd6cd85..dc14971bad 100644
--- a/cpukit/pppd/rtemsmain.c
+++ b/cpukit/pppd/rtemsmain.c
@@ -160,9 +160,9 @@ struct protent *protocols[] = {
};
int
-pppdmain(argc, argv)
- int argc;
- char *argv[];
+pppdmain(
+ int argc,
+ char *argv[])
{
int i, fdflags, t;
char *connector;
@@ -478,8 +478,8 @@ pppdmain(argc, argv)
* holdoff_end - called via a timeout when the holdoff period ends.
*/
static void
-holdoff_end(arg)
- void *arg;
+holdoff_end(
+ void *arg)
{
new_phase(PHASE_DORMANT);
}
diff --git a/cpukit/pppd/sys-rtems.c b/cpukit/pppd/sys-rtems.c
index 2bbe94f9b2..c9ddf11b63 100644
--- a/cpukit/pppd/sys-rtems.c
+++ b/cpukit/pppd/sys-rtems.c
@@ -99,7 +99,7 @@ static int get_ether_addr(uint32_t, struct sockaddr_dl *);
* sys_init - System-dependent initialization.
*/
void
-sys_init()
+sys_init(void)
{
/* Get an internet socket for doing socket ioctl's on. */
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().
*/
void
-sys_cleanup()
+sys_cleanup(void)
{
struct ifreq ifr;
@@ -136,7 +136,7 @@ sys_cleanup()
* sys_close - Clean up in a child process before execing.
*/
void
-sys_close()
+sys_close(void)
{
close(sockfd);
if (loop_slave >= 0) {
@@ -149,7 +149,7 @@ sys_close()
* sys_check_options - check the options that the user specified
*/
int
-sys_check_options()
+sys_check_options(void)
{
return 1;
}
@@ -159,7 +159,7 @@ sys_check_options()
* (in fact we check whether we can do an ioctl on ppp0).
*/
int
-ppp_available()
+ppp_available(void)
{
int s, ok;
struct ifreq ifr;
@@ -178,8 +178,8 @@ ppp_available()
* establish_ppp - Turn the serial port into a ppp interface.
*/
int
-establish_ppp(fd)
- int fd;
+establish_ppp(
+ int fd)
{
int taskid = (int)rtems_pppd_taskid;
int pppdisc = PPPDISC;
@@ -252,7 +252,7 @@ establish_ppp(fd)
* restore_loop - reattach the ppp unit to the loopback.
*/
void
-restore_loop()
+restore_loop(void)
{
int x;
@@ -281,8 +281,8 @@ restore_loop()
* This shouldn't call die() because it's called from die().
*/
void
-disestablish_ppp(fd)
- int fd;
+disestablish_ppp(
+ int fd)
{
int taskid = (int)0;
@@ -307,7 +307,7 @@ disestablish_ppp(fd)
* Check whether the link seems not to be 8-bit clean.
*/
void
-clean_check()
+clean_check(void)
{
int x;
char *s;
@@ -343,8 +343,8 @@ clean_check()
* For *BSD, we assume that speed_t values numerically equal bits/second.
*/
void
-set_up_tty(fd, local)
- int fd, local;
+set_up_tty(
+ int fd, int local)
{
struct termios tios;
@@ -412,8 +412,8 @@ set_up_tty(fd, local)
* restore_tty - restore the terminal to the saved settings.
*/
void
-restore_tty(fd)
- int fd;
+restore_tty(
+ int fd)
{
if (restore_term) {
if (!default_device) {
@@ -440,8 +440,8 @@ restore_tty(fd)
* This is called from die(), so it shouldn't call die().
*/
void
-setdtr(fd, on)
-int fd, on;
+setdtr(
+ int fd, int on )
{
int modembits = TIOCM_DTR;
@@ -453,11 +453,11 @@ int fd, on;
* to the uid given. Assumes slave_name points to >= 12 bytes of space.
*/
int
-get_pty(master_fdp, slave_fdp, slave_name, uid)
- int *master_fdp;
- int *slave_fdp;
- char *slave_name;
- int uid;
+get_pty(
+ int *master_fdp,
+ int *slave_fdp,
+ char *slave_name,
+ int uid)
{
return 1;
}
@@ -469,7 +469,7 @@ get_pty(master_fdp, slave_fdp, slave_name, uid)
* Here we use a pty.
*/
int
-open_ppp_loopback()
+open_ppp_loopback(void)
{
return loop_master;
}
@@ -479,10 +479,10 @@ open_ppp_loopback()
* output - Output PPP packet.
*/
void
-output(unit, p, len)
- int unit;
- u_char *p;
- int len;
+output(
+ int unit,
+ u_char *p,
+ int len)
{
if (debug);
dbglog("sent %P", p, len);
@@ -510,8 +510,8 @@ ppp_delay(void)
* if timo is NULL).
*/
void
-wait_input(timo)
- struct timeval *timo;
+wait_input(
+ struct timeval *timo)
{
rtems_event_set events;
rtems_interval ticks = 0;
@@ -534,8 +534,8 @@ wait_input(timo)
* read_packet - get a PPP packet from the serial device.
*/
int
-read_packet(buf)
- u_char *buf;
+read_packet(
+ u_char *buf)
{
int len;
@@ -555,7 +555,7 @@ read_packet(buf)
* Return value is 1 if we need to bring up the link, 0 otherwise.
*/
int
-get_loop_output()
+get_loop_output(void)
{
int rv = 0;
int n;
@@ -579,10 +579,12 @@ get_loop_output()
* the ppp interface.
*/
void
-ppp_send_config(unit, mtu, asyncmap, pcomp, accomp)
- int unit, mtu;
- uint32_t asyncmap;
- int pcomp, accomp;
+ppp_send_config(
+ int unit,
+ int mtu,
+ uint32_t asyncmap,
+ int pcomp,
+ int accomp)
{
u_int x;
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.
*/
void
-ppp_set_xaccm(unit, accm)
- int unit;
- ext_accm accm;
+ppp_set_xaccm(
+ int unit,
+ ext_accm accm)
{
if (ioctl(ppp_fd, PPPIOCSXASYNCMAP, accm) < 0 && errno != ENOTTY)
warn("ioctl(set extended ACCM): %m");
@@ -623,10 +625,11 @@ ppp_set_xaccm(unit, accm)
* the ppp interface.
*/
void
-ppp_recv_config(unit, mru, asyncmap, pcomp, accomp)
- int unit, mru;
- uint32_t asyncmap;
- int pcomp, accomp;
+ppp_recv_config(
+ int unit,
+ int mru,
+ uint32_t asyncmap,
+ int pcomp, int accomp)
{
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.
*/
int
-ccp_test(unit, opt_ptr, opt_len, for_transmit)
- int unit, opt_len, for_transmit;
- u_char *opt_ptr;
+ccp_test(
+ int unit, u_char *opt_ptr, int opt_len, int for_transmit)
{
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.
*/
void
-ccp_flags_set(unit, isopen, isup)
- int unit, isopen, isup;
+ccp_flags_set(
+ int unit, int isopen, int isup)
{
int x;
@@ -687,8 +689,8 @@ ccp_flags_set(unit, isopen, isup)
* 0 otherwise. This is necessary because of patent nonsense.
*/
int
-ccp_fatal_error(unit)
- int unit;
+ccp_fatal_error(
+ int unit)
{
int x;
@@ -703,9 +705,9 @@ ccp_fatal_error(unit)
* get_idle_time - return how long the link has been idle.
*/
int
-get_idle_time(u, ip)
- int u;
- struct ppp_idle *ip;
+get_idle_time(
+ int u,
+ struct ppp_idle *ip)
{
return ioctl(ppp_fd, PPPIOCGIDLE, ip) >= 0;
}
@@ -714,9 +716,9 @@ get_idle_time(u, ip)
* get_ppp_stats - return statistics for the link.
*/
int
-get_ppp_stats(u, stats)
- int u;
- struct pppd_stats *stats;
+get_ppp_stats(
+ int u,
+ struct pppd_stats *stats)
{
struct ifpppstatsreq req;
@@ -737,8 +739,8 @@ get_ppp_stats(u, stats)
* set_filters - transfer the pass and active filters to the kernel.
*/
int
-set_filters(pass, active)
- struct bpf_program *pass, *active;
+set_filters(
+ struct bpf_program *pass, struct bpf_program *active)
{
int ret = 1;
@@ -762,8 +764,8 @@ set_filters(pass, active)
* sifvjcomp - config tcp header compression
*/
int
-sifvjcomp(u, vjcomp, cidcomp, maxcid)
- int u, vjcomp, cidcomp, maxcid;
+sifvjcomp(
+ int u, int vjcomp, int cidcomp, int maxcid)
{
u_int x;
@@ -788,8 +790,8 @@ sifvjcomp(u, vjcomp, cidcomp, maxcid)
* sifup - Config the interface up and enable IP packets to pass.
*/
int
-sifup(u)
- int u;
+sifup(
+ int u)
{
struct ifreq ifr;
@@ -811,10 +813,10 @@ sifup(u)
* sifnpmode - Set the mode for handling packets for a given NP.
*/
int
-sifnpmode(u, proto, mode)
- int u;
- int proto;
- enum NPmode mode;
+sifnpmode(
+ int u,
+ int proto,
+ enum NPmode mode)
{
struct npioctl npi;
@@ -831,8 +833,8 @@ sifnpmode(u, proto, mode)
* sifdown - Config the interface down and disable IP.
*/
int
-sifdown(u)
- int u;
+sifdown(
+ int u)
{
struct ifreq ifr;
int rv;
@@ -872,9 +874,9 @@ sifdown(u)
* sifaddr - Config the interface IP addresses and netmask.
*/
int
-sifaddr(u, o, h, m)
- int u;
- uint32_t o, h, m;
+sifaddr(
+ int u,
+ uint32_t o, uint32_t h, uint32_t m )
{
struct ifaliasreq ifra;
struct ifreq ifr;
@@ -912,9 +914,9 @@ sifaddr(u, o, h, m)
* through the interface if possible.
*/
int
-cifaddr(u, o, h)
- int u;
- uint32_t o, h;
+cifaddr(
+ int u,
+ uint32_t o, uint32_t h )
{
struct ifaliasreq ifra;
@@ -937,9 +939,9 @@ cifaddr(u, o, h)
* sifdefaultroute - assign a default route through the address given.
*/
int
-sifdefaultroute(u, l, g)
- int u;
- uint32_t l, g;
+sifdefaultroute(
+ int u,
+ uint32_t l, uint32_t g)
{
return dodefaultroute(g, 's');
}
@@ -948,9 +950,9 @@ sifdefaultroute(u, l, g)
* cifdefaultroute - delete a default route through the address given.
*/
int
-cifdefaultroute(u, l, g)
- int u;
- uint32_t l, g;
+cifdefaultroute(
+ int u,
+ uint32_t l, uint32_t g)
{
return dodefaultroute(g, 'c');
}
@@ -959,9 +961,9 @@ cifdefaultroute(u, l, g)
* dodefaultroute - talk to a routing socket to add/delete a default route.
*/
static int
-dodefaultroute(g, cmd)
- uint32_t g;
- int cmd;
+dodefaultroute(
+ uint32_t g,
+ int cmd)
{
/* int status; */
struct sockaddr_in address;
@@ -1023,9 +1025,9 @@ static struct {
static int arpmsg_valid;
int
-sifproxyarp(unit, hisaddr)
- int unit;
- uint32_t hisaddr;
+sifproxyarp(
+ int unit,
+ uint32_t hisaddr)
{
int routes;
@@ -1073,9 +1075,9 @@ sifproxyarp(unit, hisaddr)
* cifproxyarp - Delete the proxy ARP entry for the peer.
*/
int
-cifproxyarp(unit, hisaddr)
- int unit;
- uint32_t hisaddr;
+cifproxyarp(
+ int unit,
+ uint32_t hisaddr)
{
int routes;
@@ -1108,9 +1110,9 @@ cifproxyarp(unit, hisaddr)
* sifproxyarp - Make a proxy ARP entry for the peer.
*/
int
-sifproxyarp(unit, hisaddr)
- int unit;
- uint32_t hisaddr;
+sifproxyarp(
+ int unit,
+ uint32_t hisaddr)
{
struct arpreq arpreq;
struct {
@@ -1148,9 +1150,9 @@ sifproxyarp(unit, hisaddr)
* cifproxyarp - Delete the proxy ARP entry for the peer.
*/
int
-cifproxyarp(unit, hisaddr)
- int unit;
- uint32_t hisaddr;
+cifproxyarp(
+ int unit,
+ uint32_t hisaddr)
{
struct arpreq arpreq;
@@ -1174,9 +1176,9 @@ cifproxyarp(unit, hisaddr)
#define MAX_IFS 32
static int
-get_ether_addr(ipaddr, hwaddr)
- uint32_t ipaddr;
- struct sockaddr_dl *hwaddr;
+get_ether_addr(
+ uint32_t ipaddr,
+ struct sockaddr_dl *hwaddr)
{
struct ifreq *ifr, *ifend, *ifp;
uint32_t ina, mask;
@@ -1259,8 +1261,8 @@ get_ether_addr(ipaddr, hwaddr)
* user-specified netmask.
*/
uint32_t
-GetMask(addr)
- uint32_t addr;
+GetMask(
+ uint32_t addr)
{
uint32_t mask, nmask, ina;
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.
*/
int
-get_host_seed()
+get_host_seed(void)
{
return 17;
}
diff --git a/cpukit/pppd/upap.c b/cpukit/pppd/upap.c
index 89b8349215..ed7cff13db 100644
--- a/cpukit/pppd/upap.c
+++ b/cpukit/pppd/upap.c
@@ -96,8 +96,7 @@ static void upap_sresp(upap_state *, u_char, u_char, char *, int);
* upap_init - Initialize a UPAP unit.
*/
static void
-upap_init(unit)
- int unit;
+upap_init(int unit)
{
upap_state *u = &upap[unit];
@@ -121,9 +120,10 @@ upap_init(unit)
* Set new state and send authenticate's.
*/
void
-upap_authwithpeer(unit, user, password)
- int unit;
- char *user, *password;
+upap_authwithpeer(
+ int unit,
+ char *user,
+ char *password)
{
upap_state *u = &upap[unit];
@@ -151,8 +151,7 @@ upap_authwithpeer(unit, user, password)
* Set new state.
*/
void
-upap_authpeer(unit)
- int unit;
+upap_authpeer(int unit)
{
upap_state *u = &upap[unit];
@@ -173,8 +172,7 @@ upap_authpeer(unit)
* upap_timeout - Retransmission timer for sending auth-reqs expired.
*/
static void
-upap_timeout(arg)
- void *arg;
+upap_timeout(void *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.
*/
static void
-upap_reqtimeout(arg)
- void *arg;
+upap_reqtimeout(void *arg)
{
upap_state *u = (upap_state *) arg;
@@ -216,8 +213,7 @@ upap_reqtimeout(arg)
* Start authenticating if pending.
*/
static void
-upap_lowerup(unit)
- int unit;
+upap_lowerup(int unit)
{
upap_state *u = &upap[unit];
@@ -243,8 +239,7 @@ upap_lowerup(unit)
* Cancel all timeouts.
*/
static void
-upap_lowerdown(unit)
- int unit;
+upap_lowerdown(int 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.
*/
static void
-upap_protrej(unit)
- int unit;
+upap_protrej(int unit)
{
upap_state *u = &upap[unit];
@@ -285,10 +279,10 @@ upap_protrej(unit)
* upap_input - Input UPAP packet.
*/
static void
-upap_input(unit, inpacket, l)
- int unit;
- u_char *inpacket;
- int l;
+upap_input(
+ int unit,
+ u_char *inpacket,
+ int l)
{
upap_state *u = &upap[unit];
u_char *inp;
@@ -343,11 +337,11 @@ upap_input(unit, inpacket, l)
* upap_rauth - Receive Authenticate.
*/
static void
-upap_rauthreq(u, inp, id, len)
- upap_state *u;
- u_char *inp;
- int id;
- int len;
+upap_rauthreq(
+ upap_state *u,
+ u_char *inp,
+ int id,
+ int len)
{
u_char ruserlen, rpasswdlen;
char *ruser, *rpasswd;
@@ -422,11 +416,11 @@ upap_rauthreq(u, inp, id, len)
* upap_rauthack - Receive Authenticate-Ack.
*/
static void
-upap_rauthack(u, inp, id, len)
- upap_state *u;
- u_char *inp;
- int id;
- int len;
+upap_rauthack(
+ upap_state *u,
+ u_char *inp,
+ int id,
+ int len)
{
u_char msglen;
char *msg;
@@ -462,11 +456,11 @@ upap_rauthack(u, inp, id, len)
* upap_rauthnak - Receive Authenticate-Nakk.
*/
static void
-upap_rauthnak(u, inp, id, len)
- upap_state *u;
- u_char *inp;
- int id;
- int len;
+upap_rauthnak(
+ upap_state *u,
+ u_char *inp,
+ int id,
+ int len)
{
u_char msglen;
char *msg;
@@ -503,8 +497,7 @@ upap_rauthnak(u, inp, id, len)
* upap_sauthreq - Send an Authenticate-Request.
*/
static void
-upap_sauthreq(u)
- upap_state *u;
+upap_sauthreq(upap_state *u)
{
u_char *outp;
int outlen;
@@ -536,11 +529,11 @@ upap_sauthreq(u)
* upap_sresp - Send a response (ack or nak).
*/
static void
-upap_sresp(u, code, id, msg, msglen)
- upap_state *u;
- u_char code, id;
- char *msg;
- int msglen;
+upap_sresp(
+ upap_state *u,
+ u_char code, u_char id,
+ char *msg,
+ int msglen)
{
u_char *outp;
int outlen;
@@ -565,11 +558,11 @@ static char *upap_codenames[] = {
};
static int
-upap_printpkt(p, plen, printer, arg)
- u_char *p;
- int plen;
- void (*printer)(void *, char *, ...);
- void *arg;
+upap_printpkt(
+ u_char *p,
+ int plen,
+ void (*printer)(void *, char *, ...),
+ void *arg)
{
int code, id, len;
int mlen, ulen, wlen;
diff --git a/cpukit/pppd/utils.c b/cpukit/pppd/utils.c
index 5ee0fbe551..af39226e24 100644
--- a/cpukit/pppd/utils.c
+++ b/cpukit/pppd/utils.c
@@ -93,11 +93,11 @@ slprintf __V((char *buf, int buflen, char *fmt, ...))
#define OUTCHAR(c) (buflen > 0? (--buflen, *buf++ = (c)): 0)
int
-vslprintf(buf, buflen, fmt, args)
- char *buf;
- int buflen;
- char *fmt;
- va_list args;
+vslprintf(
+ char *buf,
+ int buflen,
+ char *fmt,
+ va_list args)
{
int c, i, n;
int width, prec, fillch;
@@ -371,11 +371,11 @@ char line[256]; /* line to be logged accumulated here */
char *linep;
void
-log_packet(p, len, prefix, level)
- u_char *p;
- int len;
- char *prefix;
- int level;
+log_packet(
+ u_char *p,
+ int len,
+ char *prefix,
+ int level)
{
strlcpy(line, prefix, sizeof(line));
linep = line + strlen(line);
@@ -387,11 +387,11 @@ log_packet(p, len, prefix, level)
* calling `printer(arg, format, ...)' to output it.
*/
static void
-format_packet(p, len, printer, arg)
- u_char *p;
- int len;
- void (*printer)(void *, char *, ...);
- void *arg;
+format_packet(
+ u_char *p,
+ int len,
+ void (*printer)(void *, char *, ...),
+ void *arg)
{
int i, n;
u_short proto;
@@ -464,11 +464,11 @@ pr_log __V((void *arg, char *fmt, ...))
* printer.
*/
void
-print_string(p_arg, len, printer, arg)
- void *p_arg;
- int len;
- void (*printer)(void *, char *, ...);
- void *arg;
+print_string(
+ void *p_arg,
+ int len,
+ void (*printer)(void *, char *, ...),
+ void *arg)
{
int c;
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.
*/
static void
-logit(level, fmt, args)
- int level;
- char *fmt;
- va_list args;
+logit(
+ int level,
+ char *fmt,
+ va_list args)
{
int n;
char buf[256];
@@ -662,8 +662,7 @@ static char lock_file[MAXPATHLEN];
* lock - create a lock file for the named device
*/
int
-lock(dev)
- char *dev;
+lock(char *dev)
{
#ifdef LOCKLIB
int result;
@@ -780,8 +779,7 @@ lock(dev)
* between when the parent died and the child rewrote the lockfile).
*/
int
-relock(pid)
- int pid;
+relock(int pid)
{
#ifdef LOCKLIB
/* XXX is there a way to do this? */
@@ -816,7 +814,7 @@ relock(pid)
* unlock - remove our lockfile
*/
void
-unlock()
+unlock(void)
{
if (lock_file[0]) {
#ifdef LOCKLIB