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. /* network include group */
  120. #include <sys/socket.h>
  121. #ifdef HAVE_SYS_SOCKIO_H
  122. #include <sys/sockio.h>
  123. #endif /* HAVE_SYS_SOCKIO_H */
  124. #ifdef __APPLE__
  125. #define __APPLE_USE_RFC_3542
  126. #endif
  127. #ifdef HAVE_NETINET_IN_H
  128. #include <netinet/in.h>
  129. #endif /* HAVE_NETINET_IN_H */
  130. #include <netinet/in_systm.h>
  131. #include <netinet/ip.h>
  132. #include <netinet/tcp.h>
  133. #ifdef HAVE_NET_NETOPT_H
  134. #include <net/netopt.h>
  135. #endif /* HAVE_NET_NETOPT_H */
  136. #include <net/if.h>
  137. #ifdef HAVE_NET_IF_DL_H
  138. #include <net/if_dl.h>
  139. #endif /* HAVE_NET_IF_DL_H */
  140. #ifdef HAVE_NET_IF_VAR_H
  141. #include <net/if_var.h>
  142. #endif /* HAVE_NET_IF_VAR_H */
  143. #ifdef HAVE_NET_ROUTE_H
  144. #include <net/route.h>
  145. #endif /* HAVE_NET_ROUTE_H */
  146. #ifdef HAVE_NETLINK
  147. #include <linux/netlink.h>
  148. #include <linux/rtnetlink.h>
  149. #include <linux/filter.h>
  150. #else
  151. #define RT_TABLE_MAIN 0
  152. #endif /* HAVE_NETLINK */
  153. #ifdef HAVE_NETDB_H
  154. #include <netdb.h>
  155. #endif /* HAVE_NETDB_H */
  156. #include <arpa/inet.h>
  157. #ifdef HAVE_INET_ND_H
  158. #include <inet/nd.h>
  159. #endif /* HAVE_INET_ND_H */
  160. #ifdef HAVE_NETINET_IN_VAR_H
  161. #include <netinet/in_var.h>
  162. #endif /* HAVE_NETINET_IN_VAR_H */
  163. #ifdef HAVE_NETINET6_IN6_VAR_H
  164. #include <netinet6/in6_var.h>
  165. #endif /* HAVE_NETINET6_IN6_VAR_H */
  166. #ifdef HAVE_NETINET_IN6_VAR_H
  167. #include <netinet/in6_var.h>
  168. #endif /* HAVE_NETINET_IN6_VAR_H */
  169. #ifdef HAVE_NETINET6_IN_H
  170. #include <netinet6/in.h>
  171. #endif /* HAVE_NETINET6_IN_H */
  172. #ifdef HAVE_NETINET6_IP6_H
  173. #include <netinet6/ip6.h>
  174. #endif /* HAVE_NETINET6_IP6_H */
  175. #ifdef HAVE_NETINET_ICMP6_H
  176. #include <netinet/icmp6.h>
  177. #endif /* HAVE_NETINET_ICMP6_H */
  178. #ifdef HAVE_NETINET6_ND6_H
  179. #include <netinet6/nd6.h>
  180. #endif /* HAVE_NETINET6_ND6_H */
  181. /* Privileges / capabilities */
  182. #ifdef HAVE_LCAPS
  183. #include <sys/capability.h>
  184. #include <sys/prctl.h>
  185. #endif /* HAVE_LCAPS */
  186. #ifdef HAVE_SOLARIS_CAPABILITIES
  187. #include <priv.h>
  188. #endif /* HAVE_SOLARIS_CAPABILITIES */
  189. /* Some systems do not define UINT32_MAX, etc.. from inttypes.h
  190. * e.g. this makes life easier for FBSD 4.11 users.
  191. */
  192. #ifndef INT8_MAX
  193. #define INT8_MAX (127)
  194. #endif
  195. #ifndef INT16_MAX
  196. #define INT16_MAX (32767)
  197. #endif
  198. #ifndef INT32_MAX
  199. #define INT32_MAX (2147483647)
  200. #endif
  201. #ifndef UINT8_MAX
  202. #define UINT8_MAX (255U)
  203. #endif
  204. #ifndef UINT16_MAX
  205. #define UINT16_MAX (65535U)
  206. #endif
  207. #ifndef UINT32_MAX
  208. #define UINT32_MAX (4294967295U)
  209. #endif
  210. #ifdef HAVE_GLIBC_BACKTRACE
  211. #include <execinfo.h>
  212. #endif /* HAVE_GLIBC_BACKTRACE */
  213. /* Local includes: */
  214. #if !(defined(__GNUC__) || defined(VTYSH_EXTRACT_PL))
  215. #define __attribute__(x)
  216. #endif /* !__GNUC__ || VTYSH_EXTRACT_PL */
  217. #include "zassert.h"
  218. #include "str.h"
  219. #ifdef HAVE_BROKEN_CMSG_FIRSTHDR
  220. /* This bug is present in Solaris 8 and pre-patch Solaris 9 <sys/socket.h>;
  221. please refer to http://bugzilla.quagga.net/show_bug.cgi?id=142 */
  222. /* Check that msg_controllen is large enough. */
  223. #define ZCMSG_FIRSTHDR(mhdr) \
  224. (((size_t)((mhdr)->msg_controllen) >= sizeof(struct cmsghdr)) ? \
  225. CMSG_FIRSTHDR(mhdr) : (struct cmsghdr *)NULL)
  226. #warning "CMSG_FIRSTHDR is broken on this platform, using a workaround"
  227. #else /* HAVE_BROKEN_CMSG_FIRSTHDR */
  228. #define ZCMSG_FIRSTHDR(M) CMSG_FIRSTHDR(M)
  229. #endif /* HAVE_BROKEN_CMSG_FIRSTHDR */
  230. /*
  231. * RFC 3542 defines several macros for using struct cmsghdr.
  232. * Here, we define those that are not present
  233. */
  234. /*
  235. * Internal defines, for use only in this file.
  236. * These are likely wrong on other than ILP32 machines, so warn.
  237. */
  238. #ifndef _CMSG_DATA_ALIGN
  239. #define _CMSG_DATA_ALIGN(n) (((n) + 3) & ~3)
  240. #endif /* _CMSG_DATA_ALIGN */
  241. #ifndef _CMSG_HDR_ALIGN
  242. #define _CMSG_HDR_ALIGN(n) (((n) + 3) & ~3)
  243. #endif /* _CMSG_HDR_ALIGN */
  244. /*
  245. * CMSG_SPACE and CMSG_LEN are required in RFC3542, but were new in that
  246. * version.
  247. */
  248. #ifndef CMSG_SPACE
  249. #define CMSG_SPACE(l) (_CMSG_DATA_ALIGN(sizeof(struct cmsghdr)) + \
  250. _CMSG_HDR_ALIGN(l))
  251. #warning "assuming 4-byte alignment for CMSG_SPACE"
  252. #endif /* CMSG_SPACE */
  253. #ifndef CMSG_LEN
  254. #define CMSG_LEN(l) (_CMSG_DATA_ALIGN(sizeof(struct cmsghdr)) + (l))
  255. #warning "assuming 4-byte alignment for CMSG_LEN"
  256. #endif /* CMSG_LEN */
  257. /* The definition of struct in_pktinfo is missing in old version of
  258. GLIBC 2.1 (Redhat 6.1). */
  259. #if defined (GNU_LINUX) && ! defined (HAVE_STRUCT_IN_PKTINFO)
  260. struct in_pktinfo
  261. {
  262. int ipi_ifindex;
  263. struct in_addr ipi_spec_dst;
  264. struct in_addr ipi_addr;
  265. };
  266. #endif
  267. /*
  268. * OSPF Fragmentation / fragmented writes
  269. *
  270. * ospfd can support writing fragmented packets, for cases where
  271. * kernel will not fragment IP_HDRINCL and/or multicast destined
  272. * packets (ie TTBOMK all kernels, BSD, SunOS, Linux). However,
  273. * SunOS, probably BSD too, clobber the user supplied IP ID and IP
  274. * flags fields, hence user-space fragmentation will not work.
  275. * Only Linux is known to leave IP header unmolested.
  276. * Further, fragmentation really should be done the kernel, which already
  277. * supports it, and which avoids nasty IP ID state problems.
  278. *
  279. * Fragmentation of OSPF packets can be required on networks with router
  280. * with many many interfaces active in one area, or on networks with links
  281. * with low MTUs.
  282. */
  283. #ifdef GNU_LINUX
  284. #define WANT_OSPF_WRITE_FRAGMENT
  285. #endif
  286. /*
  287. * IP_HDRINCL / struct ip byte order
  288. *
  289. * Linux: network byte order
  290. * *BSD: network, except for length and offset. (cf Stevens)
  291. * SunOS: nominally as per BSD. but bug: network order on LE.
  292. * OpenBSD: network byte order, apart from older versions which are as per
  293. * *BSD
  294. */
  295. #if defined(__NetBSD__) \
  296. || (defined(__FreeBSD__) && (__FreeBSD_version < 1100030)) \
  297. || (defined(__OpenBSD__) && (OpenBSD < 200311)) \
  298. || (defined(__APPLE__)) \
  299. || (defined(SUNOS_5) && defined(WORDS_BIGENDIAN))
  300. #define HAVE_IP_HDRINCL_BSD_ORDER
  301. #endif
  302. /* Define BYTE_ORDER, if not defined. Useful for compiler conditional
  303. * code, rather than preprocessor conditional.
  304. * Not all the world has this BSD define.
  305. */
  306. #ifndef BYTE_ORDER
  307. #define BIG_ENDIAN 4321 /* least-significant byte first (vax, pc) */
  308. #define LITTLE_ENDIAN 1234 /* most-significant byte first (IBM, net) */
  309. #define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp) */
  310. #if defined(WORDS_BIGENDIAN)
  311. #define BYTE_ORDER BIG_ENDIAN
  312. #else /* !WORDS_BIGENDIAN */
  313. #define BYTE_ORDER LITTLE_ENDIAN
  314. #endif /* WORDS_BIGENDIAN */
  315. #endif /* ndef BYTE_ORDER */
  316. /* MAX / MIN are not commonly defined, but useful */
  317. #ifndef MAX
  318. #define MAX(a, b) \
  319. ({ typeof (a) _a = (a); \
  320. typeof (b) _b = (b); \
  321. _a > _b ? _a : _b; })
  322. #endif
  323. #ifndef MIN
  324. #define MIN(a, b) \
  325. ({ typeof (a) _a = (a); \
  326. typeof (b) _b = (b); \
  327. _a < _b ? _a : _b; })
  328. #endif
  329. #define ZEBRA_NUM_OF(x) (sizeof (x) / sizeof (x[0]))
  330. /* For old definition. */
  331. #ifndef IN6_ARE_ADDR_EQUAL
  332. #define IN6_ARE_ADDR_EQUAL IN6_IS_ADDR_EQUAL
  333. #endif /* IN6_ARE_ADDR_EQUAL */
  334. /* default zebra TCP port for zclient */
  335. #define ZEBRA_PORT 2600
  336. /* Zebra message types. */
  337. #define ZEBRA_INTERFACE_ADD 1
  338. #define ZEBRA_INTERFACE_DELETE 2
  339. #define ZEBRA_INTERFACE_ADDRESS_ADD 3
  340. #define ZEBRA_INTERFACE_ADDRESS_DELETE 4
  341. #define ZEBRA_INTERFACE_UP 5
  342. #define ZEBRA_INTERFACE_DOWN 6
  343. #define ZEBRA_IPV4_ROUTE_ADD 7
  344. #define ZEBRA_IPV4_ROUTE_DELETE 8
  345. #define ZEBRA_IPV6_ROUTE_ADD 9
  346. #define ZEBRA_IPV6_ROUTE_DELETE 10
  347. #define ZEBRA_REDISTRIBUTE_ADD 11
  348. #define ZEBRA_REDISTRIBUTE_DELETE 12
  349. #define ZEBRA_REDISTRIBUTE_DEFAULT_ADD 13
  350. #define ZEBRA_REDISTRIBUTE_DEFAULT_DELETE 14
  351. #define ZEBRA_IPV4_NEXTHOP_LOOKUP 15
  352. #define ZEBRA_IPV6_NEXTHOP_LOOKUP 16
  353. #define ZEBRA_IPV4_IMPORT_LOOKUP 17
  354. #define ZEBRA_IPV6_IMPORT_LOOKUP 18
  355. #define ZEBRA_INTERFACE_RENAME 19
  356. #define ZEBRA_ROUTER_ID_ADD 20
  357. #define ZEBRA_ROUTER_ID_DELETE 21
  358. #define ZEBRA_ROUTER_ID_UPDATE 22
  359. #define ZEBRA_HELLO 23
  360. #define ZEBRA_IPV4_NEXTHOP_LOOKUP_MRIB 24
  361. #define ZEBRA_VRF_UNREGISTER 25
  362. #define ZEBRA_INTERFACE_LINK_PARAMS 26
  363. #define ZEBRA_NEXTHOP_REGISTER 27
  364. #define ZEBRA_NEXTHOP_UNREGISTER 28
  365. #define ZEBRA_NEXTHOP_UPDATE 29
  366. #define ZEBRA_MESSAGE_MAX 30
  367. /* Marker value used in new Zserv, in the byte location corresponding
  368. * the command value in the old zserv header. To allow old and new
  369. * Zserv headers to be distinguished from each other.
  370. */
  371. #define ZEBRA_HEADER_MARKER 255
  372. /* Zebra route's types are defined in route_types.h */
  373. #include "route_types.h"
  374. /* Note: whenever a new route-type or zserv-command is added the
  375. * corresponding {command,route}_types[] table in lib/log.c MUST be
  376. * updated! */
  377. /* Map a route type to a string. For example, ZEBRA_ROUTE_RIPNG -> "ripng". */
  378. extern const char *zebra_route_string(unsigned int route_type);
  379. /* Map a route type to a char. For example, ZEBRA_ROUTE_RIPNG -> 'R'. */
  380. extern char zebra_route_char(unsigned int route_type);
  381. /* Map a zserv command type to the same string,
  382. * e.g. ZEBRA_INTERFACE_ADD -> "ZEBRA_INTERFACE_ADD" */
  383. /* Map a protocol name to its number. e.g. ZEBRA_ROUTE_BGP->9*/
  384. extern int proto_name2num(const char *s);
  385. /* Map redistribute X argument to protocol number.
  386. * unlike proto_name2num, this accepts shorthands and takes
  387. * an AFI value to restrict input */
  388. extern int proto_redistnum(int afi, const char *s);
  389. extern const char *zserv_command_string (unsigned int command);
  390. /* Error codes of zebra. */
  391. #define ZEBRA_ERR_NOERROR 0
  392. #define ZEBRA_ERR_RTEXIST -1
  393. #define ZEBRA_ERR_RTUNREACH -2
  394. #define ZEBRA_ERR_EPERM -3
  395. #define ZEBRA_ERR_RTNOEXIST -4
  396. #define ZEBRA_ERR_KERNEL -5
  397. /* Zebra message flags */
  398. #define ZEBRA_FLAG_INTERNAL 0x01
  399. #define ZEBRA_FLAG_SELFROUTE 0x02
  400. #define ZEBRA_FLAG_BLACKHOLE 0x04
  401. #define ZEBRA_FLAG_IBGP 0x08
  402. #define ZEBRA_FLAG_SELECTED 0x10
  403. #define ZEBRA_FLAG_FIB_OVERRIDE 0x20
  404. #define ZEBRA_FLAG_STATIC 0x40
  405. #define ZEBRA_FLAG_REJECT 0x80
  406. /* Zebra nexthop flags. */
  407. #define ZEBRA_NEXTHOP_IFINDEX 1
  408. #define ZEBRA_NEXTHOP_IFNAME 2
  409. #define ZEBRA_NEXTHOP_IPV4 3
  410. #define ZEBRA_NEXTHOP_IPV4_IFINDEX 4
  411. #define ZEBRA_NEXTHOP_IPV4_IFNAME 5
  412. #define ZEBRA_NEXTHOP_IPV6 6
  413. #define ZEBRA_NEXTHOP_IPV6_IFINDEX 7
  414. #define ZEBRA_NEXTHOP_IPV6_IFNAME 8
  415. #define ZEBRA_NEXTHOP_BLACKHOLE 9
  416. #ifndef INADDR_LOOPBACK
  417. #define INADDR_LOOPBACK 0x7f000001 /* Internet address 127.0.0.1. */
  418. #endif
  419. /* Address family numbers from RFC1700. */
  420. typedef enum {
  421. AFI_IP = 1,
  422. AFI_IP6 = 2,
  423. AFI_ETHER = 3, /* RFC 1700 has "6" for 802.* */
  424. #define AFI_MAX 4
  425. } afi_t;
  426. /* Subsequent Address Family Identifier. */
  427. #define SAFI_UNICAST 1
  428. #define SAFI_MULTICAST 2
  429. #define SAFI_RESERVED_3 3
  430. #define SAFI_MPLS_VPN 4
  431. #define SAFI_ENCAP 7 /* per IANA */
  432. #define SAFI_MAX 8
  433. /* Default Administrative Distance of each protocol. */
  434. #define ZEBRA_KERNEL_DISTANCE_DEFAULT 0
  435. #define ZEBRA_CONNECT_DISTANCE_DEFAULT 0
  436. #define ZEBRA_STATIC_DISTANCE_DEFAULT 1
  437. #define ZEBRA_RIP_DISTANCE_DEFAULT 120
  438. #define ZEBRA_RIPNG_DISTANCE_DEFAULT 120
  439. #define ZEBRA_OSPF_DISTANCE_DEFAULT 110
  440. #define ZEBRA_OSPF6_DISTANCE_DEFAULT 110
  441. #define ZEBRA_ISIS_DISTANCE_DEFAULT 115
  442. #define ZEBRA_IBGP_DISTANCE_DEFAULT 200
  443. #define ZEBRA_EBGP_DISTANCE_DEFAULT 20
  444. /* Flag manipulation macros. */
  445. #define CHECK_FLAG(V,F) ((V) & (F))
  446. #define SET_FLAG(V,F) (V) |= (F)
  447. #define UNSET_FLAG(V,F) (V) &= ~(F)
  448. #define RESET_FLAG(V) (V) = 0
  449. typedef u_int8_t safi_t;
  450. /* Zebra types. Used in Zserv message header. */
  451. typedef u_int16_t zebra_size_t;
  452. typedef u_int16_t zebra_command_t;
  453. /* VRF ID type. */
  454. typedef u_int16_t vrf_id_t;
  455. typedef uint32_t route_tag_t;
  456. #define ROUTE_TAG_MAX UINT32_MAX
  457. #endif /* _ZEBRA_H */