diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-03-08 16:27:18 +0100 |
---|---|---|
committer | Jan Moskyto Matejka <mq@ucw.cz> | 2017-03-09 13:47:00 +0100 |
commit | 665be7f6bdbf1fd8dbac45cef533bd4b1df35d4d (patch) | |
tree | 9498d4c4d9cb2533b9ddb89636bede92e00695e2 /nest/route.h | |
parent | 7126cadf80fce1af2bb4aa33f8bcb7c6b5ff1a47 (diff) |
Nest: Minor fixes in show route
Diffstat (limited to 'nest/route.h')
-rw-r--r-- | nest/route.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nest/route.h b/nest/route.h index 98bef1fd..65711138 100644 --- a/nest/route.h +++ b/nest/route.h @@ -401,6 +401,7 @@ typedef struct rta { #define RTD_BLACKHOLE 2 /* Silently drop packets */ #define RTD_UNREACHABLE 3 /* Reject as unreachable */ #define RTD_PROHIBIT 4 /* Administratively prohibited */ +#define RTD_MAX 5 /* Flags for net->n.flags, used by kernel syncer */ #define KRF_INSTALLED 0x80 /* This route should be installed in the kernel */ @@ -412,6 +413,11 @@ typedef struct rta { protocol-specific metric is availabe */ +const char * rta_dest_names[RTD_MAX]; + +static inline const char *rta_dest_name(uint n) +{ return (n < RTD_MAX) ? rta_dest_names[n] : "???"; } + /* Route has regular, reachable nexthop (i.e. not RTD_UNREACHABLE and like) */ static inline int rte_is_reachable(rte *r) { return r->attrs->dest == RTD_UNICAST; } |