]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_community_alias.h
Merge pull request #8956 from pguibert6WIND/bgp_loop_through_itself
[mirror_frr.git] / bgpd / bgp_community_alias.h
1 /* BGP community, large-community aliasing.
2 *
3 * Copyright (C) 2021 Donatas Abraitis <donatas.abraitis@gmail.com>
4 *
5 * This file is part of FRRouting (FRR).
6 *
7 * FRR is free software; you can redistribute it and/or modify it under the
8 * terms of the GNU General Public License as published by the Free Software
9 * Foundation; either version 2, or (at your option) any later version.
10 *
11 * FRR is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 * details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #include "bgpd/bgp_lcommunity.h"
22
23 #ifndef FRR_BGP_COMMUNITY_ALIAS_H
24 #define FRR_BGP_COMMUNITY_ALIAS_H
25
26 struct community_alias {
27 /* Human readable community string */
28 char community[LCOMMUNITY_SIZE * 3];
29
30 /* Human readable community alias */
31 char alias[BUFSIZ];
32 };
33
34 extern void bgp_community_alias_init(void);
35 extern void bgp_community_alias_finish(void);
36 extern struct community_alias *bgp_ca_alias_lookup(struct community_alias *ca);
37 extern struct community_alias *
38 bgp_ca_community_lookup(struct community_alias *ca);
39 extern void bgp_ca_community_insert(struct community_alias *ca);
40 extern void bgp_ca_alias_insert(struct community_alias *ca);
41 extern void bgp_ca_community_delete(struct community_alias *ca);
42 extern void bgp_ca_alias_delete(struct community_alias *ca);
43 extern int bgp_community_alias_write(struct vty *vty);
44 extern const char *bgp_community2alias(char *community);
45 extern void bgp_community_alias_command_completion_setup(void);
46
47 #endif /* FRR_BGP_COMMUNITY_ALIAS_H */