Changeset 05c1886 in rtems for cpukit/pppd


Ignore:
Timestamp:
Nov 30, 2009, 4:01:51 PM (10 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
1857b00
Parents:
1de949a8
Message:

Whitespace removal.

Location:
cpukit/pppd
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • cpukit/pppd/auth.c

    r1de949a8 r05c1886  
    420420void
    421421auth_peer_fail(
    422     int unit, 
     422    int unit,
    423423    int protocol)
    424424{
     
    435435void
    436436auth_peer_success(
    437     int unit, 
     437    int unit,
    438438    int protocol,
    439439    char *name,
     
    475475void
    476476auth_withpeer_fail(
    477     int unit, 
     477    int unit,
    478478    int protocol )
    479479{
     
    495495void
    496496auth_withpeer_success(
    497     int unit, 
     497    int unit,
    498498    int protocol )
    499499{
     
    528528void
    529529np_up(
    530     int unit, 
     530    int unit,
    531531    int proto )
    532532{
     
    577577void
    578578np_finished(
    579     int unit, 
     579    int unit,
    580580    int proto )
    581581{
  • cpukit/pppd/cbcp.c

    r1de949a8 r05c1886  
    167167
    168168    len -= CBCP_MINLEN;
    169  
     169
    170170    switch(code) {
    171171    case CBCP_REQ:
     
    230230        printer(arg, " %s", cbcp_codenames[code-1]);
    231231    else
    232         printer(arg, " code=0x%x", code); 
     232        printer(arg, " code=0x%x", code);
    233233
    234234    printer(arg, " id=0x%x", id);
     
    253253                printer(arg, " %s", cbcp_optionnames[opt-1]);
    254254            else
    255                 printer(arg, " option=0x%x", opt); 
     255                printer(arg, " option=0x%x", opt);
    256256
    257257            if (olen > 2) {
     
    402402
    403403    outlen = 4 + len;
    404    
     404
    405405    MAKEHEADER(outp, PPP_CBCP);
    406406
     
    408408    PUTCHAR(us->us_id, outp);
    409409    PUTSHORT(outlen, outp);
    410    
     410
    411411    if (len)
    412412        BCOPY(buf, outp, len);
     
    428428        GETCHAR(type, pckt);
    429429        GETCHAR(opt_len, pckt);
    430      
     430
    431431        if (opt_len > 2)
    432432            GETCHAR(delay, pckt);
  • cpukit/pppd/ccp.c

    r1de949a8 r05c1886  
    6969      &ccp_allowoptions[0].deflate_draft, 0, 0 },
    7070    { "predictor1", o_bool, &ccp_wantoptions[0].predictor_1,
    71       "request Predictor-1", 1, 
     71      "request Predictor-1", 1,
    7272      &ccp_allowoptions[0].predictor_1, 0, 0 },
    7373    { "nopredictor1", o_bool, &ccp_wantoptions[0].predictor_1,
     
    980980static char *
    981981method_name(
    982     ccp_options *opt, 
     982    ccp_options *opt,
    983983    ccp_options *opt2)
    984984{
  • cpukit/pppd/chap.c

    r1de949a8 r05c1886  
    160160    /*
    161161     * We get here as a result of LCP coming up.
    162      * So even if CHAP was open before, we will 
     162     * So even if CHAP was open before, we will
    163163     * have to re-authenticate ourselves.
    164164     */
     
    177177{
    178178    chap_state *cstate = &chap[unit];
    179  
     179
    180180    cstate->chal_name = our_name;
    181181    cstate->chal_type = digest;
     
    202202{
    203203    chap_state *cstate = (chap_state *) arg;
    204  
     204
    205205    /* if we aren't sending challenges, don't worry.  then again we */
    206206    /* probably shouldn't be here either */
     
    267267{
    268268    chap_state *cstate = &chap[unit];
    269  
     269
    270270    if (cstate->clientstate == CHAPCS_INITIAL)
    271271        cstate->clientstate = CHAPCS_CLOSED;
     
    293293{
    294294    chap_state *cstate = &chap[unit];
    295  
     295
    296296    /* Timeout(s) pending?  Cancel if so. */
    297297    if (cstate->serverstate == CHAPSS_INITIAL_CHAL ||
     
    341341    u_char code, id;
    342342    int len;
    343  
     343
    344344    /*
    345345     * Parse header (code, id and length).
     
    363363    }
    364364    len -= CHAP_HEADERLEN;
    365  
     365
    366366    /*
    367367     * Action depends on code (as in fact it usually does :-).
     
    371371        ChapReceiveChallenge(cstate, inp, id, len);
    372372        break;
    373    
     373
    374374    case CHAP_RESPONSE:
    375375        ChapReceiveResponse(cstate, inp, id, len);
    376376        break;
    377    
     377
    378378    case CHAP_FAILURE:
    379379        ChapReceiveFailure(cstate, inp, id, len);
     
    408408    MD5_CTX mdContext;
    409409    u_char hash[MD5_SIGNATURE_SIZE];
    410  
     410
    411411    if (cstate->clientstate == CHAPCS_CLOSED ||
    412412        cstate->clientstate == CHAPCS_PENDING) {
     
    456456
    457457    /*  generate MD based on negotiated type */
    458     switch (cstate->resp_type) { 
     458    switch (cstate->resp_type) {
    459459
    460460    case CHAP_DIGEST_MD5:
     
    557557
    558558        /*  generate MD based on negotiated type */
    559         switch (cstate->chal_type) { 
     559        switch (cstate->chal_type) {
    560560
    561561        case CHAP_DIGEST_MD5:           /* only MD5 is defined for now */
     
    566566            MD5Update(&mdContext, secret, secret_len);
    567567            MD5Update(&mdContext, cstate->challenge, cstate->chal_len);
    568             MD5Final(hash, &mdContext); 
     568            MD5Final(hash, &mdContext);
    569569
    570570            /* compare local and remote MDs and send the appropriate status */
     
    691691
    692692    output(cstate->unit, outpacket_buf, outlen + PPP_HDRLEN);
    693  
     693
    694694    TIMEOUT(ChapChallengeTimeout, cstate, cstate->timeouttime);
    695695    ++cstate->chal_transmits;
     
    719719
    720720    MAKEHEADER(outp, PPP_CHAP); /* paste in a header */
    721  
     721
    722722    PUTCHAR(code, outp);
    723723    PUTCHAR(cstate->chal_id, outp);
     
    742742    int i;
    743743
    744     /* pick a random challenge length between MIN_CHALLENGE_LENGTH and 
    745        MAX_CHALLENGE_LENGTH */ 
     744    /* pick a random challenge length between MIN_CHALLENGE_LENGTH and
     745       MAX_CHALLENGE_LENGTH */
    746746    chal_len =  (unsigned) ((drand48() *
    747747                             (MAX_CHALLENGE_LENGTH - MIN_CHALLENGE_LENGTH)) +
  • cpukit/pppd/chat.c

    r1de949a8 r05c1886  
    4848 *
    4949 *      Allow for comments. Line starting with '#' are comments and are
    50  *      ignored. If a '#' is to be expected as the first character, the 
     50 *      ignored. If a '#' is to be expected as the first character, the
    5151 *      expect string must be quoted.
    5252 *
     
    8686
    8787/*
    88         Fixes and some Changes by Wilfried Busalski Lancier-Monitoring GmbH Germany 
     88        Fixes and some Changes by Wilfried Busalski Lancier-Monitoring GmbH Germany
    8989        wilfried.busalski@muenster.de
    9090       
     
    180180char *report_string[MAX_REPORTS] ;
    181181char  report_buffer[50] ;
    182 int n_reports = 0, report_next = 0, report_gathering = 0 ; 
     182int n_reports = 0, report_next = 0, report_gathering = 0 ;
    183183int clear_report_next = 0;
    184184
     
    247247
    248248  script=pScript;
    249  
     249
    250250  if ( debug ) {
    251251    dbglog("chat_main: %s\n", script);
     
    360360        case 'T':
    361361            if (sending && phone_num) {
    362                 for (phchar = phone_num; *phchar != '\0'; phchar++) 
     362                for (phchar = phone_num; *phchar != '\0'; phchar++)
    363363                    *s1++ = *phchar;
    364364            }
     
    371371        case 'U':
    372372            if (sending && phone_num2) {
    373                 for (phchar = phone_num2; *phchar != '\0'; phchar++) 
     373                for (phchar = phone_num2; *phchar != '\0'; phchar++)
    374374                    *s1++ = *phchar;
    375375            }
     
    408408                *s1++ = 'N';
    409409            break;
    410            
     410       
    411411        case '$':                       /* ARI */
    412412            if (use_env) {
     
    518518        return;
    519519    }
    520  
     520
    521521    if (strcmp(s, "ABORT") == 0) {
    522522                ++abort_next;
  • cpukit/pppd/fsm.c

    r1de949a8 r05c1886  
    327327        fsm_rconfreq(f, id, inp, len);
    328328        break;
    329    
     329
    330330    case CONFACK:
    331331        fsm_rconfack(f, id, inp, len);
    332332        break;
    333    
     333
    334334    case CONFNAK:
    335335    case CONFREJ:
    336336        fsm_rconfnakrej(f, code, id, inp, len);
    337337        break;
    338    
     338
    339339    case TERMREQ:
    340340        fsm_rtermreq(f, id, inp, len);
    341341        break;
    342    
     342
    343343    case TERMACK:
    344344        fsm_rtermack(f);
    345345        break;
    346    
     346
    347347    case CODEREJ:
    348348        fsm_rcoderej(f, inp, len);
    349349        break;
    350    
     350
    351351    default:
    352352        if( !f->callbacks->extcode
  • cpukit/pppd/ipcp.c

    r1de949a8 r05c1886  
    10201020     */
    10211021    BZERO(ho, sizeof(*ho));
    1022    
     1022
    10231023    /*
    10241024     * Process all his options.
     
    11941194            if (cilen == CILEN_VJ) {
    11951195                GETCHAR(maxslotindex, p);
    1196                 if (maxslotindex > ao->maxslotindex) { 
     1196                if (maxslotindex > ao->maxslotindex) {
    11971197                    orc = CONFNAK;
    11981198                    if (!reject_if_disagree){
     
    14281428
    14291429            /* assign a default route through the interface if required */
    1430             if (ipcp_wantoptions[f->unit].default_route) 
     1430            if (ipcp_wantoptions[f->unit].default_route)
    14311431                if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
    14321432                    default_route_set[f->unit] = 1;
     
    14751475
    14761476        /* assign a default route through the interface if required */
    1477         if (ipcp_wantoptions[f->unit].default_route) 
     1477        if (ipcp_wantoptions[f->unit].default_route)
    14781478            if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
    14791479                default_route_set[f->unit] = 1;
  • cpukit/pppd/ipcp.h

    r1de949a8 r05c1886  
    4141#define IPCP_VJ_COMP 0x002d     /* current value for VJ compression option*/
    4242#define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */
    43                                 /* compression option*/ 
     43                                /* compression option*/
    4444
    4545typedef struct ipcp_options {
  • cpukit/pppd/lcp.c

    r1de949a8 r05c1886  
    420420        lcp_rprotrej(f, inp, len);
    421421        break;
    422    
     422
    423423    case ECHOREQ:
    424424        if (f->state != OPENED)
     
    428428        fsm_sdata(f, ECHOREP, id, inp, len);
    429429        break;
    430    
     430
    431431    case ECHOREP:
    432432        lcp_received_echo_reply(f, id, inp, len);
     
    442442}
    443443
    444    
     444
    445445/*
    446446 * lcp_rprotrej - Receive an Protocol-Reject.
     
    19311931    lcp_echo_number        = 0;
    19321932    lcp_echo_timer_running = 0;
    1933  
     1933
    19341934    /* If a timeout interval is specified then start the timer */
    19351935    if (lcp_echo_interval != 0)
  • cpukit/pppd/options.c

    r1de949a8 r05c1886  
    11691169    pc.linktype = DLT_PPP;
    11701170    pc.snapshot = PPP_HDRLEN;
    1171  
     1171
    11721172    if (pcap_compile(&pc, &pass_filter, *argv, 1, netmask) == 0)
    11731173        return 1;
     
    11851185    pc.linktype = DLT_PPP;
    11861186    pc.snapshot = PPP_HDRLEN;
    1187  
     1187
    11881188    if (pcap_compile(&pc, &active_filter, *argv, 1, netmask) == 0)
    11891189        return 1;
     
    12091209
    12101210/*
    1211  * setdomain - Set domain name to append to hostname 
     1211 * setdomain - Set domain name to append to hostname
    12121212 */
    12131213static int
     
    13361336    devnam_info.priv = privileged_option;
    13371337    devnam_info.source = option_source;
    1338  
     1338
    13391339    return 1;
    13401340}
     
    13521352    uint32_t local, remote;
    13531353    ipcp_options *wo = &ipcp_wantoptions[0];
    1354  
     1354
    13551355    /*
    13561356     * IP address pair separated by ":".
     
    13601360    if (prepass)
    13611361        return 1;
    1362  
     1362
    13631363    /*
    13641364     * If colon first character, then no local addr.
     
    13821382        *colon = ':';
    13831383    }
    1384  
     1384
    13851385    /*
    13861386     * If colon last character, then no remote addr.
  • cpukit/pppd/rtemsmain.c

    r1de949a8 r05c1886  
    759759{
    760760    struct callout *newp, *p, **pp;
    761  
     761
    762762    MAINDEBUG(("Timeout %p:%p in %d seconds.", func, arg, time));
    763  
     763
    764764    /*
    765765     * Allocate timeout.
     
    772772    newp->c_time.tv_sec = timenow.tv_sec + time;
    773773    newp->c_time.tv_usec = timenow.tv_usec;
    774  
     774
    775775    /*
    776776     * Find correct place and link it in.
     
    795795{
    796796    struct callout **copp, *freep;
    797  
     797
    798798    MAINDEBUG(("Untimeout %p:%p.", func, arg));
    799  
     799
    800800    /*
    801801     * Find first matching timeout and remove it from the list.
  • cpukit/pppd/rtemspppd.c

    r1de949a8 r05c1886  
    77 * found in the file LICENSE in this distribution or at
    88 * http://www.rtems.com/license/LICENSE.
    9  * 
     9 *
    1010 *  $Id$
    1111 */
  • cpukit/pppd/rtemspppd.h

    r1de949a8 r05c1886  
    77 * found in the file LICENSE in this distribution or at
    88 * http://www.rtems.com/license/LICENSE.
    9  * 
     9 *
    1010 *  $Id$
    1111 */
  • cpukit/pppd/sys-rtems.c

    r1de949a8 r05c1886  
    584584    int mtu,
    585585    uint32_t asyncmap,
    586     int pcomp, 
     586    int pcomp,
    587587    int accomp)
    588588{
     
    627627void
    628628ppp_recv_config(
    629     int unit, 
     629    int unit,
    630630    int mru,
    631631    uint32_t asyncmap,
     
    978978    memset((void *) &netmask, 0, sizeof(netmask));
    979979    netmask.sin_len = sizeof netmask;
    980     netmask.sin_addr.s_addr = INADDR_ANY; 
     980    netmask.sin_addr.s_addr = INADDR_ANY;
    981981    netmask.sin_family = AF_INET;
    982982
  • cpukit/pppd/upap.c

    r1de949a8 r05c1886  
    123123upap_authwithpeer(
    124124    int unit,
    125     char *user, 
     125    char *user,
    126126    char *password)
    127127{
     
    506506        u->us_userlen + u->us_passwdlen;
    507507    outp = outpacket_buf;
    508    
     508
    509509    MAKEHEADER(outp, PPP_PAP);
    510510
Note: See TracChangeset for help on using the changeset viewer.