From b88fd9f48c06c620f192a3a4d99c0383b2caa293 Mon Sep 17 00:00:00 2001 From: "osdl.org!shemminger" Date: Tue, 8 Jun 2004 23:50:43 +0000 Subject: [PATCH] Build fixes for 2.4 and align functions with protos use initializers. (Logical change 1.16) --- lib/rt_names.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/lib/rt_names.c b/lib/rt_names.c index 70172692..5db7f2c1 100644 --- a/lib/rt_names.c +++ b/lib/rt_names.c @@ -16,6 +16,12 @@ #include #include #include +#include + +#include +#include + +#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", };