See previous commit.
Signed-off-by: David Lamparter <equinox@diac24.net>
#include "bgpd/bgp_zebra.h"
#include "bgpd/bgp_vty.h"
-DEFINE_HOOK(peer_backward_transition, (struct peer * peer), (peer))
-DEFINE_HOOK(peer_status_changed, (struct peer * peer), (peer))
+DEFINE_HOOK(peer_backward_transition, (struct peer * peer), (peer));
+DEFINE_HOOK(peer_status_changed, (struct peer * peer), (peer));
/* Definition of display strings corresponding to FSM events. This should be
* kept consistent with the events defined in bgpd.h
extern void bgp_adjust_routeadv(struct peer *);
#include "hook.h"
-DECLARE_HOOK(peer_backward_transition, (struct peer *peer), (peer))
-DECLARE_HOOK(peer_established, (struct peer *peer), (peer))
+DECLARE_HOOK(peer_backward_transition, (struct peer *peer), (peer));
+DECLARE_HOOK(peer_established, (struct peer *peer), (peer));
int bgp_gr_update_all(struct bgp *bgp, int global_gr_cmd);
int bgp_neighbor_graceful_restart(struct peer *peer, int peer_gr_cmd);
#include "bgpd/bgp_io.h"
#include "bgpd/bgp_damp.h"
-DEFINE_HOOK(bgp_snmp_init_stats, (struct bgp *bgp), (bgp))
+DEFINE_HOOK(bgp_snmp_init_stats, (struct bgp *bgp), (bgp));
FRR_CFG_DEFAULT_ULONG(BGP_CONNECT_RETRY,
{ .val_ulong = 10, .match_profile = "datacenter", },
DEFINE_HOOK(bgp_packet_dump,
(struct peer *peer, uint8_t type, bgp_size_t size,
struct stream *s),
- (peer, type, size, s))
+ (peer, type, size, s));
DEFINE_HOOK(bgp_packet_send,
(struct peer *peer, uint8_t type, bgp_size_t size,
struct stream *s),
- (peer, type, size, s))
+ (peer, type, size, s));
/**
* Sets marker and type fields for a BGP message.
DECLARE_HOOK(bgp_packet_dump,
(struct peer *peer, uint8_t type, bgp_size_t size,
struct stream *s),
- (peer, type, size, s))
+ (peer, type, size, s));
DECLARE_HOOK(bgp_packet_send,
(struct peer *peer, uint8_t type, bgp_size_t size,
struct stream *s),
- (peer, type, size, s))
+ (peer, type, size, s));
#define BGP_NLRI_LENGTH 1U
#define BGP_TOTAL_ATTR_LEN 2U
DEFINE_HOOK(bgp_snmp_update_stats,
(struct bgp_node *rn, struct bgp_path_info *pi, bool added),
- (rn, pi, added))
+ (rn, pi, added));
DEFINE_HOOK(bgp_rpki_prefix_status,
(struct peer *peer, struct attr *attr,
const struct prefix *prefix),
- (peer, attr, prefix))
+ (peer, attr, prefix));
/* Extern from bgp_dump.c */
extern const char *bgp_origin_str[];
DEFINE_HOOK(bgp_process,
(struct bgp * bgp, afi_t afi, safi_t safi, struct bgp_dest *bn,
struct peer *peer, bool withdraw),
- (bgp, afi, safi, bn, peer, withdraw))
+ (bgp, afi, safi, bn, peer, withdraw));
/** Test if path is suppressed. */
static bool bgp_path_suppressed(struct bgp_path_info *pi)
DECLARE_HOOK(bgp_process,
(struct bgp * bgp, afi_t afi, safi_t safi, struct bgp_dest *bn,
struct peer *peer, bool withdraw),
- (bgp, afi, safi, bn, peer, withdraw))
+ (bgp, afi, safi, bn, peer, withdraw));
/* BGP show options */
#define BGP_SHOW_OPT_JSON (1 << 0)
DEFINE_HOOK(bgp_inst_config_write,
(struct bgp *bgp, struct vty *vty),
- (bgp, vty))
-DEFINE_HOOK(bgp_snmp_update_last_changed, (struct bgp *bgp), (bgp))
+ (bgp, vty));
+DEFINE_HOOK(bgp_snmp_update_last_changed, (struct bgp *bgp), (bgp));
#define GR_NO_OPER \
"The Graceful Restart No Operation was executed as cmd same as previous one."
/* hook to indicate vrf status change for SNMP */
DEFINE_HOOK(bgp_vrf_status_changed, (struct bgp *bgp, struct interface *ifp),
- (bgp, ifp))
+ (bgp, ifp));
/* Can we install into zebra? */
static inline bool bgp_install_info_to_zebra(struct bgp *bgp)
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_delete, (struct bgp *bgp), (bgp));
/* BGP process wide configuration. */
static struct bgp_master bgp_master;
};
DECLARE_QOBJ_TYPE(bgp)
-DECLARE_HOOK(bgp_inst_delete, (struct bgp *bgp), (bgp))
+DECLARE_HOOK(bgp_inst_delete, (struct bgp *bgp), (bgp));
DECLARE_HOOK(bgp_inst_config_write,
(struct bgp *bgp, struct vty *vty),
- (bgp, vty))
+ (bgp, vty));
/* Thread callback information */
struct afi_safi_info {
/* Hooks */
DECLARE_HOOK(bgp_vrf_status_changed, (struct bgp *bgp, struct interface *ifp),
- (bgp, ifp))
-DECLARE_HOOK(peer_status_changed, (struct peer *peer), (peer))
-DECLARE_HOOK(bgp_snmp_init_stats, (struct bgp *bgp), (bgp))
-DECLARE_HOOK(bgp_snmp_update_last_changed, (struct bgp *bgp), (bgp))
+ (bgp, ifp));
+DECLARE_HOOK(peer_status_changed, (struct peer *peer), (peer));
+DECLARE_HOOK(bgp_snmp_init_stats, (struct bgp *bgp), (bgp));
+DECLARE_HOOK(bgp_snmp_update_last_changed, (struct bgp *bgp), (bgp));
DECLARE_HOOK(bgp_snmp_update_stats,
(struct bgp_node *rn, struct bgp_path_info *pi, bool added),
- (rn, pi, added))
+ (rn, pi, added));
DECLARE_HOOK(bgp_rpki_prefix_status,
(struct peer * peer, struct attr *attr,
const struct prefix *prefix),
- (peer, attr, prefix))
+ (peer, attr, prefix));
void peer_nsf_stop(struct peer *peer);
:caption: mydaemon.h
#include "hook.h"
- DECLARE_HOOK(some_update_event, (struct eventinfo *info), (info))
+ DECLARE_HOOK(some_update_event, (struct eventinfo *info), (info));
.. code-block:: c
:caption: mydaemon.c
#include "mydaemon.h"
- DEFINE_HOOK(some_update_event, (struct eventinfo *info), (info))
+ DEFINE_HOOK(some_update_event, (struct eventinfo *info), (info));
...
hook_call(some_update_event, info);
.. code-block:: c
- DECLARE_HOOK(foo, (), ())
- DECLARE_HOOK(bar, (int arg), (arg))
- DECLARE_HOOK(baz, (const void *x, in_addr_t y), (x, y))
+ DECLARE_HOOK(foo, (), ());
+ DECLARE_HOOK(bar, (int arg), (arg));
+ DECLARE_HOOK(baz, (const void *x, in_addr_t y), (x, y));
.. c:macro:: DEFINE_HOOK(name, arglist, passlist)
return NULL;
}
-DEFINE_HOOK(isis_adj_state_change_hook, (struct isis_adjacency *adj), (adj))
+DEFINE_HOOK(isis_adj_state_change_hook, (struct isis_adjacency *adj), (adj));
void isis_delete_adj(void *arg)
{
void isis_adj_process_threeway(struct isis_adjacency *adj,
struct isis_threeway_adj *tw_adj,
enum isis_adj_usage adj_usage);
-DECLARE_HOOK(isis_adj_state_change_hook, (struct isis_adjacency *adj), (adj))
+DECLARE_HOOK(isis_adj_state_change_hook, (struct isis_adjacency *adj), (adj));
DECLARE_HOOK(isis_adj_ip_enabled_hook,
- (struct isis_adjacency *adj, int family), (adj, family))
+ (struct isis_adjacency *adj, int family), (adj, family));
DECLARE_HOOK(isis_adj_ip_disabled_hook,
- (struct isis_adjacency *adj, int family), (adj, family))
+ (struct isis_adjacency *adj, int family), (adj, family));
void isis_log_adj_change(struct isis_adjacency *adj,
enum isis_adj_state old_state,
enum isis_adj_state new_state, const char *reason);
DEFINE_QOBJ_TYPE(isis_circuit)
-DEFINE_HOOK(isis_if_new_hook, (struct interface *ifp), (ifp))
+DEFINE_HOOK(isis_if_new_hook, (struct interface *ifp), (ifp));
/*
* Prototypes.
}
DEFINE_HOOK(isis_circuit_add_addr_hook, (struct isis_circuit *circuit),
- (circuit))
+ (circuit));
void isis_circuit_add_addr(struct isis_circuit *circuit,
struct connected *connected)
#ifdef FABRICD
DEFINE_HOOK(isis_circuit_config_write,
(struct isis_circuit *circuit, struct vty *vty),
- (circuit, vty))
+ (circuit, vty));
static int isis_interface_config_write(struct vty *vty)
{
#ifdef FABRICD
DECLARE_HOOK(isis_circuit_config_write,
(struct isis_circuit *circuit, struct vty *vty),
- (circuit, vty))
+ (circuit, vty));
#endif
DECLARE_HOOK(isis_circuit_add_addr_hook, (struct isis_circuit *circuit),
- (circuit))
+ (circuit));
#endif /* _ZEBRA_ISIS_CIRCUIT_H */
DEFINE_HOOK(isis_route_update_hook,
(struct isis_area * area, struct prefix *prefix,
struct isis_route_info *route_info),
- (area, prefix, route_info))
+ (area, prefix, route_info));
static struct isis_nexthop *nexthoplookup(struct list *nexthops, int family,
union g_addr *ip, ifindex_t ifindex);
DECLARE_HOOK(isis_route_update_hook,
(struct isis_area * area, struct prefix *prefix,
struct isis_route_info *route_info),
- (area, prefix, route_info))
+ (area, prefix, route_info));
void isis_nexthop_delete(struct isis_nexthop *nexthop);
void adjinfo2nexthop(int family, struct list *nexthops,
}
DEFINE_HOOK(isis_adj_ip_enabled_hook, (struct isis_adjacency *adj, int family),
- (adj, family))
+ (adj, family));
DEFINE_HOOK(isis_adj_ip_disabled_hook,
- (struct isis_adjacency *adj, int family), (adj, family))
+ (struct isis_adjacency *adj, int family), (adj, family));
static void tlvs_ipv4_addresses_to_adj(struct isis_tlvs *tlvs,
struct isis_adjacency *adj,
};
DECLARE_QOBJ_TYPE(isis_area)
-DECLARE_HOOK(isis_area_overload_bit_update, (struct isis_area * area), (area))
+DECLARE_HOOK(isis_area_overload_bit_update, (struct isis_area * area), (area));
void isis_terminate(void);
void isis_finish(struct isis *isis);
static struct frr_daemon_info ldpd_di;
-DEFINE_HOOK(ldp_register_mib, (struct thread_master * tm), (tm))
+DEFINE_HOOK(ldp_register_mib, (struct thread_master * tm), (tm));
static void ldp_load_module(const char *name)
{
(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_INTFACELOCAL))
#endif
-DECLARE_HOOK(ldp_register_mib, (struct thread_master * tm), (tm))
+DECLARE_HOOK(ldp_register_mib, (struct thread_master * tm), (tm));
extern void ldp_agentx_enabled(void);
void ldpe_l2vpn_pw_init(struct l2vpn_pw *);
void ldpe_l2vpn_pw_exit(struct l2vpn_pw *);
-DECLARE_HOOK(ldp_nbr_state_change, (struct nbr * nbr, int old_state), (nbr, old_state))
+DECLARE_HOOK(ldp_nbr_state_change, (struct nbr * nbr, int old_state),
+ (nbr, old_state));
#endif /* _LDPE_H_ */
#include "lde.h"
#include "log.h"
-DEFINE_HOOK(ldp_nbr_state_change, (struct nbr * nbr, int old_state), (nbr, old_state))
+DEFINE_HOOK(ldp_nbr_state_change, (struct nbr * nbr, int old_state),
+ (nbr, old_state));
static __inline int nbr_id_compare(const struct nbr *, const struct nbr *);
static __inline int nbr_addr_compare(const struct nbr *,
XREF_SETUP()
-DEFINE_HOOK(agentx_enabled, (), ())
+DEFINE_HOOK(agentx_enabled, (), ());
static int agentx_enabled = 0;
*
* mydaemon.h:
* #include "hook.h"
- * DECLARE_HOOK (some_update_event, (struct eventinfo *info), (info))
+ * DECLARE_HOOK (some_update_event, (struct eventinfo *info), (info));
*
* mydaemon.c:
- * DEFINE_HOOK (some_update_event, (struct eventinfo *info), (info))
+ * DEFINE_HOOK (some_update_event, (struct eventinfo *info), (info));
* ...
* hook_call (some_update_event, info)
*
#define HOOK_ADDARG(...) (hookarg , ## __VA_ARGS__)
/* use in header file - declares the hook and its arguments
- * usage: DECLARE_HOOK(my_hook, (int arg1, struct foo *arg2), (arg1, arg2))
+ * usage: DECLARE_HOOK(my_hook, (int arg1, struct foo *arg2), (arg1, arg2));
* as above, "passlist" must use the same order and same names as "arglist"
*
* theoretically passlist is not neccessary, but let's keep things simple and
int(*funcptr) HOOK_ADDDEF arglist) \
{ \
return (void *)funcptr; \
- }
+ } \
+ MACRO_REQUIRE_SEMICOLON() /* end */
+
#define DECLARE_KOOH(hookname, arglist, passlist) \
DECLARE_HOOK(hookname, arglist, passlist)
hooksum += hookp.farg HOOK_ADDARG passlist; \
} \
return hooksum; \
- }
+ } \
+ MACRO_REQUIRE_SEMICOLON() /* end */
#define DEFINE_HOOK(hookname, arglist, passlist) \
DEFINE_HOOK_INT(hookname, arglist, passlist, false)
DEFINE_QOBJ_TYPE(interface)
-DEFINE_HOOK(if_add, (struct interface * ifp), (ifp))
-DEFINE_KOOH(if_del, (struct interface * ifp), (ifp))
+DEFINE_HOOK(if_add, (struct interface * ifp), (ifp));
+DEFINE_KOOH(if_del, (struct interface * ifp), (ifp));
static struct interface_master{
int (*create_hook)(struct interface *ifp);
* can use 1000+ so they run after the daemon has initialised daemon-specific
* interface data
*/
-DECLARE_HOOK(if_add, (struct interface * ifp), (ifp))
-DECLARE_KOOH(if_del, (struct interface * ifp), (ifp))
+DECLARE_HOOK(if_add, (struct interface * ifp), (ifp));
+DECLARE_KOOH(if_del, (struct interface * ifp), (ifp));
#define METRIC_MAX (~0)
#include "defaults.h"
#include "frrscript.h"
-DEFINE_HOOK(frr_late_init, (struct thread_master * tm), (tm))
-DEFINE_HOOK(frr_very_late_init, (struct thread_master * tm), (tm))
-DEFINE_KOOH(frr_early_fini, (), ())
-DEFINE_KOOH(frr_fini, (), ())
+DEFINE_HOOK(frr_late_init, (struct thread_master * tm), (tm));
+DEFINE_HOOK(frr_very_late_init, (struct thread_master * tm), (tm));
+DEFINE_KOOH(frr_early_fini, (), ());
+DEFINE_KOOH(frr_fini, (), ());
const char frr_sysconfdir[] = SYSCONFDIR;
char frr_vtydir[256];
extern uint32_t frr_get_fd_limit(void);
extern bool frr_is_startup_fd(int fd);
-DECLARE_HOOK(frr_late_init, (struct thread_master * tm), (tm))
-DECLARE_HOOK(frr_very_late_init, (struct thread_master * tm), (tm))
+DECLARE_HOOK(frr_late_init, (struct thread_master * tm), (tm));
+DECLARE_HOOK(frr_very_late_init, (struct thread_master * tm), (tm));
extern void frr_config_fork(void);
extern void frr_run(struct thread_master *master);
/* these two are before the protocol daemon does its own shutdown
* it's named this way being the counterpart to frr_late_init */
-DECLARE_KOOH(frr_early_fini, (), ())
+DECLARE_KOOH(frr_early_fini, (), ());
extern void frr_early_fini(void);
/* and these two are after the daemon did its own cleanup */
-DECLARE_KOOH(frr_fini, (), ())
+DECLARE_KOOH(frr_fini, (), ());
extern void frr_fini(void);
extern char config_default[512];
#define ZLOG_MAXLVL(a, b) MAX(a, b)
-DEFINE_HOOK(zlog_rotate, (), ())
+DEFINE_HOOK(zlog_rotate, (), ());
static const int log_default_lvl = LOG_DEBUG;
extern int log_level_match(const char *s);
extern void log_show_syslog(struct vty *vty);
-DECLARE_HOOK(zlog_rotate, (), ())
+DECLARE_HOOK(zlog_rotate, (), ());
extern void zlog_rotate(void);
#ifdef __cplusplus
/* Hooks. */
DECLARE_HOOK(nb_notification_send, (const char *xpath, struct list *arguments),
- (xpath, arguments))
-DECLARE_HOOK(nb_client_debug_config_write, (struct vty *vty), (vty))
-DECLARE_HOOK(nb_client_debug_set_all, (uint32_t flags, bool set), (flags, set))
+ (xpath, arguments));
+DECLARE_HOOK(nb_client_debug_config_write, (struct vty *vty), (vty));
+DECLARE_HOOK(nb_client_debug_set_all, (uint32_t flags, bool set), (flags, set));
/* Northbound debugging records */
extern struct debug nb_dbg_cbs_config;
* callbacks for routing to handle configuration events
* based on the control plane protocol
*/
-DECLARE_HOOK(routing_conf_event, (struct nb_cb_create_args *args), (args))
+DECLARE_HOOK(routing_conf_event, (struct nb_cb_create_args *args), (args));
void routing_control_plane_protocols_register_vrf_dependency(void);
#include "routing_nb.h"
-DEFINE_HOOK(routing_conf_event, (struct nb_cb_create_args *args), (args))
+DEFINE_HOOK(routing_conf_event, (struct nb_cb_create_args *args), (args));
/*
* XPath: /frr-routing:routing/control-plane-protocols/control-plane-protocol
extern void oid2string(oid oid[], int len, char *string);
extern void oid_copy_str(oid oid[], const char *string, int len);
-DECLARE_HOOK(agentx_enabled, (), ())
+DECLARE_HOOK(agentx_enabled, (), ());
#ifdef __cplusplus
}
DEFINE_HOOK(zlog_init, (const char *progname, const char *protoname,
unsigned short instance, uid_t uid, gid_t gid),
- (progname, protoname, instance, uid, gid))
-DEFINE_KOOH(zlog_fini, (), ())
+ (progname, protoname, instance, uid, gid));
+DEFINE_KOOH(zlog_fini, (), ());
DEFINE_HOOK(zlog_aux_init, (const char *prefix, int prio_min),
- (prefix, prio_min))
+ (prefix, prio_min));
char zlog_prefix[128];
size_t zlog_prefixsz;
unsigned short instance, uid_t uid, gid_t gid);
DECLARE_HOOK(zlog_init, (const char *progname, const char *protoname,
unsigned short instance, uid_t uid, gid_t gid),
- (progname, protoname, instance, uid, gid))
+ (progname, protoname, instance, uid, gid));
extern void zlog_fini(void);
-DECLARE_KOOH(zlog_fini, (), ())
+DECLARE_KOOH(zlog_fini, (), ());
/* for tools & test programs, i.e. anything not a daemon.
* (no cleanup needed at exit)
*/
extern void zlog_aux_init(const char *prefix, int prio_min);
DECLARE_HOOK(zlog_aux_init, (const char *prefix, int prio_min),
- (prefix, prio_min))
+ (prefix, prio_min));
extern void zlog_startup_end(void);
DEFINE_QOBJ_TYPE(ospf6_interface)
DEFINE_HOOK(ospf6_interface_change,
(struct ospf6_interface * oi, int state, int old_state),
- (oi, state, old_state))
+ (oi, state, old_state));
unsigned char conf_debug_ospf6_interface = 0;
DECLARE_HOOK(ospf6_interface_change,
(struct ospf6_interface * oi, int state, int old_state),
- (oi, state, old_state))
+ (oi, state, old_state));
#endif /* OSPF6_INTERFACE_H */
DEFINE_HOOK(ospf6_neighbor_change,
(struct ospf6_neighbor * on, int state, int next_state),
- (on, state, next_state))
+ (on, state, next_state));
unsigned char conf_debug_ospf6_neighbor = 0;
DECLARE_HOOK(ospf6_neighbor_change,
(struct ospf6_neighbor * on, int state, int next_state),
- (on, state, next_state))
+ (on, state, next_state));
#endif /* OSPF6_NEIGHBOR_H */
#include "ospfd/ospf_ldp_sync.h"
DEFINE_QOBJ_TYPE(ospf_interface)
-DEFINE_HOOK(ospf_vl_add, (struct ospf_vl_data * vd), (vd))
-DEFINE_HOOK(ospf_vl_delete, (struct ospf_vl_data * vd), (vd))
-DEFINE_HOOK(ospf_if_update, (struct interface * ifp), (ifp))
-DEFINE_HOOK(ospf_if_delete, (struct interface * ifp), (ifp))
+DEFINE_HOOK(ospf_vl_add, (struct ospf_vl_data * vd), (vd));
+DEFINE_HOOK(ospf_vl_delete, (struct ospf_vl_data * vd), (vd));
+DEFINE_HOOK(ospf_if_update, (struct interface * ifp), (ifp));
+DEFINE_HOOK(ospf_if_delete, (struct interface * ifp), (ifp));
int ospf_interface_neighbor_count(struct ospf_interface *oi)
{
extern void ospf_if_interface(struct interface *ifp);
-DECLARE_HOOK(ospf_vl_add, (struct ospf_vl_data * vd), (vd))
-DECLARE_HOOK(ospf_vl_delete, (struct ospf_vl_data * vd), (vd))
+DECLARE_HOOK(ospf_vl_add, (struct ospf_vl_data * vd), (vd));
+DECLARE_HOOK(ospf_vl_delete, (struct ospf_vl_data * vd), (vd));
-DECLARE_HOOK(ospf_if_update, (struct interface * ifp), (ifp))
-DECLARE_HOOK(ospf_if_delete, (struct interface * ifp), (ifp))
+DECLARE_HOOK(ospf_if_update, (struct interface * ifp), (ifp));
+DECLARE_HOOK(ospf_if_delete, (struct interface * ifp), (ifp));
#endif /* _ZEBRA_OSPF_INTERFACE_H */
DEFINE_HOOK(ospf_ism_change,
(struct ospf_interface * oi, int state, int oldstate),
- (oi, state, oldstate))
+ (oi, state, oldstate));
/* elect DR and BDR. Refer to RFC2319 section 9.4 */
static struct ospf_neighbor *ospf_dr_election_sub(struct list *routers)
DECLARE_HOOK(ospf_ism_change,
(struct ospf_interface * oi, int state, int oldstate),
- (oi, state, oldstate))
+ (oi, state, oldstate));
#endif /* _ZEBRA_OSPF_ISM_H */
DEFINE_HOOK(ospf_nsm_change,
(struct ospf_neighbor * on, int state, int oldstate),
- (on, state, oldstate))
+ (on, state, oldstate));
static void nsm_clear_adj(struct ospf_neighbor *);
extern int nsm_should_adj(struct ospf_neighbor *nbr);
DECLARE_HOOK(ospf_nsm_change,
(struct ospf_neighbor * on, int state, int oldstate),
- (on, state, oldstate))
+ (on, state, oldstate));
#endif /* _ZEBRA_OSPF_NSM_H */
DEFINE_MTYPE_STATIC(PATHD, PATH_SR_CANDIDATE, "SR Policy candidate path");
DEFINE_HOOK(pathd_candidate_created, (struct srte_candidate * candidate),
- (candidate))
+ (candidate));
DEFINE_HOOK(pathd_candidate_updated, (struct srte_candidate * candidate),
- (candidate))
+ (candidate));
DEFINE_HOOK(pathd_candidate_removed, (struct srte_candidate * candidate),
- (candidate))
+ (candidate));
static void trigger_pathd_candidate_created(struct srte_candidate *candidate);
static int trigger_pathd_candidate_created_timer(struct thread *thread);
RB_PROTOTYPE(srte_policy_head, srte_policy, entry, srte_policy_compare)
DECLARE_HOOK(pathd_candidate_created, (struct srte_candidate * candidate),
- (candidate))
+ (candidate));
DECLARE_HOOK(pathd_candidate_updated, (struct srte_candidate * candidate),
- (candidate))
+ (candidate));
DECLARE_HOOK(pathd_candidate_removed, (struct srte_candidate * candidate),
- (candidate))
+ (candidate));
extern struct srte_segment_list_head srte_segment_lists;
extern struct srte_policy_head srte_policies;
DEFINE_MTYPE_STATIC(RIPD, RIP_INTERFACE, "RIP interface");
DEFINE_MTYPE(RIPD, RIP_INTERFACE_STRING, "RIP Interface String");
-DEFINE_HOOK(rip_ifaddr_add, (struct connected * ifc), (ifc))
-DEFINE_HOOK(rip_ifaddr_del, (struct connected * ifc), (ifc))
+DEFINE_HOOK(rip_ifaddr_add, (struct connected * ifc), (ifc));
+DEFINE_HOOK(rip_ifaddr_del, (struct connected * ifc), (ifc));
/* static prototypes */
static void rip_enable_apply(struct interface *);
/* Master thread strucutre. */
extern struct thread_master *master;
-DECLARE_HOOK(rip_ifaddr_add, (struct connected * ifc), (ifc))
-DECLARE_HOOK(rip_ifaddr_del, (struct connected * ifc), (ifc))
+DECLARE_HOOK(rip_ifaddr_add, (struct connected * ifc), (ifc));
+DECLARE_HOOK(rip_ifaddr_del, (struct connected * ifc), (ifc));
#endif /* _ZEBRA_RIP_H */
#define ZEBRA_PTM_SUPPORT
DEFINE_HOOK(zebra_if_extra_info, (struct vty * vty, struct interface *ifp),
- (vty, ifp))
+ (vty, ifp));
DEFINE_HOOK(zebra_if_config_wr, (struct vty * vty, struct interface *ifp),
- (vty, ifp))
+ (vty, ifp));
static void if_down_del_nbr_connected(struct interface *ifp);
};
DECLARE_HOOK(zebra_if_extra_info, (struct vty * vty, struct interface *ifp),
- (vty, ifp))
+ (vty, ifp));
DECLARE_HOOK(zebra_if_config_wr, (struct vty * vty, struct interface *ifp),
- (vty, ifp))
+ (vty, ifp));
#define IS_ZEBRA_IF_VRF(ifp) \
(((struct zebra_if *)(ifp->info))->zif_type == ZEBRA_IF_VRF)
}
DECLARE_HOOK(rib_update, (struct route_node * rn, const char *reason),
- (rn, reason))
+ (rn, reason));
/*
* Access installed/fib nexthops, which may be a subset of the
#endif
DEFINE_HOOK(zebra_mlag_private_write_data,
- (uint8_t *data, uint32_t len), (data, len))
-DEFINE_HOOK(zebra_mlag_private_monitor_state, (), ())
-DEFINE_HOOK(zebra_mlag_private_open_channel, (), ())
-DEFINE_HOOK(zebra_mlag_private_close_channel, (), ())
-DEFINE_HOOK(zebra_mlag_private_cleanup_data, (), ())
+ (uint8_t *data, uint32_t len), (data, len));
+DEFINE_HOOK(zebra_mlag_private_monitor_state, (), ());
+DEFINE_HOOK(zebra_mlag_private_open_channel, (), ());
+DEFINE_HOOK(zebra_mlag_private_close_channel, (), ());
+DEFINE_HOOK(zebra_mlag_private_cleanup_data, (), ());
#define ZEBRA_MLAG_METADATA_LEN 4
#define ZEBRA_MLAG_MSG_BCAST 0xFFFFFFFF
#define ZEBRA_MLAG_LEN_SIZE 4
DECLARE_HOOK(zebra_mlag_private_write_data,
- (uint8_t *data, uint32_t len), (data, len))
-DECLARE_HOOK(zebra_mlag_private_monitor_state, (), ())
-DECLARE_HOOK(zebra_mlag_private_open_channel, (), ())
-DECLARE_HOOK(zebra_mlag_private_close_channel, (), ())
-DECLARE_HOOK(zebra_mlag_private_cleanup_data, (), ())
+ (uint8_t *data, uint32_t len), (data, len));
+DECLARE_HOOK(zebra_mlag_private_monitor_state, (), ());
+DECLARE_HOOK(zebra_mlag_private_open_channel, (), ());
+DECLARE_HOOK(zebra_mlag_private_close_channel, (), ());
+DECLARE_HOOK(zebra_mlag_private_cleanup_data, (), ());
extern uint8_t mlag_wr_buffer[ZEBRA_MLAG_BUF_LIMIT];
extern uint8_t mlag_rd_buffer[ZEBRA_MLAG_BUF_LIMIT];
DEFINE_HOOK(zebra_pbr_ipset_entry_get_stat,
(struct zebra_pbr_ipset_entry *ipset, uint64_t *pkts,
uint64_t *bytes),
- (ipset, pkts, bytes))
+ (ipset, pkts, bytes));
DEFINE_HOOK(zebra_pbr_iptable_get_stat,
(struct zebra_pbr_iptable *iptable, uint64_t *pkts,
uint64_t *bytes),
- (iptable, pkts, bytes))
+ (iptable, pkts, bytes));
DEFINE_HOOK(zebra_pbr_iptable_update,
(int cmd, struct zebra_pbr_iptable *iptable), (cmd, iptable));
DECLARE_HOOK(zebra_pbr_ipset_entry_get_stat,
(struct zebra_pbr_ipset_entry *ipset, uint64_t *pkts,
uint64_t *bytes),
- (ipset, pkts, bytes))
+ (ipset, pkts, bytes));
DECLARE_HOOK(zebra_pbr_iptable_get_stat,
(struct zebra_pbr_iptable *iptable, uint64_t *pkts,
uint64_t *bytes),
- (iptable, pkts, bytes))
+ (iptable, pkts, bytes));
DECLARE_HOOK(zebra_pbr_iptable_update,
(int cmd, struct zebra_pbr_iptable *iptable), (cmd, iptable));
DEFINE_QOBJ_TYPE(zebra_pw)
-DEFINE_HOOK(pw_install, (struct zebra_pw * pw), (pw))
-DEFINE_HOOK(pw_uninstall, (struct zebra_pw * pw), (pw))
+DEFINE_HOOK(pw_install, (struct zebra_pw * pw), (pw));
+DEFINE_HOOK(pw_uninstall, (struct zebra_pw * pw), (pw));
#define MPLS_NO_LABEL MPLS_INVALID_LABEL
RB_HEAD(zebra_static_pw_head, zebra_pw);
RB_PROTOTYPE(zebra_static_pw_head, zebra_pw, static_pw_entry, zebra_pw_compare);
-DECLARE_HOOK(pw_install, (struct zebra_pw * pw), (pw))
-DECLARE_HOOK(pw_uninstall, (struct zebra_pw * pw), (pw))
+DECLARE_HOOK(pw_install, (struct zebra_pw * pw), (pw));
+DECLARE_HOOK(pw_uninstall, (struct zebra_pw * pw), (pw));
struct zebra_pw *zebra_pw_add(struct zebra_vrf *zvrf, const char *ifname,
uint8_t protocol, struct zserv *client);
static struct dplane_ctx_q rib_dplane_q;
DEFINE_HOOK(rib_update, (struct route_node * rn, const char *reason),
- (rn, reason))
+ (rn, reason));
/* Should we allow non Quagga processes to delete our routes */
extern int allow_delete;
DEFINE_MTYPE_STATIC(ZEBRA, ZVXLAN_SG, "zebra VxLAN multicast group");
DEFINE_HOOK(zebra_rmac_update, (zebra_mac_t *rmac, zebra_l3vni_t *zl3vni,
- bool delete, const char *reason), (rmac, zl3vni, delete, reason))
+ bool delete, const char *reason), (rmac, zl3vni, delete, reason));
/* static function declarations */
static void zevpn_print_neigh_hash_all_evpn(struct hash_bucket *bucket,
extern zebra_l3vni_t *zl3vni_lookup(vni_t vni);
DECLARE_HOOK(zebra_rmac_update, (zebra_mac_t *rmac, zebra_l3vni_t *zl3vni,
- bool delete, const char *reason), (rmac, zl3vni, delete, reason))
+ bool delete, const char *reason), (rmac, zl3vni, delete, reason));
#ifdef __cplusplus