]>
git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_rd.h
1 /* BGP RD definitions for BGP-based VPNs (IP/EVPN)
2 * -- brought over from bgpd/bgp_mplsvpn.h
3 * Copyright (C) 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
5 * This file is part of FRR.
7 * FRR 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 * FRR 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
18 * along with FRR; see the file COPYING. If not, write to the Free
19 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23 #ifndef _QUAGGA_BGP_RD_H
24 #define _QUAGGA_BGP_RD_H
32 #define RD_TYPE_VNC_ETH 0xff00 /* VNC L2VPN */
35 #define RD_ADDRSTRLEN 28
53 struct ethaddr macaddr
;
57 extern uint16_t decode_rd_type(const uint8_t *pnt
);
58 extern void encode_rd_type(uint16_t, uint8_t *);
60 extern void decode_rd_as(const uint8_t *pnt
, struct rd_as
*rd_as
);
61 extern void decode_rd_as4(const uint8_t *pnt
, struct rd_as
*rd_as
);
62 extern void decode_rd_ip(const uint8_t *pnt
, struct rd_ip
*rd_ip
);
64 extern void decode_rd_vnc_eth(const uint8_t *pnt
,
65 struct rd_vnc_eth
*rd_vnc_eth
);
68 extern int str2prefix_rd(const char *, struct prefix_rd
*);
69 extern char *prefix_rd2str(const struct prefix_rd
*, char *, size_t);
70 extern void form_auto_rd(struct in_addr router_id
, uint16_t rd_id
,
71 struct prefix_rd
*prd
);
73 #endif /* _QUAGGA_BGP_RD_H */