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/physical.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/physical.c')
-rw-r--r-- | usr.sbin/ppp/physical.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c index 61e22a4..92d47f8 100644 --- a/usr.sbin/ppp/physical.c +++ b/usr.sbin/ppp/physical.c @@ -384,14 +384,14 @@ physical_DescriptorWrite(struct descriptor *d, struct bundle *bundle, p->out = link_Dequeue(&p->link); if (p->out) { - nw = physical_Write(p, MBUF_CTOP(p->out), p->out->cnt); + nw = physical_Write(p, MBUF_CTOP(p->out), p->out->m_len); log_Printf(LogDEBUG, "%s: DescriptorWrite: wrote %d(%d) to %d\n", - p->link.name, nw, p->out->cnt, p->fd); + p->link.name, nw, p->out->m_len, p->fd); if (nw > 0) { - p->out->cnt -= nw; - p->out->offset += nw; - if (p->out->cnt == 0) - p->out = mbuf_FreeSeg(p->out); + p->out->m_len -= nw; + p->out->m_offset += nw; + if (p->out->m_len == 0) + p->out = m_free(p->out); result = 1; } else if (nw < 0) { if (errno != EAGAIN) { @@ -437,8 +437,8 @@ physical_ShowStatus(struct cmdargs const *arg) prompt_Printf(arg->prompt, " Physical outq: %d\n", n); #endif - prompt_Printf(arg->prompt, " Queued Packets: %d\n", - link_QueueLen(&p->link)); + prompt_Printf(arg->prompt, " Queued Packets: %lu\n", + (u_long)link_QueueLen(&p->link)); prompt_Printf(arg->prompt, " Phone Number: %s\n", arg->cx->phone.chosen); prompt_Printf(arg->prompt, "\nDefaults:\n"); @@ -903,7 +903,7 @@ void physical_DeleteQueue(struct physical *p) { if (p->out) { - mbuf_Free(p->out); + m_freem(p->out); p->out = NULL; } link_DeleteQueue(&p->link); |