FreeBSD Bugzilla – Attachment 5376 Details for
Bug 12898
Added a command-line switch to netstat to output the number of routes in the routing table.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 3.49 KB, created by
Benjamin April
on 1999-07-31 16:00:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Benjamin April
Created:
1999-07-31 16:00:01 UTC
Size:
3.49 KB
patch
obsolete
>*** route.c Sat Jul 24 14:16:41 1999 >--- ./route.c.old Sat Jul 24 12:10:49 1999 >*************** >*** 114,131 **** > struct radix_node_head *rt_tables[AF_MAX+1]; > > int NewTree = 0; >- int total = 0; > > static struct sockaddr *kgetsa __P((struct sockaddr *)); > static void p_tree __P((struct radix_node *)); >- static void c_tree __P((struct radix_node *)); > static void p_rtnode __P((void)); > static void ntreestuff __P((void)); > static void np_rtentry __P((struct rt_msghdr *)); > static void p_sockaddr __P((struct sockaddr *, struct sockaddr *, int, int)); > static void p_flags __P((int, char *)); > static void p_rtentry __P((struct rtentry *)); >- static void c_rtentry __P((struct rtentry *)); > static u_long forgemask __P((u_long)); > static void domask __P((char *, u_long, u_long)); > >--- 114,128 ---- >*************** >*** 880,968 **** > *p += ('A' - 'a'); > break; > } >- } >- >- void >- routecount(rtree) >- u_long rtree; >- { >- struct radix_node_head *rnh, head; >- int i; >- >- printf("Routing tables\n"); >- >- if (Aflag == 0 && NewTree) >- ntreestuff(); >- else { >- if (rtree == 0) { >- printf("rt_tables: symbol not in namelist\n"); >- return; >- } >- >- kget(rtree, rt_tables); >- for (i = 0; i <= AF_MAX; i++) { >- if ((rnh = rt_tables[i]) == 0) >- continue; >- kget(rnh, head); >- if (i == AF_UNSPEC) { >- if (Aflag && af == 0) { >- printf("Netmasks:\n"); >- c_tree(head.rnh_treetop); >- } >- } else if (af == AF_UNSPEC || af == i) { >- pr_family(i); >- do_rtent = 1; >- total=0; >- c_tree(head.rnh_treetop); >- printf("%d Routes\n",total); >- } >- } >- } >- } >- >- static void >- c_tree(rn) >- struct radix_node *rn; >- { >- >- again: >- kget(rn, rnode); >- if (rnode.rn_b < 0) { >- if (Aflag) >- printf("%-8.8lx ", (u_long)rn); >- if (rnode.rn_flags & RNF_ROOT) { >- if (Aflag) >- printf("(root node)%s", >- rnode.rn_dupedkey ? " =>\n" : "\n"); >- } else if (do_rtent) { >- kget(rn, rtentry); >- c_rtentry(&rtentry); >- if (Aflag) >- p_rtnode(); >- } else { >- p_sockaddr(kgetsa((struct sockaddr *)rnode.rn_key), >- NULL, 0, 44); >- putchar('\n'); >- } >- if ((rn = rnode.rn_dupedkey)) >- goto again; >- } else { >- if (Aflag && do_rtent) { >- printf("%-8.8lx ", (u_long)rn); >- p_rtnode(); >- } >- rn = rnode.rn_r; >- c_tree(rnode.rn_l); >- c_tree(rn); >- } >- } >- >- >- static void >- c_rtentry(rt) >- register struct rtentry *rt; >- { >- if (!(rt->rt_parent && !aflag)) { >- ++total; >- } > } >--- 877,880 ----
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 12898
:
5374
|
5375
| 5376