Deleted Added
full compact
mroute.c (1591) mroute.c (2553)
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
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>
51#include <netinet/in.h>
52#include <netinet/igmp.h>
53#define KERNEL 1
54#include <netinet/ip_mroute.h>
55#undef KERNEL
56
57#include <stdio.h>
58#include <stdlib.h>
59#include "netstat.h"
60
61void
62mroutepr(mrpaddr, mrtaddr, vifaddr)
63 u_long mrpaddr, mrtaddr, vifaddr;
64{
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
65 u_int mrtproto;
66 struct mrt *mrttable[MRTHASHSIZ];
67 struct vif viftable[MAXVIFS];
68 register struct mrt *mrt;
69 struct mrt smrt;
70 register struct vif *v;
71 register vifi_t vifi;
72 register struct in_addr *grp;

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

164 printf("\n");
165 }
166 }
167 if (!banner_printed)
168 printf("\nMulticast Routing Table is empty\n");
169
170 printf("\n");
171 nflag = saved_nflag;
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
172}
173
174
175void
176mrt_stats(mrpaddr, mstaddr)
177 u_long mrpaddr, mstaddr;
178{
179 u_int mrtproto;

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

200
201 if (mstaddr == 0) {
202 printf("mrtstat: symbol not in namelist\n");
203 return;
204 }
205
206 kread(mstaddr, (char *)&mrtstat, sizeof(mrtstat));
207 printf("multicast routing:\n");
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");
208 printf(" %10u multicast route lookup%s\n",
209 mrtstat.mrts_mrt_lookups, plural(mrtstat.mrts_mrt_lookups));
210 printf(" %10u multicast route cache miss%s\n",
211 mrtstat.mrts_mrt_misses, plurales(mrtstat.mrts_mrt_misses));
212 printf(" %10u group address lookup%s\n",
213 mrtstat.mrts_grp_lookups, plural(mrtstat.mrts_grp_lookups));
214 printf(" %10u group address cache miss%s\n",
215 mrtstat.mrts_grp_misses, plurales(mrtstat.mrts_grp_misses));
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));
216 printf(" %10u datagram%s with no route for origin\n",
217 mrtstat.mrts_no_route, plural(mrtstat.mrts_no_route));
218 printf(" %10u datagram%s with malformed tunnel options\n",
219 mrtstat.mrts_bad_tunnel, plural(mrtstat.mrts_bad_tunnel));
220 printf(" %10u datagram%s with no room for tunnel options\n",
221 mrtstat.mrts_cant_tunnel, plural(mrtstat.mrts_cant_tunnel));
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));
222}
237}