summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/async.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-12-20 20:29:47 +0000
committerbrian <brian@FreeBSD.org>1999-12-20 20:29:47 +0000
commit86f30d4f38c1b3bdc30e15482e3d749c9ad5f159 (patch)
tree4d30f99ffa1bad71c98e63316d2825aa89c6d082 /usr.sbin/ppp/async.c
parent885c27b720bff004eb536dcaab0c32778e82457e (diff)
downloadFreeBSD-src-86f30d4f38c1b3bdc30e15482e3d749c9ad5f159.zip
FreeBSD-src-86f30d4f38c1b3bdc30e15482e3d749c9ad5f159.tar.gz
Cosmetic: Make struct mbuf more like kernel mbufs.
Diffstat (limited to 'usr.sbin/ppp/async.c')
-rw-r--r--usr.sbin/ppp/async.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/usr.sbin/ppp/async.c b/usr.sbin/ppp/async.c
index 956413e..6e153a9 100644
--- a/usr.sbin/ppp/async.c
+++ b/usr.sbin/ppp/async.c
@@ -92,8 +92,8 @@ async_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp,
struct mbuf *wp;
int cnt;
- if (!p || mbuf_Length(bp) > HDLCSIZE) {
- mbuf_Free(bp);
+ if (!p || m_length(bp) > HDLCSIZE) {
+ m_freem(bp);
return NULL;
}
@@ -103,20 +103,20 @@ async_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp,
*cp++ = HDLC_SYN;
while (wp) {
sp = MBUF_CTOP(wp);
- for (cnt = wp->cnt; cnt > 0; cnt--) {
+ for (cnt = wp->m_len; cnt > 0; cnt--) {
async_Encode(&p->async, &cp, *sp++, *proto);
if (cp >= ep) {
- mbuf_Free(bp);
+ m_freem(bp);
return NULL;
}
}
- wp = wp->next;
+ wp = wp->m_next;
}
*cp++ = HDLC_SYN;
cnt = cp - p->async.xbuff;
- mbuf_Free(bp);
- bp = mbuf_Alloc(cnt, MB_ASYNCOUT);
+ m_freem(bp);
+ bp = m_get(cnt, MB_ASYNCOUT);
memcpy(MBUF_CTOP(bp), p->async.xbuff, cnt);
log_DumpBp(LogASYNC, "Write", bp);
@@ -135,7 +135,7 @@ async_Decode(struct async *async, u_char c)
case HDLC_SYN:
async->mode &= ~MODE_HUNT;
if (async->length) { /* packet is ready. */
- bp = mbuf_Alloc(async->length, MB_ASYNCIN);
+ bp = m_get(async->length, MB_ASYNCIN);
mbuf_Write(bp, async->hbuff, async->length);
async->length = 0;
return bp;
@@ -185,12 +185,12 @@ async_LayerPull(struct bundle *b, struct link *l, struct mbuf *bp,
log_DumpBp(LogASYNC, "Read", bp);
while (bp) {
ch = MBUF_CTOP(bp);
- for (cnt = bp->cnt; cnt; cnt--) {
+ for (cnt = bp->m_len; cnt; cnt--) {
*last = async_Decode(&p->async, *ch++);
if (*last != NULL)
- last = &(*last)->pnext;
+ last = &(*last)->m_nextpkt;
}
- bp = mbuf_FreeSeg(bp);
+ bp = m_free(bp);
}
return nbp;
OpenPOWER on IntegriCloud