rv = gbp_endpoint_update_and_lock (GBP_ENDPOINT_SRC_CP,
sw_if_index, ips, &mac,
INDEX_INVALID, INDEX_INVALID,
rv = gbp_endpoint_update_and_lock (GBP_ENDPOINT_SRC_CP,
sw_if_index, ips, &mac,
INDEX_INVALID, INDEX_INVALID,
gef, &tun_src, &tun_dst, &handle);
}
else
gef, &tun_src, &tun_dst, &handle);
}
else
rv = gbp_endpoint_update_and_lock (GBP_ENDPOINT_SRC_CP,
sw_if_index, ips, &mac,
INDEX_INVALID, INDEX_INVALID,
rv = gbp_endpoint_update_and_lock (GBP_ENDPOINT_SRC_CP,
sw_if_index, ips, &mac,
INDEX_INVALID, INDEX_INVALID,
gef, NULL, NULL, &handle);
}
vec_free (ips);
gef, NULL, NULL, &handle);
}
vec_free (ips);
mp->endpoint.n_ips = n_ips;
mp->endpoint.flags = gbp_endpoint_flags_encode (gef->gef_flags);
mp->handle = htonl (gei);
mp->endpoint.n_ips = n_ips;
mp->endpoint.flags = gbp_endpoint_flags_encode (gef->gef_flags);
mp->handle = htonl (gei);
rv = gbp_subnet_add (ntohl (mp->subnet.rd_id),
&pfx, type,
ntohl (mp->subnet.sw_if_index),
rv = gbp_subnet_add (ntohl (mp->subnet.rd_id),
&pfx, type,
ntohl (mp->subnet.sw_if_index),
gbp_subnet_send_details (u32 rd_id,
const fib_prefix_t * pfx,
gbp_subnet_type_t type,
gbp_subnet_send_details (u32 rd_id,
const fib_prefix_t * pfx,
gbp_subnet_type_t type,
mp->subnet.rd_id = ntohl (rd_id);
ip_prefix_encode (pfx, &mp->subnet.prefix);
mp->subnet.rd_id = ntohl (rd_id);
ip_prefix_encode (pfx, &mp->subnet.prefix);
mp->epg.sclass = ntohs (gg->gg_sclass);
mp->epg.bd_id = ntohl (gbp_endpoint_group_get_bd_id (gg));
mp->epg.rd_id = ntohl (gbp_route_domain_get_rd_id (gg->gg_rd));
mp->epg.sclass = ntohs (gg->gg_sclass);
mp->epg.bd_id = ntohl (gbp_endpoint_group_get_bd_id (gg));
mp->epg.rd_id = ntohl (gbp_route_domain_get_rd_id (gg->gg_rd));
vec_validate (allowed_ethertypes, n_et - 1);
for (ii = 0; ii < n_et; ii++)
{
/* leave the ether types in network order */
vec_validate (allowed_ethertypes, n_et - 1);
for (ii = 0; ii < n_et; ii++)
{
/* leave the ether types in network order */
- rv = gbp_contract_update (ntohs (mp->contract.src_epg),
- ntohs (mp->contract.dst_epg),
+ rv = gbp_contract_update (ntohs (mp->contract.sclass),
+ ntohs (mp->contract.dclass),
ntohl (mp->contract.acl_index),
rules, allowed_ethertypes);
}
else
ntohl (mp->contract.acl_index),
rules, allowed_ethertypes);
}
else
- rv = gbp_contract_delete (ntohs (mp->contract.src_epg),
- ntohs (mp->contract.dst_epg));
+ rv = gbp_contract_delete (ntohs (mp->contract.sclass),
+ ntohs (mp->contract.dclass));
- mp->contract.src_epg = ntohs (gbpc->gc_key.gck_src);
- mp->contract.dst_epg = ntohs (gbpc->gc_key.gck_dst);
- // mp->contract.acl_index = ntohl (gbpc->gc_value.gc_acl_index);
+ mp->contract.sclass = ntohs (gbpc->gc_key.gck_src);
+ mp->contract.dclass = ntohs (gbpc->gc_key.gck_dst);
+ mp->contract.acl_index = ntohl (gbpc->gc_acl_index);