#include "bgpd/bgp_bfd.h"
#include "bgpd/bgp_memory.h"
+DEFINE_QOBJ_TYPE(bgp_master)
+DEFINE_QOBJ_TYPE(bgp)
+DEFINE_QOBJ_TYPE(peer)
+
/* BGP process wide configuration. */
static struct bgp_master bgp_master;
{
assert (peer->status == Deleted);
+ QOBJ_UNREG (peer);
+
/* this /ought/ to have been done already through bgp_stop earlier,
* but just to be sure..
*/
sp = getservbyname ("bgp", "tcp");
peer->port = (sp == NULL) ? BGP_PORT_DEFAULT : ntohs (sp->s_port);
+ QOBJ_REG (peer, peer);
return peer;
}
bgp->wpkt_quanta = BGP_WRITE_PACKET_MAX;
bgp->coalesce_time = BGP_DEFAULT_SUBGROUP_COALESCE_TIME;
+ QOBJ_REG (bgp, bgp);
+
update_bgp_group_init(bgp);
return bgp;
}
afi_t afi;
safi_t safi;
+ QOBJ_UNREG (bgp);
+
list_delete (bgp->group);
list_delete (bgp->peer);
/* Enable multiple instances by default. */
bgp_option_set (BGP_OPT_MULTIPLE_INSTANCE);
+
+ QOBJ_REG (bm, bgp_master);
}
/*
struct listnode *node, *nnode;
struct listnode *mnode, *mnnode;
+ QOBJ_UNREG (bm);
+
/* Close the listener sockets first as this prevents peers from attempting
* to reconnect on receiving the peer unconfig message. In the presence
* of a large number of peers this will ensure that no peer is left with
#ifndef _QUAGGA_BGPD_H
#define _QUAGGA_BGPD_H
+#include "qobj.h"
#include "lib/json.h"
#include "vrf.h"
struct thread *t_rmap_update; /* Handle route map updates */
u_int32_t rmap_update_timer; /* Route map update timer */
#define RMAP_DEFAULT_UPDATE_TIMER 5 /* disabled by default */
+
+ QOBJ_FIELDS
};
+DECLARE_QOBJ_TYPE(bgp_master)
/* BGP route-map structure. */
struct bgp_rmap
struct rfapi_cfg *rfapi_cfg;
struct rfapi *rfapi;
#endif
+
+ QOBJ_FIELDS
};
+DECLARE_QOBJ_TYPE(bgp)
#define BGP_ROUTE_ADV_HOLD(bgp) (bgp->main_peers_update_hold)
/* hostname and domainname advertised by host */
char *hostname;
char *domainname;
+
+ QOBJ_FIELDS
};
+DECLARE_QOBJ_TYPE(peer)
/* Check if suppress start/restart of sessions to peer. */
#define BGP_PEER_START_SUPPRESSED(P) \