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 * --- 34 unchanged lines hidden (view full) --- 43 * MROUTING 1.0 44 */ 45 46#include <sys/param.h> 47#include <sys/socket.h> 48#include <sys/socketvar.h> 49#include <sys/protosw.h> 50 |
51#include <net/if.h> |
52#include <netinet/in.h> 53#include <netinet/igmp.h> 54#define KERNEL 1 55#include <netinet/ip_mroute.h> 56#undef KERNEL 57 58#include <stdio.h> 59#include <stdlib.h> 60#include "netstat.h" 61 62void 63mroutepr(mrpaddr, mrtaddr, vifaddr) 64 u_long mrpaddr, mrtaddr, vifaddr; 65{ |
66#if 0 |
67 u_int mrtproto; 68 struct mrt *mrttable[MRTHASHSIZ]; 69 struct vif viftable[MAXVIFS]; 70 register struct mrt *mrt; 71 struct mrt smrt; 72 register struct vif *v; 73 register vifi_t vifi; 74 register struct in_addr *grp; --- 91 unchanged lines hidden (view full) --- 166 printf("\n"); 167 } 168 } 169 if (!banner_printed) 170 printf("\nMulticast Routing Table is empty\n"); 171 172 printf("\n"); 173 nflag = saved_nflag; |
174#else 175 printf("this isn't supported yet\n"); 176#endif |
177} 178 179 180void 181mrt_stats(mrpaddr, mstaddr) 182 u_long mrpaddr, mstaddr; 183{ 184 u_int mrtproto; --- 20 unchanged lines hidden (view full) --- 205 206 if (mstaddr == 0) { 207 printf("mrtstat: symbol not in namelist\n"); 208 return; 209 } 210 211 kread(mstaddr, (char *)&mrtstat, sizeof(mrtstat)); 212 printf("multicast routing:\n"); |
213 printf(" %10u multicast forwarding cache lookup%s\n", 214 mrtstat.mrts_mfc_lookups, plural(mrtstat.mrts_mfc_lookups)); 215 printf(" %10u multicast forwarding cache miss%s\n", 216 mrtstat.mrts_mfc_misses, plurales(mrtstat.mrts_mfc_misses)); 217 printf(" %10u upcall%s to mrouted\n", 218 mrtstat.mrts_upcalls, plural(mrtstat.mrts_upcalls)); 219 printf(" %10u upcall queue overflow%s\n", 220 mrtstat.mrts_upq_ovflw, plural(mrtstat.mrts_upq_ovflw)); 221 printf(" %10u cache cleanup%s\n", 222 mrtstat.mrts_cache_cleanups, plural(mrtstat.mrts_cache_cleanups)); |
223 printf(" %10u datagram%s with no route for origin\n", 224 mrtstat.mrts_no_route, plural(mrtstat.mrts_no_route)); 225 printf(" %10u datagram%s with malformed tunnel options\n", 226 mrtstat.mrts_bad_tunnel, plural(mrtstat.mrts_bad_tunnel)); 227 printf(" %10u datagram%s with no room for tunnel options\n", 228 mrtstat.mrts_cant_tunnel, plural(mrtstat.mrts_cant_tunnel)); |
229 printf(" %10u datagram%s arrived on wrong interface\n", 230 mrtstat.mrts_wrong_if, plural(mrtstat.mrts_wrong_if)); 231 printf(" %10u datagram%s selectively dropped\n", 232 mrtstat.mrts_drop_sel, plural(mrtstat.mrts_drop_sel)); 233 printf(" %10u datagram%s dropped due to queue overflow\n", 234 mrtstat.mrts_q_overflow, plural(mrtstat.mrts_q_overflow)); 235 printf(" %10u datagram%s dropped for being too large\n", 236 mrtstat.mrts_pkt2large, plural(mrtstat.mrts_pkt2large)); |
237} |