]>
git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_bfd.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * bgp_bfd.h: BGP BFD definitions and structures
5 * @copyright Copyright (C) 2015 Cumulus Networks, Inc.
8 #ifndef _QUAGGA_BGP_BFD_H
9 #define _QUAGGA_BGP_BFD_H
11 #define PEER_IS_MULTIHOP(peer) \
12 ((((peer)->sort == BGP_PEER_IBGP) && !(peer)->shared_network) \
13 || is_ebgp_multihop_configured((peer)))
15 extern void bgp_bfd_init(struct event_loop
*tm
);
17 extern void bgp_bfd_peer_config_write(struct vty
*vty
, const struct peer
*peer
,
21 * Show BFD information helper.
23 * \param vty the VTY pointer.
24 * \param peer the BGP configuration pointer.
25 * \param use_json unused.
26 * \param json_neigh JSON object when called as JSON command.
28 extern void bgp_bfd_show_info(struct vty
*vty
, const struct peer
*peer
,
29 json_object
*json_neigh
);
32 * When called on a group it applies configuration to all peers in that group,
33 * otherwise just applies the configuration to a single peer.
35 * This function should be called when configuration changes either on group
38 * \param p the BGP peer pointer.
39 * \param pg the BGP group to copy configuration from (it is usually
40 * `p->group` exception when copying new group configuration
41 * see `peer_group2peer_config_copy` function case).
43 extern void bgp_peer_config_apply(struct peer
*p
, struct peer_group
*pg
);
46 * Allocates and configure BFD session for peer. If it is already configured,
47 * then it does nothing.
49 * Always call `bgp_peer_config_apply` afterwards if you need the changes
50 * immediately applied.
52 extern void bgp_peer_configure_bfd(struct peer
*p
, bool manual
);
55 * Removes BFD configuration from either peer or peer group.
57 extern void bgp_peer_remove_bfd_config(struct peer
*p
);
60 * Special function to handle the case of changing source address. This
61 * happens when the peer/group is configured with `neigbor X update-source Y`.
63 extern void bgp_peer_bfd_update_source(struct peer
*p
);
65 #endif /* _QUAGGA_BGP_BFD_H */