]> git.proxmox.com Git - mirror_frr.git/blob - lib/prefix.h
lib, bgpd: Remove unused variable from structure
[mirror_frr.git] / lib / prefix.h
1 /*
2 * Prefix structure.
3 * Copyright (C) 1998 Kunihiro Ishiguro
4 *
5 * This file is part of GNU Zebra.
6 *
7 * GNU Zebra is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
10 * later version.
11 *
12 * GNU Zebra is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; see the file COPYING; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #ifndef _ZEBRA_PREFIX_H
23 #define _ZEBRA_PREFIX_H
24
25 #ifdef SUNOS_5
26 #include <sys/ethernet.h>
27 #else
28 #ifdef GNU_LINUX
29 #include <net/ethernet.h>
30 #else
31 #include <netinet/if_ether.h>
32 #endif
33 #endif
34 #include "sockunion.h"
35 #include "ipaddr.h"
36 #include "compiler.h"
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 #ifndef ETH_ALEN
43 #define ETH_ALEN 6
44 #endif
45
46 /* value of first byte of ESI */
47 #define ESI_TYPE_ARBITRARY 0 /* */
48 #define ESI_TYPE_LACP 1 /* <> */
49 #define ESI_TYPE_BRIDGE 2 /* <Root bridge Mac-6B>:<Root Br Priority-2B>:00 */
50 #define ESI_TYPE_MAC 3 /* <Syst Mac Add-6B>:<Local Discriminator Value-3B> */
51 #define ESI_TYPE_ROUTER 4 /* <RouterId-4B>:<Local Discriminator Value-4B> */
52 #define ESI_TYPE_AS 5 /* <AS-4B>:<Local Discriminator Value-4B> */
53
54 #define MAX_ESI {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
55
56
57 #define EVPN_ETH_TAG_BYTES 4
58 #define ESI_BYTES 10
59 #define ESI_STR_LEN (3 * ESI_BYTES)
60
61 /* Maximum number of VTEPs per-ES -
62 * XXX - temporary limit for allocating strings etc.
63 */
64 #define ES_VTEP_MAX_CNT 10
65 #define ES_VTEP_LIST_STR_SZ (ES_VTEP_MAX_CNT * 16)
66
67 #define ETHER_ADDR_STRLEN (3*ETH_ALEN)
68 /*
69 * there isn't a portable ethernet address type. We define our
70 * own to simplify internal handling
71 */
72 struct ethaddr {
73 uint8_t octet[ETH_ALEN];
74 } __attribute__((packed));
75
76
77 /* length is the number of valuable bits of prefix structure
78 * 18 bytes is current length in structure, if address is ipv4
79 * 30 bytes is in case of ipv6
80 */
81 #define PREFIX_LEN_ROUTE_TYPE_5_IPV4 (18*8)
82 #define PREFIX_LEN_ROUTE_TYPE_5_IPV6 (30*8)
83
84 typedef struct esi_t_ {
85 uint8_t val[ESI_BYTES];
86 } esi_t;
87
88 struct evpn_ead_addr {
89 esi_t esi;
90 uint32_t eth_tag;
91 struct ipaddr ip;
92 };
93
94 struct evpn_macip_addr {
95 uint32_t eth_tag;
96 uint8_t ip_prefix_length;
97 struct ethaddr mac;
98 struct ipaddr ip;
99 };
100
101 struct evpn_imet_addr {
102 uint32_t eth_tag;
103 uint8_t ip_prefix_length;
104 struct ipaddr ip;
105 };
106
107 struct evpn_es_addr {
108 esi_t esi;
109 uint8_t ip_prefix_length;
110 struct ipaddr ip;
111 };
112
113 struct evpn_prefix_addr {
114 uint32_t eth_tag;
115 uint8_t ip_prefix_length;
116 struct ipaddr ip;
117 };
118
119 /* EVPN address (RFC 7432) */
120 struct evpn_addr {
121 uint8_t route_type;
122 union {
123 struct evpn_ead_addr _ead_addr;
124 struct evpn_macip_addr _macip_addr;
125 struct evpn_imet_addr _imet_addr;
126 struct evpn_es_addr _es_addr;
127 struct evpn_prefix_addr _prefix_addr;
128 } u;
129 #define ead_addr u._ead_addr
130 #define macip_addr u._macip_addr
131 #define imet_addr u._imet_addr
132 #define es_addr u._es_addr
133 #define prefix_addr u._prefix_addr
134 };
135
136 /*
137 * A struct prefix contains an address family, a prefix length, and an
138 * address. This can represent either a 'network prefix' as defined
139 * by CIDR, where the 'host bits' of the prefix are 0
140 * (e.g. AF_INET:10.0.0.0/8), or an address and netmask
141 * (e.g. AF_INET:10.0.0.9/8), such as might be configured on an
142 * interface.
143 */
144
145 /* different OSes use different names */
146 #if defined(AF_PACKET)
147 #define AF_ETHERNET AF_PACKET
148 #else
149 #if defined(AF_LINK)
150 #define AF_ETHERNET AF_LINK
151 #endif
152 #endif
153
154 /* The 'family' in the prefix structure is internal to FRR and need not
155 * map to standard OS AF_ definitions except where needed for interacting
156 * with the kernel. However, AF_ definitions are currently in use and
157 * prevalent across the code. Define a new FRR-specific AF for EVPN to
158 * distinguish between 'ethernet' (MAC-only) and 'evpn' prefixes and
159 * ensure it does not conflict with any OS AF_ definition.
160 */
161 #if !defined(AF_EVPN)
162 #define AF_EVPN (AF_MAX + 1)
163 #endif
164
165 #if !defined(AF_FLOWSPEC)
166 #define AF_FLOWSPEC (AF_MAX + 2)
167 #endif
168
169 struct flowspec_prefix {
170 uint16_t prefixlen; /* length in bytes */
171 uintptr_t ptr;
172 };
173
174 /* FRR generic prefix structure. */
175 struct prefix {
176 uint8_t family;
177 uint16_t prefixlen;
178 union {
179 uint8_t prefix;
180 struct in_addr prefix4;
181 struct in6_addr prefix6;
182 struct {
183 struct in_addr id;
184 struct in_addr adv_router;
185 } lp;
186 struct ethaddr prefix_eth; /* AF_ETHERNET */
187 uint8_t val[16];
188 uint32_t val32[4];
189 uintptr_t ptr;
190 struct evpn_addr prefix_evpn; /* AF_EVPN */
191 struct flowspec_prefix prefix_flowspec; /* AF_FLOWSPEC */
192 } u __attribute__((aligned(8)));
193 };
194
195 /* IPv4 prefix structure. */
196 struct prefix_ipv4 {
197 uint8_t family;
198 uint16_t prefixlen;
199 struct in_addr prefix __attribute__((aligned(8)));
200 };
201
202 /* IPv6 prefix structure. */
203 struct prefix_ipv6 {
204 uint8_t family;
205 uint16_t prefixlen;
206 struct in6_addr prefix __attribute__((aligned(8)));
207 };
208
209 struct prefix_ls {
210 uint8_t family;
211 uint16_t prefixlen;
212 struct in_addr id __attribute__((aligned(8)));
213 struct in_addr adv_router;
214 };
215
216 /* Prefix for routing distinguisher. */
217 struct prefix_rd {
218 uint8_t family;
219 uint16_t prefixlen;
220 uint8_t val[8] __attribute__((aligned(8)));
221 };
222
223 /* Prefix for ethernet. */
224 struct prefix_eth {
225 uint8_t family;
226 uint16_t prefixlen;
227 struct ethaddr eth_addr __attribute__((aligned(8))); /* AF_ETHERNET */
228 };
229
230 /* EVPN prefix structure. */
231 struct prefix_evpn {
232 uint8_t family;
233 uint16_t prefixlen;
234 struct evpn_addr prefix __attribute__((aligned(8)));
235 };
236
237 static inline int is_evpn_prefix_ipaddr_none(const struct prefix_evpn *evp)
238 {
239 if (evp->prefix.route_type == 1)
240 return IS_IPADDR_NONE(&(evp)->prefix.ead_addr.ip);
241 if (evp->prefix.route_type == 2)
242 return IS_IPADDR_NONE(&(evp)->prefix.macip_addr.ip);
243 if (evp->prefix.route_type == 3)
244 return IS_IPADDR_NONE(&(evp)->prefix.imet_addr.ip);
245 if (evp->prefix.route_type == 4)
246 return IS_IPADDR_NONE(&(evp)->prefix.es_addr.ip);
247 if (evp->prefix.route_type == 5)
248 return IS_IPADDR_NONE(&(evp)->prefix.prefix_addr.ip);
249 return 0;
250 }
251
252 static inline int is_evpn_prefix_ipaddr_v4(const struct prefix_evpn *evp)
253 {
254 if (evp->prefix.route_type == 1)
255 return IS_IPADDR_V4(&(evp)->prefix.ead_addr.ip);
256 if (evp->prefix.route_type == 2)
257 return IS_IPADDR_V4(&(evp)->prefix.macip_addr.ip);
258 if (evp->prefix.route_type == 3)
259 return IS_IPADDR_V4(&(evp)->prefix.imet_addr.ip);
260 if (evp->prefix.route_type == 4)
261 return IS_IPADDR_V4(&(evp)->prefix.es_addr.ip);
262 if (evp->prefix.route_type == 5)
263 return IS_IPADDR_V4(&(evp)->prefix.prefix_addr.ip);
264 return 0;
265 }
266
267 static inline int is_evpn_prefix_ipaddr_v6(const struct prefix_evpn *evp)
268 {
269 if (evp->prefix.route_type == 1)
270 return IS_IPADDR_V6(&(evp)->prefix.ead_addr.ip);
271 if (evp->prefix.route_type == 2)
272 return IS_IPADDR_V6(&(evp)->prefix.macip_addr.ip);
273 if (evp->prefix.route_type == 3)
274 return IS_IPADDR_V6(&(evp)->prefix.imet_addr.ip);
275 if (evp->prefix.route_type == 4)
276 return IS_IPADDR_V6(&(evp)->prefix.es_addr.ip);
277 if (evp->prefix.route_type == 5)
278 return IS_IPADDR_V6(&(evp)->prefix.prefix_addr.ip);
279 return 0;
280 }
281
282 /* Prefix for a generic pointer */
283 struct prefix_ptr {
284 uint8_t family;
285 uint16_t prefixlen;
286 uintptr_t prefix __attribute__((aligned(8)));
287 };
288
289 /* Prefix for a Flowspec entry */
290 struct prefix_fs {
291 uint8_t family;
292 uint16_t prefixlen; /* unused */
293 struct flowspec_prefix prefix __attribute__((aligned(8)));
294 };
295
296 struct prefix_sg {
297 uint8_t family;
298 uint16_t prefixlen;
299 struct in_addr src __attribute__((aligned(8)));
300 struct in_addr grp;
301 };
302
303 /* helper to get type safety/avoid casts on calls
304 * (w/o this, functions accepting all prefix types need casts on the caller
305 * side, which strips type safety since the cast will accept any pointer
306 * type.)
307 */
308 #ifndef __cplusplus
309 #define prefixtype(uname, typename, fieldname) \
310 typename *fieldname;
311 #else
312 #define prefixtype(uname, typename, fieldname) \
313 typename *fieldname; \
314 uname(typename *x) { this->fieldname = x; }
315 #endif
316
317 union prefixptr {
318 prefixtype(prefixptr, struct prefix, p)
319 prefixtype(prefixptr, struct prefix_ipv4, p4)
320 prefixtype(prefixptr, struct prefix_ipv6, p6)
321 prefixtype(prefixptr, struct prefix_evpn, evp)
322 prefixtype(prefixptr, struct prefix_fs, fs)
323 prefixtype(prefixptr, struct prefix_rd, rd)
324 } __attribute__((transparent_union));
325
326 union prefixconstptr {
327 prefixtype(prefixconstptr, const struct prefix, p)
328 prefixtype(prefixconstptr, const struct prefix_ipv4, p4)
329 prefixtype(prefixconstptr, const struct prefix_ipv6, p6)
330 prefixtype(prefixconstptr, const struct prefix_evpn, evp)
331 prefixtype(prefixconstptr, const struct prefix_fs, fs)
332 prefixtype(prefixconstptr, const struct prefix_rd, rd)
333 } __attribute__((transparent_union));
334
335 #ifndef INET_ADDRSTRLEN
336 #define INET_ADDRSTRLEN 16
337 #endif /* INET_ADDRSTRLEN */
338
339 #ifndef INET6_ADDRSTRLEN
340 /* dead:beef:dead:beef:dead:beef:dead:beef + \0 */
341 #define INET6_ADDRSTRLEN 46
342 #endif /* INET6_ADDRSTRLEN */
343
344 #ifndef INET6_BUFSIZ
345 #define INET6_BUFSIZ 53
346 #endif /* INET6_BUFSIZ */
347
348 /* Maximum string length of the result of prefix2str */
349 #define PREFIX_STRLEN 80
350
351 /*
352 * Longest possible length of a (S,G) string is 36 bytes
353 * 123.123.123.123 = 15 * 2
354 * (,) = 3
355 * NULL Character at end = 1
356 * (123.123.123.123,123.123.123.123)
357 */
358 #define PREFIX_SG_STR_LEN 34
359
360 /* Max bit/byte length of IPv4 address. */
361 #define IPV4_MAX_BYTELEN 4
362 #define IPV4_MAX_BITLEN 32
363 #define IPV4_MAX_PREFIXLEN 32
364 #define IPV4_ADDR_CMP(D,S) memcmp ((D), (S), IPV4_MAX_BYTELEN)
365
366 static inline bool ipv4_addr_same(const struct in_addr *a,
367 const struct in_addr *b)
368 {
369 return (a->s_addr == b->s_addr);
370 }
371 #define IPV4_ADDR_SAME(A,B) ipv4_addr_same((A), (B))
372
373 static inline void ipv4_addr_copy(struct in_addr *dst,
374 const struct in_addr *src)
375 {
376 dst->s_addr = src->s_addr;
377 }
378 #define IPV4_ADDR_COPY(D,S) ipv4_addr_copy((D), (S))
379
380 #define IPV4_NET0(a) ((((uint32_t)(a)) & 0xff000000) == 0x00000000)
381 #define IPV4_NET127(a) ((((uint32_t)(a)) & 0xff000000) == 0x7f000000)
382 #define IPV4_LINKLOCAL(a) ((((uint32_t)(a)) & 0xffff0000) == 0xa9fe0000)
383 #define IPV4_CLASS_DE(a) ((((uint32_t)(a)) & 0xe0000000) == 0xe0000000)
384 #define IPV4_MC_LINKLOCAL(a) ((((uint32_t)(a)) & 0xffffff00) == 0xe0000000)
385
386 /* Max bit/byte length of IPv6 address. */
387 #define IPV6_MAX_BYTELEN 16
388 #define IPV6_MAX_BITLEN 128
389 #define IPV6_MAX_PREFIXLEN 128
390 #define IPV6_ADDR_CMP(D,S) memcmp ((D), (S), IPV6_MAX_BYTELEN)
391 #define IPV6_ADDR_SAME(D,S) (memcmp ((D), (S), IPV6_MAX_BYTELEN) == 0)
392 #define IPV6_ADDR_COPY(D,S) memcpy ((D), (S), IPV6_MAX_BYTELEN)
393
394 /* Count prefix size from mask length */
395 #define PSIZE(a) (((a) + 7) / (8))
396
397 #define BSIZE(a) ((a) * (8))
398
399 /* Prefix's family member. */
400 #define PREFIX_FAMILY(p) ((p)->family)
401
402 /* glibc defines s6_addr32 to __in6_u.__u6_addr32 if __USE_{MISC || GNU} */
403 #ifndef s6_addr32
404 #if defined(SUNOS_5)
405 /* Some SunOS define s6_addr32 only to kernel */
406 #define s6_addr32 _S6_un._S6_u32
407 #else
408 #define s6_addr32 __u6_addr.__u6_addr32
409 #endif /* SUNOS_5 */
410 #endif /*s6_addr32*/
411
412 /* Prototypes. */
413 extern int str2family(const char *);
414 extern int afi2family(afi_t);
415 extern afi_t family2afi(int);
416 extern const char *family2str(int family);
417 extern const char *safi2str(safi_t safi);
418 extern const char *afi2str(afi_t afi);
419
420 /*
421 * Check bit of the prefix.
422 *
423 * prefix
424 * byte buffer
425 *
426 * bit_index
427 * which bit to fetch from byte buffer, 0 indexed.
428 */
429 extern unsigned int prefix_bit(const uint8_t *prefix, const uint16_t bit_index);
430
431 extern struct prefix *prefix_new(void);
432 extern void prefix_free(struct prefix **p);
433 /*
434 * Function to handle prefix_free being used as a del function.
435 */
436 extern void prefix_free_lists(void *arg);
437 extern const char *prefix_family_str(const struct prefix *);
438 extern int prefix_blen(const struct prefix *);
439 extern int str2prefix(const char *, struct prefix *);
440
441 #define PREFIX2STR_BUFFER PREFIX_STRLEN
442
443 extern void prefix_mcast_inet4_dump(const char *onfail, struct in_addr addr,
444 char *buf, int buf_size);
445 extern const char *prefix_sg2str(const struct prefix_sg *sg, char *str);
446 extern const char *prefix2str(union prefixconstptr, char *, int);
447 extern int evpn_type5_prefix_match(const struct prefix *evpn_pfx,
448 const struct prefix *match_pfx);
449 extern int prefix_match(const struct prefix *, const struct prefix *);
450 extern int prefix_match_network_statement(const struct prefix *,
451 const struct prefix *);
452 extern int prefix_same(union prefixconstptr, union prefixconstptr);
453 extern int prefix_cmp(union prefixconstptr, union prefixconstptr);
454 extern int prefix_common_bits(const struct prefix *, const struct prefix *);
455 extern void prefix_copy(union prefixptr, union prefixconstptr);
456 extern void apply_mask(struct prefix *);
457
458 #ifdef __clang_analyzer__
459 /* clang-SA doesn't understand transparent unions, making it think that the
460 * target of prefix_copy is uninitialized. So just memset the target.
461 * cf. https://bugs.llvm.org/show_bug.cgi?id=42811
462 */
463 #define prefix_copy(a, b) ({ memset(a, 0, sizeof(*a)); prefix_copy(a, b); })
464 #endif
465
466 extern struct prefix *sockunion2hostprefix(const union sockunion *,
467 struct prefix *p);
468 extern void prefix2sockunion(const struct prefix *, union sockunion *);
469
470 extern int str2prefix_eth(const char *, struct prefix_eth *);
471
472 extern struct prefix_ipv4 *prefix_ipv4_new(void);
473 extern void prefix_ipv4_free(struct prefix_ipv4 **p);
474 extern int str2prefix_ipv4(const char *, struct prefix_ipv4 *);
475 extern void apply_mask_ipv4(struct prefix_ipv4 *);
476
477 #define PREFIX_COPY(DST, SRC) \
478 *((struct prefix *)(DST)) = *((const struct prefix *)(SRC))
479 #define PREFIX_COPY_IPV4(DST, SRC) \
480 *((struct prefix_ipv4 *)(DST)) = *((const struct prefix_ipv4 *)(SRC));
481
482 extern int prefix_ipv4_any(const struct prefix_ipv4 *);
483 extern void apply_classful_mask_ipv4(struct prefix_ipv4 *);
484
485 extern uint8_t ip_masklen(struct in_addr);
486 extern void masklen2ip(const int, struct in_addr *);
487 /* given the address of a host on a network and the network mask length,
488 * calculate the broadcast address for that network;
489 * special treatment for /31 according to RFC3021 section 3.3 */
490 extern in_addr_t ipv4_broadcast_addr(in_addr_t hostaddr, int masklen);
491
492 extern int netmask_str2prefix_str(const char *, const char *, char *);
493
494 extern struct prefix_ipv6 *prefix_ipv6_new(void);
495 extern void prefix_ipv6_free(struct prefix_ipv6 **p);
496 extern int str2prefix_ipv6(const char *, struct prefix_ipv6 *);
497 extern void apply_mask_ipv6(struct prefix_ipv6 *);
498
499 #define PREFIX_COPY_IPV6(DST, SRC) \
500 *((struct prefix_ipv6 *)(DST)) = *((const struct prefix_ipv6 *)(SRC));
501
502 extern int ip6_masklen(struct in6_addr);
503 extern void masklen2ip6(const int, struct in6_addr *);
504
505 extern const char *inet6_ntoa(struct in6_addr);
506
507 extern int is_zero_mac(const struct ethaddr *mac);
508 extern bool is_mcast_mac(const struct ethaddr *mac);
509 extern bool is_bcast_mac(const struct ethaddr *mac);
510 extern int prefix_str2mac(const char *str, struct ethaddr *mac);
511 extern char *prefix_mac2str(const struct ethaddr *mac, char *buf, int size);
512
513 extern unsigned prefix_hash_key(const void *pp);
514
515 extern int str_to_esi(const char *str, esi_t *esi);
516 extern char *esi_to_str(const esi_t *esi, char *buf, int size);
517 extern void prefix_evpn_hexdump(const struct prefix_evpn *p);
518
519 static inline int ipv6_martian(struct in6_addr *addr)
520 {
521 struct in6_addr localhost_addr;
522
523 inet_pton(AF_INET6, "::1", &localhost_addr);
524
525 if (IPV6_ADDR_SAME(&localhost_addr, addr))
526 return 1;
527
528 return 0;
529 }
530
531 extern int macstr2prefix_evpn(const char *str, struct prefix_evpn *p);
532
533 /* NOTE: This routine expects the address argument in network byte order. */
534 static inline int ipv4_martian(struct in_addr *addr)
535 {
536 in_addr_t ip = ntohl(addr->s_addr);
537
538 if (IPV4_NET0(ip) || IPV4_NET127(ip) || IPV4_CLASS_DE(ip)) {
539 return 1;
540 }
541 return 0;
542 }
543
544 static inline int is_default_prefix(const struct prefix *p)
545 {
546 if (!p)
547 return 0;
548
549 if ((p->family == AF_INET) && (p->u.prefix4.s_addr == INADDR_ANY)
550 && (p->prefixlen == 0))
551 return 1;
552
553 if ((p->family == AF_INET6) && (p->prefixlen == 0)
554 && (!memcmp(&p->u.prefix6, &in6addr_any, sizeof(struct in6_addr))))
555 return 1;
556
557 return 0;
558 }
559
560 static inline int is_host_route(const struct prefix *p)
561 {
562 if (p->family == AF_INET)
563 return (p->prefixlen == IPV4_MAX_BITLEN);
564 else if (p->family == AF_INET6)
565 return (p->prefixlen == IPV6_MAX_BITLEN);
566 return 0;
567 }
568
569 static inline int is_default_host_route(const struct prefix *p)
570 {
571 if (p->family == AF_INET) {
572 return (p->u.prefix4.s_addr == INADDR_ANY &&
573 p->prefixlen == IPV4_MAX_BITLEN);
574 } else if (p->family == AF_INET6) {
575 return ((!memcmp(&p->u.prefix6, &in6addr_any,
576 sizeof(struct in6_addr))) &&
577 p->prefixlen == IPV6_MAX_BITLEN);
578 }
579 return 0;
580 }
581
582 #ifdef _FRR_ATTRIBUTE_PRINTFRR
583 #pragma FRR printfrr_ext "%pEA" (struct ethaddr *)
584
585 #pragma FRR printfrr_ext "%pI4" (struct in_addr *)
586 #pragma FRR printfrr_ext "%pI4" (in_addr_t *)
587
588 #pragma FRR printfrr_ext "%pI6" (struct in6_addr *)
589
590 #pragma FRR printfrr_ext "%pFX" (struct prefix *)
591 #pragma FRR printfrr_ext "%pFX" (struct prefix_ipv4 *)
592 #pragma FRR printfrr_ext "%pFX" (struct prefix_ipv6 *)
593 #pragma FRR printfrr_ext "%pFX" (struct prefix_eth *)
594 #pragma FRR printfrr_ext "%pFX" (struct prefix_evpn *)
595 #pragma FRR printfrr_ext "%pFX" (struct prefix_fs *)
596
597 #pragma FRR printfrr_ext "%pSG4" (struct prefix_sg *)
598 #endif
599
600 #ifdef __cplusplus
601 }
602 #endif
603
604 #endif /* _ZEBRA_PREFIX_H */