summaryrefslogtreecommitdiffstats
path: root/cpukit/pppd
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-11-30 16:01:51 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-11-30 16:01:51 +0000
commit05c18861dd58a08076d0fa97f72cb88c4a5698e5 (patch)
tree44213053eba92e81452144bb67dba9a6f62841a9 /cpukit/pppd
parentWhitespace removal. (diff)
downloadrtems-05c18861dd58a08076d0fa97f72cb88c4a5698e5.tar.bz2
Whitespace removal.
Diffstat (limited to 'cpukit/pppd')
-rw-r--r--cpukit/pppd/auth.c12
-rw-r--r--cpukit/pppd/cbcp.c12
-rw-r--r--cpukit/pppd/ccp.c4
-rw-r--r--cpukit/pppd/chap.c34
-rw-r--r--cpukit/pppd/chat.c16
-rw-r--r--cpukit/pppd/fsm.c12
-rw-r--r--cpukit/pppd/ipcp.c8
-rw-r--r--cpukit/pppd/ipcp.h2
-rw-r--r--cpukit/pppd/lcp.c8
-rw-r--r--cpukit/pppd/options.c14
-rw-r--r--cpukit/pppd/rtemsmain.c10
-rw-r--r--cpukit/pppd/rtemspppd.c2
-rw-r--r--cpukit/pppd/rtemspppd.h2
-rw-r--r--cpukit/pppd/sys-rtems.c6
-rw-r--r--cpukit/pppd/upap.c4
15 files changed, 73 insertions, 73 deletions
diff --git a/cpukit/pppd/auth.c b/cpukit/pppd/auth.c
index a419af8ab6..fb84f1e8fc 100644
--- a/cpukit/pppd/auth.c
+++ b/cpukit/pppd/auth.c
@@ -419,7 +419,7 @@ start_networks(void)
*/
void
auth_peer_fail(
- int unit,
+ int unit,
int protocol)
{
/*
@@ -434,7 +434,7 @@ auth_peer_fail(
*/
void
auth_peer_success(
- int unit,
+ int unit,
int protocol,
char *name,
int namelen)
@@ -474,7 +474,7 @@ auth_peer_success(
*/
void
auth_withpeer_fail(
- int unit,
+ int unit,
int protocol )
{
if (passwd_from_file)
@@ -494,7 +494,7 @@ auth_withpeer_fail(
*/
void
auth_withpeer_success(
- int unit,
+ int unit,
int protocol )
{
int bit;
@@ -527,7 +527,7 @@ auth_withpeer_success(
*/
void
np_up(
- int unit,
+ int unit,
int proto )
{
int tlim;
@@ -576,7 +576,7 @@ np_down(
*/
void
np_finished(
- int unit,
+ int unit,
int proto )
{
if (--num_np_open <= 0) {
diff --git a/cpukit/pppd/cbcp.c b/cpukit/pppd/cbcp.c
index b64e95b483..eb750838cc 100644
--- a/cpukit/pppd/cbcp.c
+++ b/cpukit/pppd/cbcp.c
@@ -166,7 +166,7 @@ cbcp_input(unit, inpacket, pktlen)
#endif
len -= CBCP_MINLEN;
-
+
switch(code) {
case CBCP_REQ:
us->us_id = id;
@@ -229,7 +229,7 @@ cbcp_printpkt(p, plen, printer, arg)
if (code >= 1 && code <= sizeof(cbcp_codenames) / sizeof(char *))
printer(arg, " %s", cbcp_codenames[code-1]);
else
- printer(arg, " code=0x%x", code);
+ printer(arg, " code=0x%x", code);
printer(arg, " id=0x%x", id);
len -= HEADERLEN;
@@ -252,7 +252,7 @@ cbcp_printpkt(p, plen, printer, arg)
if (opt >= 1 && opt <= sizeof(cbcp_optionnames) / sizeof(char *))
printer(arg, " %s", cbcp_optionnames[opt-1]);
else
- printer(arg, " option=0x%x", opt);
+ printer(arg, " option=0x%x", opt);
if (olen > 2) {
GETCHAR(delay, p);
@@ -401,13 +401,13 @@ cbcp_send(us, code, buf, len)
outp = outpacket_buf;
outlen = 4 + len;
-
+
MAKEHEADER(outp, PPP_CBCP);
PUTCHAR(code, outp);
PUTCHAR(us->us_id, outp);
PUTSHORT(outlen, outp);
-
+
if (len)
BCOPY(buf, outp, len);
@@ -427,7 +427,7 @@ cbcp_recvack(us, pckt, len)
if (len) {
GETCHAR(type, pckt);
GETCHAR(opt_len, pckt);
-
+
if (opt_len > 2)
GETCHAR(delay, pckt);
diff --git a/cpukit/pppd/ccp.c b/cpukit/pppd/ccp.c
index 5f27c34d57..d80df270f7 100644
--- a/cpukit/pppd/ccp.c
+++ b/cpukit/pppd/ccp.c
@@ -68,7 +68,7 @@ static option_t ccp_option_list[] = {
"don't use draft deflate #", OPT_A2COPY,
&ccp_allowoptions[0].deflate_draft, 0, 0 },
{ "predictor1", o_bool, &ccp_wantoptions[0].predictor_1,
- "request Predictor-1", 1,
+ "request Predictor-1", 1,
&ccp_allowoptions[0].predictor_1, 0, 0 },
{ "nopredictor1", o_bool, &ccp_wantoptions[0].predictor_1,
"don't allow Predictor-1", OPT_A2COPY,
@@ -979,7 +979,7 @@ ccp_reqci(
*/
static char *
method_name(
- ccp_options *opt,
+ ccp_options *opt,
ccp_options *opt2)
{
static char result[64];
diff --git a/cpukit/pppd/chap.c b/cpukit/pppd/chap.c
index 0f4ad27451..3fe766f3a5 100644
--- a/cpukit/pppd/chap.c
+++ b/cpukit/pppd/chap.c
@@ -159,7 +159,7 @@ ChapAuthWithPeer(
/*
* We get here as a result of LCP coming up.
- * So even if CHAP was open before, we will
+ * So even if CHAP was open before, we will
* have to re-authenticate ourselves.
*/
cstate->clientstate = CHAPCS_LISTEN;
@@ -176,7 +176,7 @@ ChapAuthPeer(
int digest)
{
chap_state *cstate = &chap[unit];
-
+
cstate->chal_name = our_name;
cstate->chal_type = digest;
@@ -201,7 +201,7 @@ ChapChallengeTimeout(
void *arg)
{
chap_state *cstate = (chap_state *) arg;
-
+
/* if we aren't sending challenges, don't worry. then again we */
/* probably shouldn't be here either */
if (cstate->serverstate != CHAPSS_INITIAL_CHAL &&
@@ -266,7 +266,7 @@ ChapLowerUp(
int unit)
{
chap_state *cstate = &chap[unit];
-
+
if (cstate->clientstate == CHAPCS_INITIAL)
cstate->clientstate = CHAPCS_CLOSED;
else if (cstate->clientstate == CHAPCS_PENDING)
@@ -292,7 +292,7 @@ ChapLowerDown(
int unit)
{
chap_state *cstate = &chap[unit];
-
+
/* Timeout(s) pending? Cancel if so. */
if (cstate->serverstate == CHAPSS_INITIAL_CHAL ||
cstate->serverstate == CHAPSS_RECHALLENGE)
@@ -340,7 +340,7 @@ ChapInput(
u_char *inp;
u_char code, id;
int len;
-
+
/*
* Parse header (code, id and length).
* If packet too short, drop it.
@@ -362,7 +362,7 @@ ChapInput(
return;
}
len -= CHAP_HEADERLEN;
-
+
/*
* Action depends on code (as in fact it usually does :-).
*/
@@ -370,11 +370,11 @@ ChapInput(
case CHAP_CHALLENGE:
ChapReceiveChallenge(cstate, inp, id, len);
break;
-
+
case CHAP_RESPONSE:
ChapReceiveResponse(cstate, inp, id, len);
break;
-
+
case CHAP_FAILURE:
ChapReceiveFailure(cstate, inp, id, len);
break;
@@ -407,7 +407,7 @@ ChapReceiveChallenge(
char rhostname[256];
MD5_CTX mdContext;
u_char hash[MD5_SIGNATURE_SIZE];
-
+
if (cstate->clientstate == CHAPCS_CLOSED ||
cstate->clientstate == CHAPCS_PENDING) {
CHAPDEBUG(("ChapReceiveChallenge: in state %d", cstate->clientstate));
@@ -455,7 +455,7 @@ ChapReceiveChallenge(
cstate->resp_transmits = 0;
/* generate MD based on negotiated type */
- switch (cstate->resp_type) {
+ switch (cstate->resp_type) {
case CHAP_DIGEST_MD5:
MD5Init(&mdContext);
@@ -556,7 +556,7 @@ ChapReceiveResponse(
} else {
/* generate MD based on negotiated type */
- switch (cstate->chal_type) {
+ switch (cstate->chal_type) {
case CHAP_DIGEST_MD5: /* only MD5 is defined for now */
if (remmd_len != MD5_SIGNATURE_SIZE)
@@ -565,7 +565,7 @@ ChapReceiveResponse(
MD5Update(&mdContext, &cstate->chal_id, 1);
MD5Update(&mdContext, secret, secret_len);
MD5Update(&mdContext, cstate->challenge, cstate->chal_len);
- MD5Final(hash, &mdContext);
+ MD5Final(hash, &mdContext);
/* compare local and remote MDs and send the appropriate status */
if (memcmp (hash, remmd, MD5_SIGNATURE_SIZE) == 0)
@@ -690,7 +690,7 @@ ChapSendChallenge(
BCOPY(cstate->chal_name, outp, name_len); /* append hostname */
output(cstate->unit, outpacket_buf, outlen + PPP_HDRLEN);
-
+
TIMEOUT(ChapChallengeTimeout, cstate, cstate->timeouttime);
++cstate->chal_transmits;
}
@@ -718,7 +718,7 @@ ChapSendStatus(
outp = outpacket_buf;
MAKEHEADER(outp, PPP_CHAP); /* paste in a header */
-
+
PUTCHAR(code, outp);
PUTCHAR(cstate->chal_id, outp);
PUTSHORT(outlen, outp);
@@ -741,8 +741,8 @@ ChapGenChallenge(
u_char *ptr = cstate->challenge;
int i;
- /* pick a random challenge length between MIN_CHALLENGE_LENGTH and
- MAX_CHALLENGE_LENGTH */
+ /* pick a random challenge length between MIN_CHALLENGE_LENGTH and
+ MAX_CHALLENGE_LENGTH */
chal_len = (unsigned) ((drand48() *
(MAX_CHALLENGE_LENGTH - MIN_CHALLENGE_LENGTH)) +
MIN_CHALLENGE_LENGTH);
diff --git a/cpukit/pppd/chat.c b/cpukit/pppd/chat.c
index 8b6311221d..45e2707158 100644
--- a/cpukit/pppd/chat.c
+++ b/cpukit/pppd/chat.c
@@ -47,7 +47,7 @@
* In the same vein as above, added CLR_REPORT keyword.
*
* Allow for comments. Line starting with '#' are comments and are
- * ignored. If a '#' is to be expected as the first character, the
+ * ignored. If a '#' is to be expected as the first character, the
* expect string must be quoted.
*
*
@@ -85,7 +85,7 @@
/* $Id$ */
/*
- Fixes and some Changes by Wilfried Busalski Lancier-Monitoring GmbH Germany
+ Fixes and some Changes by Wilfried Busalski Lancier-Monitoring GmbH Germany
wilfried.busalski@muenster.de
Fixes: put_string() Free memory allocated by clean()
@@ -179,7 +179,7 @@ int clear_abort_next = 0;
char *report_string[MAX_REPORTS] ;
char report_buffer[50] ;
-int n_reports = 0, report_next = 0, report_gathering = 0 ;
+int n_reports = 0, report_next = 0, report_gathering = 0 ;
int clear_report_next = 0;
int say_next = 0, hup_next = 0;
@@ -246,7 +246,7 @@ int chatmain(int fd, int mode, char *pScript)
ttyfd = fd;
script=pScript;
-
+
if ( debug ) {
dbglog("chat_main: %s\n", script);
}
@@ -359,7 +359,7 @@ static char *clean(
case 'T':
if (sending && phone_num) {
- for (phchar = phone_num; *phchar != '\0'; phchar++)
+ for (phchar = phone_num; *phchar != '\0'; phchar++)
*s1++ = *phchar;
}
else {
@@ -370,7 +370,7 @@ static char *clean(
case 'U':
if (sending && phone_num2) {
- for (phchar = phone_num2; *phchar != '\0'; phchar++)
+ for (phchar = phone_num2; *phchar != '\0'; phchar++)
*s1++ = *phchar;
}
else {
@@ -407,7 +407,7 @@ static char *clean(
else
*s1++ = 'N';
break;
-
+
case '$': /* ARI */
if (use_env) {
*s1++ = cur_chr;
@@ -517,7 +517,7 @@ void chat_expect (
++hup_next;
return;
}
-
+
if (strcmp(s, "ABORT") == 0) {
++abort_next;
return;
diff --git a/cpukit/pppd/fsm.c b/cpukit/pppd/fsm.c
index 965323ae49..ce06401b1f 100644
--- a/cpukit/pppd/fsm.c
+++ b/cpukit/pppd/fsm.c
@@ -326,28 +326,28 @@ fsm_input(
case CONFREQ:
fsm_rconfreq(f, id, inp, len);
break;
-
+
case CONFACK:
fsm_rconfack(f, id, inp, len);
break;
-
+
case CONFNAK:
case CONFREJ:
fsm_rconfnakrej(f, code, id, inp, len);
break;
-
+
case TERMREQ:
fsm_rtermreq(f, id, inp, len);
break;
-
+
case TERMACK:
fsm_rtermack(f);
break;
-
+
case CODEREJ:
fsm_rcoderej(f, inp, len);
break;
-
+
default:
if( !f->callbacks->extcode
|| !(*f->callbacks->extcode)(f, code, id, inp, len) )
diff --git a/cpukit/pppd/ipcp.c b/cpukit/pppd/ipcp.c
index 1ace9cf311..ae8f15ba7c 100644
--- a/cpukit/pppd/ipcp.c
+++ b/cpukit/pppd/ipcp.c
@@ -1019,7 +1019,7 @@ ipcp_reqci(
* Reset all his options.
*/
BZERO(ho, sizeof(*ho));
-
+
/*
* Process all his options.
*/
@@ -1193,7 +1193,7 @@ ipcp_reqci(
ho->vj_protocol = cishort;
if (cilen == CILEN_VJ) {
GETCHAR(maxslotindex, p);
- if (maxslotindex > ao->maxslotindex) {
+ if (maxslotindex > ao->maxslotindex) {
orc = CONFNAK;
if (!reject_if_disagree){
DECPTR(1, p);
@@ -1427,7 +1427,7 @@ ipcp_up(
}
/* assign a default route through the interface if required */
- if (ipcp_wantoptions[f->unit].default_route)
+ if (ipcp_wantoptions[f->unit].default_route)
if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
default_route_set[f->unit] = 1;
@@ -1474,7 +1474,7 @@ ipcp_up(
sifnpmode(f->unit, PPP_IP, NPMODE_PASS);
/* assign a default route through the interface if required */
- if (ipcp_wantoptions[f->unit].default_route)
+ if (ipcp_wantoptions[f->unit].default_route)
if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
default_route_set[f->unit] = 1;
diff --git a/cpukit/pppd/ipcp.h b/cpukit/pppd/ipcp.h
index d3b099bb18..e841cf8b22 100644
--- a/cpukit/pppd/ipcp.h
+++ b/cpukit/pppd/ipcp.h
@@ -40,7 +40,7 @@
#define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/
#define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */
- /* compression option*/
+ /* compression option*/
typedef struct ipcp_options {
bool neg_addr; /* Negotiate IP Address? */
diff --git a/cpukit/pppd/lcp.c b/cpukit/pppd/lcp.c
index 66d4c16f35..9da1326a1a 100644
--- a/cpukit/pppd/lcp.c
+++ b/cpukit/pppd/lcp.c
@@ -419,7 +419,7 @@ lcp_extcode(
case PROTREJ:
lcp_rprotrej(f, inp, len);
break;
-
+
case ECHOREQ:
if (f->state != OPENED)
break;
@@ -427,7 +427,7 @@ lcp_extcode(
PUTLONG(lcp_gotoptions[f->unit].magicnumber, magp);
fsm_sdata(f, ECHOREP, id, inp, len);
break;
-
+
case ECHOREP:
lcp_received_echo_reply(f, id, inp, len);
break;
@@ -441,7 +441,7 @@ lcp_extcode(
return 1;
}
-
+
/*
* lcp_rprotrej - Receive an Protocol-Reject.
*
@@ -1930,7 +1930,7 @@ lcp_echo_lowerup (
lcp_echos_pending = 0;
lcp_echo_number = 0;
lcp_echo_timer_running = 0;
-
+
/* If a timeout interval is specified then start the timer */
if (lcp_echo_interval != 0)
LcpEchoCheck (f);
diff --git a/cpukit/pppd/options.c b/cpukit/pppd/options.c
index 8ca387f042..9b010e3b37 100644
--- a/cpukit/pppd/options.c
+++ b/cpukit/pppd/options.c
@@ -1168,7 +1168,7 @@ setpassfilter(
{
pc.linktype = DLT_PPP;
pc.snapshot = PPP_HDRLEN;
-
+
if (pcap_compile(&pc, &pass_filter, *argv, 1, netmask) == 0)
return 1;
option_error("error in pass-filter expression: %s\n", pcap_geterr(&pc));
@@ -1184,7 +1184,7 @@ setactivefilter(
{
pc.linktype = DLT_PPP;
pc.snapshot = PPP_HDRLEN;
-
+
if (pcap_compile(&pc, &active_filter, *argv, 1, netmask) == 0)
return 1;
option_error("error in active-filter expression: %s\n", pcap_geterr(&pc));
@@ -1208,7 +1208,7 @@ noopt(
}
/*
- * setdomain - Set domain name to append to hostname
+ * setdomain - Set domain name to append to hostname
*/
static int
setdomain(
@@ -1335,7 +1335,7 @@ setdevname(
default_device = 0;
devnam_info.priv = privileged_option;
devnam_info.source = option_source;
-
+
return 1;
}
@@ -1351,7 +1351,7 @@ setipaddr(
char *colon;
uint32_t local, remote;
ipcp_options *wo = &ipcp_wantoptions[0];
-
+
/*
* IP address pair separated by ":".
*/
@@ -1359,7 +1359,7 @@ setipaddr(
return 0;
if (prepass)
return 1;
-
+
/*
* If colon first character, then no local addr.
*/
@@ -1381,7 +1381,7 @@ setipaddr(
wo->ouraddr = local;
*colon = ':';
}
-
+
/*
* If colon last character, then no remote addr.
*/
diff --git a/cpukit/pppd/rtemsmain.c b/cpukit/pppd/rtemsmain.c
index dc14971bad..89ed77682e 100644
--- a/cpukit/pppd/rtemsmain.c
+++ b/cpukit/pppd/rtemsmain.c
@@ -758,9 +758,9 @@ ppptimeout(
int time)
{
struct callout *newp, *p, **pp;
-
+
MAINDEBUG(("Timeout %p:%p in %d seconds.", func, arg, time));
-
+
/*
* Allocate timeout.
*/
@@ -771,7 +771,7 @@ ppptimeout(
gettimeofday(&timenow, NULL);
newp->c_time.tv_sec = timenow.tv_sec + time;
newp->c_time.tv_usec = timenow.tv_usec;
-
+
/*
* Find correct place and link it in.
*/
@@ -794,9 +794,9 @@ pppuntimeout(
void *arg)
{
struct callout **copp, *freep;
-
+
MAINDEBUG(("Untimeout %p:%p.", func, arg));
-
+
/*
* Find first matching timeout and remove it from the list.
*/
diff --git a/cpukit/pppd/rtemspppd.c b/cpukit/pppd/rtemspppd.c
index c1c12cd622..6f58fce68a 100644
--- a/cpukit/pppd/rtemspppd.c
+++ b/cpukit/pppd/rtemspppd.c
@@ -6,7 +6,7 @@
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
- *
+ *
* $Id$
*/
diff --git a/cpukit/pppd/rtemspppd.h b/cpukit/pppd/rtemspppd.h
index 8503d402f6..7905b4bb0e 100644
--- a/cpukit/pppd/rtemspppd.h
+++ b/cpukit/pppd/rtemspppd.h
@@ -6,7 +6,7 @@
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
- *
+ *
* $Id$
*/
diff --git a/cpukit/pppd/sys-rtems.c b/cpukit/pppd/sys-rtems.c
index 9d4fd2c683..ac87957c1d 100644
--- a/cpukit/pppd/sys-rtems.c
+++ b/cpukit/pppd/sys-rtems.c
@@ -583,7 +583,7 @@ ppp_send_config(
int unit,
int mtu,
uint32_t asyncmap,
- int pcomp,
+ int pcomp,
int accomp)
{
u_int x;
@@ -626,7 +626,7 @@ ppp_set_xaccm(
*/
void
ppp_recv_config(
- int unit,
+ int unit,
int mru,
uint32_t asyncmap,
int pcomp, int accomp)
@@ -977,7 +977,7 @@ dodefaultroute(
memset((void *) &netmask, 0, sizeof(netmask));
netmask.sin_len = sizeof netmask;
- netmask.sin_addr.s_addr = INADDR_ANY;
+ netmask.sin_addr.s_addr = INADDR_ANY;
netmask.sin_family = AF_INET;
if (cmd=='s') {
diff --git a/cpukit/pppd/upap.c b/cpukit/pppd/upap.c
index 527d05a868..e8115a68c7 100644
--- a/cpukit/pppd/upap.c
+++ b/cpukit/pppd/upap.c
@@ -122,7 +122,7 @@ upap_init(int unit)
void
upap_authwithpeer(
int unit,
- char *user,
+ char *user,
char *password)
{
upap_state *u = &upap[unit];
@@ -505,7 +505,7 @@ upap_sauthreq(upap_state *u)
outlen = UPAP_HEADERLEN + 2 * sizeof (u_char) +
u->us_userlen + u->us_passwdlen;
outp = outpacket_buf;
-
+
MAKEHEADER(outp, PPP_PAP);
PUTCHAR(UPAP_AUTHREQ, outp);