diff options
author | brian <brian@FreeBSD.org> | 1999-12-20 20:29:47 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-12-20 20:29:47 +0000 |
commit | 86f30d4f38c1b3bdc30e15482e3d749c9ad5f159 (patch) | |
tree | 4d30f99ffa1bad71c98e63316d2825aa89c6d082 /usr.sbin/ppp/vjcomp.c | |
parent | 885c27b720bff004eb536dcaab0c32778e82457e (diff) | |
download | FreeBSD-src-86f30d4f38c1b3bdc30e15482e3d749c9ad5f159.zip FreeBSD-src-86f30d4f38c1b3bdc30e15482e3d749c9ad5f159.tar.gz |
Cosmetic: Make struct mbuf more like kernel mbufs.
Diffstat (limited to 'usr.sbin/ppp/vjcomp.c')
-rw-r--r-- | usr.sbin/ppp/vjcomp.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/ppp/vjcomp.c b/usr.sbin/ppp/vjcomp.c index 1395ba13..5c99362 100644 --- a/usr.sbin/ppp/vjcomp.c +++ b/usr.sbin/ppp/vjcomp.c @@ -66,7 +66,7 @@ vj_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp, int pri, struct ip *pip; u_short cproto = bundle->ncp.ipcp.peer_compproto >> 16; - bp = mbuf_Contiguous(bp); + bp = m_pullup(bp); pip = (struct ip *)MBUF_CTOP(bp); if (*proto == PROTO_IP && pip->ip_p == IPPROTO_TCP && cproto == PROTO_VJCOMP) { @@ -81,18 +81,18 @@ vj_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp, int pri, case TYPE_UNCOMPRESSED_TCP: *proto = PROTO_VJUNCOMP; log_Printf(LogDEBUG, "vj_LayerPush: PROTO_IP -> PROTO_VJUNCOMP\n"); - mbuf_SetType(bp, MB_VJOUT); + m_settype(bp, MB_VJOUT); break; case TYPE_COMPRESSED_TCP: *proto = PROTO_VJCOMP; log_Printf(LogDEBUG, "vj_LayerPush: PROTO_IP -> PROTO_VJUNCOMP\n"); - mbuf_SetType(bp, MB_VJOUT); + m_settype(bp, MB_VJOUT); break; default: log_Printf(LogERROR, "vj_LayerPush: Unknown frame type %x\n", type); - mbuf_Free(bp); + m_freem(bp); return NULL; } } @@ -108,8 +108,8 @@ VjUncompressTcp(struct ipcp *ipcp, struct mbuf *bp, u_char type) struct mbuf *nbp; u_char work[MAX_HDR + MAX_VJHEADER]; /* enough to hold TCP/IP header */ - bp = mbuf_Contiguous(bp); - olen = len = mbuf_Length(bp); + bp = m_pullup(bp); + olen = len = m_length(bp); if (type == TYPE_UNCOMPRESSED_TCP) { /* * Uncompressed packet does NOT change its size, so that we can use mbuf @@ -119,10 +119,10 @@ VjUncompressTcp(struct ipcp *ipcp, struct mbuf *bp, u_char type) len = sl_uncompress_tcp(&bufp, len, type, &ipcp->vj.cslc, &ipcp->vj.slstat, (ipcp->my_compproto >> 8) & 255); if (len <= 0) { - mbuf_Free(bp); + m_freem(bp); bp = NULL; } else - mbuf_SetType(bp, MB_VJIN); + m_settype(bp, MB_VJIN); return bp; } @@ -139,15 +139,15 @@ VjUncompressTcp(struct ipcp *ipcp, struct mbuf *bp, u_char type) len = sl_uncompress_tcp(&bufp, olen, type, &ipcp->vj.cslc, &ipcp->vj.slstat, (ipcp->my_compproto >> 8) & 255); if (len <= 0) { - mbuf_Free(bp); + m_freem(bp); return NULL; } len -= olen; len += rlen; - nbp = mbuf_Alloc(len, MB_VJIN); + nbp = m_get(len, MB_VJIN); memcpy(MBUF_CTOP(nbp), bufp, len); - mbuf_SetType(bp, MB_VJIN); - nbp->next = bp; + m_settype(bp, MB_VJIN); + nbp->m_next = bp; return nbp; } |