zebra.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. /* Zebra common header.
  2. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Kunihiro Ishiguro
  3. This file is part of GNU Zebra.
  4. GNU Zebra is free software; you can redistribute it and/or modify it
  5. under the terms of the GNU General Public License as published by the
  6. Free Software Foundation; either version 2, or (at your option) any
  7. later version.
  8. GNU Zebra is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNU Zebra; see the file COPYING. If not, write to the Free
  14. Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  15. 02111-1307, USA. */
  16. #ifndef _ZEBRA_H
  17. #define _ZEBRA_H
  18. #ifdef HAVE_CONFIG_H
  19. #include "config.h"
  20. #endif /* HAVE_CONFIG_H */
  21. #ifdef SUNOS_5
  22. #define _XPG4_2
  23. typedef unsigned int u_int32_t;
  24. typedef unsigned short u_int16_t;
  25. typedef unsigned char u_int8_t;
  26. #endif /* SUNOS_5 */
  27. #ifndef HAVE_SOCKLEN_T
  28. typedef int socklen_t;
  29. #endif /* HAVE_SOCKLEN_T */
  30. #include <unistd.h>
  31. #include <stdio.h>
  32. #include <stdlib.h>
  33. #include <stddef.h>
  34. #include <ctype.h>
  35. #include <errno.h>
  36. #include <fcntl.h>
  37. #include <signal.h>
  38. #include <string.h>
  39. #include <pwd.h>
  40. #include <grp.h>
  41. #ifdef HAVE_STROPTS_H
  42. #include <stropts.h>
  43. #endif /* HAVE_STROPTS_H */
  44. #ifdef HAVE_SYS_SELECT_H
  45. #include <sys/select.h>
  46. #endif /* HAVE_SYS_SELECT_H */
  47. #include <sys/stat.h>
  48. #include <sys/types.h>
  49. #include <sys/param.h>
  50. #ifdef HAVE_SYS_SYSCTL_H
  51. #ifdef GNU_LINUX
  52. #include <linux/types.h>
  53. #endif
  54. #include <sys/sysctl.h>
  55. #endif /* HAVE_SYS_SYSCTL_H */
  56. #include <sys/ioctl.h>
  57. #ifdef HAVE_SYS_CONF_H
  58. #include <sys/conf.h>
  59. #endif /* HAVE_SYS_CONF_H */
  60. #ifdef HAVE_SYS_KSYM_H
  61. #include <sys/ksym.h>
  62. #endif /* HAVE_SYS_KSYM_H */
  63. #include <syslog.h>
  64. #ifdef TIME_WITH_SYS_TIME
  65. # include <sys/time.h>
  66. # include <time.h>
  67. #else
  68. # ifdef HAVE_SYS_TIME_H
  69. # include <sys/time.h>
  70. # else
  71. # include <time.h>
  72. # endif
  73. #endif /* TIME_WITH_SYS_TIME */
  74. #include <sys/uio.h>
  75. #include <sys/utsname.h>
  76. #ifdef HAVE_RUSAGE
  77. #include <sys/resource.h>
  78. #endif /* HAVE_RUSAGE */
  79. #ifdef HAVE_LIMITS_H
  80. #include <limits.h>
  81. #endif /* HAVE_LIMITS_H */
  82. #ifdef HAVE_INTTYPES_H
  83. #include <inttypes.h>
  84. #endif /* HAVE_INTTYPES_H */
  85. #ifdef HAVE_STDBOOL_H
  86. #include <stdbool.h>
  87. #endif
  88. /* primarily for __STDC_IEC_559__ with clang */
  89. #ifdef HAVE_FEATURES_H
  90. #include <features.h>
  91. #endif
  92. /* machine dependent includes */
  93. #ifdef SUNOS_5
  94. #include <strings.h>
  95. #endif /* SUNOS_5 */
  96. /* machine dependent includes */
  97. #ifdef HAVE_LINUX_VERSION_H
  98. #include <linux/version.h>
  99. #endif /* HAVE_LINUX_VERSION_H */
  100. #ifdef HAVE_ASM_TYPES_H
  101. #include <asm/types.h>
  102. #endif /* HAVE_ASM_TYPES_H */
  103. /* misc include group */
  104. #include <stdarg.h>
  105. #if !(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
  106. /* Not C99; do we need to define va_copy? */
  107. #ifndef va_copy
  108. #ifdef __va_copy
  109. #define va_copy(DST,SRC) __va_copy(DST,SRC)
  110. #else
  111. /* Now we are desperate; this should work on many typical platforms.
  112. But this is slightly dangerous, because the standard does not require
  113. va_copy to be a macro. */
  114. #define va_copy(DST,SRC) memcpy(&(DST), &(SRC), sizeof(va_list))
  115. #warning "Not C99 and no va_copy macro available, falling back to memcpy"
  116. #endif /* __va_copy */
  117. #endif /* !va_copy */
  118. #endif /* !C99 */
  119. #ifdef HAVE_LCAPS
  120. #include <sys/capability.h>
  121. #include <sys/prctl.h>
  122. #endif /* HAVE_LCAPS */
  123. #ifdef HAVE_SOLARIS_CAPABILITIES
  124. #include <priv.h>
  125. #endif /* HAVE_SOLARIS_CAPABILITIES */
  126. /* network include group */
  127. #include <sys/socket.h>
  128. #ifdef HAVE_SYS_SOCKIO_H
  129. #include <sys/sockio.h>
  130. #endif /* HAVE_SYS_SOCKIO_H */
  131. #ifdef __APPLE__
  132. #define __APPLE_USE_RFC_3542
  133. #endif
  134. #ifdef HAVE_NETINET_IN_H
  135. #include <netinet/in.h>
  136. #endif /* HAVE_NETINET_IN_H */
  137. #include <netinet/in_systm.h>
  138. #include <netinet/ip.h>
  139. #include <netinet/tcp.h>
  140. #ifdef HAVE_NET_NETOPT_H
  141. #include <net/netopt.h>
  142. #endif /* HAVE_NET_NETOPT_H */
  143. #include <net/if.h>
  144. #ifdef HAVE_NET_IF_DL_H
  145. #include <net/if_dl.h>
  146. #endif /* HAVE_NET_IF_DL_H */
  147. #ifdef HAVE_NET_IF_VAR_H
  148. #include <net/if_var.h>
  149. #endif /* HAVE_NET_IF_VAR_H */
  150. #ifdef HAVE_NET_ROUTE_H
  151. #include <net/route.h>
  152. #endif /* HAVE_NET_ROUTE_H */
  153. #ifdef HAVE_NETLINK
  154. #include <linux/netlink.h>
  155. #include <linux/rtnetlink.h>
  156. #include <linux/filter.h>
  157. #else
  158. #define RT_TABLE_MAIN 0
  159. #endif /* HAVE_NETLINK */
  160. #ifdef HAVE_NETDB_H
  161. #include <netdb.h>
  162. #endif /* HAVE_NETDB_H */
  163. #include <arpa/inet.h>
  164. #ifdef HAVE_INET_ND_H
  165. #include <inet/nd.h>
  166. #endif /* HAVE_INET_ND_H */
  167. #ifdef HAVE_NETINET_IN_VAR_H
  168. #include <netinet/in_var.h>
  169. #endif /* HAVE_NETINET_IN_VAR_H */
  170. #ifdef HAVE_NETINET6_IN6_VAR_H
  171. #include <netinet6/in6_var.h>
  172. #endif /* HAVE_NETINET6_IN6_VAR_H */
  173. #ifdef HAVE_NETINET_IN6_VAR_H
  174. #include <netinet/in6_var.h>
  175. #endif /* HAVE_NETINET_IN6_VAR_H */
  176. #ifdef HAVE_NETINET6_IN_H
  177. #include <netinet6/in.h>
  178. #endif /* HAVE_NETINET6_IN_H */
  179. #ifdef HAVE_NETINET6_IP6_H
  180. #include <netinet6/ip6.h>
  181. #endif /* HAVE_NETINET6_IP6_H */
  182. #ifdef HAVE_NETINET_ICMP6_H
  183. #include <netinet/icmp6.h>
  184. #endif /* HAVE_NETINET_ICMP6_H */
  185. #ifdef HAVE_NETINET6_ND6_H
  186. #include <netinet6/nd6.h>
  187. #endif /* HAVE_NETINET6_ND6_H */
  188. /* Some systems do not define UINT32_MAX, etc.. from inttypes.h
  189. * e.g. this makes life easier for FBSD 4.11 users.
  190. */
  191. #ifndef INT8_MAX
  192. #define INT8_MAX (127)
  193. #endif
  194. #ifndef INT16_MAX
  195. #define INT16_MAX (32767)
  196. #endif
  197. #ifndef INT32_MAX
  198. #define INT32_MAX (2147483647)
  199. #endif
  200. #ifndef UINT8_MAX
  201. #define UINT8_MAX (255U)
  202. #endif
  203. #ifndef UINT16_MAX
  204. #define UINT16_MAX (65535U)
  205. #endif
  206. #ifndef UINT32_MAX
  207. #define UINT32_MAX (4294967295U)
  208. #endif
  209. #ifdef HAVE_GLIBC_BACKTRACE
  210. #include <execinfo.h>
  211. #endif /* HAVE_GLIBC_BACKTRACE */
  212. /* Local includes: */
  213. #if !(defined(__GNUC__) || defined(VTYSH_EXTRACT_PL))
  214. #define __attribute__(x)
  215. #endif /* !__GNUC__ || VTYSH_EXTRACT_PL */
  216. #include "zassert.h"
  217. #include "str.h"
  218. #ifdef HAVE_BROKEN_CMSG_FIRSTHDR
  219. /* This bug is present in Solaris 8 and pre-patch Solaris 9 <sys/socket.h>;
  220. please refer to http://bugzilla.quagga.net/show_bug.cgi?id=142 */
  221. /* Check that msg_controllen is large enough. */
  222. #define ZCMSG_FIRSTHDR(mhdr) \
  223. (((size_t)((mhdr)->msg_controllen) >= sizeof(struct cmsghdr)) ? \
  224. CMSG_FIRSTHDR(mhdr) : (struct cmsghdr *)NULL)
  225. #warning "CMSG_FIRSTHDR is broken on this platform, using a workaround"
  226. #else /* HAVE_BROKEN_CMSG_FIRSTHDR */
  227. #define ZCMSG_FIRSTHDR(M) CMSG_FIRSTHDR(M)
  228. #endif /* HAVE_BROKEN_CMSG_FIRSTHDR */
  229. /*
  230. * RFC 3542 defines several macros for using struct cmsghdr.
  231. * Here, we define those that are not present
  232. */
  233. /*
  234. * Internal defines, for use only in this file.
  235. * These are likely wrong on other than ILP32 machines, so warn.
  236. */
  237. #ifndef _CMSG_DATA_ALIGN
  238. #define _CMSG_DATA_ALIGN(n) (((n) + 3) & ~3)
  239. #endif /* _CMSG_DATA_ALIGN */
  240. #ifndef _CMSG_HDR_ALIGN
  241. #define _CMSG_HDR_ALIGN(n) (((n) + 3) & ~3)
  242. #endif /* _CMSG_HDR_ALIGN */
  243. /*
  244. * CMSG_SPACE and CMSG_LEN are required in RFC3542, but were new in that
  245. * version.
  246. */
  247. #ifndef CMSG_SPACE
  248. #define CMSG_SPACE(l) (_CMSG_DATA_ALIGN(sizeof(struct cmsghdr)) + \
  249. _CMSG_HDR_ALIGN(l))
  250. #warning "assuming 4-byte alignment for CMSG_SPACE"
  251. #endif /* CMSG_SPACE */
  252. #ifndef CMSG_LEN
  253. #define CMSG_LEN(l) (_CMSG_DATA_ALIGN(sizeof(struct cmsghdr)) + (l))
  254. #warning "assuming 4-byte alignment for CMSG_LEN"
  255. #endif /* CMSG_LEN */
  256. /* The definition of struct in_pktinfo is missing in old version of
  257. GLIBC 2.1 (Redhat 6.1). */
  258. #if defined (GNU_LINUX) && ! defined (HAVE_STRUCT_IN_PKTINFO)
  259. struct in_pktinfo
  260. {
  261. int ipi_ifindex;
  262. struct in_addr ipi_spec_dst;
  263. struct in_addr ipi_addr;
  264. };
  265. #endif
  266. /*
  267. * OSPF Fragmentation / fragmented writes
  268. *
  269. * ospfd can support writing fragmented packets, for cases where
  270. * kernel will not fragment IP_HDRINCL and/or multicast destined
  271. * packets (ie TTBOMK all kernels, BSD, SunOS, Linux). However,
  272. * SunOS, probably BSD too, clobber the user supplied IP ID and IP
  273. * flags fields, hence user-space fragmentation will not work.
  274. * Only Linux is known to leave IP header unmolested.
  275. * Further, fragmentation really should be done the kernel, which already
  276. * supports it, and which avoids nasty IP ID state problems.
  277. *
  278. * Fragmentation of OSPF packets can be required on networks with router
  279. * with many many interfaces active in one area, or on networks with links
  280. * with low MTUs.
  281. */
  282. #ifdef GNU_LINUX
  283. #define WANT_OSPF_WRITE_FRAGMENT
  284. #endif
  285. /*
  286. * IP_HDRINCL / struct ip byte order
  287. *
  288. * Linux: network byte order
  289. * *BSD: network, except for length and offset. (cf Stevens)
  290. * SunOS: nominally as per BSD. but bug: network order on LE.
  291. * OpenBSD: network byte order, apart from older versions which are as per
  292. * *BSD
  293. */
  294. #if defined(__NetBSD__) \
  295. || (defined(__FreeBSD__) && (__FreeBSD_version < 1100030)) \
  296. || (defined(__OpenBSD__) && (OpenBSD < 200311)) \
  297. || (defined(__APPLE__)) \
  298. || (defined(SUNOS_5) && defined(WORDS_BIGENDIAN))
  299. #define HAVE_IP_HDRINCL_BSD_ORDER
  300. #endif
  301. /* Define BYTE_ORDER, if not defined. Useful for compiler conditional
  302. * code, rather than preprocessor conditional.
  303. * Not all the world has this BSD define.
  304. */
  305. #ifndef BYTE_ORDER
  306. #define BIG_ENDIAN 4321 /* least-significant byte first (vax, pc) */
  307. #define LITTLE_ENDIAN 1234 /* most-significant byte first (IBM, net) */
  308. #define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp) */
  309. #if defined(WORDS_BIGENDIAN)
  310. #define BYTE_ORDER BIG_ENDIAN
  311. #else /* !WORDS_BIGENDIAN */
  312. #define BYTE_ORDER LITTLE_ENDIAN
  313. #endif /* WORDS_BIGENDIAN */
  314. #endif /* ndef BYTE_ORDER */
  315. /* MAX / MIN are not commonly defined, but useful */
  316. #ifndef MAX
  317. #define MAX(a, b) \
  318. ({ typeof (a) _a = (a); \
  319. typeof (b) _b = (b); \
  320. _a > _b ? _a : _b; })
  321. #endif
  322. #ifndef MIN
  323. #define MIN(a, b) \
  324. ({ typeof (a) _a = (a); \
  325. typeof (b) _b = (b); \
  326. _a < _b ? _a : _b; })
  327. #endif
  328. #define ZEBRA_NUM_OF(x) (sizeof (x) / sizeof (x[0]))
  329. /* For old definition. */
  330. #ifndef IN6_ARE_ADDR_EQUAL
  331. #define IN6_ARE_ADDR_EQUAL IN6_IS_ADDR_EQUAL
  332. #endif /* IN6_ARE_ADDR_EQUAL */
  333. /* default zebra TCP port for zclient */
  334. #define ZEBRA_PORT 2600
  335. /* Zebra message types. */
  336. #define ZEBRA_INTERFACE_ADD 1
  337. #define ZEBRA_INTERFACE_DELETE 2
  338. #define ZEBRA_INTERFACE_ADDRESS_ADD 3
  339. #define ZEBRA_INTERFACE_ADDRESS_DELETE 4
  340. #define ZEBRA_INTERFACE_UP 5
  341. #define ZEBRA_INTERFACE_DOWN 6
  342. #define ZEBRA_IPV4_ROUTE_ADD 7
  343. #define ZEBRA_IPV4_ROUTE_DELETE 8
  344. #define ZEBRA_IPV6_ROUTE_ADD 9
  345. #define ZEBRA_IPV6_ROUTE_DELETE 10
  346. #define ZEBRA_REDISTRIBUTE_ADD 11
  347. #define ZEBRA_REDISTRIBUTE_DELETE 12
  348. #define ZEBRA_REDISTRIBUTE_DEFAULT_ADD 13
  349. #define ZEBRA_REDISTRIBUTE_DEFAULT_DELETE 14
  350. #define ZEBRA_IPV4_NEXTHOP_LOOKUP 15
  351. #define ZEBRA_IPV6_NEXTHOP_LOOKUP 16
  352. #define ZEBRA_IPV4_IMPORT_LOOKUP 17
  353. #define ZEBRA_IPV6_IMPORT_LOOKUP 18
  354. #define ZEBRA_INTERFACE_RENAME 19
  355. #define ZEBRA_ROUTER_ID_ADD 20
  356. #define ZEBRA_ROUTER_ID_DELETE 21
  357. #define ZEBRA_ROUTER_ID_UPDATE 22
  358. #define ZEBRA_HELLO 23
  359. #define ZEBRA_IPV4_NEXTHOP_LOOKUP_MRIB 24
  360. #define ZEBRA_VRF_UNREGISTER 25
  361. #define ZEBRA_INTERFACE_LINK_PARAMS 26
  362. #define ZEBRA_NEXTHOP_REGISTER 27
  363. #define ZEBRA_NEXTHOP_UNREGISTER 28
  364. #define ZEBRA_NEXTHOP_UPDATE 29
  365. #define ZEBRA_MESSAGE_MAX 30
  366. /* Marker value used in new Zserv, in the byte location corresponding
  367. * the command value in the old zserv header. To allow old and new
  368. * Zserv headers to be distinguished from each other.
  369. */
  370. #define ZEBRA_HEADER_MARKER 255
  371. /* Zebra route's types are defined in route_types.h */
  372. #include "route_types.h"
  373. /* Note: whenever a new route-type or zserv-command is added the
  374. * corresponding {command,route}_types[] table in lib/log.c MUST be
  375. * updated! */
  376. /* Map a route type to a string. For example, ZEBRA_ROUTE_RIPNG -> "ripng". */
  377. extern const char *zebra_route_string(unsigned int route_type);
  378. /* Map a route type to a char. For example, ZEBRA_ROUTE_RIPNG -> 'R'. */
  379. extern char zebra_route_char(unsigned int route_type);
  380. /* Map a zserv command type to the same string,
  381. * e.g. ZEBRA_INTERFACE_ADD -> "ZEBRA_INTERFACE_ADD" */
  382. /* Map a protocol name to its number. e.g. ZEBRA_ROUTE_BGP->9*/
  383. extern int proto_name2num(const char *s);
  384. /* Map redistribute X argument to protocol number.
  385. * unlike proto_name2num, this accepts shorthands and takes
  386. * an AFI value to restrict input */
  387. extern int proto_redistnum(int afi, const char *s);
  388. extern const char *zserv_command_string (unsigned int command);
  389. /* Error codes of zebra. */
  390. #define ZEBRA_ERR_NOERROR 0
  391. #define ZEBRA_ERR_RTEXIST -1
  392. #define ZEBRA_ERR_RTUNREACH -2
  393. #define ZEBRA_ERR_EPERM -3
  394. #define ZEBRA_ERR_RTNOEXIST -4
  395. #define ZEBRA_ERR_KERNEL -5
  396. /* Zebra message flags */
  397. #define ZEBRA_FLAG_INTERNAL 0x01
  398. #define ZEBRA_FLAG_SELFROUTE 0x02
  399. #define ZEBRA_FLAG_BLACKHOLE 0x04
  400. #define ZEBRA_FLAG_IBGP 0x08
  401. #define ZEBRA_FLAG_SELECTED 0x10
  402. #define ZEBRA_FLAG_FIB_OVERRIDE 0x20
  403. #define ZEBRA_FLAG_STATIC 0x40
  404. #define ZEBRA_FLAG_REJECT 0x80
  405. /* Zebra nexthop flags. */
  406. #define ZEBRA_NEXTHOP_IFINDEX 1
  407. #define ZEBRA_NEXTHOP_IFNAME 2
  408. #define ZEBRA_NEXTHOP_IPV4 3
  409. #define ZEBRA_NEXTHOP_IPV4_IFINDEX 4
  410. #define ZEBRA_NEXTHOP_IPV4_IFNAME 5
  411. #define ZEBRA_NEXTHOP_IPV6 6
  412. #define ZEBRA_NEXTHOP_IPV6_IFINDEX 7
  413. #define ZEBRA_NEXTHOP_IPV6_IFNAME 8
  414. #define ZEBRA_NEXTHOP_BLACKHOLE 9
  415. #ifndef INADDR_LOOPBACK
  416. #define INADDR_LOOPBACK 0x7f000001 /* Internet address 127.0.0.1. */
  417. #endif
  418. /* Address family numbers from RFC1700. */
  419. typedef enum {
  420. AFI_IP = 1,
  421. AFI_IP6 = 2,
  422. AFI_ETHER = 3, /* RFC 1700 has "6" for 802.* */
  423. #define AFI_MAX 4
  424. } afi_t;
  425. /* Subsequent Address Family Identifier. */
  426. #define SAFI_UNICAST 1
  427. #define SAFI_MULTICAST 2
  428. #define SAFI_RESERVED_3 3
  429. #define SAFI_MPLS_VPN 4
  430. #define SAFI_ENCAP 7 /* per IANA */
  431. #define SAFI_MAX 8
  432. /* Default Administrative Distance of each protocol. */
  433. #define ZEBRA_KERNEL_DISTANCE_DEFAULT 0
  434. #define ZEBRA_CONNECT_DISTANCE_DEFAULT 0
  435. #define ZEBRA_STATIC_DISTANCE_DEFAULT 1
  436. #define ZEBRA_RIP_DISTANCE_DEFAULT 120
  437. #define ZEBRA_RIPNG_DISTANCE_DEFAULT 120
  438. #define ZEBRA_OSPF_DISTANCE_DEFAULT 110
  439. #define ZEBRA_OSPF6_DISTANCE_DEFAULT 110
  440. #define ZEBRA_ISIS_DISTANCE_DEFAULT 115
  441. #define ZEBRA_IBGP_DISTANCE_DEFAULT 200
  442. #define ZEBRA_EBGP_DISTANCE_DEFAULT 20
  443. /* Flag manipulation macros. */
  444. #define CHECK_FLAG(V,F) ((V) & (F))
  445. #define SET_FLAG(V,F) (V) |= (F)
  446. #define UNSET_FLAG(V,F) (V) &= ~(F)
  447. #define RESET_FLAG(V) (V) = 0
  448. typedef u_int8_t safi_t;
  449. /* Zebra types. Used in Zserv message header. */
  450. typedef u_int16_t zebra_size_t;
  451. typedef u_int16_t zebra_command_t;
  452. /* VRF ID type. */
  453. typedef u_int16_t vrf_id_t;
  454. typedef uint32_t route_tag_t;
  455. #define ROUTE_TAG_MAX UINT32_MAX
  456. #endif /* _ZEBRA_H */