diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-09-01 09:41:35 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-09-01 09:41:35 +0000 |
commit | ae653649f5b90527d7d2bdb0349c0736bf21a976 (patch) | |
tree | db0ba79b626f795596eeaf1e305ddf0d07644836 /sbin | |
parent | c08fe93a6f42b3bb433a2d0eb6d67f9538c62037 (diff) |
Display all route flags in "route get", "route show" and "netstat -r"
output. Sort them according to the RTF_... defines in route.h.
OK claudio@ mpi@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/route/route.c | 8 | ||||
-rw-r--r-- | sbin/route/show.c | 12 |
2 files changed, 12 insertions, 8 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index 5294f763e18..7ae5c105dd8 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.186 2016/08/31 21:32:06 bluhm Exp $ */ +/* $OpenBSD: route.c,v 1.187 2016/09/01 09:41:34 bluhm Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -1237,8 +1237,10 @@ char *msgtypes[] = { char metricnames[] = "\011priority\010rttvar\7rtt\6ssthresh\5sendpipe\4recvpipe\3expire\2hopcount\1mtu"; char routeflags[] = -"\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE\010XMASK_PRESENT\011CLONING" -"\012XRESOLVE\013LLINFO\014STATIC\015BLACKHOLE\016PROTO3\017PROTO2\020PROTO1\021CLONED\023MPATH\025MPLS\026LOCAL\027BROADCAST"; +"\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE\010XMASK_PRESENT" +"\011CLONING\012MULTICAST\013LLINFO\014STATIC\015BLACKHOLE\016PROTO3\017PROTO2" +"\020PROTO1\021CLONED\022CACHED\023MPATH\025MPLS\026LOCAL\027BROADCAST" +"\028CONNECTED"; char ifnetflags[] = "\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5PTP\6NOTRAILERS\7RUNNING\010NOARP\011PPROMISC" "\012ALLMULTI\013OACTIVE\014SIMPLEX\015LINK0\016LINK1\017LINK2\020MULTICAST"; diff --git a/sbin/route/show.c b/sbin/route/show.c index 6c9d0b0e7e0..a04924f1f9a 100644 --- a/sbin/route/show.c +++ b/sbin/route/show.c @@ -1,4 +1,4 @@ -/* $OpenBSD: show.c,v 1.104 2016/07/13 08:40:46 mpi Exp $ */ +/* $OpenBSD: show.c,v 1.105 2016/09/01 09:41:34 bluhm Exp $ */ /* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */ /* @@ -74,7 +74,6 @@ static const struct bits bits[] = { { RTF_GATEWAY, 'G' }, { RTF_HOST, 'H' }, { RTF_REJECT, 'R' }, - { RTF_BLACKHOLE, 'B' }, { RTF_DYNAMIC, 'D' }, { RTF_MODIFIED, 'M' }, { RTF_DONE, 'd' }, /* Completed -- for routing messages only */ @@ -82,14 +81,17 @@ static const struct bits bits[] = { { RTF_MULTICAST,'m' }, { RTF_LLINFO, 'L' }, { RTF_STATIC, 'S' }, - { RTF_PROTO1, '1' }, - { RTF_PROTO2, '2' }, + { RTF_BLACKHOLE,'B' }, { RTF_PROTO3, '3' }, + { RTF_PROTO2, '2' }, + { RTF_PROTO1, '1' }, { RTF_CLONED, 'c' }, + { RTF_CACHED, 'h' }, { RTF_MPATH, 'P' }, { RTF_MPLS, 'T' }, { RTF_LOCAL, 'l' }, - { RTF_BROADCAST, 'b' }, + { RTF_BROADCAST,'b' }, + { RTF_CONNECTED,'n' }, { 0 } }; |