SCCS-vsn: usr.bin/netstat/route.c 5.22
SCCS-vsn: usr.bin/netstat/main.c 5.25
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 5.24 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 5.25 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
#define N_NIMP 20
{ "_nimp"},
#define N_RTREE 21
#define N_NIMP 20
{ "_nimp"},
#define N_RTREE 21
#define N_CLTP 22
{ "_cltb"},
#define N_CLTPSTAT 23
#define N_CLTP 22
{ "_cltb"},
#define N_CLTPSTAT 23
-static char sccsid[] = "@(#)route.c 5.21 (Berkeley) %G%";
+static char sccsid[] = "@(#)route.c 5.22 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
{ RTF_XRESOLVE, 'X' },
{ RTF_LLINFO, 'L' },
{ RTF_REJECT, 'R' },
{ RTF_XRESOLVE, 'X' },
{ RTF_LLINFO, 'L' },
{ RTF_REJECT, 'R' },
off_t rtree;
{
struct radix_node_head *rnh, head;
off_t rtree;
{
struct radix_node_head *rnh, head;
printf("Routing tables\n");
printf("Routing tables\n");
ntreestuff();
else {
if (rtree == 0) {
ntreestuff();
else {
if (rtree == 0) {
- printf("radix_node_head: symbol not in namelist\n");
+ printf("rt_tables: symbol not in namelist\n");
- for (kget(rtree, rnh); rnh; rnh = head.rnh_next) {
+ kget(rtree, rt_tables);
+ for (i = 0; i <= AF_MAX; i++) {
+ if ((rnh = rt_tables[i]) == 0)
+ continue;
- if (head.rnh_af == AF_UNSPEC) {
- if (Aflag) {
+ if (i == AF_UNSPEC) {
+ if (Aflag && af == 0) {
printf("Netmasks:\n");
p_tree(head.rnh_treetop);
}
printf("Netmasks:\n");
p_tree(head.rnh_treetop);
}
- } else if (af == AF_UNSPEC || af == head.rnh_af) {
- pr_family(head.rnh_af);
+ } else if (af == AF_UNSPEC || af == i) {
+ pr_family(i);
do_rtent = 1;
pr_rthdr();
p_tree(head.rnh_treetop);
do_rtent = 1;
pr_rthdr();
p_tree(head.rnh_treetop);
case AF_ISO:
afname = "ISO";
break;
case AF_ISO:
afname = "ISO";
break;
+ case AF_CCITT:
+ afname = "X.25";
+ break;
default:
afname = NULL;
break;
default:
afname = NULL;
break;