Deleted Added
full compact
mbuf.c (160787) mbuf.c (171465)
1/*
2 * Copyright (c) 1983, 1988, 1993
3 * The Regents of the University of California.
4 * Copyright (c) 2005 Robert N. M. Watson
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

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

35
36#if 0
37#ifndef lint
38static char sccsid[] = "@(#)mbuf.c 8.1 (Berkeley) 6/6/93";
39#endif /* not lint */
40#endif
41
42#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1983, 1988, 1993
3 * The Regents of the University of California.
4 * Copyright (c) 2005 Robert N. M. Watson
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

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

35
36#if 0
37#ifndef lint
38static char sccsid[] = "@(#)mbuf.c 8.1 (Berkeley) 6/6/93";
39#endif /* not lint */
40#endif
41
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/usr.bin/netstat/mbuf.c 160787 2006-07-28 16:09:19Z yar $");
43__FBSDID("$FreeBSD: head/usr.bin/netstat/mbuf.c 171465 2007-07-16 17:15:55Z jhb $");
44
45#include <sys/param.h>
46#include <sys/mbuf.h>
47#include <sys/protosw.h>
48#include <sys/socket.h>
44
45#include <sys/param.h>
46#include <sys/mbuf.h>
47#include <sys/protosw.h>
48#include <sys/socket.h>
49#include <sys/socketvar.h>
49#include <sys/sysctl.h>
50
51#include <err.h>
52#include <kvm.h>
53#include <memstat.h>
54#include <stdint.h>
55#include <stdio.h>
56#include <stdlib.h>

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

75 uintmax_t jumbo9_count, jumbo9_bytes, jumbo9_limit, jumbo9_free;
76 uintmax_t jumbo9_failures, jumbo9_size;
77 uintmax_t jumbo16_count, jumbo16_bytes, jumbo16_limit, jumbo16_free;
78 uintmax_t jumbo16_failures, jumbo16_size;
79 uintmax_t bytes_inuse, bytes_incache, bytes_total;
80 int nsfbufs, nsfbufspeak, nsfbufsused;
81 struct mbstat mbstat;
82 size_t mlen;
50#include <sys/sysctl.h>
51
52#include <err.h>
53#include <kvm.h>
54#include <memstat.h>
55#include <stdint.h>
56#include <stdio.h>
57#include <stdlib.h>

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

76 uintmax_t jumbo9_count, jumbo9_bytes, jumbo9_limit, jumbo9_free;
77 uintmax_t jumbo9_failures, jumbo9_size;
78 uintmax_t jumbo16_count, jumbo16_bytes, jumbo16_limit, jumbo16_free;
79 uintmax_t jumbo16_failures, jumbo16_size;
80 uintmax_t bytes_inuse, bytes_incache, bytes_total;
81 int nsfbufs, nsfbufspeak, nsfbufsused;
82 struct mbstat mbstat;
83 size_t mlen;
83 int error, live;
84 int error;
84
85
85 live = (kvmd == NULL);
86 mtlp = memstat_mtl_alloc();
87 if (mtlp == NULL) {
88 warn("memstat_mtl_alloc");
89 return;
90 }
91
92 /*
93 * Use memstat_*_all() because some mbuf-related memory is in uma(9),

--- 220 unchanged lines hidden ---
86 mtlp = memstat_mtl_alloc();
87 if (mtlp == NULL) {
88 warn("memstat_mtl_alloc");
89 return;
90 }
91
92 /*
93 * Use memstat_*_all() because some mbuf-related memory is in uma(9),

--- 220 unchanged lines hidden ---