]>
git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_bfd.h
2 * bgp_bfd.h: BGP BFD definitions and structures
4 * @copyright Copyright (C) 2015 Cumulus Networks, Inc.
6 * This file is part of GNU Zebra.
8 * GNU Zebra is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2, or (at your option) any
13 * GNU Zebra is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; see the file COPYING; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #ifndef _QUAGGA_BGP_BFD_H
24 #define _QUAGGA_BGP_BFD_H
26 #define PEER_IS_MULTIHOP(peer) \
27 ((((peer)->sort == BGP_PEER_IBGP) && !(peer)->shared_network) \
28 || is_ebgp_multihop_configured((peer)))
30 extern void bgp_bfd_init(struct thread_master
*tm
);
32 extern void bgp_bfd_peer_config_write(struct vty
*vty
, const struct peer
*peer
,
36 * Show BFD information helper.
38 * \param vty the VTY pointer.
39 * \param peer the BGP configuration pointer.
40 * \param use_json unused.
41 * \param json_neigh JSON object when called as JSON command.
43 extern void bgp_bfd_show_info(struct vty
*vty
, const struct peer
*peer
,
44 json_object
*json_neigh
);
47 * When called on a group it applies configuration to all peers in that group,
48 * otherwise just applies the configuration to a single peer.
50 * This function should be called when configuration changes either on group
53 * \param p the BGP peer pointer.
54 * \param pg the BGP group to copy configuration from (it is usually
55 * `p->group` exception when copying new group configuration
56 * see `peer_group2peer_config_copy` function case).
58 extern void bgp_peer_config_apply(struct peer
*p
, struct peer_group
*pg
);
61 * Allocates and configure BFD session for peer. If it is already configured,
62 * then it does nothing.
64 * Always call `bgp_peer_config_apply` afterwards if you need the changes
65 * immediately applied.
67 extern void bgp_peer_configure_bfd(struct peer
*p
, bool manual
);
70 * Removes BFD configuration from either peer or peer group.
72 extern void bgp_peer_remove_bfd_config(struct peer
*p
);
75 * Special function to handle the case of changing source address. This
76 * happens when the peer/group is configured with `neigbor X update-source Y`.
78 extern void bgp_peer_bfd_update_source(struct peer
*p
);
80 #endif /* _QUAGGA_BGP_BFD_H */