]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
Build fixes for 2.4 and align functions with protos
authorosdl.org!shemminger <osdl.org!shemminger>
Tue, 8 Jun 2004 23:50:43 +0000 (23:50 +0000)
committerosdl.org!shemminger <osdl.org!shemminger>
Tue, 8 Jun 2004 23:50:43 +0000 (23:50 +0000)
use initializers.

(Logical change 1.16)

lib/rt_names.c

index 701726924e6fae82b228e594e5a9ccf29d87dd98..5db7f2c11ed3844f09e13e9a57e2c335010058ec 100644 (file)
 #include <fcntl.h>
 #include <string.h>
 #include <sys/time.h>
+#include <sys/socket.h>
+
+#include <asm/types.h>
+#include <linux/rtnetlink.h>
+
+#include "rt_names.h"
 
 static void rtnl_tab_initialize(char *file, char **tab, int size)
 {
@@ -53,19 +59,19 @@ static void rtnl_tab_initialize(char *file, char **tab, int size)
 
 
 static char * rtnl_rtprot_tab[256] = {
-       "none",
-       "redirect",
-       "kernel",
-       "boot",
-       "static",
-       NULL,
-       NULL,
-       NULL,
-       "gated",
-       "ra",
-       "mrt",
-       "zebra",
-       "bird",
+       [RTPROT_UNSPEC] = "none",
+       [RTPROT_REDIRECT] ="redirect",
+       [RTPROT_KERNEL] = "kernel",
+       [RTPROT_BOOT] = "boot",
+       [RTPROT_STATIC] = "static",
+
+       [RTPROT_GATED] = "gated",
+       [RTPROT_RA] = "ra",
+       [RTPROT_MRT] =  "mrt",
+       [RTPROT_ZEBRA] ="zebra",
+       [RTPROT_BIRD] = "bird",
+       [RTPROT_DNROUTED] = "dnrouted",
+       [RTPROT_XORP] = "xorp",
 };