]>
git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_rd.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* BGP RD definitions for BGP-based VPNs (IP/EVPN)
3 * -- brought over from bgpd/bgp_mplsvpn.h
4 * Copyright (C) 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
7 #ifndef _QUAGGA_BGP_RD_H
8 #define _QUAGGA_BGP_RD_H
16 #define RD_TYPE_VNC_ETH 0xff00 /* VNC L2VPN */
19 #define RD_ADDRSTRLEN 28
38 struct ethaddr macaddr
;
42 extern uint16_t decode_rd_type(const uint8_t *pnt
);
43 extern void encode_rd_type(uint16_t, uint8_t *);
45 extern void decode_rd_as(const uint8_t *pnt
, struct rd_as
*rd_as
);
46 extern void decode_rd_as4(const uint8_t *pnt
, struct rd_as
*rd_as
);
47 extern void decode_rd_ip(const uint8_t *pnt
, struct rd_ip
*rd_ip
);
49 extern void decode_rd_vnc_eth(const uint8_t *pnt
,
50 struct rd_vnc_eth
*rd_vnc_eth
);
53 extern int str2prefix_rd(const char *, struct prefix_rd
*);
54 extern char *prefix_rd2str(const struct prefix_rd
*, char *, size_t);
55 extern void form_auto_rd(struct in_addr router_id
, uint16_t rd_id
,
56 struct prefix_rd
*prd
);
58 #endif /* _QUAGGA_BGP_RD_H */