mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-06 07:33:17 +00:00
2005-02-08 Ralf Corsepius <ralf.corsepius@rtems.org>
* libnetworking/net/if_ppp.c, libnetworking/net/if_pppvar.h: Ansification, cosmetics from FreeBSD.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2005-02-08 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
|
* libnetworking/net/if_ppp.c, libnetworking/net/if_pppvar.h:
|
||||||
|
Ansification, cosmetics from FreeBSD.
|
||||||
|
|
||||||
2005-02-07 Ralf Corsepius <ralf.corsepius@rtems.org>
|
2005-02-07 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
* libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_load_tar.c,
|
* libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_load_tar.c,
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* if_ppp.c - Point-to-Point Protocol (PPP) Asynchronous driver.
|
* if_ppp.c - Point-to-Point Protocol (PPP) Asynchronous driver.
|
||||||
*
|
*/
|
||||||
|
|
||||||
|
/*-
|
||||||
* Copyright (c) 1989 Carnegie Mellon University.
|
* Copyright (c) 1989 Carnegie Mellon University.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -125,14 +127,14 @@
|
|||||||
#include <net/ppp-comp.h>
|
#include <net/ppp-comp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int pppsioctl __P((struct ifnet *, int, caddr_t));
|
static int pppsioctl(struct ifnet *, int, caddr_t);
|
||||||
static void ppp_requeue __P((struct ppp_softc *));
|
static void ppp_requeue(struct ppp_softc *);
|
||||||
#ifdef PPP_COMPRESS
|
#ifdef PPP_COMPRESS
|
||||||
static void ppp_ccp __P((struct ppp_softc *, struct mbuf *m, int rcvd));
|
static void ppp_ccp(struct ppp_softc *, struct mbuf *m, int rcvd);
|
||||||
static void ppp_ccp_closed __P((struct ppp_softc *));
|
static void ppp_ccp_closed(struct ppp_softc *);
|
||||||
#endif
|
#endif
|
||||||
static struct mbuf *ppp_inproc __P((struct ppp_softc *, struct mbuf *));
|
static struct mbuf *ppp_inproc(struct ppp_softc *, struct mbuf *);
|
||||||
static void pppdumpm __P((struct mbuf *m0));
|
static void pppdumpm(struct mbuf *m0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some useful mbuf macros not in mbuf.h.
|
* Some useful mbuf macros not in mbuf.h.
|
||||||
@@ -1111,7 +1113,7 @@ bad:
|
|||||||
/*
|
/*
|
||||||
* After a change in the NPmode for some NP, move packets from the
|
* After a change in the NPmode for some NP, move packets from the
|
||||||
* npqueue to the send queue or the fast queue as appropriate.
|
* npqueue to the send queue or the fast queue as appropriate.
|
||||||
* Should be called at splsoftnet.
|
* Should be called at spl[soft]net.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
ppp_requeue(sc)
|
ppp_requeue(sc)
|
||||||
@@ -1170,10 +1172,7 @@ struct mbuf *
|
|||||||
ppp_dequeue(sc)
|
ppp_dequeue(sc)
|
||||||
struct ppp_softc *sc;
|
struct ppp_softc *sc;
|
||||||
{
|
{
|
||||||
struct mbuf *m;
|
struct mbuf *m, *mp;
|
||||||
#ifdef VJC
|
|
||||||
struct mbuf *mp;
|
|
||||||
#endif
|
|
||||||
u_char *cp;
|
u_char *cp;
|
||||||
int address, control, protocol;
|
int address, control, protocol;
|
||||||
|
|
||||||
@@ -1565,6 +1564,9 @@ ppp_inproc(sc, m)
|
|||||||
goto bad; /* lose if big headers and no clusters */
|
goto bad; /* lose if big headers and no clusters */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef MAC
|
||||||
|
mac_create_mbuf_from_mbuf(m, mp);
|
||||||
|
#endif
|
||||||
cp = mtod(mp, u_char *);
|
cp = mtod(mp, u_char *);
|
||||||
cp[0] = adrs;
|
cp[0] = adrs;
|
||||||
cp[1] = ctrl;
|
cp[1] = ctrl;
|
||||||
|
|||||||
@@ -94,9 +94,9 @@ struct ppp_softc {
|
|||||||
char *sc_mp; /* ptr to next char in input mbuf */
|
char *sc_mp; /* ptr to next char in input mbuf */
|
||||||
short sc_ilen; /* length of input packet so far */
|
short sc_ilen; /* length of input packet so far */
|
||||||
u_short sc_fcs; /* FCS so far (input) */
|
u_short sc_fcs; /* FCS so far (input) */
|
||||||
|
u_short sc_outfcs; /* FCS so far for output packet */
|
||||||
u_char sc_rawin[16]; /* chars as received */
|
u_char sc_rawin[16]; /* chars as received */
|
||||||
int sc_rawin_count; /* # in sc_rawin */
|
int sc_rawin_count; /* # in sc_rawin */
|
||||||
u_short sc_outfcs; /* FCS so far for output packet */
|
|
||||||
|
|
||||||
struct ifqueue sc_freeq; /* free packets */
|
struct ifqueue sc_freeq; /* free packets */
|
||||||
short sc_outoff; /* output packet byte offset */
|
short sc_outoff; /* output packet byte offset */
|
||||||
|
|||||||
Reference in New Issue
Block a user