mroute.c (171465) | mroute.c (175061) |
---|---|
1/* | 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 * 9 * Redistribution and use in source and binary forms, with or without --- 23 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> | 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 * 9 * Redistribution and use in source and binary forms, with or without --- 23 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 171465 2007-07-16 17:15:55Z jhb $"); | 41__FBSDID("$FreeBSD: head/usr.bin/netstat/mroute.c 175061 2008-01-02 23:26:11Z obrien $"); |
42 43/* 44 * Print multicast routing structures and statistics. 45 * 46 * MROUTING 1.0 47 */ 48 49#include <sys/param.h> --- 66 unchanged lines hidden (view full) --- 116 printf("\nIPv4 Virtual Interface Table\n" 117 " Vif Thresh Rate Local-Address " 118 "Remote-Address Pkts-In Pkts-Out\n"); 119 banner_printed = 1; 120 } 121 122 printf(" %2u %6u %4d %-15.15s", 123 /* opposite math of add_vif() */ | 42 43/* 44 * Print multicast routing structures and statistics. 45 * 46 * MROUTING 1.0 47 */ 48 49#include <sys/param.h> --- 66 unchanged lines hidden (view full) --- 116 printf("\nIPv4 Virtual Interface Table\n" 117 " Vif Thresh Rate Local-Address " 118 "Remote-Address Pkts-In Pkts-Out\n"); 119 banner_printed = 1; 120 } 121 122 printf(" %2u %6u %4d %-15.15s", 123 /* opposite math of add_vif() */ |
124 vifi, v->v_threshold, v->v_rate_limit * 1000 / 1024, | 124 vifi, v->v_threshold, v->v_rate_limit * 1000 / 1024, |
125 routename(v->v_lcl_addr.s_addr)); 126 printf(" %-15.15s", (v->v_flags & VIFF_TUNNEL) ? 127 routename(v->v_rmt_addr.s_addr) : ""); 128 129 printf(" %9lu %9lu\n", v->v_pkt_in, v->v_pkt_out); 130 } 131 if (!banner_printed) 132 printf("\nIPv4 Virtual Interface Table is empty\n"); --- 13 unchanged lines hidden (view full) --- 146 } 147 148 printf(" %-15.15s", routename(mfc.mfc_origin.s_addr)); 149 printf(" %-15.15s", routename(mfc.mfc_mcastgrp.s_addr)); 150 printf(" %9lu", mfc.mfc_pkt_cnt); 151 printf(" %3d ", mfc.mfc_parent); 152 for (vifi = 0; vifi <= maxvif; vifi++) { 153 if (mfc.mfc_ttls[vifi] > 0) | 125 routename(v->v_lcl_addr.s_addr)); 126 printf(" %-15.15s", (v->v_flags & VIFF_TUNNEL) ? 127 routename(v->v_rmt_addr.s_addr) : ""); 128 129 printf(" %9lu %9lu\n", v->v_pkt_in, v->v_pkt_out); 130 } 131 if (!banner_printed) 132 printf("\nIPv4 Virtual Interface Table is empty\n"); --- 13 unchanged lines hidden (view full) --- 146 } 147 148 printf(" %-15.15s", routename(mfc.mfc_origin.s_addr)); 149 printf(" %-15.15s", routename(mfc.mfc_mcastgrp.s_addr)); 150 printf(" %9lu", mfc.mfc_pkt_cnt); 151 printf(" %3d ", mfc.mfc_parent); 152 for (vifi = 0; vifi <= maxvif; vifi++) { 153 if (mfc.mfc_ttls[vifi] > 0) |
154 printf(" %u:%u", vifi, | 154 printf(" %u:%u", vifi, |
155 mfc.mfc_ttls[vifi]); 156 } 157 printf("\n"); 158 159 /* Print the bw meter information */ 160 { 161 struct bw_meter bw_meter, *bwm; 162 int banner_printed2 = 0; | 155 mfc.mfc_ttls[vifi]); 156 } 157 printf("\n"); 158 159 /* Print the bw meter information */ 160 { 161 struct bw_meter bw_meter, *bwm; 162 int banner_printed2 = 0; |
163 | 163 |
164 bwm = mfc.mfc_bw_meter; 165 while (bwm) { 166 /* XXX KVM */ 167 kread((u_long)bwm, (char *)&bw_meter, 168 sizeof bw_meter); 169 print_bw_meter(&bw_meter, 170 &banner_printed2); 171 bwm = bw_meter.bm_mfc_next; --- 133 unchanged lines hidden --- | 164 bwm = mfc.mfc_bw_meter; 165 while (bwm) { 166 /* XXX KVM */ 167 kread((u_long)bwm, (char *)&bw_meter, 168 sizeof bw_meter); 169 print_bw_meter(&bw_meter, 170 &banner_printed2); 171 bwm = bw_meter.bm_mfc_next; --- 133 unchanged lines hidden --- |