]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_conditional_adv.h
Merge pull request #12317 from mobash-rasool/ospf-fixes
[mirror_frr.git] / bgpd / bgp_conditional_adv.h
1 /*
2 * BGP Conditional advertisement
3 * Copyright (C) 2020 Samsung R&D Institute India - Bangalore.
4 * Madhurilatha Kuruganti
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more 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 #ifndef _FRR_BGP_CONDITION_ADV_H
22 #define _FRR_BGP_CONDITION_ADV_H
23 #include <zebra.h>
24 #include "prefix.h"
25 #include "bgpd/bgp_addpath.h"
26 #include "bgpd/bgp_attr.h"
27 #include "bgpd/bgpd.h"
28 #include "bgpd/bgp_debug.h"
29 #include "bgpd/bgp_route.h"
30 #include "bgpd/bgp_updgrp.h"
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /* Macro to log debug message */
37 #define bgp_cond_adv_debug(...) \
38 do { \
39 if (BGP_DEBUG(cond_adv, COND_ADV)) \
40 zlog_debug("" __VA_ARGS__); \
41 } while (0)
42
43 /* Polling time for monitoring condition-map routes in route table */
44 #define DEFAULT_CONDITIONAL_ROUTES_POLL_TIME 60
45
46 extern void bgp_conditional_adv_enable(struct peer *peer, afi_t afi,
47 safi_t safi);
48 extern void bgp_conditional_adv_disable(struct peer *peer, afi_t afi,
49 safi_t safi);
50 extern int peer_advertise_map_set(struct peer *peer, afi_t afi, safi_t safi,
51 const char *advertise_name,
52 struct route_map *advertise_map,
53 const char *condition_name,
54 struct route_map *condition_map,
55 bool condition);
56 extern int peer_advertise_map_unset(struct peer *peer, afi_t afi, safi_t safi,
57 const char *advertise_name,
58 struct route_map *advertise_map,
59 const char *condition_name,
60 struct route_map *condition_map,
61 bool condition);
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif /* _FRR_BGP_CONDITION_ADV_H */