Deleted Added
full compact
mroute.c (191356) mroute.c (253081)
1/*-
2 * Copyright (c) 1989 Stephen Deering
3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Stephen Deering of Stanford University.
8 *

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

33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)mroute.c 8.2 (Berkeley) 4/28/95
38 */
39
40#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1989 Stephen Deering
3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Stephen Deering of Stanford University.
8 *

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

33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)mroute.c 8.2 (Berkeley) 4/28/95
38 */
39
40#include <sys/cdefs.h>
41__FBSDID("$FreeBSD: head/usr.bin/netstat/mroute.c 191356 2009-04-21 12:47:09Z bms $");
41__FBSDID("$FreeBSD: head/usr.bin/netstat/mroute.c 253081 2013-07-09 09:32:06Z ae $");
42
43/*
44 * Print multicast routing structures and statistics.
45 *
46 * MROUTING 1.0
47 */
48
49#include <sys/param.h>

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

350 return;
351 }
352 } else
353 kread(mstaddr, (char *)&mrtstat, sizeof(mrtstat));
354
355 printf("IPv4 multicast forwarding:\n");
356
357#define p(f, m) if (mrtstat.f || sflag <= 1) \
42
43/*
44 * Print multicast routing structures and statistics.
45 *
46 * MROUTING 1.0
47 */
48
49#include <sys/param.h>

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

350 return;
351 }
352 } else
353 kread(mstaddr, (char *)&mrtstat, sizeof(mrtstat));
354
355 printf("IPv4 multicast forwarding:\n");
356
357#define p(f, m) if (mrtstat.f || sflag <= 1) \
358 printf(m, mrtstat.f, plural(mrtstat.f))
358 printf(m, (uintmax_t)mrtstat.f, plural(mrtstat.f))
359#define p2(f, m) if (mrtstat.f || sflag <= 1) \
359#define p2(f, m) if (mrtstat.f || sflag <= 1) \
360 printf(m, mrtstat.f, plurales(mrtstat.f))
360 printf(m, (uintmax_t)mrtstat.f, plurales(mrtstat.f))
361
361
362 p(mrts_mfc_lookups, "\t%lu multicast forwarding cache lookup%s\n");
363 p2(mrts_mfc_misses, "\t%lu multicast forwarding cache miss%s\n");
364 p(mrts_upcalls, "\t%lu upcall%s to multicast routing daemon\n");
365 p(mrts_upq_ovflw, "\t%lu upcall queue overflow%s\n");
362 p(mrts_mfc_lookups, "\t%ju multicast forwarding cache lookup%s\n");
363 p2(mrts_mfc_misses, "\t%ju multicast forwarding cache miss%s\n");
364 p(mrts_upcalls, "\t%ju upcall%s to multicast routing daemon\n");
365 p(mrts_upq_ovflw, "\t%ju upcall queue overflow%s\n");
366 p(mrts_upq_sockfull,
366 p(mrts_upq_sockfull,
367 "\t%lu upcall%s dropped due to full socket buffer\n");
368 p(mrts_cache_cleanups, "\t%lu cache cleanup%s\n");
369 p(mrts_no_route, "\t%lu datagram%s with no route for origin\n");
370 p(mrts_bad_tunnel, "\t%lu datagram%s arrived with bad tunneling\n");
371 p(mrts_cant_tunnel, "\t%lu datagram%s could not be tunneled\n");
372 p(mrts_wrong_if, "\t%lu datagram%s arrived on wrong interface\n");
373 p(mrts_drop_sel, "\t%lu datagram%s selectively dropped\n");
374 p(mrts_q_overflow, "\t%lu datagram%s dropped due to queue overflow\n");
375 p(mrts_pkt2large, "\t%lu datagram%s dropped for being too large\n");
367 "\t%ju upcall%s dropped due to full socket buffer\n");
368 p(mrts_cache_cleanups, "\t%ju cache cleanup%s\n");
369 p(mrts_no_route, "\t%ju datagram%s with no route for origin\n");
370 p(mrts_bad_tunnel, "\t%ju datagram%s arrived with bad tunneling\n");
371 p(mrts_cant_tunnel, "\t%ju datagram%s could not be tunneled\n");
372 p(mrts_wrong_if, "\t%ju datagram%s arrived on wrong interface\n");
373 p(mrts_drop_sel, "\t%ju datagram%s selectively dropped\n");
374 p(mrts_q_overflow, "\t%ju datagram%s dropped due to queue overflow\n");
375 p(mrts_pkt2large, "\t%ju datagram%s dropped for being too large\n");
376
377#undef p2
378#undef p
379}
376
377#undef p2
378#undef p
379}