]> git.proxmox.com Git - mirror_frr.git/blame - bgpd/bgp_conditional_adv.h
bgpd: Refactor subgroup_announce_table() to reuse an existing helpers
[mirror_frr.git] / bgpd / bgp_conditional_adv.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
7f7940e6
MK
2/*
3 * BGP Conditional advertisement
1a0416bd 4 * Copyright (C) 2020 Samsung R&D Institute India - Bangalore.
7f7940e6 5 * Madhurilatha Kuruganti
7f7940e6
MK
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
20extern "C" {
21#endif
22
8093d799
MK
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
7f7940e6 30/* Polling time for monitoring condition-map routes in route table */
389e4f92 31#define DEFAULT_CONDITIONAL_ROUTES_POLL_TIME 60
7f7940e6 32
7f7940e6
MK
33extern void bgp_conditional_adv_enable(struct peer *peer, afi_t afi,
34 safi_t safi);
35extern void bgp_conditional_adv_disable(struct peer *peer, afi_t afi,
36 safi_t safi);
e85e4a8d
MK
37extern 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);
43extern 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);
7f7940e6
MK
49#ifdef __cplusplus
50}
51#endif
52
53#endif /* _FRR_BGP_CONDITION_ADV_H */