Changeset cb1e8a46 in rtems


Ignore:
Timestamp:
Feb 27, 2002, 10:43:31 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
e51bd96
Parents:
c52f1c7
Message:

2002-02-27 Ilya Alexeev <ilya@…>

  • net/if_ppp.c, pppd/auth.c, pppd/chat.c, pppd/pppd.h, pppd/sys-rtems.c: Add server with pap-authorization capabilities as well as eliminate some warnings.
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libnetworking/ChangeLog

    rc52f1c7 rcb1e8a46  
     12002-02-27      Ilya Alexeev <ilya@continuum.ru>
     2
     3        * net/if_ppp.c, pppd/auth.c, pppd/chat.c, pppd/pppd.h,
     4        pppd/sys-rtems.c: Add server with pap-authorization
     5        capabilities as well as eliminate some warnings.
     6
    172002-02-27      Eric Norum <eric.norum@usask.ca>
    28
  • c/src/exec/libnetworking/net/if_ppp.c

    rc52f1c7 rcb1e8a46  
    625625            ppp_ccp_closed(sc);
    626626#endif
    627         splimp();
     627        s = splimp();
    628628        sc->sc_flags = (sc->sc_flags & ~SC_MASK) | flags;
    629629        splx(s);
     
    11371137    struct ppp_softc *sc;
    11381138{
    1139     struct mbuf *m, *mp;
     1139    struct mbuf *m;
     1140#ifdef VJC
     1141    struct mbuf *mp;
     1142#endif
    11401143    u_char *cp;
    11411144    int address, control, protocol;
     
    14011404    struct ifnet *ifp = &sc->sc_if;
    14021405    struct ifqueue *inq;
    1403     int s, ilen, xlen, proto, rv;
     1406    int s, ilen, proto, rv;
    14041407    u_char *cp, adrs, ctrl;
    14051408    struct mbuf *mp;
     
    14071410    struct mbuf *dmp = NULL;
    14081411#endif
     1412#ifdef VJC
    14091413    u_char *iphdr;
    1410     u_int hlen;
     1414    u_int hlen;
     1415    int xlen;
     1416#endif
    14111417
    14121418    sc->sc_stats.ppp_ipackets++;
  • c/src/libnetworking/ChangeLog

    rc52f1c7 rcb1e8a46  
     12002-02-27      Ilya Alexeev <ilya@continuum.ru>
     2
     3        * net/if_ppp.c, pppd/auth.c, pppd/chat.c, pppd/pppd.h,
     4        pppd/sys-rtems.c: Add server with pap-authorization
     5        capabilities as well as eliminate some warnings.
     6
    172002-02-27      Eric Norum <eric.norum@usask.ca>
    28
  • c/src/libnetworking/net/if_ppp.c

    rc52f1c7 rcb1e8a46  
    625625            ppp_ccp_closed(sc);
    626626#endif
    627         splimp();
     627        s = splimp();
    628628        sc->sc_flags = (sc->sc_flags & ~SC_MASK) | flags;
    629629        splx(s);
     
    11371137    struct ppp_softc *sc;
    11381138{
    1139     struct mbuf *m, *mp;
     1139    struct mbuf *m;
     1140#ifdef VJC
     1141    struct mbuf *mp;
     1142#endif
    11401143    u_char *cp;
    11411144    int address, control, protocol;
     
    14011404    struct ifnet *ifp = &sc->sc_if;
    14021405    struct ifqueue *inq;
    1403     int s, ilen, xlen, proto, rv;
     1406    int s, ilen, proto, rv;
    14041407    u_char *cp, adrs, ctrl;
    14051408    struct mbuf *mp;
     
    14071410    struct mbuf *dmp = NULL;
    14081411#endif
     1412#ifdef VJC
    14091413    u_char *iphdr;
    1410     u_int hlen;
     1414    u_int hlen;
     1415    int xlen;
     1416#endif
    14111417
    14121418    sc->sc_stats.ppp_ipackets++;
  • c/src/libnetworking/pppd/auth.c

    rc52f1c7 rcb1e8a46  
    117117
    118118/* Hook for a plugin to check the PAP user and password */
    119 int (*pap_auth_hook) __P((char *user, char *passwd, char **msgp,
     119int (*pap_auth_hook) __P((char *user, char *passwd/*, char **msgp,
    120120                          struct wordlist **paddrs,
    121                           struct wordlist **popts)) = NULL;
     121                          struct wordlist **popts*/)) = NULL;
    122122
    123123/* Hook for a plugin to know about the PAP user logout */
     
    740740    char **msg;
    741741{
     742    char passwd[64], user[64];
     743
     744    if (pap_auth_hook)
     745    {
     746        slprintf(passwd, sizeof(passwd), "%.*v", passwdlen, apasswd);
     747        slprintf(user, sizeof(user), "%.*v", userlen, auser);
     748
     749        return (*pap_auth_hook)(user, passwd/*, NULL, NULL, NULL*/) ?
     750            UPAP_AUTHACK : UPAP_AUTHNAK;
     751    }
     752
     753    return UPAP_AUTHACK;
     754
     755#if 0
    742756    int    ret = (int)UPAP_AUTHNAK;
    743757
     
    748762
    749763    return ret;
     764#endif
    750765}
    751766
     
    794809    int *lacks_ipp;
    795810{
     811    return 1;
     812
     813#if 0
    796814    int ret = (int)0;
    797815
     
    803821
    804822    return ( ret );
     823#endif
    805824}
    806825
     
    10121031    u_int32_t addr;
    10131032{
     1033#if 0
    10141034    int ok;
     1035#endif
    10151036
    10161037    /* don't allow loopback or multicast address */
    10171038    if (bad_ip_adrs(addr))
    10181039        return 0;
    1019 
     1040       
     1041    return 1;
     1042
     1043#if 0
    10201044    if (addresses[unit] != NULL) {
    10211045        ok = ip_addr_check(addr, addresses[unit]);
     
    10261050        return 0;               /* no addresses authorized */
    10271051    return allow_any_ip || !have_route_to(addr);
     1052#endif
    10281053}
    10291054
  • c/src/libnetworking/pppd/chat.c

    rc52f1c7 rcb1e8a46  
    599599register char *s;
    600600{
    601     char file_data[STR_LEN];
     601/*  char file_data[STR_LEN];  */
    602602
    603603    if (say_next) {
  • c/src/libnetworking/pppd/pppd.h

    rc52f1c7 rcb1e8a46  
    481481extern int (*holdoff_hook) __P((void));
    482482extern int (*pap_check_hook) __P((void));
    483 extern int (*pap_auth_hook) __P((char *user, char *passwd, char **msgp,
     483extern int (*pap_auth_hook) __P((char *user, char *passwd/*, char **msgp,
    484484                                 struct wordlist **paddrs,
    485                                  struct wordlist **popts));
     485                                 struct wordlist **popts*/));
    486486extern void (*pap_logout_hook) __P((void));
    487487extern int (*pap_passwd_hook) __P((char *user, char *passwd));
  • c/src/libnetworking/pppd/sys-rtems.c

    rc52f1c7 rcb1e8a46  
    956956    int cmd;
    957957{
    958     int    status;
     958/*    int    status;  */
    959959    struct sockaddr_in address;
    960960    struct sockaddr_in netmask;
  • cpukit/libnetworking/ChangeLog

    rc52f1c7 rcb1e8a46  
     12002-02-27      Ilya Alexeev <ilya@continuum.ru>
     2
     3        * net/if_ppp.c, pppd/auth.c, pppd/chat.c, pppd/pppd.h,
     4        pppd/sys-rtems.c: Add server with pap-authorization
     5        capabilities as well as eliminate some warnings.
     6
    172002-02-27      Eric Norum <eric.norum@usask.ca>
    28
  • cpukit/libnetworking/net/if_ppp.c

    rc52f1c7 rcb1e8a46  
    625625            ppp_ccp_closed(sc);
    626626#endif
    627         splimp();
     627        s = splimp();
    628628        sc->sc_flags = (sc->sc_flags & ~SC_MASK) | flags;
    629629        splx(s);
     
    11371137    struct ppp_softc *sc;
    11381138{
    1139     struct mbuf *m, *mp;
     1139    struct mbuf *m;
     1140#ifdef VJC
     1141    struct mbuf *mp;
     1142#endif
    11401143    u_char *cp;
    11411144    int address, control, protocol;
     
    14011404    struct ifnet *ifp = &sc->sc_if;
    14021405    struct ifqueue *inq;
    1403     int s, ilen, xlen, proto, rv;
     1406    int s, ilen, proto, rv;
    14041407    u_char *cp, adrs, ctrl;
    14051408    struct mbuf *mp;
     
    14071410    struct mbuf *dmp = NULL;
    14081411#endif
     1412#ifdef VJC
    14091413    u_char *iphdr;
    1410     u_int hlen;
     1414    u_int hlen;
     1415    int xlen;
     1416#endif
    14111417
    14121418    sc->sc_stats.ppp_ipackets++;
  • cpukit/pppd/auth.c

    rc52f1c7 rcb1e8a46  
    117117
    118118/* Hook for a plugin to check the PAP user and password */
    119 int (*pap_auth_hook) __P((char *user, char *passwd, char **msgp,
     119int (*pap_auth_hook) __P((char *user, char *passwd/*, char **msgp,
    120120                          struct wordlist **paddrs,
    121                           struct wordlist **popts)) = NULL;
     121                          struct wordlist **popts*/)) = NULL;
    122122
    123123/* Hook for a plugin to know about the PAP user logout */
     
    740740    char **msg;
    741741{
     742    char passwd[64], user[64];
     743
     744    if (pap_auth_hook)
     745    {
     746        slprintf(passwd, sizeof(passwd), "%.*v", passwdlen, apasswd);
     747        slprintf(user, sizeof(user), "%.*v", userlen, auser);
     748
     749        return (*pap_auth_hook)(user, passwd/*, NULL, NULL, NULL*/) ?
     750            UPAP_AUTHACK : UPAP_AUTHNAK;
     751    }
     752
     753    return UPAP_AUTHACK;
     754
     755#if 0
    742756    int    ret = (int)UPAP_AUTHNAK;
    743757
     
    748762
    749763    return ret;
     764#endif
    750765}
    751766
     
    794809    int *lacks_ipp;
    795810{
     811    return 1;
     812
     813#if 0
    796814    int ret = (int)0;
    797815
     
    803821
    804822    return ( ret );
     823#endif
    805824}
    806825
     
    10121031    u_int32_t addr;
    10131032{
     1033#if 0
    10141034    int ok;
     1035#endif
    10151036
    10161037    /* don't allow loopback or multicast address */
    10171038    if (bad_ip_adrs(addr))
    10181039        return 0;
    1019 
     1040       
     1041    return 1;
     1042
     1043#if 0
    10201044    if (addresses[unit] != NULL) {
    10211045        ok = ip_addr_check(addr, addresses[unit]);
     
    10261050        return 0;               /* no addresses authorized */
    10271051    return allow_any_ip || !have_route_to(addr);
     1052#endif
    10281053}
    10291054
  • cpukit/pppd/chat.c

    rc52f1c7 rcb1e8a46  
    599599register char *s;
    600600{
    601     char file_data[STR_LEN];
     601/*  char file_data[STR_LEN];  */
    602602
    603603    if (say_next) {
  • cpukit/pppd/pppd.h

    rc52f1c7 rcb1e8a46  
    481481extern int (*holdoff_hook) __P((void));
    482482extern int (*pap_check_hook) __P((void));
    483 extern int (*pap_auth_hook) __P((char *user, char *passwd, char **msgp,
     483extern int (*pap_auth_hook) __P((char *user, char *passwd/*, char **msgp,
    484484                                 struct wordlist **paddrs,
    485                                  struct wordlist **popts));
     485                                 struct wordlist **popts*/));
    486486extern void (*pap_logout_hook) __P((void));
    487487extern int (*pap_passwd_hook) __P((char *user, char *passwd));
  • cpukit/pppd/sys-rtems.c

    rc52f1c7 rcb1e8a46  
    956956    int cmd;
    957957{
    958     int    status;
     958/*    int    status;  */
    959959    struct sockaddr_in address;
    960960    struct sockaddr_in netmask;
Note: See TracChangeset for help on using the changeset viewer.