--- embedaddon/quagga/lib/route_types.h 2012/02/21 17:26:12 1.1.1.1 +++ embedaddon/quagga/lib/route_types.h 2012/10/09 09:22:28 1.1.1.2 @@ -1,67 +1,107 @@ -/* Auto-generated from route_types.txt by gawk. */ +/* Auto-generated from route_types.txt by . */ /* Do not edit! */ #ifndef _QUAGGA_ROUTE_TYPES_H #define _QUAGGA_ROUTE_TYPES_H -/* zebra */ -#define QUAGGA_REDIST_STR_ZEBRA \ -"(rip|ripng|ospf|ospf6|isis|bgp)" -#define QUAGGA_REDIST_HELP_STR_ZEBRA \ +/* Zebra route's types. */ +#define ZEBRA_ROUTE_SYSTEM 0 +#define ZEBRA_ROUTE_KERNEL 1 +#define ZEBRA_ROUTE_CONNECT 2 +#define ZEBRA_ROUTE_STATIC 3 +#define ZEBRA_ROUTE_RIP 4 +#define ZEBRA_ROUTE_RIPNG 5 +#define ZEBRA_ROUTE_OSPF 6 +#define ZEBRA_ROUTE_OSPF6 7 +#define ZEBRA_ROUTE_ISIS 8 +#define ZEBRA_ROUTE_BGP 9 +#define ZEBRA_ROUTE_HSLS 10 +#define ZEBRA_ROUTE_OLSR 11 +#define ZEBRA_ROUTE_BABEL 12 +#define ZEBRA_ROUTE_MAX 13 + +#define SHOW_ROUTE_V4_HEADER \ + "Codes: K - kernel route, C - connected, S - static, R - RIP,%s" \ + " O - OSPF, I - IS-IS, B - BGP, A - Babel,%s" \ + " > - selected route, * - FIB route%s%s", \ + VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE +#define SHOW_ROUTE_V6_HEADER \ + "Codes: K - kernel route, C - connected, S - static, R - RIPng,%s" \ + " O - OSPFv6, I - IS-IS, B - BGP, A - Babel,%s" \ + " > - selected route, * - FIB route%s%s", \ + VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE + +/* babeld */ +#define QUAGGA_REDIST_STR_BABELD \ + "(kernel|connected|static|rip|ripng|ospf|ospf6|isis|bgp)" +#define QUAGGA_REDIST_HELP_STR_BABELD \ + "Kernel routes (not installed via the zebra RIB)\n" \ + "Connected routes (directly attached subnet or host)\n" \ + "Statically configured routes\n" \ "Routing Information Protocol (RIP)\n" \ "Routing Information Protocol next-generation (IPv6) (RIPng)\n" \ "Open Shortest Path First (OSPFv2)\n" \ "Open Shortest Path First (IPv6) (OSPFv3)\n" \ "Intermediate System to Intermediate System (IS-IS)\n" \ "Border Gateway Protocol (BGP)\n" - -/* ripd */ -#define QUAGGA_REDIST_STR_RIPD \ -"(kernel|connected|static|ospf|isis|bgp)" -#define QUAGGA_REDIST_HELP_STR_RIPD \ +#define QUAGGA_IP_REDIST_STR_BABELD \ + "(kernel|connected|static|rip|ospf|isis|bgp)" +#define QUAGGA_IP_REDIST_HELP_STR_BABELD \ "Kernel routes (not installed via the zebra RIB)\n" \ "Connected routes (directly attached subnet or host)\n" \ "Statically configured routes\n" \ + "Routing Information Protocol (RIP)\n" \ "Open Shortest Path First (OSPFv2)\n" \ "Intermediate System to Intermediate System (IS-IS)\n" \ "Border Gateway Protocol (BGP)\n" - -/* ripngd */ -#define QUAGGA_REDIST_STR_RIPNGD \ -"(kernel|connected|static|ospf6|isis|bgp)" -#define QUAGGA_REDIST_HELP_STR_RIPNGD \ +#define QUAGGA_IP6_REDIST_STR_BABELD \ + "(kernel|connected|static|ripng|ospf6|isis|bgp)" +#define QUAGGA_IP6_REDIST_HELP_STR_BABELD \ "Kernel routes (not installed via the zebra RIB)\n" \ "Connected routes (directly attached subnet or host)\n" \ "Statically configured routes\n" \ + "Routing Information Protocol next-generation (IPv6) (RIPng)\n" \ "Open Shortest Path First (IPv6) (OSPFv3)\n" \ "Intermediate System to Intermediate System (IS-IS)\n" \ "Border Gateway Protocol (BGP)\n" -/* ospfd */ -#define QUAGGA_REDIST_STR_OSPFD \ -"(kernel|connected|static|rip|isis|bgp)" -#define QUAGGA_REDIST_HELP_STR_OSPFD \ +/* bgpd */ +#define QUAGGA_REDIST_STR_BGPD \ + "(kernel|connected|static|rip|ripng|ospf|ospf6|isis|babel)" +#define QUAGGA_REDIST_HELP_STR_BGPD \ "Kernel routes (not installed via the zebra RIB)\n" \ "Connected routes (directly attached subnet or host)\n" \ "Statically configured routes\n" \ "Routing Information Protocol (RIP)\n" \ + "Routing Information Protocol next-generation (IPv6) (RIPng)\n" \ + "Open Shortest Path First (OSPFv2)\n" \ + "Open Shortest Path First (IPv6) (OSPFv3)\n" \ "Intermediate System to Intermediate System (IS-IS)\n" \ - "Border Gateway Protocol (BGP)\n" - -/* ospf6d */ -#define QUAGGA_REDIST_STR_OSPF6D \ -"(kernel|connected|static|ripng|isis|bgp)" -#define QUAGGA_REDIST_HELP_STR_OSPF6D \ + "Babel routing protocol (Babel)\n" +#define QUAGGA_IP_REDIST_STR_BGPD \ + "(kernel|connected|static|rip|ospf|isis|babel)" +#define QUAGGA_IP_REDIST_HELP_STR_BGPD \ "Kernel routes (not installed via the zebra RIB)\n" \ "Connected routes (directly attached subnet or host)\n" \ "Statically configured routes\n" \ + "Routing Information Protocol (RIP)\n" \ + "Open Shortest Path First (OSPFv2)\n" \ + "Intermediate System to Intermediate System (IS-IS)\n" \ + "Babel routing protocol (Babel)\n" +#define QUAGGA_IP6_REDIST_STR_BGPD \ + "(kernel|connected|static|ripng|ospf6|isis|babel)" +#define QUAGGA_IP6_REDIST_HELP_STR_BGPD \ + "Kernel routes (not installed via the zebra RIB)\n" \ + "Connected routes (directly attached subnet or host)\n" \ + "Statically configured routes\n" \ "Routing Information Protocol next-generation (IPv6) (RIPng)\n" \ + "Open Shortest Path First (IPv6) (OSPFv3)\n" \ "Intermediate System to Intermediate System (IS-IS)\n" \ - "Border Gateway Protocol (BGP)\n" + "Babel routing protocol (Babel)\n" /* isisd */ #define QUAGGA_REDIST_STR_ISISD \ -"(kernel|connected|static|rip|ripng|ospf|ospf6|bgp)" + "(kernel|connected|static|rip|ripng|ospf|ospf6|bgp|babel)" #define QUAGGA_REDIST_HELP_STR_ISISD \ "Kernel routes (not installed via the zebra RIB)\n" \ "Connected routes (directly attached subnet or host)\n" \ @@ -70,19 +110,142 @@ "Routing Information Protocol next-generation (IPv6) (RIPng)\n" \ "Open Shortest Path First (OSPFv2)\n" \ "Open Shortest Path First (IPv6) (OSPFv3)\n" \ - "Border Gateway Protocol (BGP)\n" + "Border Gateway Protocol (BGP)\n" \ + "Babel routing protocol (Babel)\n" +#define QUAGGA_IP_REDIST_STR_ISISD \ + "(kernel|connected|static|rip|ospf|bgp|babel)" +#define QUAGGA_IP_REDIST_HELP_STR_ISISD \ + "Kernel routes (not installed via the zebra RIB)\n" \ + "Connected routes (directly attached subnet or host)\n" \ + "Statically configured routes\n" \ + "Routing Information Protocol (RIP)\n" \ + "Open Shortest Path First (OSPFv2)\n" \ + "Border Gateway Protocol (BGP)\n" \ + "Babel routing protocol (Babel)\n" +#define QUAGGA_IP6_REDIST_STR_ISISD \ + "(kernel|connected|static|ripng|ospf6|bgp|babel)" +#define QUAGGA_IP6_REDIST_HELP_STR_ISISD \ + "Kernel routes (not installed via the zebra RIB)\n" \ + "Connected routes (directly attached subnet or host)\n" \ + "Statically configured routes\n" \ + "Routing Information Protocol next-generation (IPv6) (RIPng)\n" \ + "Open Shortest Path First (IPv6) (OSPFv3)\n" \ + "Border Gateway Protocol (BGP)\n" \ + "Babel routing protocol (Babel)\n" -/* bgpd */ -#define QUAGGA_REDIST_STR_BGPD \ -"(kernel|connected|static|rip|ripng|ospf|ospf6|isis)" -#define QUAGGA_REDIST_HELP_STR_BGPD \ +/* ospf6d */ +#define QUAGGA_REDIST_STR_OSPF6D \ + "(kernel|connected|static|ripng|isis|bgp|babel)" +#define QUAGGA_REDIST_HELP_STR_OSPF6D \ "Kernel routes (not installed via the zebra RIB)\n" \ "Connected routes (directly attached subnet or host)\n" \ "Statically configured routes\n" \ + "Routing Information Protocol next-generation (IPv6) (RIPng)\n" \ + "Intermediate System to Intermediate System (IS-IS)\n" \ + "Border Gateway Protocol (BGP)\n" \ + "Babel routing protocol (Babel)\n" + +/* ospfd */ +#define QUAGGA_REDIST_STR_OSPFD \ + "(kernel|connected|static|rip|isis|bgp|babel)" +#define QUAGGA_REDIST_HELP_STR_OSPFD \ + "Kernel routes (not installed via the zebra RIB)\n" \ + "Connected routes (directly attached subnet or host)\n" \ + "Statically configured routes\n" \ "Routing Information Protocol (RIP)\n" \ + "Intermediate System to Intermediate System (IS-IS)\n" \ + "Border Gateway Protocol (BGP)\n" \ + "Babel routing protocol (Babel)\n" + +/* ripd */ +#define QUAGGA_REDIST_STR_RIPD \ + "(kernel|connected|static|ospf|isis|bgp|babel)" +#define QUAGGA_REDIST_HELP_STR_RIPD \ + "Kernel routes (not installed via the zebra RIB)\n" \ + "Connected routes (directly attached subnet or host)\n" \ + "Statically configured routes\n" \ + "Open Shortest Path First (OSPFv2)\n" \ + "Intermediate System to Intermediate System (IS-IS)\n" \ + "Border Gateway Protocol (BGP)\n" \ + "Babel routing protocol (Babel)\n" + +/* ripngd */ +#define QUAGGA_REDIST_STR_RIPNGD \ + "(kernel|connected|static|ospf6|isis|bgp|babel)" +#define QUAGGA_REDIST_HELP_STR_RIPNGD \ + "Kernel routes (not installed via the zebra RIB)\n" \ + "Connected routes (directly attached subnet or host)\n" \ + "Statically configured routes\n" \ + "Open Shortest Path First (IPv6) (OSPFv3)\n" \ + "Intermediate System to Intermediate System (IS-IS)\n" \ + "Border Gateway Protocol (BGP)\n" \ + "Babel routing protocol (Babel)\n" + +/* zebra */ +#define QUAGGA_REDIST_STR_ZEBRA \ + "(kernel|connected|static|rip|ripng|ospf|ospf6|isis|bgp|babel)" +#define QUAGGA_REDIST_HELP_STR_ZEBRA \ + "Kernel routes (not installed via the zebra RIB)\n" \ + "Connected routes (directly attached subnet or host)\n" \ + "Statically configured routes\n" \ + "Routing Information Protocol (RIP)\n" \ "Routing Information Protocol next-generation (IPv6) (RIPng)\n" \ "Open Shortest Path First (OSPFv2)\n" \ "Open Shortest Path First (IPv6) (OSPFv3)\n" \ - "Intermediate System to Intermediate System (IS-IS)\n" + "Intermediate System to Intermediate System (IS-IS)\n" \ + "Border Gateway Protocol (BGP)\n" \ + "Babel routing protocol (Babel)\n" +#define QUAGGA_IP_REDIST_STR_ZEBRA \ + "(kernel|connected|static|rip|ospf|isis|bgp|babel)" +#define QUAGGA_IP_REDIST_HELP_STR_ZEBRA \ + "Kernel routes (not installed via the zebra RIB)\n" \ + "Connected routes (directly attached subnet or host)\n" \ + "Statically configured routes\n" \ + "Routing Information Protocol (RIP)\n" \ + "Open Shortest Path First (OSPFv2)\n" \ + "Intermediate System to Intermediate System (IS-IS)\n" \ + "Border Gateway Protocol (BGP)\n" \ + "Babel routing protocol (Babel)\n" +#define QUAGGA_IP6_REDIST_STR_ZEBRA \ + "(kernel|connected|static|ripng|ospf6|isis|bgp|babel)" +#define QUAGGA_IP6_REDIST_HELP_STR_ZEBRA \ + "Kernel routes (not installed via the zebra RIB)\n" \ + "Connected routes (directly attached subnet or host)\n" \ + "Statically configured routes\n" \ + "Routing Information Protocol next-generation (IPv6) (RIPng)\n" \ + "Open Shortest Path First (IPv6) (OSPFv3)\n" \ + "Intermediate System to Intermediate System (IS-IS)\n" \ + "Border Gateway Protocol (BGP)\n" \ + "Babel routing protocol (Babel)\n" + + +#ifdef QUAGGA_DEFINE_DESC_TABLE + +struct zebra_desc_table +{ + unsigned int type; + const char *string; + char chr; +}; + +#define DESC_ENTRY(T,S,C) [(T)] = { (T), (S), (C) } +static const struct zebra_desc_table route_types[] = { + DESC_ENTRY (ZEBRA_ROUTE_SYSTEM, "system", 'X' ), + DESC_ENTRY (ZEBRA_ROUTE_KERNEL, "kernel", 'K' ), + DESC_ENTRY (ZEBRA_ROUTE_CONNECT, "connected", 'C' ), + DESC_ENTRY (ZEBRA_ROUTE_STATIC, "static", 'S' ), + DESC_ENTRY (ZEBRA_ROUTE_RIP, "rip", 'R' ), + DESC_ENTRY (ZEBRA_ROUTE_RIPNG, "ripng", 'R' ), + DESC_ENTRY (ZEBRA_ROUTE_OSPF, "ospf", 'O' ), + DESC_ENTRY (ZEBRA_ROUTE_OSPF6, "ospf6", 'O' ), + DESC_ENTRY (ZEBRA_ROUTE_ISIS, "isis", 'I' ), + DESC_ENTRY (ZEBRA_ROUTE_BGP, "bgp", 'B' ), + DESC_ENTRY (ZEBRA_ROUTE_HSLS, "hsls", 'H' ), + DESC_ENTRY (ZEBRA_ROUTE_OLSR, "olsr", 'o' ), + DESC_ENTRY (ZEBRA_ROUTE_BABEL, "babel", 'A' ), +}; +#undef DESC_ENTRY + +#endif /* QUAGGA_DEFINE_DESC_TABLE */ #endif /* _QUAGGA_ROUTE_TYPES_H */