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:
Ralf Corsepius
2005-02-08 01:51:07 +00:00
parent c2ab8b0d3a
commit 41ff6708e7
3 changed files with 20 additions and 13 deletions

View File

@@ -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>
* libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_load_tar.c,

View File

@@ -1,6 +1,8 @@
/*
* if_ppp.c - Point-to-Point Protocol (PPP) Asynchronous driver.
*
*/
/*-
* Copyright (c) 1989 Carnegie Mellon University.
* All rights reserved.
*
@@ -125,14 +127,14 @@
#include <net/ppp-comp.h>
#endif
static int pppsioctl __P((struct ifnet *, int, caddr_t));
static void ppp_requeue __P((struct ppp_softc *));
static int pppsioctl(struct ifnet *, int, caddr_t);
static void ppp_requeue(struct ppp_softc *);
#ifdef PPP_COMPRESS
static void ppp_ccp __P((struct ppp_softc *, struct mbuf *m, int rcvd));
static void ppp_ccp_closed __P((struct ppp_softc *));
static void ppp_ccp(struct ppp_softc *, struct mbuf *m, int rcvd);
static void ppp_ccp_closed(struct ppp_softc *);
#endif
static struct mbuf *ppp_inproc __P((struct ppp_softc *, struct mbuf *));
static void pppdumpm __P((struct mbuf *m0));
static struct mbuf *ppp_inproc(struct ppp_softc *, struct mbuf *);
static void pppdumpm(struct mbuf *m0);
/*
* 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
* 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
ppp_requeue(sc)
@@ -1170,10 +1172,7 @@ struct mbuf *
ppp_dequeue(sc)
struct ppp_softc *sc;
{
struct mbuf *m;
#ifdef VJC
struct mbuf *mp;
#endif
struct mbuf *m, *mp;
u_char *cp;
int address, control, protocol;
@@ -1565,6 +1564,9 @@ ppp_inproc(sc, m)
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[0] = adrs;
cp[1] = ctrl;

View File

@@ -94,9 +94,9 @@ struct ppp_softc {
char *sc_mp; /* ptr to next char in input mbuf */
short sc_ilen; /* length of input packet so far */
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 */
int sc_rawin_count; /* # in sc_rawin */
u_short sc_outfcs; /* FCS so far for output packet */
struct ifqueue sc_freeq; /* free packets */
short sc_outoff; /* output packet byte offset */