Deleted Added
full compact
mbuf.c (78189) mbuf.c (81634)
1/*-
2 * Copyright (c) 1996 - 2001 Brian Somers <brian@Awfulhak.org>
3 * based on work by Toshiharu OHNO <tony-o@iij.ad.jp>
4 * Internet Initiative Japan, Inc (IIJ)
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 1996 - 2001 Brian Somers <brian@Awfulhak.org>
3 * based on work by Toshiharu OHNO <tony-o@iij.ad.jp>
4 * Internet Initiative Japan, Inc (IIJ)
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/usr.sbin/ppp/mbuf.c 78189 2001-06-13 21:52:19Z brian $
28 * $FreeBSD: head/usr.sbin/ppp/mbuf.c 81634 2001-08-14 16:05:52Z brian $
29 */
30
31#include <sys/types.h>
32
33#include <stdio.h>
34#include <stdlib.h>
35#include <string.h>
36#include <sysexits.h>

--- 45 unchanged lines hidden (view full) ---

82 len += bp->m_len;
83 return len;
84}
85
86static const char *
87mbuftype(int type)
88{
89 static const char * const mbufdesc[MB_MAX] = {
29 */
30
31#include <sys/types.h>
32
33#include <stdio.h>
34#include <stdlib.h>
35#include <string.h>
36#include <sysexits.h>

--- 45 unchanged lines hidden (view full) ---

82 len += bp->m_len;
83 return len;
84}
85
86static const char *
87mbuftype(int type)
88{
89 static const char * const mbufdesc[MB_MAX] = {
90 "ip in", "ip out", "nat in", "nat out", "mp in", "mp out",
91 "vj in", "vj out", "icompd in", "icompd out", "compd in", "compd out",
92 "lqr in", "lqr out", "echo in", "echo out", "proto in", "proto out",
93 "acf in", "acf out", "sync in", "sync out", "hdlc in", "hdlc out",
94 "async in", "async out", "cbcp in", "cbcp out", "chap in", "chap out",
95 "pap in", "pap out", "ccp in", "ccp out", "ipcp in", "ipcp out",
96 "lcp in", "lcp out"
90 "ip in", "ip out", "ipv6 in", "ipv6 out", "nat in", "nat out",
91 "mp in", "mp out", "vj in", "vj out", "icompd in", "icompd out",
92 "compd in", "compd out", "lqr in", "lqr out", "echo in", "echo out",
93 "proto in", "proto out", "acf in", "acf out", "sync in", "sync out",
94 "hdlc in", "hdlc out", "async in", "async out", "cbcp in", "cbcp out",
95 "chap in", "chap out", "pap in", "pap out", "ccp in", "ccp out",
96 "ipcp in", "ipcp out", "ipv6cp in", "ipv6cp out", "lcp in", "lcp out"
97 };
98
99 return type < 0 || type >= MB_MAX ? "unknown" : mbufdesc[type];
100}
101
102struct mbuf *
103m_get(size_t m_len, int type)
104{

--- 331 unchanged lines hidden ---
97 };
98
99 return type < 0 || type >= MB_MAX ? "unknown" : mbufdesc[type];
100}
101
102struct mbuf *
103m_get(size_t m_len, int type)
104{

--- 331 unchanged lines hidden ---