3 * Copyright (C) 1998 Kunihiro Ishiguro
5 * This file is part of GNU Zebra.
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
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.
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
22 #ifndef _ZEBRA_PREFIX_H
23 #define _ZEBRA_PREFIX_H
26 #include <net/ethernet.h>
28 #include <netinet/if_ether.h>
30 #include "sockunion.h"
42 /* EVPN route types. */
44 BGP_EVPN_AD_ROUTE
= 1, /* Ethernet Auto-Discovery (A-D) route */
45 BGP_EVPN_MAC_IP_ROUTE
, /* MAC/IP Advertisement route */
46 BGP_EVPN_IMET_ROUTE
, /* Inclusive Multicast Ethernet Tag route */
47 BGP_EVPN_ES_ROUTE
, /* Ethernet Segment route */
48 BGP_EVPN_IP_PREFIX_ROUTE
, /* IP Prefix route */
49 } bgp_evpn_route_type
;
51 /* value of first byte of ESI */
52 #define ESI_TYPE_ARBITRARY 0 /* */
53 #define ESI_TYPE_LACP 1 /* <> */
54 #define ESI_TYPE_BRIDGE 2 /* <Root bridge Mac-6B>:<Root Br Priority-2B>:00 */
55 #define ESI_TYPE_MAC 3 /* <Syst Mac Add-6B>:<Local Discriminator Value-3B> */
56 #define ESI_TYPE_ROUTER 4 /* <RouterId-4B>:<Local Discriminator Value-4B> */
57 #define ESI_TYPE_AS 5 /* <AS-4B>:<Local Discriminator Value-4B> */
59 #define MAX_ESI {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
62 #define EVPN_ETH_TAG_BYTES 4
64 #define ESI_STR_LEN (3 * ESI_BYTES)
65 #define EVPN_DF_ALG_STR_LEN 24
67 /* Maximum number of VTEPs per-ES -
68 * XXX - temporary limit for allocating strings etc.
70 #define ES_VTEP_MAX_CNT 10
71 #define ES_VTEP_LIST_STR_SZ (ES_VTEP_MAX_CNT * 16)
73 #define ETHER_ADDR_STRLEN (3*ETH_ALEN)
75 * there isn't a portable ethernet address type. We define our
76 * own to simplify internal handling
79 uint8_t octet
[ETH_ALEN
];
80 } __attribute__((packed
));
83 /* length is the number of valuable bits of prefix structure
84 * 18 bytes is current length in structure, if address is ipv4
85 * 30 bytes is in case of ipv6
87 #define PREFIX_LEN_ROUTE_TYPE_5_IPV4 (18*8)
88 #define PREFIX_LEN_ROUTE_TYPE_5_IPV6 (30*8)
90 typedef struct esi_t_
{
91 uint8_t val
[ESI_BYTES
];
94 struct evpn_ead_addr
{
101 struct evpn_macip_addr
{
103 uint8_t ip_prefix_length
;
108 struct evpn_imet_addr
{
110 uint8_t ip_prefix_length
;
114 struct evpn_es_addr
{
116 uint8_t ip_prefix_length
;
120 struct evpn_prefix_addr
{
122 uint8_t ip_prefix_length
;
126 /* EVPN address (RFC 7432) */
130 struct evpn_ead_addr _ead_addr
;
131 struct evpn_macip_addr _macip_addr
;
132 struct evpn_imet_addr _imet_addr
;
133 struct evpn_es_addr _es_addr
;
134 struct evpn_prefix_addr _prefix_addr
;
136 #define ead_addr u._ead_addr
137 #define macip_addr u._macip_addr
138 #define imet_addr u._imet_addr
139 #define es_addr u._es_addr
140 #define prefix_addr u._prefix_addr
144 * A struct prefix contains an address family, a prefix length, and an
145 * address. This can represent either a 'network prefix' as defined
146 * by CIDR, where the 'host bits' of the prefix are 0
147 * (e.g. AF_INET:10.0.0.0/8), or an address and netmask
148 * (e.g. AF_INET:10.0.0.9/8), such as might be configured on an
152 /* different OSes use different names */
153 #if defined(AF_PACKET)
154 #define AF_ETHERNET AF_PACKET
157 #define AF_ETHERNET AF_LINK
161 /* The 'family' in the prefix structure is internal to FRR and need not
162 * map to standard OS AF_ definitions except where needed for interacting
163 * with the kernel. However, AF_ definitions are currently in use and
164 * prevalent across the code. Define a new FRR-specific AF for EVPN to
165 * distinguish between 'ethernet' (MAC-only) and 'evpn' prefixes and
166 * ensure it does not conflict with any OS AF_ definition.
168 #if !defined(AF_EVPN)
169 #define AF_EVPN (AF_MAX + 1)
172 #if !defined(AF_FLOWSPEC)
173 #define AF_FLOWSPEC (AF_MAX + 2)
176 struct flowspec_prefix
{
178 uint16_t prefixlen
; /* length in bytes */
182 /* FRR generic prefix structure. */
188 struct in_addr prefix4
;
189 struct in6_addr prefix6
;
192 struct in_addr adv_router
;
194 struct ethaddr prefix_eth
; /* AF_ETHERNET */
198 struct evpn_addr prefix_evpn
; /* AF_EVPN */
199 struct flowspec_prefix prefix_flowspec
; /* AF_FLOWSPEC */
200 } u
__attribute__((aligned(8)));
203 /* IPv4 prefix structure. */
207 struct in_addr prefix
__attribute__((aligned(8)));
210 /* IPv6 prefix structure. */
214 struct in6_addr prefix
__attribute__((aligned(8)));
220 struct in_addr id
__attribute__((aligned(8)));
221 struct in_addr adv_router
;
224 /* Prefix for routing distinguisher. */
228 uint8_t val
[8] __attribute__((aligned(8)));
231 /* Prefix for ethernet. */
235 struct ethaddr eth_addr
__attribute__((aligned(8))); /* AF_ETHERNET */
238 /* EVPN prefix structure. */
242 struct evpn_addr prefix
__attribute__((aligned(8)));
245 static inline int is_evpn_prefix_ipaddr_none(const struct prefix_evpn
*evp
)
247 if (evp
->prefix
.route_type
== BGP_EVPN_AD_ROUTE
)
248 return IS_IPADDR_NONE(&(evp
)->prefix
.ead_addr
.ip
);
249 if (evp
->prefix
.route_type
== BGP_EVPN_MAC_IP_ROUTE
)
250 return IS_IPADDR_NONE(&(evp
)->prefix
.macip_addr
.ip
);
251 if (evp
->prefix
.route_type
== BGP_EVPN_IMET_ROUTE
)
252 return IS_IPADDR_NONE(&(evp
)->prefix
.imet_addr
.ip
);
253 if (evp
->prefix
.route_type
== BGP_EVPN_ES_ROUTE
)
254 return IS_IPADDR_NONE(&(evp
)->prefix
.es_addr
.ip
);
255 if (evp
->prefix
.route_type
== BGP_EVPN_IP_PREFIX_ROUTE
)
256 return IS_IPADDR_NONE(&(evp
)->prefix
.prefix_addr
.ip
);
260 static inline int is_evpn_prefix_ipaddr_v4(const struct prefix_evpn
*evp
)
262 if (evp
->prefix
.route_type
== BGP_EVPN_AD_ROUTE
)
263 return IS_IPADDR_V4(&(evp
)->prefix
.ead_addr
.ip
);
264 if (evp
->prefix
.route_type
== BGP_EVPN_MAC_IP_ROUTE
)
265 return IS_IPADDR_V4(&(evp
)->prefix
.macip_addr
.ip
);
266 if (evp
->prefix
.route_type
== BGP_EVPN_IMET_ROUTE
)
267 return IS_IPADDR_V4(&(evp
)->prefix
.imet_addr
.ip
);
268 if (evp
->prefix
.route_type
== BGP_EVPN_ES_ROUTE
)
269 return IS_IPADDR_V4(&(evp
)->prefix
.es_addr
.ip
);
270 if (evp
->prefix
.route_type
== BGP_EVPN_IP_PREFIX_ROUTE
)
271 return IS_IPADDR_V4(&(evp
)->prefix
.prefix_addr
.ip
);
275 static inline int is_evpn_prefix_ipaddr_v6(const struct prefix_evpn
*evp
)
277 if (evp
->prefix
.route_type
== BGP_EVPN_AD_ROUTE
)
278 return IS_IPADDR_V6(&(evp
)->prefix
.ead_addr
.ip
);
279 if (evp
->prefix
.route_type
== BGP_EVPN_MAC_IP_ROUTE
)
280 return IS_IPADDR_V6(&(evp
)->prefix
.macip_addr
.ip
);
281 if (evp
->prefix
.route_type
== BGP_EVPN_IMET_ROUTE
)
282 return IS_IPADDR_V6(&(evp
)->prefix
.imet_addr
.ip
);
283 if (evp
->prefix
.route_type
== BGP_EVPN_ES_ROUTE
)
284 return IS_IPADDR_V6(&(evp
)->prefix
.es_addr
.ip
);
285 if (evp
->prefix
.route_type
== BGP_EVPN_IP_PREFIX_ROUTE
)
286 return IS_IPADDR_V6(&(evp
)->prefix
.prefix_addr
.ip
);
290 /* Prefix for a Flowspec entry */
293 uint16_t prefixlen
; /* unused */
294 struct flowspec_prefix prefix
__attribute__((aligned(8)));
300 struct in_addr src
__attribute__((aligned(8)));
305 prefixtype(prefixptr
, struct prefix
, p
)
306 prefixtype(prefixptr
, struct prefix_ipv4
, p4
)
307 prefixtype(prefixptr
, struct prefix_ipv6
, p6
)
308 prefixtype(prefixptr
, struct prefix_evpn
, evp
)
309 prefixtype(prefixptr
, struct prefix_fs
, fs
)
310 prefixtype(prefixptr
, struct prefix_rd
, rd
)
313 union prefixconstptr
{
314 prefixtype(prefixconstptr
, const struct prefix
, p
)
315 prefixtype(prefixconstptr
, const struct prefix_ipv4
, p4
)
316 prefixtype(prefixconstptr
, const struct prefix_ipv6
, p6
)
317 prefixtype(prefixconstptr
, const struct prefix_evpn
, evp
)
318 prefixtype(prefixconstptr
, const struct prefix_fs
, fs
)
319 prefixtype(prefixconstptr
, const struct prefix_rd
, rd
)
322 #ifndef INET_ADDRSTRLEN
323 #define INET_ADDRSTRLEN 16
324 #endif /* INET_ADDRSTRLEN */
326 #ifndef INET6_ADDRSTRLEN
327 /* dead:beef:dead:beef:dead:beef:dead:beef + \0 */
328 #define INET6_ADDRSTRLEN 46
329 #endif /* INET6_ADDRSTRLEN */
332 #define INET6_BUFSIZ 53
333 #endif /* INET6_BUFSIZ */
335 /* Maximum string length of the result of prefix2str */
336 #define PREFIX_STRLEN 80
339 * Longest possible length of a (S,G) string is 34 bytes
340 * 123.123.123.123 = 15 * 2
342 * NULL Character at end = 1
343 * (123.123.123.123,123.123.123.123)
345 #define PREFIX_SG_STR_LEN 34
347 /* Max bit/byte length of IPv4 address. */
348 #define IPV4_MAX_BYTELEN 4
349 #define IPV4_MAX_BITLEN 32
350 #define IPV4_ADDR_CMP(D,S) memcmp ((D), (S), IPV4_MAX_BYTELEN)
352 static inline bool ipv4_addr_same(const struct in_addr
*a
,
353 const struct in_addr
*b
)
355 return (a
->s_addr
== b
->s_addr
);
357 #define IPV4_ADDR_SAME(A,B) ipv4_addr_same((A), (B))
359 static inline void ipv4_addr_copy(struct in_addr
*dst
,
360 const struct in_addr
*src
)
362 dst
->s_addr
= src
->s_addr
;
364 #define IPV4_ADDR_COPY(D,S) ipv4_addr_copy((D), (S))
366 #define IPV4_NET0(a) ((((uint32_t)(a)) & 0xff000000) == 0x00000000)
367 #define IPV4_NET127(a) ((((uint32_t)(a)) & 0xff000000) == 0x7f000000)
368 #define IPV4_LINKLOCAL(a) ((((uint32_t)(a)) & 0xffff0000) == 0xa9fe0000)
369 #define IPV4_CLASS_D(a) ((((uint32_t)(a)) & 0xf0000000) == 0xe0000000)
370 #define IPV4_CLASS_E(a) ((((uint32_t)(a)) & 0xf0000000) == 0xf0000000)
371 #define IPV4_CLASS_DE(a) ((((uint32_t)(a)) & 0xe0000000) == 0xe0000000)
372 #define IPV4_MC_LINKLOCAL(a) ((((uint32_t)(a)) & 0xffffff00) == 0xe0000000)
374 /* Max bit/byte length of IPv6 address. */
375 #define IPV6_MAX_BYTELEN 16
376 #define IPV6_MAX_BITLEN 128
377 #define IPV6_ADDR_CMP(D,S) memcmp ((D), (S), IPV6_MAX_BYTELEN)
378 #define IPV6_ADDR_SAME(D,S) (memcmp ((D), (S), IPV6_MAX_BYTELEN) == 0)
379 #define IPV6_ADDR_COPY(D,S) memcpy ((D), (S), IPV6_MAX_BYTELEN)
381 /* Count prefix size from mask length */
382 #define PSIZE(a) (((a) + 7) / (8))
384 #define BSIZE(a) ((a) * (8))
386 /* Prefix's family member. */
387 #define PREFIX_FAMILY(p) ((p)->family)
389 /* glibc defines s6_addr32 to __in6_u.__u6_addr32 if __USE_{MISC || GNU} */
391 #define s6_addr32 __u6_addr.__u6_addr32
395 extern int str2family(const char *);
396 extern int afi2family(afi_t
);
397 extern afi_t
family2afi(int);
398 extern const char *family2str(int family
);
399 extern const char *safi2str(safi_t safi
);
400 extern const char *afi2str(afi_t afi
);
402 static inline afi_t
prefix_afi(union prefixconstptr pu
)
404 return family2afi(pu
.p
->family
);
408 * Check bit of the prefix.
414 * which bit to fetch from byte buffer, 0 indexed.
416 extern unsigned int prefix_bit(const uint8_t *prefix
, const uint16_t bit_index
);
418 extern struct prefix
*prefix_new(void);
419 extern void prefix_free(struct prefix
**p
);
421 * Function to handle prefix_free being used as a del function.
423 extern void prefix_free_lists(void *arg
);
424 extern const char *prefix_family_str(union prefixconstptr pu
);
425 extern int prefix_blen(union prefixconstptr pu
);
426 extern int str2prefix(const char *, struct prefix
*);
428 #define PREFIX2STR_BUFFER PREFIX_STRLEN
430 extern void prefix_mcast_inet4_dump(const char *onfail
, struct in_addr addr
,
431 char *buf
, int buf_size
);
432 extern const char *prefix_sg2str(const struct prefix_sg
*sg
, char *str
);
433 extern const char *prefix2str(union prefixconstptr
, char *, int);
434 extern int evpn_type5_prefix_match(const struct prefix
*evpn_pfx
,
435 const struct prefix
*match_pfx
);
436 extern int prefix_match(union prefixconstptr unet
, union prefixconstptr upfx
);
437 extern int prefix_match_network_statement(union prefixconstptr unet
,
438 union prefixconstptr upfx
);
439 extern int prefix_same(union prefixconstptr ua
, union prefixconstptr ub
);
440 extern int prefix_cmp(union prefixconstptr ua
, union prefixconstptr ub
);
441 extern int prefix_common_bits(union prefixconstptr ua
, union prefixconstptr ub
);
442 extern void prefix_copy(union prefixptr udst
, union prefixconstptr usrc
);
443 extern void apply_mask(union prefixptr pu
);
445 #ifdef __clang_analyzer__
446 /* clang-SA doesn't understand transparent unions, making it think that the
447 * target of prefix_copy is uninitialized. So just memset the target.
448 * cf. https://bugs.llvm.org/show_bug.cgi?id=42811
450 #define prefix_copy(a, b) ({ memset(a, 0, sizeof(*a)); prefix_copy(a, b); })
453 extern struct prefix
*sockunion2hostprefix(const union sockunion
*,
455 extern void prefix2sockunion(const struct prefix
*, union sockunion
*);
457 extern int str2prefix_eth(const char *, struct prefix_eth
*);
459 extern struct prefix_ipv4
*prefix_ipv4_new(void);
460 extern void prefix_ipv4_free(struct prefix_ipv4
**p
);
461 extern int str2prefix_ipv4(const char *, struct prefix_ipv4
*);
462 extern void apply_mask_ipv4(struct prefix_ipv4
*);
464 extern int prefix_ipv4_any(const struct prefix_ipv4
*);
465 extern void apply_classful_mask_ipv4(struct prefix_ipv4
*);
467 extern uint8_t ip_masklen(struct in_addr
);
468 extern void masklen2ip(const int, struct in_addr
*);
469 /* given the address of a host on a network and the network mask length,
470 * calculate the broadcast address for that network;
471 * special treatment for /31 according to RFC3021 section 3.3 */
472 extern in_addr_t
ipv4_broadcast_addr(in_addr_t hostaddr
, int masklen
);
474 extern int netmask_str2prefix_str(const char *, const char *, char *, size_t);
476 extern struct prefix_ipv6
*prefix_ipv6_new(void);
477 extern void prefix_ipv6_free(struct prefix_ipv6
**p
);
478 extern int str2prefix_ipv6(const char *, struct prefix_ipv6
*);
479 extern void apply_mask_ipv6(struct prefix_ipv6
*);
481 extern int ip6_masklen(struct in6_addr
);
482 extern void masklen2ip6(const int, struct in6_addr
*);
484 extern int is_zero_mac(const struct ethaddr
*mac
);
485 extern bool is_mcast_mac(const struct ethaddr
*mac
);
486 extern bool is_bcast_mac(const struct ethaddr
*mac
);
487 extern int prefix_str2mac(const char *str
, struct ethaddr
*mac
);
488 extern char *prefix_mac2str(const struct ethaddr
*mac
, char *buf
, int size
);
490 extern unsigned prefix_hash_key(const void *pp
);
492 extern int str_to_esi(const char *str
, esi_t
*esi
);
493 extern char *esi_to_str(const esi_t
*esi
, char *buf
, int size
);
494 extern char *evpn_es_df_alg2str(uint8_t df_alg
, char *buf
, int buf_len
);
495 extern void prefix_evpn_hexdump(const struct prefix_evpn
*p
);
496 extern bool ipv4_unicast_valid(const struct in_addr
*addr
);
497 extern int evpn_prefix2prefix(const struct prefix
*evpn
, struct prefix
*to
);
499 static inline int ipv6_martian(const struct in6_addr
*addr
)
501 struct in6_addr localhost_addr
;
503 inet_pton(AF_INET6
, "::1", &localhost_addr
);
505 if (IPV6_ADDR_SAME(&localhost_addr
, addr
))
511 extern int macstr2prefix_evpn(const char *str
, struct prefix_evpn
*p
);
513 /* NOTE: This routine expects the address argument in network byte order. */
514 static inline bool ipv4_martian(const struct in_addr
*addr
)
516 in_addr_t ip
= ntohl(addr
->s_addr
);
518 if (IPV4_NET0(ip
) || IPV4_NET127(ip
) || !ipv4_unicast_valid(addr
)) {
524 static inline bool is_default_prefix4(const struct prefix_ipv4
*p
)
526 return p
&& p
->family
== AF_INET
&& p
->prefixlen
== 0
527 && p
->prefix
.s_addr
== INADDR_ANY
;
530 static inline bool is_default_prefix6(const struct prefix_ipv6
*p
)
532 return p
&& p
->family
== AF_INET6
&& p
->prefixlen
== 0
533 && memcmp(&p
->prefix
, &in6addr_any
, sizeof(struct in6_addr
))
537 static inline bool is_default_prefix(const struct prefix
*p
)
544 return is_default_prefix4((const struct prefix_ipv4
*)p
);
546 return is_default_prefix6((const struct prefix_ipv6
*)p
);
552 static inline int is_host_route(const struct prefix
*p
)
554 if (p
->family
== AF_INET
)
555 return (p
->prefixlen
== IPV4_MAX_BITLEN
);
556 else if (p
->family
== AF_INET6
)
557 return (p
->prefixlen
== IPV6_MAX_BITLEN
);
561 static inline int is_default_host_route(const struct prefix
*p
)
563 if (p
->family
== AF_INET
) {
564 return (p
->u
.prefix4
.s_addr
== INADDR_ANY
&&
565 p
->prefixlen
== IPV4_MAX_BITLEN
);
566 } else if (p
->family
== AF_INET6
) {
567 return ((!memcmp(&p
->u
.prefix6
, &in6addr_any
,
568 sizeof(struct in6_addr
))) &&
569 p
->prefixlen
== IPV6_MAX_BITLEN
);
574 static inline bool is_ipv6_global_unicast(const struct in6_addr
*p
)
576 if (IN6_IS_ADDR_UNSPECIFIED(p
) || IN6_IS_ADDR_LOOPBACK(p
) ||
577 IN6_IS_ADDR_LINKLOCAL(p
) || IN6_IS_ADDR_MULTICAST(p
))
583 /* IPv6 scope values, usable for IPv4 too (cf. below) */
584 /* clang-format off */
587 MCAST_SCOPE_IFACE
= 0x1,
588 MCAST_SCOPE_LINK
= 0x2,
589 MCAST_SCOPE_REALM
= 0x3,
590 MCAST_SCOPE_ADMIN
= 0x4,
591 MCAST_SCOPE_SITE
= 0x5,
592 /* 6-7: unassigned */
593 MCAST_SCOPE_ORG
= 0x8,
594 /* 9-d: unassigned */
595 MCAST_SCOPE_GLOBAL
= 0xe,
598 /* clang-format on */
600 static inline uint8_t ipv6_mcast_scope(const struct in6_addr
*addr
)
602 return addr
->s6_addr
[1] & 0xf;
605 static inline bool ipv6_mcast_nofwd(const struct in6_addr
*addr
)
607 return (addr
->s6_addr
[1] & 0xf) <= MCAST_SCOPE_LINK
;
610 static inline bool ipv6_mcast_ssm(const struct in6_addr
*addr
)
612 uint32_t bits
= ntohl(addr
->s6_addr32
[0]);
615 return (bits
& 0xfff0ffff) == 0xff300000;
618 static inline uint8_t ipv4_mcast_scope(const struct in_addr
*addr
)
620 uint32_t bits
= ntohl(addr
->s_addr
);
622 /* 224.0.0.0/24 - link scope */
623 if ((bits
& 0xffffff00) == 0xe0000000)
624 return MCAST_SCOPE_LINK
;
625 /* 239.0.0.0/8 - org scope */
626 if ((bits
& 0xff000000) == 0xef000000)
627 return MCAST_SCOPE_ORG
;
629 return MCAST_SCOPE_GLOBAL
;
632 static inline bool ipv4_mcast_nofwd(const struct in_addr
*addr
)
634 uint32_t bits
= ntohl(addr
->s_addr
);
637 return (bits
& 0xffffff00) == 0xe0000000;
640 static inline bool ipv4_mcast_ssm(const struct in_addr
*addr
)
642 uint32_t bits
= ntohl(addr
->s_addr
);
645 return (bits
& 0xff000000) == 0xe8000000;
648 #ifdef _FRR_ATTRIBUTE_PRINTFRR
649 #pragma FRR printfrr_ext "%pEA" (struct ethaddr *)
651 #pragma FRR printfrr_ext "%pI4" (struct in_addr *)
652 #pragma FRR printfrr_ext "%pI4" (in_addr_t *)
654 #pragma FRR printfrr_ext "%pI6" (struct in6_addr *)
656 #pragma FRR printfrr_ext "%pFX" (struct prefix *)
657 #pragma FRR printfrr_ext "%pFX" (struct prefix_ipv4 *)
658 #pragma FRR printfrr_ext "%pFX" (struct prefix_ipv6 *)
659 #pragma FRR printfrr_ext "%pFX" (struct prefix_eth *)
660 #pragma FRR printfrr_ext "%pFX" (struct prefix_evpn *)
661 #pragma FRR printfrr_ext "%pFX" (struct prefix_fs *)
662 #pragma FRR printfrr_ext "%pRD" (struct prefix_rd *)
664 #pragma FRR printfrr_ext "%pPSG4" (struct prefix_sg *)
671 #endif /* _ZEBRA_PREFIX_H */