bgp_evpn_route_type rtype,
int install)
{
- afi_t afi;
- safi_t safi;
- struct bgp_node *rd_rn, *rn;
- struct bgp_table *table;
- struct bgp_info *ri;
- int ret;
+ afi_t afi;
+ safi_t safi;
+ struct bgp_node *rd_rn, *rn;
+ struct bgp_table *table;
+ struct bgp_info *ri;
+ int ret;
afi = AFI_L2VPN;
safi = SAFI_EVPN;
/* filter routes which have martian next hops */
int bgp_filter_evpn_routes_upon_martian_nh_change(struct bgp *bgp)
{
- afi_t afi;
- safi_t safi;
- struct bgp_node *rd_rn, *rn;
- struct bgp_table *table;
- struct bgp_info *ri;
+ afi_t afi;
+ safi_t safi;
+ struct bgp_node *rd_rn, *rn;
+ struct bgp_table *table;
+ struct bgp_info *ri;
afi = AFI_L2VPN;
safi = SAFI_EVPN;
"IP address (IPv4 or IPv6)\n"
JSON_STR)
{
- struct bgp *bgp;
- int ret;
- struct prefix_rd prd;
- struct ethaddr mac;
- struct ipaddr ip;
- int rd_idx = 0;
- int mac_idx = 0;
- int ip_idx = 0;
- int uj = 0;
- json_object *json = NULL;
+ struct bgp *bgp;
+ int ret;
+ struct prefix_rd prd;
+ struct ethaddr mac;
+ struct ipaddr ip;
+ int rd_idx = 0;
+ int mac_idx = 0;
+ int ip_idx = 0;
+ int uj = 0;
+ json_object *json = NULL;
memset(&mac, 0, sizeof(struct ethaddr));
memset(&ip, 0, sizeof(struct ipaddr));
static void *bgp_tip_hash_alloc(void *p)
{
- const struct in_addr *val = (const struct in_addr *)p;
- struct tip_addr *addr;
+ const struct in_addr *val = (const struct in_addr *)p;
+ struct tip_addr *addr;
addr = XMALLOC(MTYPE_TIP_ADDR, sizeof(struct tip_addr));
addr->refcnt = 0;
static unsigned int bgp_tip_hash_key_make(void *p)
{
- const struct tip_addr *addr = p;
+ const struct tip_addr *addr = p;
return jhash_1word(addr->addr.s_addr, 0);
}
static int bgp_tip_hash_cmp(const void *p1, const void *p2)
{
- const struct tip_addr *addr1 = p1;
- const struct tip_addr *addr2 = p2;
+ const struct tip_addr *addr1 = p1;
+ const struct tip_addr *addr2 = p2;
return addr1->addr.s_addr == addr2->addr.s_addr;
}
void bgp_tip_add(struct bgp *bgp, struct in_addr *tip)
{
- struct tip_addr tmp;
- struct tip_addr *addr;
+ struct tip_addr tmp;
+ struct tip_addr *addr;
tmp.addr = *tip;
void bgp_tip_del(struct bgp *bgp, struct in_addr *tip)
{
- struct tip_addr tmp;
- struct tip_addr *addr;
+ struct tip_addr tmp;
+ struct tip_addr *addr;
tmp.addr = *tip;
#if defined(HAVE_CUMULUS)
char buf3[EVPN_ROUTE_STRLEN];
#endif
- char prefix_str[BUFSIZ];
+ char prefix_str[BUFSIZ];
int count = 0;
int best = 0;
int suppress = 0;
static void show_address_entry(struct hash_backet *backet, void *args)
{
- struct vty *vty = (struct vty *) args;
+ struct vty *vty = (struct vty *) args;
struct bgp_addr *addr = (struct bgp_addr *) backet->data;
vty_out(vty, "addr: %s, count: %d\n",
static void show_tip_entry(struct hash_backet *backet, void *args)
{
- struct vty *vty = (struct vty *)args;
+ struct vty *vty = (struct vty *)args;
struct tip_addr *tip = (struct tip_addr *) backet->data;
vty_out(vty, "addr: %s, count: %d\n",
"martian next-hops\n"
"martian next-hop database\n")
{
- struct bgp *bgp = NULL;
+ struct bgp *bgp = NULL;
bgp = bgp_get_default();
if (!bgp) {
safi_t safi, u_char use_json,
json_object *json_neigh)
{
- struct bgp_filter *filter;
- struct peer_af *paf;
- char orf_pfx_name[BUFSIZ];
- int orf_pfx_count;
- json_object *json_af = NULL;
- json_object *json_prefA = NULL;
- json_object *json_prefB = NULL;
- json_object *json_addr = NULL;
+ struct bgp_filter *filter;
+ struct peer_af *paf;
+ char orf_pfx_name[BUFSIZ];
+ int orf_pfx_count;
+ json_object *json_af = NULL;
+ json_object *json_prefA = NULL;
+ json_object *json_prefB = NULL;
+ json_object *json_addr = NULL;
if (use_json) {
json_addr = json_object_new_object();
static void bgp_show_all_instances_neighbors_vty(struct vty *vty,
u_char use_json)
{
- struct listnode *node, *nnode;
- struct bgp *bgp;
- json_object *json = NULL;
- int is_first = 1;
+ struct listnode *node, *nnode;
+ struct bgp *bgp;
+ json_object *json = NULL;
+ int is_first = 1;
if (use_json)
vty_out(vty, "{\n");
static int bgp_zebra_process_local_vni(int command, struct zclient *zclient,
zebra_size_t length, vrf_id_t vrf_id)
{
- struct stream *s;
- vni_t vni;
- struct bgp *bgp;
- struct in_addr vtep_ip;
+ struct stream *s;
+ vni_t vni;
+ struct bgp *bgp;
+ struct in_addr vtep_ip;
s = zclient->ibuf;
vni = stream_getl(s);
static struct bgp *bgp_create(as_t *as, const char *name,
enum bgp_instance_type inst_type)
{
- struct bgp *bgp;
- afi_t afi;
- safi_t safi;
- struct utsname names;
+ struct bgp *bgp;
+ afi_t afi;
+ safi_t safi;
+ struct utsname names;
uname(&names);