]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_conditional_adv.h
*: auto-convert to SPDX License IDs
[mirror_frr.git] / bgpd / bgp_conditional_adv.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * BGP Conditional advertisement
4 * Copyright (C) 2020 Samsung R&D Institute India - Bangalore.
5 * Madhurilatha Kuruganti
6 */
7
8 #ifndef _FRR_BGP_CONDITION_ADV_H
9 #define _FRR_BGP_CONDITION_ADV_H
10 #include <zebra.h>
11 #include "prefix.h"
12 #include "bgpd/bgp_addpath.h"
13 #include "bgpd/bgp_attr.h"
14 #include "bgpd/bgpd.h"
15 #include "bgpd/bgp_debug.h"
16 #include "bgpd/bgp_route.h"
17 #include "bgpd/bgp_updgrp.h"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 /* Macro to log debug message */
24 #define bgp_cond_adv_debug(...) \
25 do { \
26 if (BGP_DEBUG(cond_adv, COND_ADV)) \
27 zlog_debug("" __VA_ARGS__); \
28 } while (0)
29
30 /* Polling time for monitoring condition-map routes in route table */
31 #define DEFAULT_CONDITIONAL_ROUTES_POLL_TIME 60
32
33 extern void bgp_conditional_adv_enable(struct peer *peer, afi_t afi,
34 safi_t safi);
35 extern void bgp_conditional_adv_disable(struct peer *peer, afi_t afi,
36 safi_t safi);
37 extern int peer_advertise_map_set(struct peer *peer, afi_t afi, safi_t safi,
38 const char *advertise_name,
39 struct route_map *advertise_map,
40 const char *condition_name,
41 struct route_map *condition_map,
42 bool condition);
43 extern int peer_advertise_map_unset(struct peer *peer, afi_t afi, safi_t safi,
44 const char *advertise_name,
45 struct route_map *advertise_map,
46 const char *condition_name,
47 struct route_map *condition_map,
48 bool condition);
49 #ifdef __cplusplus
50 }
51 #endif
52
53 #endif /* _FRR_BGP_CONDITION_ADV_H */