DEFINE_QOBJ_TYPE(bgp_master)
DEFINE_QOBJ_TYPE(bgp)
DEFINE_QOBJ_TYPE(peer)
+DEFINE_HOOK(bgp_inst_delete, (struct bgp *bgp), (bgp))
+DEFINE_HOOK(bgp_inst_config_write,
+ (struct bgp *bgp, struct vty *vty),
+ (bgp, vty))
/* BGP process wide configuration. */
static struct bgp_master bgp_master;
int i;
assert(bgp);
+
+ hook_call(bgp_inst_delete, bgp);
+
THREAD_OFF(bgp->t_startup);
THREAD_OFF(bgp->t_maxmed_onstartup);
THREAD_OFF(bgp->t_update_delay);
/* EVPN configuration. */
bgp_config_write_family(vty, bgp, AFI_L2VPN, SAFI_EVPN);
+ hook_call(bgp_inst_config_write, bgp, vty);
+
#if ENABLE_BGP_VNC
bgp_rfapi_cfg_write(vty, bgp);
#endif
#include "qobj.h"
#include <pthread.h>
+#include "hook.h"
#include "frr_pthread.h"
#include "lib/json.h"
#include "vrf.h"
};
DECLARE_QOBJ_TYPE(bgp)
+DECLARE_HOOK(bgp_inst_delete, (struct bgp *bgp), (bgp))
+DECLARE_HOOK(bgp_inst_config_write,
+ (struct bgp *bgp, struct vty *vty),
+ (bgp, vty))
+
#define BGP_ROUTE_ADV_HOLD(bgp) (bgp->main_peers_update_hold)
#define IS_BGP_INST_KNOWN_TO_ZEBRA(bgp) \