]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - lib/rt_names.c
libnetlink: Add filter function to rtnl_neighdump_req
[mirror_iproute2.git] / lib / rt_names.c
index 3a16d5cf9bb573eb3b207c2917c84500c916f5fd..66d5f2f0722b80a7764315a8122b2fcc7fd0f138 100644 (file)
@@ -12,7 +12,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <syslog.h>
 #include <fcntl.h>
 #include <string.h>
 #include <sys/time.h>
@@ -119,7 +118,7 @@ static void rtnl_tab_initialize(const char *file, char **tab, int size)
 }
 
 static char *rtnl_rtprot_tab[256] = {
-       [RTPROT_UNSPEC]   = "none",
+       [RTPROT_UNSPEC]   = "unspec",
        [RTPROT_REDIRECT] = "redirect",
        [RTPROT_KERNEL]   = "kernel",
        [RTPROT_BOOT]     = "boot",
@@ -135,6 +134,11 @@ static char *rtnl_rtprot_tab[256] = {
        [RTPROT_XORP]     = "xorp",
        [RTPROT_NTK]      = "ntk",
        [RTPROT_DHCP]     = "dhcp",
+       [RTPROT_BGP]      = "bgp",
+       [RTPROT_ISIS]     = "isis",
+       [RTPROT_OSPF]     = "ospf",
+       [RTPROT_RIP]      = "rip",
+       [RTPROT_EIGRP]    = "eigrp",
 };
 
 
@@ -410,10 +414,6 @@ const char *rtnl_rttable_n2a(__u32 id, char *buf, int len)
 {
        struct rtnl_hash_entry *entry;
 
-       if (id > RT_TABLE_MAX) {
-               snprintf(buf, len, "%u", id);
-               return buf;
-       }
        if (!rtnl_rttable_init)
                rtnl_rttable_initialize();
        entry = rtnl_rttable_hash[id & 255];