forked from Mirror/frr
Merge pull request #8121 from opensourcerouting/macro-cleanup
*: require ISO C11 + semicolons after file-scope macros
This commit is contained in:
commit
37916b2b11
|
@ -12,3 +12,10 @@ ac4d0be5874fafd14212d6007fff7495edc9b152
|
|||
d62a17aedeb0eebdba98238874bb13d62c48dbf9
|
||||
c14777c6bfd0a446c85243d3a9835054a259c276
|
||||
996c93142d3abfab0f6d6c800474e22a8cfbdbc5
|
||||
# require semicolon after macro XYZ
|
||||
67b0f40c98aeb9bbc95370fe2be29e56a00a8748
|
||||
80413c2073a20774b264ab04f7a4ea4515699790
|
||||
960b9a53837d1aefa16bd531c7087f800dbe147b
|
||||
96244aca23adec551c29b78f26605f8af8eea53e
|
||||
8451921b70044a2c1075e7ba391f095fabee2550
|
||||
bf8d3d6aca3f20255a621ed1c148fd05b3a8ae5c
|
||||
|
|
|
@ -42,7 +42,7 @@ THE SOFTWARE.
|
|||
#include "xroute.h"
|
||||
#include "babel_errors.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(BABELD, BABEL_IF, "Babel Interface")
|
||||
DEFINE_MTYPE_STATIC(BABELD, BABEL_IF, "Babel Interface");
|
||||
|
||||
#define IS_ENABLE(ifp) (babel_enable_if_lookup(ifp->name) >= 0)
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ FRR_DAEMON_INFO(babeld, BABELD,
|
|||
|
||||
.yang_modules = babeld_yang_modules,
|
||||
.n_yang_modules = array_size(babeld_yang_modules),
|
||||
)
|
||||
);
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
|
|
|
@ -46,8 +46,8 @@ THE SOFTWARE.
|
|||
#include "babel_zebra.h"
|
||||
#include "babel_errors.h"
|
||||
|
||||
DEFINE_MGROUP(BABELD, "babeld")
|
||||
DEFINE_MTYPE_STATIC(BABELD, BABEL, "Babel Structure")
|
||||
DEFINE_MGROUP(BABELD, "babeld");
|
||||
DEFINE_MTYPE_STATIC(BABELD, BABEL, "Babel Structure");
|
||||
|
||||
static int babel_init_routing_process(struct thread *thread);
|
||||
static void babel_get_myid(void);
|
||||
|
|
|
@ -41,20 +41,6 @@ THE SOFTWARE.
|
|||
#define MAX(x,y) ((x)<=(y)?(y):(x))
|
||||
#define MIN(x,y) ((x)<=(y)?(x):(y))
|
||||
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
/* nothing */
|
||||
#elif defined(__GNUC__)
|
||||
#define inline __inline
|
||||
#if (__GNUC__ >= 3)
|
||||
#define restrict __restrict
|
||||
#else
|
||||
#define restrict /**/
|
||||
#endif
|
||||
#else
|
||||
#define inline /**/
|
||||
#define restrict /**/
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 3)
|
||||
#define ATTRIBUTE(x) __attribute__ (x)
|
||||
#define LIKELY(_x) __builtin_expect(!!(_x), 1)
|
||||
|
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
|||
#include "log.h"
|
||||
#include "memory.h"
|
||||
|
||||
DECLARE_MGROUP(BABELD)
|
||||
DECLARE_MGROUP(BABELD);
|
||||
|
||||
#if defined(i386) || defined(__mc68020__) || defined(__x86_64__)
|
||||
#define DO_NTOHS(_d, _s) do{ _d = ntohs(*(const unsigned short*)(_s)); }while(0)
|
||||
|
@ -129,13 +129,7 @@ extern const unsigned char v4prefix[16];
|
|||
vararg macros are not portable. */
|
||||
#if defined NO_DEBUG
|
||||
|
||||
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
|
||||
#define debugf(...) do {} while(0)
|
||||
#elif defined __GNUC__
|
||||
#define debugf(_args...) do {} while(0)
|
||||
#else
|
||||
static inline void debugf(int level, const char *format, ...) { return; }
|
||||
#endif
|
||||
|
||||
#else /* NO_DEBUG */
|
||||
|
||||
|
@ -148,19 +142,10 @@ static inline void debugf(int level, const char *format, ...) { return; }
|
|||
#define BABEL_DEBUG_ROUTE (1 << 5)
|
||||
#define BABEL_DEBUG_ALL (0xFFFF)
|
||||
|
||||
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
|
||||
#define debugf(level, ...) \
|
||||
do { \
|
||||
if(UNLIKELY(debug & level)) zlog_debug(__VA_ARGS__); \
|
||||
} while(0)
|
||||
#elif defined __GNUC__
|
||||
#define debugf(level, _args...) \
|
||||
do { \
|
||||
if(UNLIKELY(debug & level)) zlog_debug(_args); \
|
||||
} while(0)
|
||||
#else
|
||||
static inline void debugf(int level, const char *format, ...) { return; }
|
||||
#endif
|
||||
|
||||
#endif /* NO_DEBUG */
|
||||
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
|
||||
#include "bfd.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(BFDD, BFDD_CONFIG, "long-lived configuration memory")
|
||||
DEFINE_MTYPE_STATIC(BFDD, BFDD_PROFILE, "long-lived profile memory")
|
||||
DEFINE_MTYPE_STATIC(BFDD, BFDD_SESSION_OBSERVER, "Session observer")
|
||||
DEFINE_MTYPE_STATIC(BFDD, BFDD_VRF, "BFD VRF")
|
||||
DEFINE_MTYPE_STATIC(BFDD, BFDD_CONFIG, "long-lived configuration memory");
|
||||
DEFINE_MTYPE_STATIC(BFDD, BFDD_PROFILE, "long-lived profile memory");
|
||||
DEFINE_MTYPE_STATIC(BFDD, BFDD_SESSION_OBSERVER, "Session observer");
|
||||
DEFINE_MTYPE_STATIC(BFDD, BFDD_VRF, "BFD VRF");
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
#define BFDD_JSON_CONV_OPTIONS (0)
|
||||
#endif
|
||||
|
||||
DECLARE_MGROUP(BFDD)
|
||||
DECLARE_MTYPE(BFDD_CONTROL)
|
||||
DECLARE_MTYPE(BFDD_NOTIFICATION)
|
||||
DECLARE_MGROUP(BFDD);
|
||||
DECLARE_MTYPE(BFDD_CONTROL);
|
||||
DECLARE_MTYPE(BFDD_NOTIFICATION);
|
||||
|
||||
struct bfd_timers {
|
||||
uint32_t desired_min_tx;
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
/*
|
||||
* FRR related code.
|
||||
*/
|
||||
DEFINE_MGROUP(BFDD, "Bidirectional Forwarding Detection Daemon")
|
||||
DEFINE_MTYPE(BFDD, BFDD_CONTROL, "long-lived control socket memory")
|
||||
DEFINE_MTYPE(BFDD, BFDD_NOTIFICATION, "short-lived control notification data")
|
||||
DEFINE_MGROUP(BFDD, "Bidirectional Forwarding Detection Daemon");
|
||||
DEFINE_MTYPE(BFDD, BFDD_CONTROL, "long-lived control socket memory");
|
||||
DEFINE_MTYPE(BFDD, BFDD_NOTIFICATION, "short-lived control notification data");
|
||||
|
||||
/* Master of threads. */
|
||||
struct thread_master *master;
|
||||
|
@ -134,7 +134,8 @@ FRR_DAEMON_INFO(bfdd, BFD, .vty_port = 2617,
|
|||
.signals = bfd_signals, .n_signals = array_size(bfd_signals),
|
||||
.privs = &bglobal.bfdd_privs,
|
||||
.yang_modules = bfdd_yang_modules,
|
||||
.n_yang_modules = array_size(bfdd_yang_modules))
|
||||
.n_yang_modules = array_size(bfdd_yang_modules),
|
||||
);
|
||||
|
||||
#define OPTION_CTLSOCK 1001
|
||||
#define OPTION_DPLANEADDR 2000
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "bfd.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(BFDD, BFDD_LABEL, "long-lived label memory")
|
||||
DEFINE_MTYPE_STATIC(BFDD, BFDD_LABEL, "long-lived label memory");
|
||||
|
||||
/*
|
||||
* Definitions
|
||||
|
|
|
@ -46,7 +46,8 @@
|
|||
|
||||
#include "lib/openbsd-queue.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(BFDD, BFDD_DPLANE_CTX, "Data plane client allocated memory")
|
||||
DEFINE_MTYPE_STATIC(BFDD, BFDD_DPLANE_CTX,
|
||||
"Data plane client allocated memory");
|
||||
|
||||
/** Data plane client socket buffer size. */
|
||||
#define BFD_DPLANE_CLIENT_BUF_SIZE 8192
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "lib/typesafe.h"
|
||||
|
||||
PREDECL_DLIST(bgp_adv_fifo)
|
||||
PREDECL_DLIST(bgp_adv_fifo);
|
||||
|
||||
struct update_subgroup;
|
||||
|
||||
|
@ -60,7 +60,7 @@ struct bgp_advertise {
|
|||
struct bgp_path_info *pathi;
|
||||
};
|
||||
|
||||
DECLARE_DLIST(bgp_adv_fifo, struct bgp_advertise, fifo)
|
||||
DECLARE_DLIST(bgp_adv_fifo, struct bgp_advertise, fifo);
|
||||
|
||||
/* BGP adjacency out. */
|
||||
struct bgp_adj_out {
|
||||
|
|
|
@ -59,21 +59,21 @@ static struct bmp_bgp_peer *bmp_bgp_peer_get(struct peer *peer);
|
|||
static void bmp_active_disconnected(struct bmp_active *ba);
|
||||
static void bmp_active_put(struct bmp_active *ba);
|
||||
|
||||
DEFINE_MGROUP(BMP, "BMP (BGP Monitoring Protocol)")
|
||||
DEFINE_MGROUP(BMP, "BMP (BGP Monitoring Protocol)");
|
||||
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_CONN, "BMP connection state")
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_TARGETS, "BMP targets")
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_TARGETSNAME, "BMP targets name")
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_LISTENER, "BMP listener")
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_ACTIVE, "BMP active connection config")
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_ACLNAME, "BMP access-list name")
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_QUEUE, "BMP update queue item")
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP, "BMP instance state")
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_MIRRORQ, "BMP route mirroring buffer")
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_PEER, "BMP per BGP peer data")
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_OPEN, "BMP stored BGP OPEN message")
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_CONN, "BMP connection state");
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_TARGETS, "BMP targets");
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_TARGETSNAME, "BMP targets name");
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_LISTENER, "BMP listener");
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_ACTIVE, "BMP active connection config");
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_ACLNAME, "BMP access-list name");
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_QUEUE, "BMP update queue item");
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP, "BMP instance state");
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_MIRRORQ, "BMP route mirroring buffer");
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_PEER, "BMP per BGP peer data");
|
||||
DEFINE_MTYPE_STATIC(BMP, BMP_OPEN, "BMP stored BGP OPEN message");
|
||||
|
||||
DEFINE_QOBJ_TYPE(bmp_targets)
|
||||
DEFINE_QOBJ_TYPE(bmp_targets);
|
||||
|
||||
static int bmp_bgp_cmp(const struct bmp_bgp *a, const struct bmp_bgp *b)
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ static uint32_t bmp_bgp_hash(const struct bmp_bgp *e)
|
|||
return jhash(&e->bgp, sizeof(e->bgp), 0x55aa5a5a);
|
||||
}
|
||||
|
||||
DECLARE_HASH(bmp_bgph, struct bmp_bgp, bbi, bmp_bgp_cmp, bmp_bgp_hash)
|
||||
DECLARE_HASH(bmp_bgph, struct bmp_bgp, bbi, bmp_bgp_cmp, bmp_bgp_hash);
|
||||
|
||||
struct bmp_bgph_head bmp_bgph;
|
||||
|
||||
|
@ -109,11 +109,11 @@ static uint32_t bmp_bgp_peer_hash(const struct bmp_bgp_peer *e)
|
|||
}
|
||||
|
||||
DECLARE_HASH(bmp_peerh, struct bmp_bgp_peer, bpi,
|
||||
bmp_bgp_peer_cmp, bmp_bgp_peer_hash)
|
||||
bmp_bgp_peer_cmp, bmp_bgp_peer_hash);
|
||||
|
||||
struct bmp_peerh_head bmp_peerh;
|
||||
|
||||
DECLARE_LIST(bmp_mirrorq, struct bmp_mirrorq, bmi)
|
||||
DECLARE_LIST(bmp_mirrorq, struct bmp_mirrorq, bmi);
|
||||
|
||||
/* listener management */
|
||||
|
||||
|
@ -132,7 +132,8 @@ static int bmp_listener_cmp(const struct bmp_listener *a,
|
|||
return 0;
|
||||
}
|
||||
|
||||
DECLARE_SORTLIST_UNIQ(bmp_listeners, struct bmp_listener, bli, bmp_listener_cmp)
|
||||
DECLARE_SORTLIST_UNIQ(bmp_listeners, struct bmp_listener, bli,
|
||||
bmp_listener_cmp);
|
||||
|
||||
static int bmp_targets_cmp(const struct bmp_targets *a,
|
||||
const struct bmp_targets *b)
|
||||
|
@ -140,11 +141,11 @@ static int bmp_targets_cmp(const struct bmp_targets *a,
|
|||
return strcmp(a->name, b->name);
|
||||
}
|
||||
|
||||
DECLARE_SORTLIST_UNIQ(bmp_targets, struct bmp_targets, bti, bmp_targets_cmp)
|
||||
DECLARE_SORTLIST_UNIQ(bmp_targets, struct bmp_targets, bti, bmp_targets_cmp);
|
||||
|
||||
DECLARE_LIST(bmp_session, struct bmp, bsi)
|
||||
DECLARE_LIST(bmp_session, struct bmp, bsi);
|
||||
|
||||
DECLARE_DLIST(bmp_qlist, struct bmp_queue_entry, bli)
|
||||
DECLARE_DLIST(bmp_qlist, struct bmp_queue_entry, bli);
|
||||
|
||||
static int bmp_qhash_cmp(const struct bmp_queue_entry *a,
|
||||
const struct bmp_queue_entry *b)
|
||||
|
@ -189,7 +190,7 @@ static uint32_t bmp_qhash_hkey(const struct bmp_queue_entry *e)
|
|||
}
|
||||
|
||||
DECLARE_HASH(bmp_qhash, struct bmp_queue_entry, bhi,
|
||||
bmp_qhash_cmp, bmp_qhash_hkey)
|
||||
bmp_qhash_cmp, bmp_qhash_hkey);
|
||||
|
||||
static int bmp_active_cmp(const struct bmp_active *a,
|
||||
const struct bmp_active *b)
|
||||
|
@ -206,7 +207,7 @@ static int bmp_active_cmp(const struct bmp_active *a,
|
|||
return 0;
|
||||
}
|
||||
|
||||
DECLARE_SORTLIST_UNIQ(bmp_actives, struct bmp_active, bai, bmp_active_cmp)
|
||||
DECLARE_SORTLIST_UNIQ(bmp_actives, struct bmp_active, bai, bmp_active_cmp);
|
||||
|
||||
static struct bmp *bmp_new(struct bmp_targets *bt, int bmp_sock)
|
||||
{
|
||||
|
@ -2443,4 +2444,5 @@ static int bgp_bmp_module_init(void)
|
|||
|
||||
FRR_MODULE_SETUP(.name = "bgpd_bmp", .version = FRR_VERSION,
|
||||
.description = "bgpd BMP module",
|
||||
.init = bgp_bmp_module_init)
|
||||
.init = bgp_bmp_module_init,
|
||||
);
|
||||
|
|
|
@ -66,8 +66,8 @@
|
|||
* always happens from the front of the queue.)
|
||||
*/
|
||||
|
||||
PREDECL_DLIST(bmp_qlist)
|
||||
PREDECL_HASH(bmp_qhash)
|
||||
PREDECL_DLIST(bmp_qlist);
|
||||
PREDECL_HASH(bmp_qhash);
|
||||
|
||||
struct bmp_queue_entry {
|
||||
struct bmp_qlist_item bli;
|
||||
|
@ -92,7 +92,7 @@ struct bmp_queue_entry {
|
|||
* with a size limit. Refcount works the same as for monitoring above.
|
||||
*/
|
||||
|
||||
PREDECL_LIST(bmp_mirrorq)
|
||||
PREDECL_LIST(bmp_mirrorq);
|
||||
|
||||
struct bmp_mirrorq {
|
||||
struct bmp_mirrorq_item bmi;
|
||||
|
@ -112,7 +112,7 @@ enum {
|
|||
BMP_AFI_LIVE,
|
||||
};
|
||||
|
||||
PREDECL_LIST(bmp_session)
|
||||
PREDECL_LIST(bmp_session);
|
||||
|
||||
struct bmp_active;
|
||||
struct bmp_targets;
|
||||
|
@ -166,7 +166,7 @@ struct bmp {
|
|||
* succeeds, "bmp" is set up.
|
||||
*/
|
||||
|
||||
PREDECL_SORTLIST_UNIQ(bmp_actives)
|
||||
PREDECL_SORTLIST_UNIQ(bmp_actives);
|
||||
|
||||
#define BMP_DFLT_MINRETRY 30000
|
||||
#define BMP_DFLT_MAXRETRY 720000
|
||||
|
@ -191,7 +191,7 @@ struct bmp_active {
|
|||
};
|
||||
|
||||
/* config & state for passive / listening sockets */
|
||||
PREDECL_SORTLIST_UNIQ(bmp_listeners)
|
||||
PREDECL_SORTLIST_UNIQ(bmp_listeners);
|
||||
|
||||
struct bmp_listener {
|
||||
struct bmp_listeners_item bli;
|
||||
|
@ -209,7 +209,7 @@ struct bmp_listener {
|
|||
* bmp_active items. If they have the same config, BMP session should be
|
||||
* put in the same targets since that's a bit more effective.
|
||||
*/
|
||||
PREDECL_SORTLIST_UNIQ(bmp_targets)
|
||||
PREDECL_SORTLIST_UNIQ(bmp_targets);
|
||||
|
||||
struct bmp_targets {
|
||||
struct bmp_targets_item bti;
|
||||
|
@ -245,13 +245,13 @@ struct bmp_targets {
|
|||
|
||||
uint64_t cnt_accept, cnt_aclrefused;
|
||||
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(bmp_targets)
|
||||
DECLARE_QOBJ_TYPE(bmp_targets);
|
||||
|
||||
/* per struct peer * data. Lookup by peer->qobj_node.nid, created on demand,
|
||||
* deleted in peer_backward hook. */
|
||||
PREDECL_HASH(bmp_peerh)
|
||||
PREDECL_HASH(bmp_peerh);
|
||||
|
||||
struct bmp_bgp_peer {
|
||||
struct bmp_peerh_item bpi;
|
||||
|
@ -267,7 +267,7 @@ struct bmp_bgp_peer {
|
|||
};
|
||||
|
||||
/* per struct bgp * data */
|
||||
PREDECL_HASH(bmp_bgph)
|
||||
PREDECL_HASH(bmp_bgph);
|
||||
|
||||
#define BMP_PEER_DOWN_NO_RELEVANT_EVENT_CODE 0x00
|
||||
|
||||
|
@ -309,6 +309,6 @@ enum {
|
|||
BMP_STATS_FRR_NH_INVALID = 65531,
|
||||
};
|
||||
|
||||
DECLARE_MGROUP(BMP)
|
||||
DECLARE_MGROUP(BMP);
|
||||
|
||||
#endif /*_BGP_BMP_H_*/
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
/*
|
||||
* Definitions and external declarations.
|
||||
*/
|
||||
DEFINE_QOBJ_TYPE(bgpevpn)
|
||||
DEFINE_QOBJ_TYPE(bgp_evpn_es)
|
||||
DEFINE_QOBJ_TYPE(bgpevpn);
|
||||
DEFINE_QOBJ_TYPE(bgp_evpn_es);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -125,9 +125,9 @@ struct bgp_evpn_es {
|
|||
/* preference config for BUM-DF election. advertised via the ESR. */
|
||||
uint16_t df_pref;
|
||||
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(bgp_evpn_es)
|
||||
DECLARE_QOBJ_TYPE(bgp_evpn_es);
|
||||
RB_HEAD(bgp_es_rb_head, bgp_evpn_es);
|
||||
RB_PROTOTYPE(bgp_es_rb_head, bgp_evpn_es, rb_node, bgp_es_rb_cmp);
|
||||
|
||||
|
|
|
@ -112,10 +112,10 @@ struct bgpevpn {
|
|||
/* List of local ESs */
|
||||
struct list *local_es_evi_list;
|
||||
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
|
||||
DECLARE_QOBJ_TYPE(bgpevpn)
|
||||
DECLARE_QOBJ_TYPE(bgpevpn);
|
||||
|
||||
/* Mapping of Import RT to VNIs.
|
||||
* The Import RTs of all VNIs are maintained in a hash table with each
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
#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
|
||||
|
|
|
@ -155,8 +155,8 @@ extern void bgp_start_routeadv(struct bgp *);
|
|||
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);
|
||||
|
|
|
@ -50,10 +50,10 @@ static struct labelpool *lp;
|
|||
/* request this many labels at a time from zebra */
|
||||
#define LP_CHUNK_SIZE 50
|
||||
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_LABEL_CHUNK, "BGP Label Chunk")
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_LABEL_FIFO, "BGP Label FIFO item")
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_LABEL_CB, "BGP Dynamic Label Assignment")
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_LABEL_CBQ, "BGP Dynamic Label Callback")
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_LABEL_CHUNK, "BGP Label Chunk");
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_LABEL_FIFO, "BGP Label FIFO item");
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_LABEL_CB, "BGP Dynamic Label Assignment");
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_LABEL_CBQ, "BGP Dynamic Label Callback");
|
||||
|
||||
struct lp_chunk {
|
||||
uint32_t first;
|
||||
|
@ -80,7 +80,7 @@ struct lp_fifo {
|
|||
struct lp_lcb lcb;
|
||||
};
|
||||
|
||||
DECLARE_LIST(lp_fifo, struct lp_fifo, fifo)
|
||||
DECLARE_LIST(lp_fifo, struct lp_fifo, fifo);
|
||||
|
||||
struct lp_cbq_item {
|
||||
int (*cbfunc)(mpls_label_t label, void *lblid, bool alloc);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#define LP_TYPE_VRF 0x00000001
|
||||
#define LP_TYPE_BGP_LU 0x00000002
|
||||
|
||||
PREDECL_LIST(lp_fifo)
|
||||
PREDECL_LIST(lp_fifo);
|
||||
|
||||
struct labelpool {
|
||||
struct skiplist *ledger; /* all requests */
|
||||
|
|
|
@ -394,7 +394,8 @@ FRR_DAEMON_INFO(bgpd, BGP, .vty_port = BGP_VTY_PORT,
|
|||
.signals = bgp_signals, .n_signals = array_size(bgp_signals),
|
||||
|
||||
.privs = &bgpd_privs, .yang_modules = bgpd_yang_modules,
|
||||
.n_yang_modules = array_size(bgpd_yang_modules), )
|
||||
.n_yang_modules = array_size(bgpd_yang_modules),
|
||||
);
|
||||
|
||||
#define DEPRECATED_OPTIONS ""
|
||||
|
||||
|
|
|
@ -28,112 +28,112 @@
|
|||
/* this file is temporary in nature; definitions should be moved to the
|
||||
* files they're used in */
|
||||
|
||||
DEFINE_MGROUP(BGPD, "bgpd")
|
||||
DEFINE_MTYPE(BGPD, BGP, "BGP instance")
|
||||
DEFINE_MTYPE(BGPD, BGP_LISTENER, "BGP listen socket details")
|
||||
DEFINE_MTYPE(BGPD, BGP_PEER, "BGP peer")
|
||||
DEFINE_MTYPE(BGPD, BGP_PEER_HOST, "BGP peer hostname")
|
||||
DEFINE_MTYPE(BGPD, BGP_PEER_IFNAME, "BGP peer ifname")
|
||||
DEFINE_MTYPE(BGPD, PEER_GROUP, "Peer group")
|
||||
DEFINE_MTYPE(BGPD, PEER_GROUP_HOST, "BGP Peer group hostname")
|
||||
DEFINE_MTYPE(BGPD, PEER_DESC, "Peer description")
|
||||
DEFINE_MTYPE(BGPD, PEER_PASSWORD, "Peer password string")
|
||||
DEFINE_MTYPE(BGPD, BGP_PEER_AF, "BGP peer af")
|
||||
DEFINE_MTYPE(BGPD, BGP_UPDGRP, "BGP update group")
|
||||
DEFINE_MTYPE(BGPD, BGP_UPD_SUBGRP, "BGP update subgroup")
|
||||
DEFINE_MTYPE(BGPD, BGP_PACKET, "BGP packet")
|
||||
DEFINE_MTYPE(BGPD, ATTR, "BGP attribute")
|
||||
DEFINE_MTYPE(BGPD, AS_PATH, "BGP aspath")
|
||||
DEFINE_MTYPE(BGPD, AS_SEG, "BGP aspath seg")
|
||||
DEFINE_MTYPE(BGPD, AS_SEG_DATA, "BGP aspath segment data")
|
||||
DEFINE_MTYPE(BGPD, AS_STR, "BGP aspath str")
|
||||
DEFINE_MGROUP(BGPD, "bgpd");
|
||||
DEFINE_MTYPE(BGPD, BGP, "BGP instance");
|
||||
DEFINE_MTYPE(BGPD, BGP_LISTENER, "BGP listen socket details");
|
||||
DEFINE_MTYPE(BGPD, BGP_PEER, "BGP peer");
|
||||
DEFINE_MTYPE(BGPD, BGP_PEER_HOST, "BGP peer hostname");
|
||||
DEFINE_MTYPE(BGPD, BGP_PEER_IFNAME, "BGP peer ifname");
|
||||
DEFINE_MTYPE(BGPD, PEER_GROUP, "Peer group");
|
||||
DEFINE_MTYPE(BGPD, PEER_GROUP_HOST, "BGP Peer group hostname");
|
||||
DEFINE_MTYPE(BGPD, PEER_DESC, "Peer description");
|
||||
DEFINE_MTYPE(BGPD, PEER_PASSWORD, "Peer password string");
|
||||
DEFINE_MTYPE(BGPD, BGP_PEER_AF, "BGP peer af");
|
||||
DEFINE_MTYPE(BGPD, BGP_UPDGRP, "BGP update group");
|
||||
DEFINE_MTYPE(BGPD, BGP_UPD_SUBGRP, "BGP update subgroup");
|
||||
DEFINE_MTYPE(BGPD, BGP_PACKET, "BGP packet");
|
||||
DEFINE_MTYPE(BGPD, ATTR, "BGP attribute");
|
||||
DEFINE_MTYPE(BGPD, AS_PATH, "BGP aspath");
|
||||
DEFINE_MTYPE(BGPD, AS_SEG, "BGP aspath seg");
|
||||
DEFINE_MTYPE(BGPD, AS_SEG_DATA, "BGP aspath segment data");
|
||||
DEFINE_MTYPE(BGPD, AS_STR, "BGP aspath str");
|
||||
|
||||
DEFINE_MTYPE(BGPD, BGP_TABLE, "BGP table")
|
||||
DEFINE_MTYPE(BGPD, BGP_NODE, "BGP node")
|
||||
DEFINE_MTYPE(BGPD, BGP_ROUTE, "BGP route")
|
||||
DEFINE_MTYPE(BGPD, BGP_ROUTE_EXTRA, "BGP ancillary route info")
|
||||
DEFINE_MTYPE(BGPD, BGP_CONN, "BGP connected")
|
||||
DEFINE_MTYPE(BGPD, BGP_STATIC, "BGP static")
|
||||
DEFINE_MTYPE(BGPD, BGP_ADVERTISE_ATTR, "BGP adv attr")
|
||||
DEFINE_MTYPE(BGPD, BGP_ADVERTISE, "BGP adv")
|
||||
DEFINE_MTYPE(BGPD, BGP_SYNCHRONISE, "BGP synchronise")
|
||||
DEFINE_MTYPE(BGPD, BGP_ADJ_IN, "BGP adj in")
|
||||
DEFINE_MTYPE(BGPD, BGP_ADJ_OUT, "BGP adj out")
|
||||
DEFINE_MTYPE(BGPD, BGP_MPATH_INFO, "BGP multipath info")
|
||||
DEFINE_MTYPE(BGPD, BGP_TABLE, "BGP table");
|
||||
DEFINE_MTYPE(BGPD, BGP_NODE, "BGP node");
|
||||
DEFINE_MTYPE(BGPD, BGP_ROUTE, "BGP route");
|
||||
DEFINE_MTYPE(BGPD, BGP_ROUTE_EXTRA, "BGP ancillary route info");
|
||||
DEFINE_MTYPE(BGPD, BGP_CONN, "BGP connected");
|
||||
DEFINE_MTYPE(BGPD, BGP_STATIC, "BGP static");
|
||||
DEFINE_MTYPE(BGPD, BGP_ADVERTISE_ATTR, "BGP adv attr");
|
||||
DEFINE_MTYPE(BGPD, BGP_ADVERTISE, "BGP adv");
|
||||
DEFINE_MTYPE(BGPD, BGP_SYNCHRONISE, "BGP synchronise");
|
||||
DEFINE_MTYPE(BGPD, BGP_ADJ_IN, "BGP adj in");
|
||||
DEFINE_MTYPE(BGPD, BGP_ADJ_OUT, "BGP adj out");
|
||||
DEFINE_MTYPE(BGPD, BGP_MPATH_INFO, "BGP multipath info");
|
||||
|
||||
DEFINE_MTYPE(BGPD, AS_LIST, "BGP AS list")
|
||||
DEFINE_MTYPE(BGPD, AS_FILTER, "BGP AS filter")
|
||||
DEFINE_MTYPE(BGPD, AS_FILTER_STR, "BGP AS filter str")
|
||||
DEFINE_MTYPE(BGPD, AS_LIST, "BGP AS list");
|
||||
DEFINE_MTYPE(BGPD, AS_FILTER, "BGP AS filter");
|
||||
DEFINE_MTYPE(BGPD, AS_FILTER_STR, "BGP AS filter str");
|
||||
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY, "community")
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_VAL, "community val")
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_STR, "community str")
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY, "community");
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_VAL, "community val");
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_STR, "community str");
|
||||
|
||||
DEFINE_MTYPE(BGPD, ECOMMUNITY, "extcommunity")
|
||||
DEFINE_MTYPE(BGPD, ECOMMUNITY_VAL, "extcommunity val")
|
||||
DEFINE_MTYPE(BGPD, ECOMMUNITY_STR, "extcommunity str")
|
||||
DEFINE_MTYPE(BGPD, ECOMMUNITY, "extcommunity");
|
||||
DEFINE_MTYPE(BGPD, ECOMMUNITY_VAL, "extcommunity val");
|
||||
DEFINE_MTYPE(BGPD, ECOMMUNITY_STR, "extcommunity str");
|
||||
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_LIST, "community-list")
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_LIST_NAME, "community-list name")
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_LIST_ENTRY, "community-list entry")
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_LIST_CONFIG, "community-list config")
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_LIST_HANDLER, "community-list handler")
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_LIST, "community-list");
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_LIST_NAME, "community-list name");
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_LIST_ENTRY, "community-list entry");
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_LIST_CONFIG, "community-list config");
|
||||
DEFINE_MTYPE(BGPD, COMMUNITY_LIST_HANDLER, "community-list handler");
|
||||
|
||||
DEFINE_MTYPE(BGPD, CLUSTER, "Cluster list")
|
||||
DEFINE_MTYPE(BGPD, CLUSTER_VAL, "Cluster list val")
|
||||
DEFINE_MTYPE(BGPD, CLUSTER, "Cluster list");
|
||||
DEFINE_MTYPE(BGPD, CLUSTER_VAL, "Cluster list val");
|
||||
|
||||
DEFINE_MTYPE(BGPD, BGP_PROCESS_QUEUE, "BGP Process queue")
|
||||
DEFINE_MTYPE(BGPD, BGP_CLEAR_NODE_QUEUE, "BGP node clear queue")
|
||||
DEFINE_MTYPE(BGPD, BGP_PROCESS_QUEUE, "BGP Process queue");
|
||||
DEFINE_MTYPE(BGPD, BGP_CLEAR_NODE_QUEUE, "BGP node clear queue");
|
||||
|
||||
DEFINE_MTYPE(BGPD, TRANSIT, "BGP transit attr")
|
||||
DEFINE_MTYPE(BGPD, TRANSIT_VAL, "BGP transit val")
|
||||
DEFINE_MTYPE(BGPD, TRANSIT, "BGP transit attr");
|
||||
DEFINE_MTYPE(BGPD, TRANSIT_VAL, "BGP transit val");
|
||||
|
||||
DEFINE_MTYPE(BGPD, BGP_DEBUG_FILTER, "BGP debug filter")
|
||||
DEFINE_MTYPE(BGPD, BGP_DEBUG_STR, "BGP debug filter string")
|
||||
DEFINE_MTYPE(BGPD, BGP_DEBUG_FILTER, "BGP debug filter");
|
||||
DEFINE_MTYPE(BGPD, BGP_DEBUG_STR, "BGP debug filter string");
|
||||
|
||||
DEFINE_MTYPE(BGPD, BGP_DISTANCE, "BGP distance")
|
||||
DEFINE_MTYPE(BGPD, BGP_NEXTHOP_CACHE, "BGP nexthop")
|
||||
DEFINE_MTYPE(BGPD, BGP_CONFED_LIST, "BGP confed list")
|
||||
DEFINE_MTYPE(BGPD, PEER_UPDATE_SOURCE, "BGP peer update interface")
|
||||
DEFINE_MTYPE(BGPD, PEER_CONF_IF, "BGP peer config interface")
|
||||
DEFINE_MTYPE(BGPD, BGP_DAMP_INFO, "Dampening info")
|
||||
DEFINE_MTYPE(BGPD, BGP_DAMP_ARRAY, "BGP Dampening array")
|
||||
DEFINE_MTYPE(BGPD, BGP_DAMP_REUSELIST, "BGP Dampening reuse list")
|
||||
DEFINE_MTYPE(BGPD, BGP_REGEXP, "BGP regexp")
|
||||
DEFINE_MTYPE(BGPD, BGP_AGGREGATE, "BGP aggregate")
|
||||
DEFINE_MTYPE(BGPD, BGP_ADDR, "BGP own address")
|
||||
DEFINE_MTYPE(BGPD, TIP_ADDR, "BGP own tunnel-ip address")
|
||||
DEFINE_MTYPE(BGPD, BGP_DISTANCE, "BGP distance");
|
||||
DEFINE_MTYPE(BGPD, BGP_NEXTHOP_CACHE, "BGP nexthop");
|
||||
DEFINE_MTYPE(BGPD, BGP_CONFED_LIST, "BGP confed list");
|
||||
DEFINE_MTYPE(BGPD, PEER_UPDATE_SOURCE, "BGP peer update interface");
|
||||
DEFINE_MTYPE(BGPD, PEER_CONF_IF, "BGP peer config interface");
|
||||
DEFINE_MTYPE(BGPD, BGP_DAMP_INFO, "Dampening info");
|
||||
DEFINE_MTYPE(BGPD, BGP_DAMP_ARRAY, "BGP Dampening array");
|
||||
DEFINE_MTYPE(BGPD, BGP_DAMP_REUSELIST, "BGP Dampening reuse list");
|
||||
DEFINE_MTYPE(BGPD, BGP_REGEXP, "BGP regexp");
|
||||
DEFINE_MTYPE(BGPD, BGP_AGGREGATE, "BGP aggregate");
|
||||
DEFINE_MTYPE(BGPD, BGP_ADDR, "BGP own address");
|
||||
DEFINE_MTYPE(BGPD, TIP_ADDR, "BGP own tunnel-ip address");
|
||||
|
||||
DEFINE_MTYPE(BGPD, BGP_REDIST, "BGP redistribution")
|
||||
DEFINE_MTYPE(BGPD, BGP_FILTER_NAME, "BGP Filter Information")
|
||||
DEFINE_MTYPE(BGPD, BGP_DUMP_STR, "BGP Dump String Information")
|
||||
DEFINE_MTYPE(BGPD, ENCAP_TLV, "ENCAP TLV")
|
||||
DEFINE_MTYPE(BGPD, BGP_REDIST, "BGP redistribution");
|
||||
DEFINE_MTYPE(BGPD, BGP_FILTER_NAME, "BGP Filter Information");
|
||||
DEFINE_MTYPE(BGPD, BGP_DUMP_STR, "BGP Dump String Information");
|
||||
DEFINE_MTYPE(BGPD, ENCAP_TLV, "ENCAP TLV");
|
||||
|
||||
DEFINE_MTYPE(BGPD, BGP_TEA_OPTIONS, "BGP TEA Options")
|
||||
DEFINE_MTYPE(BGPD, BGP_TEA_OPTIONS_VALUE, "BGP TEA Options Value")
|
||||
DEFINE_MTYPE(BGPD, BGP_TEA_OPTIONS, "BGP TEA Options");
|
||||
DEFINE_MTYPE(BGPD, BGP_TEA_OPTIONS_VALUE, "BGP TEA Options Value");
|
||||
|
||||
DEFINE_MTYPE(BGPD, LCOMMUNITY, "Large Community")
|
||||
DEFINE_MTYPE(BGPD, LCOMMUNITY_STR, "Large Community display string")
|
||||
DEFINE_MTYPE(BGPD, LCOMMUNITY_VAL, "Large Community value")
|
||||
DEFINE_MTYPE(BGPD, LCOMMUNITY, "Large Community");
|
||||
DEFINE_MTYPE(BGPD, LCOMMUNITY_STR, "Large Community display string");
|
||||
DEFINE_MTYPE(BGPD, LCOMMUNITY_VAL, "Large Community value");
|
||||
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN, "BGP EVPN Information")
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_MH_INFO, "BGP EVPN MH Information")
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_ES_VTEP, "BGP EVPN ES VTEP")
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_PATH_ES_INFO, "BGP EVPN PATH ES Information")
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_ES_EVI_VTEP, "BGP EVPN ES-EVI VTEP")
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_ES, "BGP EVPN ESI Information")
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_ES_EVI, "BGP EVPN ES-per-EVI Information")
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_ES_VRF, "BGP EVPN ES-per-VRF Information")
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_IMPORT_RT, "BGP EVPN Import RT")
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_VRF_IMPORT_RT, "BGP EVPN VRF Import RT")
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_MACIP, "BGP EVPN MAC IP")
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN, "BGP EVPN Information");
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_MH_INFO, "BGP EVPN MH Information");
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_ES_VTEP, "BGP EVPN ES VTEP");
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_PATH_ES_INFO, "BGP EVPN PATH ES Information");
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_ES_EVI_VTEP, "BGP EVPN ES-EVI VTEP");
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_ES, "BGP EVPN ESI Information");
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_ES_EVI, "BGP EVPN ES-per-EVI Information");
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_ES_VRF, "BGP EVPN ES-per-VRF Information");
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_IMPORT_RT, "BGP EVPN Import RT");
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_VRF_IMPORT_RT, "BGP EVPN VRF Import RT");
|
||||
DEFINE_MTYPE(BGPD, BGP_EVPN_MACIP, "BGP EVPN MAC IP");
|
||||
|
||||
DEFINE_MTYPE(BGPD, BGP_FLOWSPEC, "BGP flowspec")
|
||||
DEFINE_MTYPE(BGPD, BGP_FLOWSPEC_RULE, "BGP flowspec rule")
|
||||
DEFINE_MTYPE(BGPD, BGP_FLOWSPEC_RULE_STR, "BGP flowspec rule str")
|
||||
DEFINE_MTYPE(BGPD, BGP_FLOWSPEC_COMPILED, "BGP flowspec compiled")
|
||||
DEFINE_MTYPE(BGPD, BGP_FLOWSPEC_NAME, "BGP flowspec name")
|
||||
DEFINE_MTYPE(BGPD, BGP_FLOWSPEC_INDEX, "BGP flowspec index")
|
||||
DEFINE_MTYPE(BGPD, BGP_FLOWSPEC, "BGP flowspec");
|
||||
DEFINE_MTYPE(BGPD, BGP_FLOWSPEC_RULE, "BGP flowspec rule");
|
||||
DEFINE_MTYPE(BGPD, BGP_FLOWSPEC_RULE_STR, "BGP flowspec rule str");
|
||||
DEFINE_MTYPE(BGPD, BGP_FLOWSPEC_COMPILED, "BGP flowspec compiled");
|
||||
DEFINE_MTYPE(BGPD, BGP_FLOWSPEC_NAME, "BGP flowspec name");
|
||||
DEFINE_MTYPE(BGPD, BGP_FLOWSPEC_INDEX, "BGP flowspec index");
|
||||
|
||||
DEFINE_MTYPE(BGPD, BGP_SRV6_L3VPN, "BGP prefix-sid srv6 l3vpn servcie")
|
||||
DEFINE_MTYPE(BGPD, BGP_SRV6_VPN, "BGP prefix-sid srv6 vpn service")
|
||||
DEFINE_MTYPE(BGPD, BGP_SRV6_L3VPN, "BGP prefix-sid srv6 l3vpn servcie");
|
||||
DEFINE_MTYPE(BGPD, BGP_SRV6_VPN, "BGP prefix-sid srv6 vpn service");
|
||||
|
|
|
@ -24,115 +24,115 @@
|
|||
|
||||
#include "memory.h"
|
||||
|
||||
DECLARE_MGROUP(BGPD)
|
||||
DECLARE_MTYPE(BGP)
|
||||
DECLARE_MTYPE(BGP_LISTENER)
|
||||
DECLARE_MTYPE(BGP_PEER)
|
||||
DECLARE_MTYPE(BGP_PEER_HOST)
|
||||
DECLARE_MTYPE(BGP_PEER_IFNAME)
|
||||
DECLARE_MTYPE(PEER_GROUP)
|
||||
DECLARE_MTYPE(PEER_GROUP_HOST)
|
||||
DECLARE_MTYPE(PEER_DESC)
|
||||
DECLARE_MTYPE(PEER_PASSWORD)
|
||||
DECLARE_MTYPE(BGP_PEER_AF)
|
||||
DECLARE_MTYPE(BGP_UPDGRP)
|
||||
DECLARE_MTYPE(BGP_UPD_SUBGRP)
|
||||
DECLARE_MTYPE(BGP_PACKET)
|
||||
DECLARE_MTYPE(ATTR)
|
||||
DECLARE_MTYPE(AS_PATH)
|
||||
DECLARE_MTYPE(AS_SEG)
|
||||
DECLARE_MTYPE(AS_SEG_DATA)
|
||||
DECLARE_MTYPE(AS_STR)
|
||||
DECLARE_MGROUP(BGPD);
|
||||
DECLARE_MTYPE(BGP);
|
||||
DECLARE_MTYPE(BGP_LISTENER);
|
||||
DECLARE_MTYPE(BGP_PEER);
|
||||
DECLARE_MTYPE(BGP_PEER_HOST);
|
||||
DECLARE_MTYPE(BGP_PEER_IFNAME);
|
||||
DECLARE_MTYPE(PEER_GROUP);
|
||||
DECLARE_MTYPE(PEER_GROUP_HOST);
|
||||
DECLARE_MTYPE(PEER_DESC);
|
||||
DECLARE_MTYPE(PEER_PASSWORD);
|
||||
DECLARE_MTYPE(BGP_PEER_AF);
|
||||
DECLARE_MTYPE(BGP_UPDGRP);
|
||||
DECLARE_MTYPE(BGP_UPD_SUBGRP);
|
||||
DECLARE_MTYPE(BGP_PACKET);
|
||||
DECLARE_MTYPE(ATTR);
|
||||
DECLARE_MTYPE(AS_PATH);
|
||||
DECLARE_MTYPE(AS_SEG);
|
||||
DECLARE_MTYPE(AS_SEG_DATA);
|
||||
DECLARE_MTYPE(AS_STR);
|
||||
|
||||
DECLARE_MTYPE(BGP_TABLE)
|
||||
DECLARE_MTYPE(BGP_NODE)
|
||||
DECLARE_MTYPE(BGP_ROUTE)
|
||||
DECLARE_MTYPE(BGP_ROUTE_EXTRA)
|
||||
DECLARE_MTYPE(BGP_CONN)
|
||||
DECLARE_MTYPE(BGP_STATIC)
|
||||
DECLARE_MTYPE(BGP_ADVERTISE_ATTR)
|
||||
DECLARE_MTYPE(BGP_ADVERTISE)
|
||||
DECLARE_MTYPE(BGP_SYNCHRONISE)
|
||||
DECLARE_MTYPE(BGP_ADJ_IN)
|
||||
DECLARE_MTYPE(BGP_ADJ_OUT)
|
||||
DECLARE_MTYPE(BGP_MPATH_INFO)
|
||||
DECLARE_MTYPE(BGP_TABLE);
|
||||
DECLARE_MTYPE(BGP_NODE);
|
||||
DECLARE_MTYPE(BGP_ROUTE);
|
||||
DECLARE_MTYPE(BGP_ROUTE_EXTRA);
|
||||
DECLARE_MTYPE(BGP_CONN);
|
||||
DECLARE_MTYPE(BGP_STATIC);
|
||||
DECLARE_MTYPE(BGP_ADVERTISE_ATTR);
|
||||
DECLARE_MTYPE(BGP_ADVERTISE);
|
||||
DECLARE_MTYPE(BGP_SYNCHRONISE);
|
||||
DECLARE_MTYPE(BGP_ADJ_IN);
|
||||
DECLARE_MTYPE(BGP_ADJ_OUT);
|
||||
DECLARE_MTYPE(BGP_MPATH_INFO);
|
||||
|
||||
DECLARE_MTYPE(AS_LIST)
|
||||
DECLARE_MTYPE(AS_FILTER)
|
||||
DECLARE_MTYPE(AS_FILTER_STR)
|
||||
DECLARE_MTYPE(AS_LIST);
|
||||
DECLARE_MTYPE(AS_FILTER);
|
||||
DECLARE_MTYPE(AS_FILTER_STR);
|
||||
|
||||
DECLARE_MTYPE(COMMUNITY)
|
||||
DECLARE_MTYPE(COMMUNITY_VAL)
|
||||
DECLARE_MTYPE(COMMUNITY_STR)
|
||||
DECLARE_MTYPE(COMMUNITY);
|
||||
DECLARE_MTYPE(COMMUNITY_VAL);
|
||||
DECLARE_MTYPE(COMMUNITY_STR);
|
||||
|
||||
DECLARE_MTYPE(ECOMMUNITY)
|
||||
DECLARE_MTYPE(ECOMMUNITY_VAL)
|
||||
DECLARE_MTYPE(ECOMMUNITY_STR)
|
||||
DECLARE_MTYPE(ECOMMUNITY);
|
||||
DECLARE_MTYPE(ECOMMUNITY_VAL);
|
||||
DECLARE_MTYPE(ECOMMUNITY_STR);
|
||||
|
||||
DECLARE_MTYPE(COMMUNITY_LIST)
|
||||
DECLARE_MTYPE(COMMUNITY_LIST_NAME)
|
||||
DECLARE_MTYPE(COMMUNITY_LIST_ENTRY)
|
||||
DECLARE_MTYPE(COMMUNITY_LIST_CONFIG)
|
||||
DECLARE_MTYPE(COMMUNITY_LIST_HANDLER)
|
||||
DECLARE_MTYPE(COMMUNITY_LIST);
|
||||
DECLARE_MTYPE(COMMUNITY_LIST_NAME);
|
||||
DECLARE_MTYPE(COMMUNITY_LIST_ENTRY);
|
||||
DECLARE_MTYPE(COMMUNITY_LIST_CONFIG);
|
||||
DECLARE_MTYPE(COMMUNITY_LIST_HANDLER);
|
||||
|
||||
DECLARE_MTYPE(CLUSTER)
|
||||
DECLARE_MTYPE(CLUSTER_VAL)
|
||||
DECLARE_MTYPE(CLUSTER);
|
||||
DECLARE_MTYPE(CLUSTER_VAL);
|
||||
|
||||
DECLARE_MTYPE(BGP_PROCESS_QUEUE)
|
||||
DECLARE_MTYPE(BGP_CLEAR_NODE_QUEUE)
|
||||
DECLARE_MTYPE(BGP_PROCESS_QUEUE);
|
||||
DECLARE_MTYPE(BGP_CLEAR_NODE_QUEUE);
|
||||
|
||||
DECLARE_MTYPE(TRANSIT)
|
||||
DECLARE_MTYPE(TRANSIT_VAL)
|
||||
DECLARE_MTYPE(TRANSIT);
|
||||
DECLARE_MTYPE(TRANSIT_VAL);
|
||||
|
||||
DECLARE_MTYPE(BGP_DEBUG_FILTER)
|
||||
DECLARE_MTYPE(BGP_DEBUG_STR)
|
||||
DECLARE_MTYPE(BGP_DEBUG_FILTER);
|
||||
DECLARE_MTYPE(BGP_DEBUG_STR);
|
||||
|
||||
DECLARE_MTYPE(BGP_DISTANCE)
|
||||
DECLARE_MTYPE(BGP_NEXTHOP_CACHE)
|
||||
DECLARE_MTYPE(BGP_CONFED_LIST)
|
||||
DECLARE_MTYPE(PEER_UPDATE_SOURCE)
|
||||
DECLARE_MTYPE(PEER_CONF_IF)
|
||||
DECLARE_MTYPE(BGP_DAMP_INFO)
|
||||
DECLARE_MTYPE(BGP_DAMP_ARRAY)
|
||||
DECLARE_MTYPE(BGP_DAMP_REUSELIST)
|
||||
DECLARE_MTYPE(BGP_REGEXP)
|
||||
DECLARE_MTYPE(BGP_AGGREGATE)
|
||||
DECLARE_MTYPE(BGP_ADDR)
|
||||
DECLARE_MTYPE(TIP_ADDR)
|
||||
DECLARE_MTYPE(BGP_DISTANCE);
|
||||
DECLARE_MTYPE(BGP_NEXTHOP_CACHE);
|
||||
DECLARE_MTYPE(BGP_CONFED_LIST);
|
||||
DECLARE_MTYPE(PEER_UPDATE_SOURCE);
|
||||
DECLARE_MTYPE(PEER_CONF_IF);
|
||||
DECLARE_MTYPE(BGP_DAMP_INFO);
|
||||
DECLARE_MTYPE(BGP_DAMP_ARRAY);
|
||||
DECLARE_MTYPE(BGP_DAMP_REUSELIST);
|
||||
DECLARE_MTYPE(BGP_REGEXP);
|
||||
DECLARE_MTYPE(BGP_AGGREGATE);
|
||||
DECLARE_MTYPE(BGP_ADDR);
|
||||
DECLARE_MTYPE(TIP_ADDR);
|
||||
|
||||
DECLARE_MTYPE(BGP_REDIST)
|
||||
DECLARE_MTYPE(BGP_FILTER_NAME)
|
||||
DECLARE_MTYPE(BGP_DUMP_STR)
|
||||
DECLARE_MTYPE(ENCAP_TLV)
|
||||
DECLARE_MTYPE(BGP_REDIST);
|
||||
DECLARE_MTYPE(BGP_FILTER_NAME);
|
||||
DECLARE_MTYPE(BGP_DUMP_STR);
|
||||
DECLARE_MTYPE(ENCAP_TLV);
|
||||
|
||||
DECLARE_MTYPE(BGP_TEA_OPTIONS)
|
||||
DECLARE_MTYPE(BGP_TEA_OPTIONS_VALUE)
|
||||
DECLARE_MTYPE(BGP_TEA_OPTIONS);
|
||||
DECLARE_MTYPE(BGP_TEA_OPTIONS_VALUE);
|
||||
|
||||
DECLARE_MTYPE(LCOMMUNITY)
|
||||
DECLARE_MTYPE(LCOMMUNITY_STR)
|
||||
DECLARE_MTYPE(LCOMMUNITY_VAL)
|
||||
DECLARE_MTYPE(LCOMMUNITY);
|
||||
DECLARE_MTYPE(LCOMMUNITY_STR);
|
||||
DECLARE_MTYPE(LCOMMUNITY_VAL);
|
||||
|
||||
DECLARE_MTYPE(BGP_EVPN_MH_INFO)
|
||||
DECLARE_MTYPE(BGP_EVPN_ES)
|
||||
DECLARE_MTYPE(BGP_EVPN_ES_EVI)
|
||||
DECLARE_MTYPE(BGP_EVPN_ES_VRF)
|
||||
DECLARE_MTYPE(BGP_EVPN_ES_VTEP)
|
||||
DECLARE_MTYPE(BGP_EVPN_PATH_ES_INFO)
|
||||
DECLARE_MTYPE(BGP_EVPN_ES_EVI_VTEP)
|
||||
DECLARE_MTYPE(BGP_EVPN_MH_INFO);
|
||||
DECLARE_MTYPE(BGP_EVPN_ES);
|
||||
DECLARE_MTYPE(BGP_EVPN_ES_EVI);
|
||||
DECLARE_MTYPE(BGP_EVPN_ES_VRF);
|
||||
DECLARE_MTYPE(BGP_EVPN_ES_VTEP);
|
||||
DECLARE_MTYPE(BGP_EVPN_PATH_ES_INFO);
|
||||
DECLARE_MTYPE(BGP_EVPN_ES_EVI_VTEP);
|
||||
|
||||
DECLARE_MTYPE(BGP_EVPN)
|
||||
DECLARE_MTYPE(BGP_EVPN_IMPORT_RT)
|
||||
DECLARE_MTYPE(BGP_EVPN_VRF_IMPORT_RT)
|
||||
DECLARE_MTYPE(BGP_EVPN_MACIP)
|
||||
DECLARE_MTYPE(BGP_EVPN);
|
||||
DECLARE_MTYPE(BGP_EVPN_IMPORT_RT);
|
||||
DECLARE_MTYPE(BGP_EVPN_VRF_IMPORT_RT);
|
||||
DECLARE_MTYPE(BGP_EVPN_MACIP);
|
||||
|
||||
DECLARE_MTYPE(BGP_FLOWSPEC)
|
||||
DECLARE_MTYPE(BGP_FLOWSPEC_RULE)
|
||||
DECLARE_MTYPE(BGP_FLOWSPEC_RULE_STR)
|
||||
DECLARE_MTYPE(BGP_FLOWSPEC_COMPILED)
|
||||
DECLARE_MTYPE(BGP_FLOWSPEC_NAME)
|
||||
DECLARE_MTYPE(BGP_FLOWSPEC_INDEX)
|
||||
DECLARE_MTYPE(BGP_FLOWSPEC);
|
||||
DECLARE_MTYPE(BGP_FLOWSPEC_RULE);
|
||||
DECLARE_MTYPE(BGP_FLOWSPEC_RULE_STR);
|
||||
DECLARE_MTYPE(BGP_FLOWSPEC_COMPILED);
|
||||
DECLARE_MTYPE(BGP_FLOWSPEC_NAME);
|
||||
DECLARE_MTYPE(BGP_FLOWSPEC_INDEX);
|
||||
|
||||
DECLARE_MTYPE(BGP_SRV6_L3VPN)
|
||||
DECLARE_MTYPE(BGP_SRV6_VPN)
|
||||
DECLARE_MTYPE(BGP_SRV6_L3VPN);
|
||||
DECLARE_MTYPE(BGP_SRV6_VPN);
|
||||
|
||||
#endif /* _QUAGGA_BGP_MEMORY_H */
|
||||
|
|
|
@ -32,20 +32,20 @@
|
|||
#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", },
|
||||
{ .val_ulong = 120 },
|
||||
)
|
||||
);
|
||||
FRR_CFG_DEFAULT_ULONG(BGP_HOLDTIME,
|
||||
{ .val_ulong = 9, .match_profile = "datacenter", },
|
||||
{ .val_ulong = 180 },
|
||||
)
|
||||
);
|
||||
FRR_CFG_DEFAULT_ULONG(BGP_KEEPALIVE,
|
||||
{ .val_ulong = 3, .match_profile = "datacenter", },
|
||||
{ .val_ulong = 60 },
|
||||
)
|
||||
);
|
||||
|
||||
int routing_control_plane_protocols_name_validate(
|
||||
struct nb_cb_create_args *args)
|
||||
|
|
|
@ -68,12 +68,12 @@
|
|||
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.
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
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
|
||||
|
|
|
@ -37,12 +37,12 @@
|
|||
#include "bgpd/bgp_flowspec_private.h"
|
||||
#include "bgpd/bgp_errors.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(BGPD, PBR_MATCH_ENTRY, "PBR match entry")
|
||||
DEFINE_MTYPE_STATIC(BGPD, PBR_MATCH, "PBR match")
|
||||
DEFINE_MTYPE_STATIC(BGPD, PBR_ACTION, "PBR action")
|
||||
DEFINE_MTYPE_STATIC(BGPD, PBR_RULE, "PBR rule")
|
||||
DEFINE_MTYPE_STATIC(BGPD, PBR, "BGP PBR Context")
|
||||
DEFINE_MTYPE_STATIC(BGPD, PBR_VALMASK, "BGP PBR Val Mask Value")
|
||||
DEFINE_MTYPE_STATIC(BGPD, PBR_MATCH_ENTRY, "PBR match entry");
|
||||
DEFINE_MTYPE_STATIC(BGPD, PBR_MATCH, "PBR match");
|
||||
DEFINE_MTYPE_STATIC(BGPD, PBR_ACTION, "PBR action");
|
||||
DEFINE_MTYPE_STATIC(BGPD, PBR_RULE, "PBR rule");
|
||||
DEFINE_MTYPE_STATIC(BGPD, PBR, "BGP PBR Context");
|
||||
DEFINE_MTYPE_STATIC(BGPD, PBR_VALMASK, "BGP PBR Val Mask Value");
|
||||
|
||||
/* chain strings too long to fit in one line */
|
||||
#define FSPEC_ACTION_EXCEED_LIMIT "flowspec actions exceeds limit"
|
||||
|
|
|
@ -95,12 +95,12 @@
|
|||
|
||||
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[];
|
||||
|
@ -126,7 +126,7 @@ static const struct message bgp_pmsi_tnltype_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)
|
||||
|
|
|
@ -550,7 +550,7 @@ static inline bool bgp_check_advertise(struct bgp *bgp, struct bgp_dest *dest)
|
|||
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)
|
||||
|
|
|
@ -60,8 +60,8 @@
|
|||
#include "bgpd/bgp_rpki_clippy.c"
|
||||
#endif
|
||||
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_RPKI_CACHE, "BGP RPKI Cache server")
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_RPKI_CACHE_GROUP, "BGP RPKI Cache server group")
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_RPKI_CACHE, "BGP RPKI Cache server");
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_RPKI_CACHE_GROUP, "BGP RPKI Cache server group");
|
||||
|
||||
#define RPKI_VALID 1
|
||||
#define RPKI_NOTFOUND 2
|
||||
|
@ -1471,4 +1471,5 @@ static void install_cli_commands(void)
|
|||
|
||||
FRR_MODULE_SETUP(.name = "bgpd_rpki", .version = "0.3.6",
|
||||
.description = "Enable RPKI support for FRR.",
|
||||
.init = bgp_rpki_module_init)
|
||||
.init = bgp_rpki_module_init,
|
||||
);
|
||||
|
|
|
@ -914,4 +914,5 @@ static int bgp_snmp_module_init(void)
|
|||
|
||||
FRR_MODULE_SETUP(.name = "bgpd_snmp", .version = FRR_VERSION,
|
||||
.description = "bgpd AgentX SNMP module",
|
||||
.init = bgp_snmp_module_init)
|
||||
.init = bgp_snmp_module_init,
|
||||
);
|
||||
|
|
|
@ -86,49 +86,49 @@ FRR_CFG_DEFAULT_BOOL(BGP_IMPORT_CHECK,
|
|||
.match_version = "< 7.4",
|
||||
},
|
||||
{ .val_bool = true },
|
||||
)
|
||||
);
|
||||
FRR_CFG_DEFAULT_BOOL(BGP_SHOW_HOSTNAME,
|
||||
{ .val_bool = true, .match_profile = "datacenter", },
|
||||
{ .val_bool = false },
|
||||
)
|
||||
);
|
||||
FRR_CFG_DEFAULT_BOOL(BGP_SHOW_NEXTHOP_HOSTNAME,
|
||||
{ .val_bool = true, .match_profile = "datacenter", },
|
||||
{ .val_bool = false },
|
||||
)
|
||||
);
|
||||
FRR_CFG_DEFAULT_BOOL(BGP_LOG_NEIGHBOR_CHANGES,
|
||||
{ .val_bool = true, .match_profile = "datacenter", },
|
||||
{ .val_bool = false },
|
||||
)
|
||||
);
|
||||
FRR_CFG_DEFAULT_BOOL(BGP_DETERMINISTIC_MED,
|
||||
{ .val_bool = true, .match_profile = "datacenter", },
|
||||
{ .val_bool = false },
|
||||
)
|
||||
);
|
||||
FRR_CFG_DEFAULT_ULONG(BGP_CONNECT_RETRY,
|
||||
{ .val_ulong = 10, .match_profile = "datacenter", },
|
||||
{ .val_ulong = 120 },
|
||||
)
|
||||
);
|
||||
FRR_CFG_DEFAULT_ULONG(BGP_HOLDTIME,
|
||||
{ .val_ulong = 9, .match_profile = "datacenter", },
|
||||
{ .val_ulong = 180 },
|
||||
)
|
||||
);
|
||||
FRR_CFG_DEFAULT_ULONG(BGP_KEEPALIVE,
|
||||
{ .val_ulong = 3, .match_profile = "datacenter", },
|
||||
{ .val_ulong = 60 },
|
||||
)
|
||||
);
|
||||
FRR_CFG_DEFAULT_BOOL(BGP_EBGP_REQUIRES_POLICY,
|
||||
{ .val_bool = false, .match_profile = "datacenter", },
|
||||
{ .val_bool = false, .match_version = "< 7.4", },
|
||||
{ .val_bool = true },
|
||||
)
|
||||
);
|
||||
FRR_CFG_DEFAULT_BOOL(BGP_SUPPRESS_DUPLICATES,
|
||||
{ .val_bool = false, .match_version = "< 7.6", },
|
||||
{ .val_bool = true },
|
||||
)
|
||||
);
|
||||
|
||||
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."
|
||||
|
|
|
@ -69,7 +69,7 @@ struct zclient *zclient = NULL;
|
|||
|
||||
/* 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)
|
||||
|
|
|
@ -93,10 +93,10 @@
|
|||
|
||||
DEFINE_MTYPE_STATIC(BGPD, PEER_TX_SHUTDOWN_MSG, "Peer shutdown message (TX)");
|
||||
DEFINE_MTYPE_STATIC(BGPD, BGP_EVPN_INFO, "BGP EVPN instance information");
|
||||
DEFINE_QOBJ_TYPE(bgp_master)
|
||||
DEFINE_QOBJ_TYPE(bgp)
|
||||
DEFINE_QOBJ_TYPE(peer)
|
||||
DEFINE_HOOK(bgp_inst_delete, (struct bgp *bgp), (bgp))
|
||||
DEFINE_QOBJ_TYPE(bgp_master);
|
||||
DEFINE_QOBJ_TYPE(bgp);
|
||||
DEFINE_QOBJ_TYPE(peer);
|
||||
DEFINE_HOOK(bgp_inst_delete, (struct bgp *bgp), (bgp));
|
||||
|
||||
/* BGP process wide configuration. */
|
||||
static struct bgp_master bgp_master;
|
||||
|
|
28
bgpd/bgpd.h
28
bgpd/bgpd.h
|
@ -175,9 +175,9 @@ struct bgp_master {
|
|||
#define BM_FLAG_SEND_EXTRA_DATA_TO_ZEBRA (1 << 1)
|
||||
|
||||
bool terminating; /* global flag that sigint terminate seen */
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(bgp_master)
|
||||
DECLARE_QOBJ_TYPE(bgp_master);
|
||||
|
||||
/* BGP route-map structure. */
|
||||
struct bgp_rmap {
|
||||
|
@ -710,14 +710,14 @@ struct bgp {
|
|||
/* BGP route flap dampening configuration */
|
||||
struct bgp_damp_config damp[AFI_MAX][SAFI_MAX];
|
||||
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(bgp)
|
||||
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 {
|
||||
|
@ -1574,9 +1574,9 @@ struct peer {
|
|||
bool advmap_config_change[AFI_MAX][SAFI_MAX];
|
||||
bool advmap_table_change;
|
||||
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(peer)
|
||||
DECLARE_QOBJ_TYPE(peer);
|
||||
|
||||
/* Inherit peer attribute from peer-group. */
|
||||
#define PEER_ATTR_INHERIT(peer, group, attr) \
|
||||
|
@ -2364,17 +2364,17 @@ extern int bgp_lookup_by_as_name_type(struct bgp **bgp_val, as_t *as,
|
|||
|
||||
/* 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);
|
||||
|
||||
|
|
|
@ -52,36 +52,36 @@
|
|||
#undef BGP_VNC_DEBUG_MATCH_GROUP
|
||||
|
||||
|
||||
DEFINE_MGROUP(RFAPI, "rfapi")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_CFG, "NVE Configuration")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_GROUP_CFG, "NVE Group Configuration")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_L2_CFG, "RFAPI L2 Group Configuration")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_RFP_GROUP_CFG, "RFAPI RFP Group Configuration")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI, "RFAPI Generic")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_DESC, "RFAPI Descriptor")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_IMPORTTABLE, "RFAPI Import Table")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_MONITOR, "RFAPI Monitor VPN")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_MONITOR_ENCAP, "RFAPI Monitor Encap")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_NEXTHOP, "RFAPI Next Hop")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_VN_OPTION, "RFAPI VN Option")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_UN_OPTION, "RFAPI UN Option")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_WITHDRAW, "RFAPI Withdraw")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_RFG_NAME, "RFAPI RFGName")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_ADB, "RFAPI Advertisement Data")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_ETI, "RFAPI Export Table Info")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_NVE_ADDR, "RFAPI NVE Address")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_PREFIX_BAG, "RFAPI Prefix Bag")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_IT_EXTRA, "RFAPI IT Extra")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_INFO, "RFAPI Info")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_ADDR, "RFAPI Addr")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_UPDATED_RESPONSE_QUEUE, "RFAPI Updated Rsp Queue")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_RECENT_DELETE, "RFAPI Recently Deleted Route")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_L2ADDR_OPT, "RFAPI L2 Address Option")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_AP, "RFAPI Advertised Prefix")
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_MONITOR_ETH, "RFAPI Monitor Ethernet")
|
||||
DEFINE_MGROUP(RFAPI, "rfapi");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_CFG, "NVE Configuration");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_GROUP_CFG, "NVE Group Configuration");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_L2_CFG, "RFAPI L2 Group Configuration");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_RFP_GROUP_CFG, "RFAPI RFP Group Configuration");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI, "RFAPI Generic");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_DESC, "RFAPI Descriptor");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_IMPORTTABLE, "RFAPI Import Table");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_MONITOR, "RFAPI Monitor VPN");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_MONITOR_ENCAP, "RFAPI Monitor Encap");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_NEXTHOP, "RFAPI Next Hop");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_VN_OPTION, "RFAPI VN Option");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_UN_OPTION, "RFAPI UN Option");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_WITHDRAW, "RFAPI Withdraw");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_RFG_NAME, "RFAPI RFGName");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_ADB, "RFAPI Advertisement Data");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_ETI, "RFAPI Export Table Info");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_NVE_ADDR, "RFAPI NVE Address");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_PREFIX_BAG, "RFAPI Prefix Bag");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_IT_EXTRA, "RFAPI IT Extra");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_INFO, "RFAPI Info");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_ADDR, "RFAPI Addr");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_UPDATED_RESPONSE_QUEUE, "RFAPI Updated Rsp Queue");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_RECENT_DELETE, "RFAPI Recently Deleted Route");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_L2ADDR_OPT, "RFAPI L2 Address Option");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_AP, "RFAPI Advertised Prefix");
|
||||
DEFINE_MTYPE(RFAPI, RFAPI_MONITOR_ETH, "RFAPI Monitor Ethernet");
|
||||
|
||||
DEFINE_QOBJ_TYPE(rfapi_nve_group_cfg)
|
||||
DEFINE_QOBJ_TYPE(rfapi_l2_group_cfg)
|
||||
DEFINE_QOBJ_TYPE(rfapi_nve_group_cfg);
|
||||
DEFINE_QOBJ_TYPE(rfapi_l2_group_cfg);
|
||||
/***********************************************************************
|
||||
* RFAPI Support
|
||||
***********************************************************************/
|
||||
|
|
|
@ -35,9 +35,9 @@ struct rfapi_l2_group_cfg {
|
|||
struct ecommunity *rt_export_list;
|
||||
void *rfp_cfg; /* rfp owned group config */
|
||||
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(rfapi_l2_group_cfg)
|
||||
DECLARE_QOBJ_TYPE(rfapi_l2_group_cfg);
|
||||
|
||||
typedef enum {
|
||||
RFAPI_GROUP_CFG_NVE = 1,
|
||||
|
@ -108,9 +108,9 @@ struct rfapi_nve_group_cfg {
|
|||
/* for VRF type groups */
|
||||
uint32_t label;
|
||||
struct rfapi_descriptor *rfd;
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(rfapi_nve_group_cfg)
|
||||
DECLARE_QOBJ_TYPE(rfapi_nve_group_cfg);
|
||||
|
||||
struct rfapi_rfg_name {
|
||||
struct rfapi_nve_group_cfg *rfg;
|
||||
|
|
|
@ -367,33 +367,33 @@ extern int rfapi_extract_l2o(
|
|||
*/
|
||||
extern time_t rfapi_time(time_t *t);
|
||||
|
||||
DECLARE_MGROUP(RFAPI)
|
||||
DECLARE_MTYPE(RFAPI_CFG)
|
||||
DECLARE_MTYPE(RFAPI_GROUP_CFG)
|
||||
DECLARE_MTYPE(RFAPI_L2_CFG)
|
||||
DECLARE_MTYPE(RFAPI_RFP_GROUP_CFG)
|
||||
DECLARE_MTYPE(RFAPI)
|
||||
DECLARE_MTYPE(RFAPI_DESC)
|
||||
DECLARE_MTYPE(RFAPI_IMPORTTABLE)
|
||||
DECLARE_MTYPE(RFAPI_MONITOR)
|
||||
DECLARE_MTYPE(RFAPI_MONITOR_ENCAP)
|
||||
DECLARE_MTYPE(RFAPI_NEXTHOP)
|
||||
DECLARE_MTYPE(RFAPI_VN_OPTION)
|
||||
DECLARE_MTYPE(RFAPI_UN_OPTION)
|
||||
DECLARE_MTYPE(RFAPI_WITHDRAW)
|
||||
DECLARE_MTYPE(RFAPI_RFG_NAME)
|
||||
DECLARE_MTYPE(RFAPI_ADB)
|
||||
DECLARE_MTYPE(RFAPI_ETI)
|
||||
DECLARE_MTYPE(RFAPI_NVE_ADDR)
|
||||
DECLARE_MTYPE(RFAPI_PREFIX_BAG)
|
||||
DECLARE_MTYPE(RFAPI_IT_EXTRA)
|
||||
DECLARE_MTYPE(RFAPI_INFO)
|
||||
DECLARE_MTYPE(RFAPI_ADDR)
|
||||
DECLARE_MTYPE(RFAPI_UPDATED_RESPONSE_QUEUE)
|
||||
DECLARE_MTYPE(RFAPI_RECENT_DELETE)
|
||||
DECLARE_MTYPE(RFAPI_L2ADDR_OPT)
|
||||
DECLARE_MTYPE(RFAPI_AP)
|
||||
DECLARE_MTYPE(RFAPI_MONITOR_ETH)
|
||||
DECLARE_MGROUP(RFAPI);
|
||||
DECLARE_MTYPE(RFAPI_CFG);
|
||||
DECLARE_MTYPE(RFAPI_GROUP_CFG);
|
||||
DECLARE_MTYPE(RFAPI_L2_CFG);
|
||||
DECLARE_MTYPE(RFAPI_RFP_GROUP_CFG);
|
||||
DECLARE_MTYPE(RFAPI);
|
||||
DECLARE_MTYPE(RFAPI_DESC);
|
||||
DECLARE_MTYPE(RFAPI_IMPORTTABLE);
|
||||
DECLARE_MTYPE(RFAPI_MONITOR);
|
||||
DECLARE_MTYPE(RFAPI_MONITOR_ENCAP);
|
||||
DECLARE_MTYPE(RFAPI_NEXTHOP);
|
||||
DECLARE_MTYPE(RFAPI_VN_OPTION);
|
||||
DECLARE_MTYPE(RFAPI_UN_OPTION);
|
||||
DECLARE_MTYPE(RFAPI_WITHDRAW);
|
||||
DECLARE_MTYPE(RFAPI_RFG_NAME);
|
||||
DECLARE_MTYPE(RFAPI_ADB);
|
||||
DECLARE_MTYPE(RFAPI_ETI);
|
||||
DECLARE_MTYPE(RFAPI_NVE_ADDR);
|
||||
DECLARE_MTYPE(RFAPI_PREFIX_BAG);
|
||||
DECLARE_MTYPE(RFAPI_IT_EXTRA);
|
||||
DECLARE_MTYPE(RFAPI_INFO);
|
||||
DECLARE_MTYPE(RFAPI_ADDR);
|
||||
DECLARE_MTYPE(RFAPI_UPDATED_RESPONSE_QUEUE);
|
||||
DECLARE_MTYPE(RFAPI_RECENT_DELETE);
|
||||
DECLARE_MTYPE(RFAPI_L2ADDR_OPT);
|
||||
DECLARE_MTYPE(RFAPI_AP);
|
||||
DECLARE_MTYPE(RFAPI_MONITOR_ETH);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -220,7 +220,7 @@ bgpd_bgpd_LDADD = bgpd/libbgp.a $(RFPLDADD) lib/libfrr.la $(LIBCAP) $(LIBM) $(US
|
|||
bgpd_bgp_btoa_LDADD = bgpd/libbgp.a $(RFPLDADD) lib/libfrr.la $(LIBCAP) $(LIBM) $(UST_LIBS)
|
||||
|
||||
bgpd_bgpd_snmp_la_SOURCES = bgpd/bgp_snmp.c bgpd/bgp_mplsvpn_snmp.c
|
||||
bgpd_bgpd_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu99
|
||||
bgpd_bgpd_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu11
|
||||
bgpd_bgpd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
|
||||
bgpd_bgpd_snmp_la_LIBADD = lib/libfrrsnmp.la
|
||||
|
||||
|
|
|
@ -15,13 +15,13 @@ Example:
|
|||
: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);
|
||||
|
||||
|
@ -110,9 +110,9 @@ Definition
|
|||
|
||||
.. 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)
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ The common setup pattern will look like this:
|
|||
|
||||
#include <typesafe.h>
|
||||
|
||||
PREDECL_XXX(Z)
|
||||
PREDECL_XXX(Z);
|
||||
struct item {
|
||||
int otherdata;
|
||||
struct Z_item mylistitem;
|
||||
|
@ -149,20 +149,20 @@ The common setup pattern will look like this:
|
|||
struct Z_head mylisthead;
|
||||
|
||||
/* unsorted: */
|
||||
DECLARE_XXX(Z, struct item, mylistitem)
|
||||
DECLARE_XXX(Z, struct item, mylistitem);
|
||||
|
||||
/* sorted, items that compare as equal cannot be added to list */
|
||||
int compare_func(const struct item *a, const struct item *b);
|
||||
DECLARE_XXX_UNIQ(Z, struct item, mylistitem, compare_func)
|
||||
DECLARE_XXX_UNIQ(Z, struct item, mylistitem, compare_func);
|
||||
|
||||
/* sorted, items that compare as equal can be added to list */
|
||||
int compare_func(const struct item *a, const struct item *b);
|
||||
DECLARE_XXX_NONUNIQ(Z, struct item, mylistitem, compare_func)
|
||||
DECLARE_XXX_NONUNIQ(Z, struct item, mylistitem, compare_func);
|
||||
|
||||
/* hash tables: */
|
||||
int compare_func(const struct item *a, const struct item *b);
|
||||
uint32_t hash_func(const struct item *a);
|
||||
DECLARE_XXX(Z, struct item, mylistitem, compare_func, hash_func)
|
||||
DECLARE_XXX(Z, struct item, mylistitem, compare_func, hash_func);
|
||||
|
||||
``XXX`` is replaced with the name of the data structure, e.g. ``SKIPLIST``
|
||||
or ``ATOMLIST``. The ``DECLARE_XXX`` invocation can either occur in a `.h`
|
||||
|
|
|
@ -15,15 +15,15 @@ Example:
|
|||
.. code-block:: c
|
||||
:caption: mydaemon.h
|
||||
|
||||
DECLARE_MGROUP(MYDAEMON)
|
||||
DECLARE_MTYPE(MYNEIGHBOR)
|
||||
DECLARE_MGROUP(MYDAEMON);
|
||||
DECLARE_MTYPE(MYNEIGHBOR);
|
||||
|
||||
.. code-block:: c
|
||||
:caption: mydaemon.c
|
||||
|
||||
DEFINE_MGROUP( MYDAEMON, "My daemon's memory")
|
||||
DEFINE_MTYPE( MYDAEMON, MYNEIGHBOR, "Neighbor entry")
|
||||
DEFINE_MTYPE_STATIC(MYDAEMON, MYNEIGHBORNAME, "Neighbor name")
|
||||
DEFINE_MGROUP( MYDAEMON, "My daemon's memory");
|
||||
DEFINE_MTYPE( MYDAEMON, MYNEIGHBOR, "Neighbor entry");
|
||||
DEFINE_MTYPE_STATIC(MYDAEMON, MYNEIGHBORNAME, "Neighbor name");
|
||||
|
||||
struct neigh *neighbor_new(const char *name)
|
||||
{
|
||||
|
|
|
@ -76,7 +76,7 @@ Basic boilerplate:
|
|||
.version = "0.0",
|
||||
.description = "my module",
|
||||
.init = module_init,
|
||||
)
|
||||
);
|
||||
|
||||
The ``frr_late_init`` hook will be called after the daemon has finished
|
||||
its other startup and is about to enter the main event loop; this is the
|
||||
|
|
|
@ -155,7 +155,8 @@ FRR_DAEMON_INFO(eigrpd, EIGRP, .vty_port = EIGRP_VTY_PORT,
|
|||
.n_signals = array_size(eigrp_signals),
|
||||
|
||||
.privs = &eigrpd_privs, .yang_modules = eigrpd_yang_modules,
|
||||
.n_yang_modules = array_size(eigrpd_yang_modules), )
|
||||
.n_yang_modules = array_size(eigrpd_yang_modules),
|
||||
);
|
||||
|
||||
/* EIGRPd main routine. */
|
||||
int main(int argc, char **argv, char **envp)
|
||||
|
|
|
@ -25,18 +25,18 @@
|
|||
|
||||
#include "eigrp_memory.h"
|
||||
|
||||
DEFINE_MGROUP(EIGRPD, "eigrpd")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_TOP, "EIGRP structure")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_IF, "EIGRP interface")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_NEIGHBOR, "EIGRP neighbor")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_IF_PARAMS, "EIGRP Interface Parameters")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_IF_INFO, "EIGRP Interface Information")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_FIFO, "EIGRP FIFO")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_PACKET, "EIGRP Packet")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_IPV4_INT_TLV, "EIGRP IPv4 TLV")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_SEQ_TLV, "EIGRP SEQ TLV")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_AUTH_TLV, "EIGRP AUTH TLV")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_AUTH_SHA256_TLV, "EIGRP SHA TLV")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_PREFIX_DESCRIPTOR, "EIGRP Prefix")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_ROUTE_DESCRIPTOR, "EIGRP Nexthop Entry")
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_FSM_MSG, "EIGRP FSM Message")
|
||||
DEFINE_MGROUP(EIGRPD, "eigrpd");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_TOP, "EIGRP structure");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_IF, "EIGRP interface");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_NEIGHBOR, "EIGRP neighbor");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_IF_PARAMS, "EIGRP Interface Parameters");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_IF_INFO, "EIGRP Interface Information");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_FIFO, "EIGRP FIFO");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_PACKET, "EIGRP Packet");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_IPV4_INT_TLV, "EIGRP IPv4 TLV");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_SEQ_TLV, "EIGRP SEQ TLV");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_AUTH_TLV, "EIGRP AUTH TLV");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_AUTH_SHA256_TLV, "EIGRP SHA TLV");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_PREFIX_DESCRIPTOR, "EIGRP Prefix");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_ROUTE_DESCRIPTOR, "EIGRP Nexthop Entry");
|
||||
DEFINE_MTYPE(EIGRPD, EIGRP_FSM_MSG, "EIGRP FSM Message");
|
||||
|
|
|
@ -24,20 +24,20 @@
|
|||
|
||||
#include "memory.h"
|
||||
|
||||
DECLARE_MGROUP(EIGRPD)
|
||||
DECLARE_MTYPE(EIGRP_TOP)
|
||||
DECLARE_MTYPE(EIGRP_IF)
|
||||
DECLARE_MTYPE(EIGRP_NEIGHBOR)
|
||||
DECLARE_MTYPE(EIGRP_IF_PARAMS)
|
||||
DECLARE_MTYPE(EIGRP_IF_INFO)
|
||||
DECLARE_MTYPE(EIGRP_FIFO)
|
||||
DECLARE_MTYPE(EIGRP_PACKET)
|
||||
DECLARE_MTYPE(EIGRP_IPV4_INT_TLV)
|
||||
DECLARE_MTYPE(EIGRP_SEQ_TLV)
|
||||
DECLARE_MTYPE(EIGRP_AUTH_TLV)
|
||||
DECLARE_MTYPE(EIGRP_AUTH_SHA256_TLV)
|
||||
DECLARE_MTYPE(EIGRP_PREFIX_DESCRIPTOR)
|
||||
DECLARE_MTYPE(EIGRP_ROUTE_DESCRIPTOR)
|
||||
DECLARE_MTYPE(EIGRP_FSM_MSG)
|
||||
DECLARE_MGROUP(EIGRPD);
|
||||
DECLARE_MTYPE(EIGRP_TOP);
|
||||
DECLARE_MTYPE(EIGRP_IF);
|
||||
DECLARE_MTYPE(EIGRP_NEIGHBOR);
|
||||
DECLARE_MTYPE(EIGRP_IF_PARAMS);
|
||||
DECLARE_MTYPE(EIGRP_IF_INFO);
|
||||
DECLARE_MTYPE(EIGRP_FIFO);
|
||||
DECLARE_MTYPE(EIGRP_PACKET);
|
||||
DECLARE_MTYPE(EIGRP_IPV4_INT_TLV);
|
||||
DECLARE_MTYPE(EIGRP_SEQ_TLV);
|
||||
DECLARE_MTYPE(EIGRP_AUTH_TLV);
|
||||
DECLARE_MTYPE(EIGRP_AUTH_SHA256_TLV);
|
||||
DECLARE_MTYPE(EIGRP_PREFIX_DESCRIPTOR);
|
||||
DECLARE_MTYPE(EIGRP_ROUTE_DESCRIPTOR);
|
||||
DECLARE_MTYPE(EIGRP_FSM_MSG);
|
||||
|
||||
#endif /* _FRR_EIGRP_MEMORY_H */
|
||||
|
|
|
@ -126,9 +126,9 @@ struct eigrp {
|
|||
/* distribute_ctx */
|
||||
struct distribute_ctx *distribute_ctx;
|
||||
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(eigrp)
|
||||
DECLARE_QOBJ_TYPE(eigrp);
|
||||
|
||||
struct eigrp_if_params {
|
||||
uint8_t passive_interface;
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
#include "eigrpd/eigrp_memory.h"
|
||||
#include "eigrpd/eigrp_filter.h"
|
||||
|
||||
DEFINE_QOBJ_TYPE(eigrp)
|
||||
DEFINE_QOBJ_TYPE(eigrp);
|
||||
|
||||
static struct eigrp_master eigrp_master;
|
||||
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
#include "isisd/isis_tx_queue.h"
|
||||
#include "isisd/isis_csm.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(ISISD, FABRICD_STATE, "ISIS OpenFabric")
|
||||
DEFINE_MTYPE_STATIC(ISISD, FABRICD_NEIGHBOR, "ISIS OpenFabric Neighbor Entry")
|
||||
DEFINE_MTYPE_STATIC(ISISD, FABRICD_FLOODING_INFO, "ISIS OpenFabric Flooding Log")
|
||||
DEFINE_MTYPE_STATIC(ISISD, FABRICD_STATE, "ISIS OpenFabric");
|
||||
DEFINE_MTYPE_STATIC(ISISD, FABRICD_NEIGHBOR, "ISIS OpenFabric Neighbor Entry");
|
||||
DEFINE_MTYPE_STATIC(ISISD, FABRICD_FLOODING_INFO, "ISIS OpenFabric Flooding Log");
|
||||
|
||||
/* Tracks initial synchronization as per section 2.4
|
||||
*
|
||||
|
|
|
@ -146,7 +146,7 @@ struct isis_adjacency *isis_adj_find(const struct isis_area *area, int level,
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -123,11 +123,11 @@ void isis_delete_adj(void *adj);
|
|||
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);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "isisd/isisd.h"
|
||||
#include "isisd/fabricd.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(ISISD, BFD_SESSION, "ISIS BFD Session")
|
||||
DEFINE_MTYPE_STATIC(ISISD, BFD_SESSION, "ISIS BFD Session");
|
||||
|
||||
struct bfd_session {
|
||||
int family;
|
||||
|
|
|
@ -61,9 +61,9 @@
|
|||
#include "isisd/isis_nb.h"
|
||||
#include "isisd/isis_ldp_sync.h"
|
||||
|
||||
DEFINE_QOBJ_TYPE(isis_circuit)
|
||||
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.
|
||||
|
@ -308,7 +308,7 @@ struct isis_circuit *circuit_scan_by_ifp(struct interface *ifp)
|
|||
}
|
||||
|
||||
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)
|
||||
|
@ -1085,7 +1085,7 @@ void isis_circuit_print_vty(struct isis_circuit *circuit, struct vty *vty,
|
|||
#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)
|
||||
{
|
||||
|
|
|
@ -174,9 +174,9 @@ struct isis_circuit {
|
|||
*/
|
||||
struct list *snmp_adj_list; /* List in id order */
|
||||
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(isis_circuit)
|
||||
DECLARE_QOBJ_TYPE(isis_circuit);
|
||||
|
||||
void isis_circuit_init(void);
|
||||
struct isis_circuit *isis_circuit_new(struct isis *isis);
|
||||
|
@ -231,10 +231,10 @@ int isis_circuit_mt_enabled_set(struct isis_circuit *circuit, uint16_t mtid,
|
|||
#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 */
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
#include "lib/typesafe.h"
|
||||
#include "lib/zclient.h"
|
||||
|
||||
PREDECL_RBTREE_UNIQ(lfa_tiebreaker_tree)
|
||||
PREDECL_RBTREE_UNIQ(rlfa_tree)
|
||||
PREDECL_RBTREE_UNIQ(lfa_tiebreaker_tree);
|
||||
PREDECL_RBTREE_UNIQ(rlfa_tree);
|
||||
|
||||
enum lfa_tiebreaker_type {
|
||||
LFA_TIEBREAKER_DOWNSTREAM = 0,
|
||||
|
@ -41,7 +41,7 @@ struct lfa_tiebreaker {
|
|||
int lfa_tiebreaker_cmp(const struct lfa_tiebreaker *a,
|
||||
const struct lfa_tiebreaker *b);
|
||||
DECLARE_RBTREE_UNIQ(lfa_tiebreaker_tree, struct lfa_tiebreaker, entry,
|
||||
lfa_tiebreaker_cmp)
|
||||
lfa_tiebreaker_cmp);
|
||||
|
||||
struct rlfa {
|
||||
struct rlfa_tree_item entry;
|
||||
|
@ -50,7 +50,7 @@ struct rlfa {
|
|||
struct in_addr pq_address;
|
||||
};
|
||||
int rlfa_cmp(const struct rlfa *a, const struct rlfa *b);
|
||||
DECLARE_RBTREE_UNIQ(rlfa_tree, struct rlfa, entry, rlfa_cmp)
|
||||
DECLARE_RBTREE_UNIQ(rlfa_tree, struct rlfa, entry, rlfa_cmp);
|
||||
|
||||
enum isis_tilfa_sid_type {
|
||||
TILFA_SID_PREFIX = 1,
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "lib/typesafe.h"
|
||||
#include "isisd/isis_pdu.h"
|
||||
|
||||
PREDECL_RBTREE_UNIQ(lspdb)
|
||||
PREDECL_RBTREE_UNIQ(lspdb);
|
||||
|
||||
struct isis;
|
||||
/* Structure for isis_lsp, this structure will only support the fixed
|
||||
|
@ -61,7 +61,7 @@ struct isis_lsp {
|
|||
};
|
||||
|
||||
extern int lspdb_compare(const struct isis_lsp *a, const struct isis_lsp *b);
|
||||
DECLARE_RBTREE_UNIQ(lspdb, struct isis_lsp, dbe, lspdb_compare)
|
||||
DECLARE_RBTREE_UNIQ(lspdb, struct isis_lsp, dbe, lspdb_compare);
|
||||
|
||||
void lsp_db_init(struct lspdb_head *head);
|
||||
void lsp_db_fini(struct lspdb_head *head);
|
||||
|
|
|
@ -193,7 +193,8 @@ FRR_DAEMON_INFO(isisd, ISIS, .vty_port = ISISD_VTY_PORT,
|
|||
.n_signals = array_size(isisd_signals),
|
||||
|
||||
.privs = &isisd_privs, .yang_modules = isisd_yang_modules,
|
||||
.n_yang_modules = array_size(isisd_yang_modules), )
|
||||
.n_yang_modules = array_size(isisd_yang_modules),
|
||||
);
|
||||
|
||||
/*
|
||||
* Main routine of isisd. Parse arguments and handle IS-IS state machine.
|
||||
|
|
|
@ -25,25 +25,25 @@
|
|||
|
||||
#include "isis_memory.h"
|
||||
|
||||
DEFINE_MGROUP(ISISD, "isisd")
|
||||
DEFINE_MTYPE(ISISD, ISIS, "ISIS")
|
||||
DEFINE_MTYPE(ISISD, ISIS_TMP, "ISIS TMP")
|
||||
DEFINE_MTYPE(ISISD, ISIS_CIRCUIT, "ISIS circuit")
|
||||
DEFINE_MTYPE(ISISD, ISIS_LSP, "ISIS LSP")
|
||||
DEFINE_MTYPE(ISISD, ISIS_ADJACENCY, "ISIS adjacency")
|
||||
DEFINE_MTYPE(ISISD, ISIS_ADJACENCY_INFO, "ISIS adjacency info")
|
||||
DEFINE_MTYPE(ISISD, ISIS_AREA, "ISIS area")
|
||||
DEFINE_MTYPE(ISISD, ISIS_AREA_ADDR, "ISIS area address")
|
||||
DEFINE_MTYPE(ISISD, ISIS_DYNHN, "ISIS dyn hostname")
|
||||
DEFINE_MTYPE(ISISD, ISIS_SPFTREE, "ISIS SPFtree")
|
||||
DEFINE_MTYPE(ISISD, ISIS_VERTEX, "ISIS vertex")
|
||||
DEFINE_MTYPE(ISISD, ISIS_ROUTE_INFO, "ISIS route info")
|
||||
DEFINE_MTYPE(ISISD, ISIS_NEXTHOP, "ISIS nexthop")
|
||||
DEFINE_MTYPE(ISISD, ISIS_NEXTHOP_LABELS, "ISIS nexthop MPLS labels")
|
||||
DEFINE_MTYPE(ISISD, ISIS_DICT, "ISIS dictionary")
|
||||
DEFINE_MTYPE(ISISD, ISIS_DICT_NODE, "ISIS dictionary node")
|
||||
DEFINE_MTYPE(ISISD, ISIS_EXT_ROUTE, "ISIS redistributed route")
|
||||
DEFINE_MTYPE(ISISD, ISIS_EXT_INFO, "ISIS redistributed route info")
|
||||
DEFINE_MTYPE(ISISD, ISIS_MPLS_TE, "ISIS MPLS_TE parameters")
|
||||
DEFINE_MTYPE(ISISD, ISIS_ACL_NAME, "ISIS access-list name")
|
||||
DEFINE_MTYPE(ISISD, ISIS_PLIST_NAME, "ISIS prefix-list name")
|
||||
DEFINE_MGROUP(ISISD, "isisd");
|
||||
DEFINE_MTYPE(ISISD, ISIS, "ISIS");
|
||||
DEFINE_MTYPE(ISISD, ISIS_TMP, "ISIS TMP");
|
||||
DEFINE_MTYPE(ISISD, ISIS_CIRCUIT, "ISIS circuit");
|
||||
DEFINE_MTYPE(ISISD, ISIS_LSP, "ISIS LSP");
|
||||
DEFINE_MTYPE(ISISD, ISIS_ADJACENCY, "ISIS adjacency");
|
||||
DEFINE_MTYPE(ISISD, ISIS_ADJACENCY_INFO, "ISIS adjacency info");
|
||||
DEFINE_MTYPE(ISISD, ISIS_AREA, "ISIS area");
|
||||
DEFINE_MTYPE(ISISD, ISIS_AREA_ADDR, "ISIS area address");
|
||||
DEFINE_MTYPE(ISISD, ISIS_DYNHN, "ISIS dyn hostname");
|
||||
DEFINE_MTYPE(ISISD, ISIS_SPFTREE, "ISIS SPFtree");
|
||||
DEFINE_MTYPE(ISISD, ISIS_VERTEX, "ISIS vertex");
|
||||
DEFINE_MTYPE(ISISD, ISIS_ROUTE_INFO, "ISIS route info");
|
||||
DEFINE_MTYPE(ISISD, ISIS_NEXTHOP, "ISIS nexthop");
|
||||
DEFINE_MTYPE(ISISD, ISIS_NEXTHOP_LABELS, "ISIS nexthop MPLS labels");
|
||||
DEFINE_MTYPE(ISISD, ISIS_DICT, "ISIS dictionary");
|
||||
DEFINE_MTYPE(ISISD, ISIS_DICT_NODE, "ISIS dictionary node");
|
||||
DEFINE_MTYPE(ISISD, ISIS_EXT_ROUTE, "ISIS redistributed route");
|
||||
DEFINE_MTYPE(ISISD, ISIS_EXT_INFO, "ISIS redistributed route info");
|
||||
DEFINE_MTYPE(ISISD, ISIS_MPLS_TE, "ISIS MPLS_TE parameters");
|
||||
DEFINE_MTYPE(ISISD, ISIS_ACL_NAME, "ISIS access-list name");
|
||||
DEFINE_MTYPE(ISISD, ISIS_PLIST_NAME, "ISIS prefix-list name");
|
||||
|
|
|
@ -24,27 +24,27 @@
|
|||
|
||||
#include "memory.h"
|
||||
|
||||
DECLARE_MGROUP(ISISD)
|
||||
DECLARE_MTYPE(ISIS)
|
||||
DECLARE_MTYPE(ISIS_TMP)
|
||||
DECLARE_MTYPE(ISIS_CIRCUIT)
|
||||
DECLARE_MTYPE(ISIS_LSP)
|
||||
DECLARE_MTYPE(ISIS_ADJACENCY)
|
||||
DECLARE_MTYPE(ISIS_ADJACENCY_INFO)
|
||||
DECLARE_MTYPE(ISIS_AREA)
|
||||
DECLARE_MTYPE(ISIS_AREA_ADDR)
|
||||
DECLARE_MTYPE(ISIS_DYNHN)
|
||||
DECLARE_MTYPE(ISIS_SPFTREE)
|
||||
DECLARE_MTYPE(ISIS_VERTEX)
|
||||
DECLARE_MTYPE(ISIS_ROUTE_INFO)
|
||||
DECLARE_MTYPE(ISIS_NEXTHOP)
|
||||
DECLARE_MTYPE(ISIS_NEXTHOP_LABELS)
|
||||
DECLARE_MTYPE(ISIS_DICT)
|
||||
DECLARE_MTYPE(ISIS_DICT_NODE)
|
||||
DECLARE_MTYPE(ISIS_EXT_ROUTE)
|
||||
DECLARE_MTYPE(ISIS_EXT_INFO)
|
||||
DECLARE_MTYPE(ISIS_MPLS_TE)
|
||||
DECLARE_MTYPE(ISIS_ACL_NAME)
|
||||
DECLARE_MTYPE(ISIS_PLIST_NAME)
|
||||
DECLARE_MGROUP(ISISD);
|
||||
DECLARE_MTYPE(ISIS);
|
||||
DECLARE_MTYPE(ISIS_TMP);
|
||||
DECLARE_MTYPE(ISIS_CIRCUIT);
|
||||
DECLARE_MTYPE(ISIS_LSP);
|
||||
DECLARE_MTYPE(ISIS_ADJACENCY);
|
||||
DECLARE_MTYPE(ISIS_ADJACENCY_INFO);
|
||||
DECLARE_MTYPE(ISIS_AREA);
|
||||
DECLARE_MTYPE(ISIS_AREA_ADDR);
|
||||
DECLARE_MTYPE(ISIS_DYNHN);
|
||||
DECLARE_MTYPE(ISIS_SPFTREE);
|
||||
DECLARE_MTYPE(ISIS_VERTEX);
|
||||
DECLARE_MTYPE(ISIS_ROUTE_INFO);
|
||||
DECLARE_MTYPE(ISIS_NEXTHOP);
|
||||
DECLARE_MTYPE(ISIS_NEXTHOP_LABELS);
|
||||
DECLARE_MTYPE(ISIS_DICT);
|
||||
DECLARE_MTYPE(ISIS_DICT_NODE);
|
||||
DECLARE_MTYPE(ISIS_EXT_ROUTE);
|
||||
DECLARE_MTYPE(ISIS_EXT_INFO);
|
||||
DECLARE_MTYPE(ISIS_MPLS_TE);
|
||||
DECLARE_MTYPE(ISIS_ACL_NAME);
|
||||
DECLARE_MTYPE(ISIS_PLIST_NAME);
|
||||
|
||||
#endif /* _QUAGGA_ISIS_MEMORY_H */
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
#include "isisd/isis_mt.h"
|
||||
#include "isisd/isis_tlvs.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(ISISD, MT_AREA_SETTING, "ISIS MT Area Setting")
|
||||
DEFINE_MTYPE_STATIC(ISISD, MT_CIRCUIT_SETTING, "ISIS MT Circuit Setting")
|
||||
DEFINE_MTYPE_STATIC(ISISD, MT_ADJ_INFO, "ISIS MT Adjacency Info")
|
||||
DEFINE_MTYPE_STATIC(ISISD, MT_AREA_SETTING, "ISIS MT Area Setting");
|
||||
DEFINE_MTYPE_STATIC(ISISD, MT_CIRCUIT_SETTING, "ISIS MT Circuit Setting");
|
||||
DEFINE_MTYPE_STATIC(ISISD, MT_ADJ_INFO, "ISIS MT Adjacency Info");
|
||||
|
||||
bool isis_area_ipv6_dstsrc_enabled(struct isis_area *area)
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
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);
|
||||
|
|
|
@ -52,7 +52,7 @@ struct isis_route_info {
|
|||
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,
|
||||
|
|
|
@ -3452,6 +3452,9 @@ static int isis_snmp_module_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
FRR_MODULE_SETUP(.name = "isis_snmp", .version = FRR_VERSION,
|
||||
FRR_MODULE_SETUP(
|
||||
.name = "isis_snmp",
|
||||
.version = FRR_VERSION,
|
||||
.description = "isis AgentX SNMP module",
|
||||
.init = isis_snmp_module_init, )
|
||||
.init = isis_snmp_module_init,
|
||||
);
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include "isisd/isis_errors.h"
|
||||
|
||||
/* Local variables and functions */
|
||||
DEFINE_MTYPE_STATIC(ISISD, ISIS_SR_INFO, "ISIS segment routing information")
|
||||
DEFINE_MTYPE_STATIC(ISISD, ISIS_SR_INFO, "ISIS segment routing information");
|
||||
|
||||
static void sr_local_block_delete(struct isis_area *area);
|
||||
static int sr_local_block_init(struct isis_area *area);
|
||||
|
@ -73,7 +73,7 @@ static inline int sr_prefix_sid_cfg_compare(const struct sr_prefix_cfg *a,
|
|||
return prefix_cmp(&a->prefix, &b->prefix);
|
||||
}
|
||||
DECLARE_RBTREE_UNIQ(srdb_prefix_cfg, struct sr_prefix_cfg, entry,
|
||||
sr_prefix_sid_cfg_compare)
|
||||
sr_prefix_sid_cfg_compare);
|
||||
|
||||
/**
|
||||
* Find SRGB associated to a System ID.
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#define SRLB_UPPER_BOUND 15999
|
||||
|
||||
/* Segment Routing Data Base (SRDB) RB-Tree structure */
|
||||
PREDECL_RBTREE_UNIQ(srdb_prefix_cfg)
|
||||
PREDECL_RBTREE_UNIQ(srdb_prefix_cfg);
|
||||
|
||||
/*
|
||||
* Segment Routing Prefix-SID information.
|
||||
|
|
|
@ -45,9 +45,9 @@
|
|||
#include "isisd/isis_te.h"
|
||||
#include "isisd/isis_sr.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(ISISD, ISIS_TLV, "ISIS TLVs")
|
||||
DEFINE_MTYPE(ISISD, ISIS_SUBTLV, "ISIS Sub-TLVs")
|
||||
DEFINE_MTYPE_STATIC(ISISD, ISIS_MT_ITEM_LIST, "ISIS MT Item Lists")
|
||||
DEFINE_MTYPE_STATIC(ISISD, ISIS_TLV, "ISIS TLVs");
|
||||
DEFINE_MTYPE(ISISD, ISIS_SUBTLV, "ISIS Sub-TLVs");
|
||||
DEFINE_MTYPE_STATIC(ISISD, ISIS_MT_ITEM_LIST, "ISIS MT Item Lists");
|
||||
|
||||
typedef int (*unpack_tlv_func)(enum isis_tlv_context context, uint8_t tlv_type,
|
||||
uint8_t tlv_len, struct stream *s,
|
||||
|
@ -4488,9 +4488,9 @@ static void tlvs_protocols_supported_to_adj(struct isis_tlvs *tlvs,
|
|||
}
|
||||
|
||||
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,
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "openbsd-tree.h"
|
||||
#include "prefix.h"
|
||||
|
||||
DECLARE_MTYPE(ISIS_SUBTLV)
|
||||
DECLARE_MTYPE(ISIS_SUBTLV);
|
||||
|
||||
struct lspdb_head;
|
||||
struct isis_subtlvs;
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
#include "isisd/isis_misc.h"
|
||||
#include "isisd/isis_tx_queue.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(ISISD, TX_QUEUE, "ISIS TX Queue")
|
||||
DEFINE_MTYPE_STATIC(ISISD, TX_QUEUE_ENTRY, "ISIS TX Queue Entry")
|
||||
DEFINE_MTYPE_STATIC(ISISD, TX_QUEUE, "ISIS TX Queue");
|
||||
DEFINE_MTYPE_STATIC(ISISD, TX_QUEUE_ENTRY, "ISIS TX Queue Entry");
|
||||
|
||||
struct isis_tx_queue {
|
||||
struct isis_circuit *circuit;
|
||||
|
|
|
@ -81,7 +81,7 @@ unsigned long debug_sr;
|
|||
unsigned long debug_ldp_sync;
|
||||
unsigned long debug_lfa;
|
||||
|
||||
DEFINE_QOBJ_TYPE(isis_area)
|
||||
DEFINE_QOBJ_TYPE(isis_area);
|
||||
|
||||
/* ISIS process wide configuration. */
|
||||
static struct isis_master isis_master;
|
||||
|
|
|
@ -236,11 +236,11 @@ struct isis_area {
|
|||
uint64_t id_len_mismatches[2];
|
||||
uint64_t lsp_error_counter[2];
|
||||
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(isis_area)
|
||||
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);
|
||||
|
|
|
@ -142,7 +142,7 @@ nodist_isisd_isisd_SOURCES = \
|
|||
# end
|
||||
|
||||
isisd_isisd_snmp_la_SOURCES = isisd/isis_snmp.c
|
||||
isisd_isisd_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu99
|
||||
isisd_isisd_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu11
|
||||
isisd_isisd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
|
||||
isisd_isisd_snmp_la_LIBADD = lib/libfrrsnmp.la
|
||||
|
||||
|
|
|
@ -1239,6 +1239,9 @@ static int ldp_snmp_module_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
FRR_MODULE_SETUP(.name = "ldp_snmp", .version = FRR_VERSION,
|
||||
FRR_MODULE_SETUP(
|
||||
.name = "ldp_snmp",
|
||||
.version = FRR_VERSION,
|
||||
.description = "ldp AgentX SNMP module",
|
||||
.init = ldp_snmp_module_init, )
|
||||
.init = ldp_snmp_module_init,
|
||||
);
|
||||
|
|
18
ldpd/ldpd.c
18
ldpd/ldpd.c
|
@ -69,13 +69,13 @@ static void merge_l2vpns(struct ldpd_conf *, struct ldpd_conf *);
|
|||
static void merge_l2vpn(struct ldpd_conf *, struct l2vpn *,
|
||||
struct l2vpn *);
|
||||
|
||||
DEFINE_QOBJ_TYPE(iface)
|
||||
DEFINE_QOBJ_TYPE(tnbr)
|
||||
DEFINE_QOBJ_TYPE(nbr_params)
|
||||
DEFINE_QOBJ_TYPE(l2vpn_if)
|
||||
DEFINE_QOBJ_TYPE(l2vpn_pw)
|
||||
DEFINE_QOBJ_TYPE(l2vpn)
|
||||
DEFINE_QOBJ_TYPE(ldpd_conf)
|
||||
DEFINE_QOBJ_TYPE(iface);
|
||||
DEFINE_QOBJ_TYPE(tnbr);
|
||||
DEFINE_QOBJ_TYPE(nbr_params);
|
||||
DEFINE_QOBJ_TYPE(l2vpn_if);
|
||||
DEFINE_QOBJ_TYPE(l2vpn_pw);
|
||||
DEFINE_QOBJ_TYPE(l2vpn);
|
||||
DEFINE_QOBJ_TYPE(ldpd_conf);
|
||||
|
||||
struct ldpd_global global;
|
||||
struct ldpd_init init;
|
||||
|
@ -88,7 +88,7 @@ static pid_t lde_pid;
|
|||
|
||||
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)
|
||||
{
|
||||
|
@ -218,7 +218,7 @@ FRR_DAEMON_INFO(ldpd, LDP,
|
|||
|
||||
.yang_modules = ldpd_yang_modules,
|
||||
.n_yang_modules = array_size(ldpd_yang_modules),
|
||||
)
|
||||
);
|
||||
|
||||
static int ldp_config_fork_apply(struct thread *t)
|
||||
{
|
||||
|
|
30
ldpd/ldpd.h
30
ldpd/ldpd.h
|
@ -362,11 +362,11 @@ struct iface {
|
|||
struct iface_af ipv4;
|
||||
struct iface_af ipv6;
|
||||
struct iface_ldp_sync ldp_sync;
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
RB_HEAD(iface_head, iface);
|
||||
RB_PROTOTYPE(iface_head, iface, entry, iface_compare);
|
||||
DECLARE_QOBJ_TYPE(iface)
|
||||
DECLARE_QOBJ_TYPE(iface);
|
||||
|
||||
/* source of targeted hellos */
|
||||
struct tnbr {
|
||||
|
@ -379,11 +379,11 @@ struct tnbr {
|
|||
uint16_t pw_count;
|
||||
uint32_t rlfa_count;
|
||||
uint8_t flags;
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
RB_HEAD(tnbr_head, tnbr);
|
||||
RB_PROTOTYPE(tnbr_head, tnbr, entry, tnbr_compare);
|
||||
DECLARE_QOBJ_TYPE(tnbr)
|
||||
DECLARE_QOBJ_TYPE(tnbr);
|
||||
#define F_TNBR_CONFIGURED 0x01
|
||||
#define F_TNBR_DYNAMIC 0x02
|
||||
|
||||
|
@ -405,11 +405,11 @@ struct nbr_params {
|
|||
uint8_t md5key_len;
|
||||
} auth;
|
||||
uint8_t flags;
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
RB_HEAD(nbrp_head, nbr_params);
|
||||
RB_PROTOTYPE(nbrp_head, nbr_params, entry, nbr_params_compare);
|
||||
DECLARE_QOBJ_TYPE(nbr_params)
|
||||
DECLARE_QOBJ_TYPE(nbr_params);
|
||||
#define F_NBRP_KEEPALIVE 0x01
|
||||
#define F_NBRP_GTSM 0x02
|
||||
#define F_NBRP_GTSM_HOPS 0x04
|
||||
|
@ -463,11 +463,11 @@ struct l2vpn_if {
|
|||
ifindex_t ifindex;
|
||||
int operative;
|
||||
uint8_t mac[ETH_ALEN];
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
RB_HEAD(l2vpn_if_head, l2vpn_if);
|
||||
RB_PROTOTYPE(l2vpn_if_head, l2vpn_if, entry, l2vpn_if_compare);
|
||||
DECLARE_QOBJ_TYPE(l2vpn_if)
|
||||
DECLARE_QOBJ_TYPE(l2vpn_if);
|
||||
|
||||
struct l2vpn_pw {
|
||||
RB_ENTRY(l2vpn_pw) entry;
|
||||
|
@ -485,11 +485,11 @@ struct l2vpn_pw {
|
|||
uint32_t remote_status;
|
||||
uint8_t flags;
|
||||
uint8_t reason;
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
RB_HEAD(l2vpn_pw_head, l2vpn_pw);
|
||||
RB_PROTOTYPE(l2vpn_pw_head, l2vpn_pw, entry, l2vpn_pw_compare);
|
||||
DECLARE_QOBJ_TYPE(l2vpn_pw)
|
||||
DECLARE_QOBJ_TYPE(l2vpn_pw);
|
||||
#define F_PW_STATUSTLV_CONF 0x01 /* status tlv configured */
|
||||
#define F_PW_STATUSTLV 0x02 /* status tlv negotiated */
|
||||
#define F_PW_CWORD_CONF 0x04 /* control word configured */
|
||||
|
@ -513,11 +513,11 @@ struct l2vpn {
|
|||
struct l2vpn_if_head if_tree;
|
||||
struct l2vpn_pw_head pw_tree;
|
||||
struct l2vpn_pw_head pw_inactive_tree;
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
RB_HEAD(l2vpn_head, l2vpn);
|
||||
RB_PROTOTYPE(l2vpn_head, l2vpn, entry, l2vpn_compare);
|
||||
DECLARE_QOBJ_TYPE(l2vpn)
|
||||
DECLARE_QOBJ_TYPE(l2vpn);
|
||||
#define L2VPN_TYPE_VPWS 1
|
||||
#define L2VPN_TYPE_VPLS 2
|
||||
|
||||
|
@ -584,9 +584,9 @@ struct ldpd_conf {
|
|||
int flags;
|
||||
time_t config_change_time;
|
||||
struct ldp_entity_stats stats;
|
||||
QOBJ_FIELDS
|
||||
QOBJ_FIELDS;
|
||||
};
|
||||
DECLARE_QOBJ_TYPE(ldpd_conf)
|
||||
DECLARE_QOBJ_TYPE(ldpd_conf);
|
||||
#define F_LDPD_NO_FIB_UPDATE 0x0001
|
||||
#define F_LDPD_DS_CISCO_INTEROP 0x0002
|
||||
#define F_LDPD_ENABLED 0x0004
|
||||
|
@ -915,7 +915,7 @@ int ldp_zebra_send_rlfa_labels(struct zapi_rlfa_response *
|
|||
(__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);
|
||||
|
||||
|
|
|
@ -321,6 +321,7 @@ void ldpe_l2vpn_exit(struct l2vpn *);
|
|||
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_ */
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
#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 *,
|
||||
|
|
|
@ -65,6 +65,6 @@ ldpd_ldpd_SOURCES = ldpd/ldpd.c
|
|||
ldpd_ldpd_LDADD = ldpd/libldp.a lib/libfrr.la $(LIBCAP)
|
||||
|
||||
ldpd_ldpd_snmp_la_SOURCES = ldpd/ldp_snmp.c
|
||||
ldpd_ldpd_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu99
|
||||
ldpd_ldpd_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu11
|
||||
ldpd_ldpd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
|
||||
ldpd_ldpd_snmp_la_LIBADD = lib/libfrrsnmp.la
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
#include "lib_errors.h"
|
||||
#include "xref.h"
|
||||
|
||||
XREF_SETUP()
|
||||
XREF_SETUP();
|
||||
|
||||
DEFINE_HOOK(agentx_enabled, (), ())
|
||||
DEFINE_HOOK(agentx_enabled, (), ());
|
||||
|
||||
static int agentx_enabled = 0;
|
||||
|
||||
|
|
|
@ -123,15 +123,16 @@ struct atomlist_head {
|
|||
|
||||
/* use as:
|
||||
*
|
||||
* PREDECL_ATOMLIST(namelist)
|
||||
* PREDECL_ATOMLIST(namelist);
|
||||
* struct name {
|
||||
* struct namelist_item nlitem;
|
||||
* }
|
||||
* DECLARE_ATOMLIST(namelist, struct name, nlitem)
|
||||
* DECLARE_ATOMLIST(namelist, struct name, nlitem);
|
||||
*/
|
||||
#define PREDECL_ATOMLIST(prefix) \
|
||||
struct prefix ## _head { struct atomlist_head ah; }; \
|
||||
struct prefix ## _item { struct atomlist_item ai; };
|
||||
struct prefix ## _item { struct atomlist_item ai; }; \
|
||||
MACRO_REQUIRE_SEMICOLON() /* end */
|
||||
|
||||
#define INIT_ATOMLIST(var) { }
|
||||
|
||||
|
@ -171,7 +172,7 @@ macro_inline void prefix ## _fini(struct prefix##_head *h) \
|
|||
assert(prefix ## _count(h) == 0); \
|
||||
memset(h, 0, sizeof(*h)); \
|
||||
} \
|
||||
/* ... */
|
||||
MACRO_REQUIRE_SEMICOLON() /* end */
|
||||
|
||||
/* add_head:
|
||||
* - contention on ->first pointer
|
||||
|
@ -221,7 +222,8 @@ struct atomsort_head {
|
|||
|
||||
#define _PREDECL_ATOMSORT(prefix) \
|
||||
struct prefix ## _head { struct atomsort_head ah; }; \
|
||||
struct prefix ## _item { struct atomsort_item ai; };
|
||||
struct prefix ## _item { struct atomsort_item ai; }; \
|
||||
MACRO_REQUIRE_SEMICOLON() /* end */
|
||||
|
||||
#define INIT_ATOMSORT_UNIQ(var) { }
|
||||
#define INIT_ATOMSORT_NONUNIQ(var) { }
|
||||
|
@ -298,7 +300,7 @@ macro_inline type *prefix ## _pop(struct prefix##_head *h) \
|
|||
struct atomsort_item *p = atomsort_pop(&h->ah); \
|
||||
return p ? container_of(p, type, field.ai) : NULL; \
|
||||
} \
|
||||
/* ... */
|
||||
MACRO_REQUIRE_SEMICOLON() /* end */
|
||||
|
||||
#define PREDECL_ATOMSORT_UNIQ(prefix) \
|
||||
_PREDECL_ATOMSORT(prefix)
|
||||
|
@ -312,7 +314,7 @@ macro_inline int prefix ## __cmp(const struct atomsort_item *a, \
|
|||
} \
|
||||
\
|
||||
_DECLARE_ATOMSORT(prefix, type, field, \
|
||||
prefix ## __cmp, prefix ## __cmp) \
|
||||
prefix ## __cmp, prefix ## __cmp); \
|
||||
\
|
||||
atomic_find_warn \
|
||||
macro_inline type *prefix ## _find(struct prefix##_head *h, const type *item) \
|
||||
|
@ -325,7 +327,7 @@ macro_inline type *prefix ## _find(struct prefix##_head *h, const type *item) \
|
|||
return NULL; \
|
||||
return p; \
|
||||
} \
|
||||
/* ... */
|
||||
MACRO_REQUIRE_SEMICOLON() /* end */
|
||||
|
||||
#define PREDECL_ATOMSORT_NONUNIQ(prefix) \
|
||||
_PREDECL_ATOMSORT(prefix)
|
||||
|
@ -352,8 +354,8 @@ macro_inline int prefix ## __cmp_uq(const struct atomsort_item *a, \
|
|||
} \
|
||||
\
|
||||
_DECLARE_ATOMSORT(prefix, type, field, \
|
||||
prefix ## __cmp, prefix ## __cmp_uq) \
|
||||
/* ... */
|
||||
prefix ## __cmp, prefix ## __cmp_uq); \
|
||||
MACRO_REQUIRE_SEMICOLON() /* end */
|
||||
|
||||
struct atomsort_item *atomsort_add(struct atomsort_head *h,
|
||||
struct atomsort_item *item, int (*cmpfn)(
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "vty.h"
|
||||
#include "bfd.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(LIB, BFD_INFO, "BFD info")
|
||||
DEFINE_MTYPE_STATIC(LIB, BFD_INFO, "BFD info");
|
||||
|
||||
static int bfd_debug = 0;
|
||||
static struct bfd_gbl bfd_gbl;
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
|
||||
#include <stddef.h>
|
||||
|
||||
DEFINE_MTYPE_STATIC(LIB, BUFFER, "Buffer")
|
||||
DEFINE_MTYPE_STATIC(LIB, BUFFER_DATA, "Buffer data")
|
||||
DEFINE_MTYPE_STATIC(LIB, BUFFER, "Buffer");
|
||||
DEFINE_MTYPE_STATIC(LIB, BUFFER_DATA, "Buffer data");
|
||||
|
||||
/* Buffer master. */
|
||||
struct buffer {
|
||||
|
|
|
@ -51,8 +51,8 @@
|
|||
|
||||
#include "frrscript.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(LIB, HOST, "Host config")
|
||||
DEFINE_MTYPE(LIB, COMPLETION, "Completion item")
|
||||
DEFINE_MTYPE_STATIC(LIB, HOST, "Host config");
|
||||
DEFINE_MTYPE(LIB, COMPLETION, "Completion item");
|
||||
|
||||
#define item(x) \
|
||||
{ \
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
DECLARE_MTYPE(COMPLETION)
|
||||
DECLARE_MTYPE(COMPLETION);
|
||||
|
||||
/*
|
||||
* From RFC 1123 (Requirements for Internet Hosts), Section 2.1 on hostnames:
|
||||
|
|
|
@ -26,11 +26,11 @@
|
|||
|
||||
#include "command_graph.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command Tokens")
|
||||
DEFINE_MTYPE_STATIC(LIB, CMD_DESC, "Command Token Text")
|
||||
DEFINE_MTYPE_STATIC(LIB, CMD_TEXT, "Command Token Help")
|
||||
DEFINE_MTYPE(LIB, CMD_ARG, "Command Argument")
|
||||
DEFINE_MTYPE_STATIC(LIB, CMD_VAR, "Command Argument Name")
|
||||
DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command Tokens");
|
||||
DEFINE_MTYPE_STATIC(LIB, CMD_DESC, "Command Token Text");
|
||||
DEFINE_MTYPE_STATIC(LIB, CMD_TEXT, "Command Token Help");
|
||||
DEFINE_MTYPE(LIB, CMD_ARG, "Command Argument");
|
||||
DEFINE_MTYPE_STATIC(LIB, CMD_VAR, "Command Argument Name");
|
||||
|
||||
struct cmd_token *cmd_token_new(enum cmd_token_type type, uint8_t attr,
|
||||
const char *text, const char *desc)
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
DECLARE_MTYPE(CMD_ARG)
|
||||
DECLARE_MTYPE(CMD_ARG);
|
||||
|
||||
struct vty;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "command_match.h"
|
||||
#include "memory.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(LIB, CMD_MATCHSTACK, "Command Match Stack")
|
||||
DEFINE_MTYPE_STATIC(LIB, CMD_MATCHSTACK, "Command Match Stack");
|
||||
|
||||
#ifdef TRACE_MATCHER
|
||||
#define TM 1
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
#include "command_graph.h"
|
||||
#include "log.h"
|
||||
|
||||
DECLARE_MTYPE(LEX)
|
||||
DECLARE_MTYPE(LEX);
|
||||
|
||||
#define YYSTYPE CMD_YYSTYPE
|
||||
#define YYLTYPE CMD_YYLTYPE
|
||||
|
@ -376,7 +376,7 @@ selector: '[' selector_seq_seq ']' varname_token
|
|||
|
||||
#undef scanner
|
||||
|
||||
DEFINE_MTYPE(LIB, LEX, "Lexer token (temporary)")
|
||||
DEFINE_MTYPE(LIB, LEX, "Lexer token (temporary)");
|
||||
|
||||
void
|
||||
cmd_graph_parse (struct graph *graph, const struct cmd_element *cmd)
|
||||
|
|
|
@ -21,6 +21,21 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
# if __cplusplus < 201103L
|
||||
# error FRRouting headers must be compiled in C++11 mode or newer
|
||||
# endif
|
||||
/* C++ defines static_assert(), but not _Static_assert(). C defines
|
||||
* _Static_assert() and has static_assert() in <assert.h>. However, we mess
|
||||
* with assert() in zassert.h so let's not include <assert.h> here.
|
||||
*/
|
||||
# define _Static_assert static_assert
|
||||
#else
|
||||
# if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L
|
||||
# error FRRouting must be compiled with min. -std=gnu11 (GNU ISO C11 dialect)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* function attributes, use like
|
||||
* void prototype(void) __attribute__((_CONSTRUCTOR(100)));
|
||||
*/
|
||||
|
@ -121,6 +136,24 @@ extern "C" {
|
|||
#define macro_inline static inline __attribute__((unused))
|
||||
#define macro_pure static inline __attribute__((unused, pure))
|
||||
|
||||
/* if the macro ends with a function definition */
|
||||
#define MACRO_REQUIRE_SEMICOLON() \
|
||||
_Static_assert(1, "please add a semicolon after this macro")
|
||||
|
||||
#if CONFDATE < 20210601
|
||||
#ifdef ENABLE_BGP_VNC
|
||||
/* temporarily disabled for transition for LabN CI
|
||||
* NB: it's not possible to generate a deprecation warning for this, hence
|
||||
* the shortened transition period (since otherwise new uses of the old syntax
|
||||
* may creep in without errors)
|
||||
*/
|
||||
#undef MACRO_REQUIRE_SEMICOLON
|
||||
#define MACRO_REQUIRE_SEMICOLON() \
|
||||
/* nothing */
|
||||
#endif /* ENABLE_BGP_VNC */
|
||||
#else /* CONFDATE >= 20210601 */
|
||||
CPP_NOTICE("time to remove this CONFDATE block")
|
||||
#endif
|
||||
|
||||
/* variadic macros, use like:
|
||||
* #define V_0() ...
|
||||
|
@ -357,10 +390,8 @@ typedef signed long long _int64_t;
|
|||
/* if this breaks, 128-bit machines may have entered reality (or <long long>
|
||||
* is something weird)
|
||||
*/
|
||||
#if __STDC_VERSION__ >= 201112L
|
||||
_Static_assert(sizeof(_uint64_t) == 8 && sizeof(_int64_t) == 8,
|
||||
"nobody expects the spanish intquisition");
|
||||
#endif
|
||||
|
||||
/* since we redefined int64_t, we also need to redefine PRI*64 */
|
||||
#undef PRIu64
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
static struct debug_cb_list_head cb_head;
|
||||
|
||||
DECLARE_LIST(debug_cb_list, struct debug_callbacks, item)
|
||||
DECLARE_LIST(debug_cb_list, struct debug_callbacks, item);
|
||||
|
||||
/* All code in this section should be reentrant and MT-safe */
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ struct debug {
|
|||
const char *desc;
|
||||
};
|
||||
|
||||
PREDECL_LIST(debug_cb_list)
|
||||
PREDECL_LIST(debug_cb_list);
|
||||
/*
|
||||
* Callback set for debugging code.
|
||||
*
|
||||
|
|
|
@ -98,7 +98,8 @@ struct frr_default {
|
|||
static void _dfltinit_##varname(void) \
|
||||
{ \
|
||||
frr_default_add(&_dflt_##varname); \
|
||||
}
|
||||
} \
|
||||
MACRO_REQUIRE_SEMICOLON() /* end */
|
||||
|
||||
/* use:
|
||||
* FRR_CFG_DEFAULT_LONG(SHARP_BLUNTNESS,
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
#include "distribute.h"
|
||||
#include "memory.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_CTX, "Distribute ctx")
|
||||
DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE, "Distribute list")
|
||||
DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_IFNAME, "Dist-list ifname")
|
||||
DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_NAME, "Dist-list name")
|
||||
DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_CTX, "Distribute ctx");
|
||||
DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE, "Distribute list");
|
||||
DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_IFNAME, "Dist-list ifname");
|
||||
DEFINE_MTYPE_STATIC(LIB, DISTRIBUTE_NAME, "Dist-list name");
|
||||
|
||||
static struct list *dist_ctx_list;
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ static PyObject *refuse_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
struct elfreloc;
|
||||
struct elfsect;
|
||||
|
||||
PREDECL_HASH(elfrelocs)
|
||||
PREDECL_HASH(elfrelocs);
|
||||
|
||||
/* ELFFile and ELFSection intentionally share some behaviour, particularly
|
||||
* subscript[123:456] access to file data. This is because relocatables
|
||||
|
@ -200,7 +200,7 @@ static int elfreloc_cmp(const struct elfreloc *a, const struct elfreloc *b);
|
|||
static uint32_t elfreloc_hash(const struct elfreloc *reloc);
|
||||
|
||||
DECLARE_HASH(elfrelocs, struct elfreloc, elfrelocs_item,
|
||||
elfreloc_cmp, elfreloc_hash)
|
||||
elfreloc_cmp, elfreloc_hash);
|
||||
|
||||
static Elf_Scn *elf_find_addr(struct elffile *ef, uint64_t addr, size_t *idx);
|
||||
static PyObject *elffile_secbyidx(struct elffile *w, Elf_Scn *scn, size_t idx);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "linklist.h"
|
||||
#include "frr_pthread.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(LIB, ERRINFO, "error information")
|
||||
DEFINE_MTYPE_STATIC(LIB, ERRINFO, "error information");
|
||||
|
||||
/*
|
||||
* Thread-specific key for temporary storage of allocated ferr.
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
#include "libfrr.h"
|
||||
#include "northbound_cli.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(LIB, ACCESS_LIST, "Access List")
|
||||
DEFINE_MTYPE_STATIC(LIB, ACCESS_LIST_STR, "Access List Str")
|
||||
DEFINE_MTYPE_STATIC(LIB, ACCESS_FILTER, "Access Filter")
|
||||
DEFINE_MTYPE_STATIC(LIB, ACCESS_LIST, "Access List");
|
||||
DEFINE_MTYPE_STATIC(LIB, ACCESS_LIST_STR, "Access List Str");
|
||||
DEFINE_MTYPE_STATIC(LIB, ACCESS_FILTER, "Access Filter");
|
||||
|
||||
/* Static structure for mac access_list's master. */
|
||||
static struct access_master access_master_mac = {
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
#include "zlog.h"
|
||||
#include "libfrr_trace.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(LIB, FRR_PTHREAD, "FRR POSIX Thread")
|
||||
DEFINE_MTYPE_STATIC(LIB, PTHREAD_PRIM, "POSIX sync primitives")
|
||||
DEFINE_MTYPE_STATIC(LIB, FRR_PTHREAD, "FRR POSIX Thread");
|
||||
DEFINE_MTYPE_STATIC(LIB, PTHREAD_PRIM, "POSIX sync primitives");
|
||||
|
||||
/* default frr_pthread start/stop routine prototypes */
|
||||
static void *fpt_run(void *arg);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "log.h"
|
||||
#include "lib_errors.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(LIB, ZEROMQ_CB, "ZeroMQ callback")
|
||||
DEFINE_MTYPE_STATIC(LIB, ZEROMQ_CB, "ZeroMQ callback");
|
||||
|
||||
/* libzmq's context */
|
||||
void *frrzmq_context = NULL;
|
||||
|
|
10
lib/frrcu.c
10
lib/frrcu.c
|
@ -54,12 +54,12 @@
|
|||
#include "seqlock.h"
|
||||
#include "atomlist.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(LIB, RCU_THREAD, "RCU thread")
|
||||
DEFINE_MTYPE_STATIC(LIB, RCU_NEXT, "RCU sequence barrier")
|
||||
DEFINE_MTYPE_STATIC(LIB, RCU_THREAD, "RCU thread");
|
||||
DEFINE_MTYPE_STATIC(LIB, RCU_NEXT, "RCU sequence barrier");
|
||||
|
||||
DECLARE_ATOMLIST(rcu_heads, struct rcu_head, head)
|
||||
DECLARE_ATOMLIST(rcu_heads, struct rcu_head, head);
|
||||
|
||||
PREDECL_ATOMLIST(rcu_threads)
|
||||
PREDECL_ATOMLIST(rcu_threads);
|
||||
struct rcu_thread {
|
||||
struct rcu_threads_item head;
|
||||
|
||||
|
@ -70,7 +70,7 @@ struct rcu_thread {
|
|||
/* only accessed by thread itself, not atomic */
|
||||
unsigned depth;
|
||||
};
|
||||
DECLARE_ATOMLIST(rcu_threads, struct rcu_thread, head)
|
||||
DECLARE_ATOMLIST(rcu_threads, struct rcu_thread, head);
|
||||
|
||||
static const struct rcu_action rcua_next = { .type = RCUA_NEXT };
|
||||
static const struct rcu_action rcua_end = { .type = RCUA_END };
|
||||
|
|
|
@ -116,7 +116,7 @@ struct rcu_action {
|
|||
};
|
||||
|
||||
/* RCU cleanup function queue item */
|
||||
PREDECL_ATOMLIST(rcu_heads)
|
||||
PREDECL_ATOMLIST(rcu_heads);
|
||||
struct rcu_head {
|
||||
struct rcu_heads_item head;
|
||||
const struct rcu_action *action;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue