* Install or uninstall route for appropriate VNIs/ESIs.
*/
static int install_uninstall_evpn_route(struct bgp *bgp, afi_t afi, safi_t safi,
- struct prefix *p,
+ const struct prefix *p,
struct bgp_path_info *pi, int import)
{
struct prefix_evpn *evp = (struct prefix_evpn *)p;
* Import evpn route from global table to VNI/VRF/ESI.
*/
int bgp_evpn_import_route(struct bgp *bgp, afi_t afi, safi_t safi,
- struct prefix *p, struct bgp_path_info *pi)
+ const struct prefix *p, struct bgp_path_info *pi)
{
return install_uninstall_evpn_route(bgp, afi, safi, p, pi, 1);
}
* Unimport evpn route from VNI/VRF/ESI.
*/
int bgp_evpn_unimport_route(struct bgp *bgp, afi_t afi, safi_t safi,
- struct prefix *p, struct bgp_path_info *pi)
+ const struct prefix *p, struct bgp_path_info *pi)
{
return install_uninstall_evpn_route(bgp, afi, safi, p, pi, 0);
}
/*
* Should we register nexthop for this EVPN prefix for nexthop tracking?
*/
-bool bgp_evpn_is_prefix_nht_supported(struct prefix *pfx)
+bool bgp_evpn_is_prefix_nht_supported(const struct prefix *pfx)
{
struct prefix_evpn *evp = (struct prefix_evpn *)pfx;
extern int bgp_nlri_parse_evpn(struct peer *peer, struct attr *attr,
struct bgp_nlri *packet, int withdraw);
extern int bgp_evpn_import_route(struct bgp *bgp, afi_t afi, safi_t safi,
- struct prefix *p, struct bgp_path_info *ri);
+ const struct prefix *p,
+ struct bgp_path_info *ri);
extern int bgp_evpn_unimport_route(struct bgp *bgp, afi_t afi, safi_t safi,
- struct prefix *p, struct bgp_path_info *ri);
+ const struct prefix *p,
+ struct bgp_path_info *ri);
extern int bgp_filter_evpn_routes_upon_martian_nh_change(struct bgp *bgp);
extern int bgp_evpn_local_macip_del(struct bgp *bgp, vni_t vni,
struct ethaddr *mac, struct ipaddr *ip,
extern void bgp_evpn_cleanup(struct bgp *bgp);
extern void bgp_evpn_init(struct bgp *bgp);
extern int bgp_evpn_get_type5_prefixlen(struct prefix *pfx);
-extern bool bgp_evpn_is_prefix_nht_supported(struct prefix *pfx);
+extern bool bgp_evpn_is_prefix_nht_supported(const struct prefix *pfx);
extern void update_advertise_vrf_routes(struct bgp *bgp_vrf);
#endif /* _QUAGGA_BGP_EVPN_H */
* An example: router-mac attribute in any of evpn update
* requires to compare against local mac.
*/
-bool bgp_mac_exist(struct ethaddr *mac)
+bool bgp_mac_exist(const struct ethaddr *mac)
{
struct bgp_self_mac lookup;
struct bgp_self_mac *bsm;
* mac against any of local assigned (SVIs) MAC
* address.
*/
-bool bgp_mac_entry_exists(struct prefix *p)
+bool bgp_mac_entry_exists(const struct prefix *p)
{
- struct prefix_evpn *pevpn = (struct prefix_evpn *)p;
+ const struct prefix_evpn *pevpn = (const struct prefix_evpn *)p;
if (pevpn->family != AF_EVPN)
return false;
/*
* Function to lookup the prefix and see if we have a matching mac
*/
-bool bgp_mac_entry_exists(struct prefix *p);
-bool bgp_mac_exist(struct ethaddr *mac);
+bool bgp_mac_entry_exists(const struct prefix *p);
+bool bgp_mac_exist(const struct ethaddr *mac);
#endif
}
/* return -1 if build or validation failed */
-int bgp_pbr_build_and_validate_entry(struct prefix *p,
- struct bgp_path_info *path,
- struct bgp_pbr_entry_main *api)
+int bgp_pbr_build_and_validate_entry(const struct prefix *p,
+ struct bgp_path_info *path,
+ struct bgp_pbr_entry_main *api)
{
int ret;
int i, action_count = 0;
}
}
-void bgp_pbr_update_entry(struct bgp *bgp, struct prefix *p,
+void bgp_pbr_update_entry(struct bgp *bgp, const struct prefix *p,
struct bgp_path_info *info, afi_t afi, safi_t safi,
bool nlri_update)
{
struct bgp_node;
struct bgp_path_info;
-extern void bgp_pbr_update_entry(struct bgp *bgp, struct prefix *p,
+extern void bgp_pbr_update_entry(struct bgp *bgp, const struct prefix *p,
struct bgp_path_info *new_select, afi_t afi,
safi_t safi, bool nlri_update);
extern struct bgp_pbr_interface *bgp_pbr_interface_lookup(const char *name,
struct bgp_pbr_interface_head *head);
-extern int bgp_pbr_build_and_validate_entry(struct prefix *p,
+extern int bgp_pbr_build_and_validate_entry(const struct prefix *p,
struct bgp_path_info *path,
struct bgp_pbr_entry_main *api);
#endif /* __BGP_PBR_H__ */
}
/* type == RD_TYPE_IP */
-void decode_rd_ip(uint8_t *pnt, struct rd_ip *rd_ip)
+void decode_rd_ip(const uint8_t *pnt, struct rd_ip *rd_ip)
{
memcpy(&rd_ip->ip, pnt, 4);
pnt += 4;
extern void decode_rd_as(const uint8_t *pnt, struct rd_as *rd_as);
extern void decode_rd_as4(const uint8_t *pnt, struct rd_as *rd_as);
-extern void decode_rd_ip(uint8_t *pnt, struct rd_ip *rd_ip);
+extern void decode_rd_ip(const uint8_t *pnt, struct rd_ip *rd_ip);
#if ENABLE_BGP_VNC
extern void decode_rd_vnc_eth(uint8_t *pnt, struct rd_vnc_eth *rd_vnc_eth);
#endif
struct bgp_node *bgp_afi_node_get(struct bgp_table *table, afi_t afi,
- safi_t safi, struct prefix *p,
+ safi_t safi, const struct prefix *p,
struct prefix_rd *prd)
{
struct bgp_node *rn;
return ret;
}
-static enum filter_type bgp_input_filter(struct peer *peer, struct prefix *p,
+static enum filter_type bgp_input_filter(struct peer *peer,
+ const struct prefix *p,
struct attr *attr, afi_t afi,
safi_t safi)
{
return false;
}
-static int bgp_input_modifier(struct peer *peer, struct prefix *p,
+static int bgp_input_modifier(struct peer *peer, const struct prefix *p,
struct attr *attr, afi_t afi, safi_t safi,
const char *rmap_name, mpls_label_t *label,
uint32_t num_labels, struct bgp_node *rn)
return ret;
}
-int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id,
+int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
struct attr *attr, afi_t afi, safi_t safi, int type,
int sub_type, struct prefix_rd *prd, mpls_label_t *label,
uint32_t num_labels, int soft_reconfig,
lcommunity, atomic_aggregate, aggregate);
}
-void bgp_aggregate_increment(struct bgp *bgp, struct prefix *p,
+void bgp_aggregate_increment(struct bgp *bgp, const struct prefix *p,
struct bgp_path_info *pi, afi_t afi, safi_t safi)
{
struct bgp_node *child;
bgp_unlock_node(child);
}
-void bgp_aggregate_decrement(struct bgp *bgp, struct prefix *p,
+void bgp_aggregate_decrement(struct bgp *bgp, const struct prefix *p,
struct bgp_path_info *del, afi_t afi, safi_t safi)
{
struct bgp_node *child;
extern bool bgp_inbound_policy_exists(struct peer *, struct bgp_filter *);
extern struct bgp_node *bgp_afi_node_get(struct bgp_table *table, afi_t afi,
- safi_t safi, struct prefix *p,
+ safi_t safi, const struct prefix *p,
struct prefix_rd *prd);
extern struct bgp_path_info *bgp_path_info_lock(struct bgp_path_info *path);
extern struct bgp_path_info *bgp_path_info_unlock(struct bgp_path_info *path);
const char *, const char *, const char *);
/* this is primarily for MPLS-VPN */
-extern int bgp_update(struct peer *, struct prefix *, uint32_t, struct attr *,
- afi_t, safi_t, int, int, struct prefix_rd *,
- mpls_label_t *, uint32_t, int, struct bgp_route_evpn *);
+extern int bgp_update(struct peer *peer, const struct prefix *p,
+ uint32_t addpath_id, struct attr *attr,
+ afi_t afi, safi_t safi, int type, int sub_type,
+ struct prefix_rd *prd, mpls_label_t *label,
+ uint32_t num_labels, int soft_reconfig,
+ struct bgp_route_evpn *evpn);
extern int bgp_withdraw(struct peer *, struct prefix *, uint32_t, struct attr *,
afi_t, safi_t, int, int, struct prefix_rd *,
mpls_label_t *, uint32_t, struct bgp_route_evpn *);
safi_t safi, struct bgp_aggregate *aggregate);
extern void bgp_aggregate_route(struct bgp *bgp, struct prefix *p, afi_t afi,
safi_t safi, struct bgp_aggregate *aggregate);
-extern void bgp_aggregate_increment(struct bgp *bgp, struct prefix *p,
+extern void bgp_aggregate_increment(struct bgp *bgp, const struct prefix *p,
struct bgp_path_info *path, afi_t afi,
safi_t safi);
-extern void bgp_aggregate_decrement(struct bgp *bgp, struct prefix *p,
+extern void bgp_aggregate_decrement(struct bgp *bgp, const struct prefix *p,
struct bgp_path_info *path, afi_t afi,
safi_t safi);
safi);
}
-void bgp_zebra_withdraw(struct prefix *p, struct bgp_path_info *info,
+void bgp_zebra_withdraw(const struct prefix *p, struct bgp_path_info *info,
struct bgp *bgp, safi_t safi)
{
struct zapi_route api;
struct bgp_path_info *path, struct bgp *bgp,
afi_t afi, safi_t safi);
extern void bgp_zebra_announce_table(struct bgp *, afi_t, safi_t);
-extern void bgp_zebra_withdraw(struct prefix *p, struct bgp_path_info *path,
- struct bgp *bgp, safi_t safi);
+extern void bgp_zebra_withdraw(const struct prefix *p,
+ struct bgp_path_info *path, struct bgp *bgp,
+ safi_t safi);
extern void bgp_zebra_initiate_radv(struct bgp *bgp, struct peer *peer);
extern void bgp_zebra_terminate_radv(struct bgp *bgp, struct peer *peer);
void del_vnc_route(struct rfapi_descriptor *rfd,
struct peer *peer, /* rfd->peer for RFP regs */
- struct bgp *bgp, safi_t safi, struct prefix *p,
+ struct bgp *bgp, safi_t safi, const struct prefix *p,
struct prefix_rd *prd, uint8_t type, uint8_t sub_type,
struct rfapi_nexthop *lnh, int kill)
{
/* Based on bgp_redistribute_add() */
void add_vnc_route(struct rfapi_descriptor *rfd, /* cookie, VPN UN addr, peer */
- struct bgp *bgp, int safi, struct prefix *p,
+ struct bgp *bgp, int safi, const struct prefix *p,
struct prefix_rd *prd, struct rfapi_ip_addr *nexthop,
uint32_t *local_pref,
uint32_t *lifetime, /* NULL => dont send lifetime */
struct rfapi *bgp_rfapi_new(struct bgp *bgp);
void bgp_rfapi_destroy(struct bgp *bgp, struct rfapi *h);
-extern void rfapiProcessUpdate(struct peer *peer, void *rfd, struct prefix *p,
- struct prefix_rd *prd, struct attr *attr,
- afi_t afi, safi_t safi, uint8_t type,
- uint8_t sub_type, uint32_t *label);
+extern void rfapiProcessUpdate(struct peer *peer, void *rfd,
+ const struct prefix *p, struct prefix_rd *prd,
+ struct attr *attr, afi_t afi, safi_t safi,
+ uint8_t type, uint8_t sub_type, uint32_t *label);
-extern void rfapiProcessWithdraw(struct peer *peer, void *rfd, struct prefix *p,
- struct prefix_rd *prd, struct attr *attr,
- afi_t afi, safi_t safi, uint8_t type,
- int kill);
+extern void rfapiProcessWithdraw(struct peer *peer, void *rfd,
+ const struct prefix *p, struct prefix_rd *prd,
+ struct attr *attr, afi_t afi, safi_t safi,
+ uint8_t type, int kill);
extern void rfapiProcessPeerDown(struct peer *peer);
static struct bgp_path_info *rfapiItBiIndexSearch(
struct agg_node *rn, /* Import table VPN node */
struct prefix_rd *prd, struct peer *peer,
- struct prefix *aux_prefix) /* optional L3 addr for L2 ITs */
+ const struct prefix *aux_prefix) /* optional L3 addr for L2 ITs */
{
struct skiplist *sl;
int rc;
}
-typedef void(rfapi_bi_filtered_import_f)(struct rfapi_import_table *, int,
- struct peer *, void *, struct prefix *,
- struct prefix *, afi_t,
- struct prefix_rd *, struct attr *,
- uint8_t, uint8_t, uint32_t *);
+typedef void(rfapi_bi_filtered_import_f)(struct rfapi_import_table *table,
+ int action, struct peer *peer,
+ void *rfd, const struct prefix *prefix,
+ const struct prefix *aux_prefix,
+ afi_t afi, struct prefix_rd *prd,
+ struct attr *attr, uint8_t type,
+ uint8_t sub_type, uint32_t *label);
static void rfapiExpireEncapNow(struct rfapi_import_table *it,
static void rfapiBgpInfoFilteredImportEncap(
struct rfapi_import_table *import_table, int action, struct peer *peer,
void *rfd, /* set for looped back routes */
- struct prefix *p,
- struct prefix *aux_prefix, /* Unused for encap routes */
+ const struct prefix *p,
+ const struct prefix *aux_prefix, /* Unused for encap routes */
afi_t afi, struct prefix_rd *prd,
struct attr *attr, /* part of bgp_path_info */
- uint8_t type, /* part of bgp_path_info */
+ uint8_t type, /* part of bgp_path_info */
uint8_t sub_type, /* part of bgp_path_info */
uint32_t *label) /* part of bgp_path_info */
{
void rfapiBgpInfoFilteredImportVPN(
struct rfapi_import_table *import_table, int action, struct peer *peer,
void *rfd, /* set for looped back routes */
- struct prefix *p,
- struct prefix *aux_prefix, /* AFI_L2VPN: optional IP */
+ const struct prefix *p,
+ const struct prefix *aux_prefix, /* AFI_L2VPN: optional IP */
afi_t afi, struct prefix_rd *prd,
struct attr *attr, /* part of bgp_path_info */
- uint8_t type, /* part of bgp_path_info */
+ uint8_t type, /* part of bgp_path_info */
uint8_t sub_type, /* part of bgp_path_info */
uint32_t *label) /* part of bgp_path_info */
{
static void rfapiBgpInfoFilteredImportBadSafi(
struct rfapi_import_table *import_table, int action, struct peer *peer,
void *rfd, /* set for looped back routes */
- struct prefix *p,
- struct prefix *aux_prefix, /* AFI_L2VPN: optional IP */
+ const struct prefix *p,
+ const struct prefix *aux_prefix, /* AFI_L2VPN: optional IP */
afi_t afi, struct prefix_rd *prd,
struct attr *attr, /* part of bgp_path_info */
- uint8_t type, /* part of bgp_path_info */
+ uint8_t type, /* part of bgp_path_info */
uint8_t sub_type, /* part of bgp_path_info */
uint32_t *label) /* part of bgp_path_info */
{
void rfapiProcessUpdate(struct peer *peer,
void *rfd, /* set when looped from RFP/RFAPI */
- struct prefix *p, struct prefix_rd *prd,
+ const struct prefix *p, struct prefix_rd *prd,
struct attr *attr, afi_t afi, safi_t safi, uint8_t type,
uint8_t sub_type, uint32_t *label)
{
}
-void rfapiProcessWithdraw(struct peer *peer, void *rfd, struct prefix *p,
+void rfapiProcessWithdraw(struct peer *peer, void *rfd, const struct prefix *p,
struct prefix_rd *prd, struct attr *attr, afi_t afi,
safi_t safi, uint8_t type, int kill)
{
extern void rfapiBgpInfoFilteredImportVPN(
struct rfapi_import_table *import_table, int action, struct peer *peer,
void *rfd, /* set for looped back routes */
- struct prefix *p,
- struct prefix *aux_prefix, /* AFI_ETHER: optional IP */
+ const struct prefix *p,
+ const struct prefix *aux_prefix, /* AFI_ETHER: optional IP */
afi_t afi, struct prefix_rd *prd,
struct attr *attr, /* part of bgp_path_info */
- uint8_t type, /* part of bgp_path_info */
+ uint8_t type, /* part of bgp_path_info */
uint8_t sub_type, /* part of bgp_path_info */
uint32_t *label); /* part of bgp_path_info */
extern void
add_vnc_route(struct rfapi_descriptor *rfd, /* cookie + UN addr for VPN */
- struct bgp *bgp, int safi, struct prefix *p,
+ struct bgp *bgp, int safi, const struct prefix *p,
struct prefix_rd *prd, struct rfapi_ip_addr *nexthop,
uint32_t *local_pref, /* host byte order */
uint32_t *lifetime, /* host byte order */
#endif
extern void del_vnc_route(struct rfapi_descriptor *rfd, struct peer *peer,
- struct bgp *bgp, safi_t safi, struct prefix *p,
+ struct bgp *bgp, safi_t safi, const struct prefix *p,
struct prefix_rd *prd, uint8_t type, uint8_t sub_type,
struct rfapi_nexthop *lnh, int kill);
* caller do it?
*/
void vnc_direct_bgp_rh_add_route(struct bgp *bgp, afi_t afi,
- struct prefix *prefix, struct peer *peer,
+ const struct prefix *prefix, struct peer *peer,
struct attr *attr)
{
struct vnc_export_info *eti;
* caller do it?
*/
void vnc_direct_bgp_rh_del_route(struct bgp *bgp, afi_t afi,
- struct prefix *prefix, struct peer *peer)
+ const struct prefix *prefix, struct peer *peer)
{
struct vnc_export_info *eti;
extern void vnc_direct_bgp_rh_add_route(struct bgp *bgp, afi_t afi,
- struct prefix *prefix,
+ const struct prefix *prefix,
struct peer *peer, struct attr *attr);
extern void vnc_direct_bgp_rh_del_route(struct bgp *bgp, afi_t afi,
- struct prefix *prefix,
+ const struct prefix *prefix,
struct peer *peer);
extern void vnc_direct_bgp_reexport(struct bgp *bgp, afi_t afi);
#include "bgpd/rfapi/vnc_debug.h"
struct agg_node *vnc_etn_get(struct bgp *bgp, vnc_export_type_t type,
- struct prefix *p)
+ const struct prefix *p)
{
struct agg_table *t = NULL;
struct agg_node *rn = NULL;
}
struct agg_node *vnc_etn_lookup(struct bgp *bgp, vnc_export_type_t type,
- struct prefix *p)
+ const struct prefix *p)
{
struct agg_table *t = NULL;
struct agg_node *rn = NULL;
}
struct vnc_export_info *vnc_eti_get(struct bgp *bgp, vnc_export_type_t etype,
- struct prefix *p, struct peer *peer,
+ const struct prefix *p, struct peer *peer,
uint8_t type, uint8_t subtype)
{
struct agg_node *etn;
};
extern struct agg_node *vnc_etn_get(struct bgp *bgp, vnc_export_type_t type,
- struct prefix *p);
+ const struct prefix *p);
extern struct agg_node *vnc_etn_lookup(struct bgp *bgp, vnc_export_type_t type,
- struct prefix *p);
+ const struct prefix *p);
-extern struct vnc_export_info *vnc_eti_get(struct bgp *bgp,
- vnc_export_type_t etype,
- struct prefix *p, struct peer *peer,
- uint8_t type, uint8_t subtype);
+extern struct vnc_export_info *
+vnc_eti_get(struct bgp *bgp, vnc_export_type_t etype, const struct prefix *p,
+ struct peer *peer, uint8_t type, uint8_t subtype);
extern void vnc_eti_delete(struct vnc_export_info *goner);
return local_pref;
}
-static int is_host_prefix(struct prefix *p)
+static int is_host_prefix(const struct prefix *p)
{
switch (p->family) {
case AF_INET:
*/
static int process_unicast_route(struct bgp *bgp, /* in */
afi_t afi, /* in */
- struct prefix *prefix, /* in */
- struct bgp_path_info *info, /* in */
- struct ecommunity **ecom, /* OUT */
+ const struct prefix *prefix, /* in */
+ struct bgp_path_info *info, /* in */
+ struct ecommunity **ecom, /* OUT */
struct prefix *unicast_nexthop) /* OUT */
{
struct rfapi_cfg *hc = bgp->rfapi_cfg;
static void vnc_import_bgp_add_route_mode_resolve_nve_one_bi(
struct bgp *bgp, afi_t afi, struct bgp_path_info *bpi, /* VPN bpi */
struct prefix_rd *prd, /* RD */
- struct prefix *prefix, /* unicast route prefix */
- uint32_t *local_pref, /* NULL = no local_pref */
- uint32_t *med, /* NULL = no med */
- struct ecommunity *ecom) /* generated ecoms */
+ const struct prefix *prefix, /* unicast route prefix */
+ uint32_t *local_pref, /* NULL = no local_pref */
+ uint32_t *med, /* NULL = no med */
+ struct ecommunity *ecom) /* generated ecoms */
{
struct prefix un;
struct prefix nexthop;
}
static void vnc_import_bgp_add_route_mode_resolve_nve_one_rd(
- struct prefix_rd *prd, /* RD */
+ struct prefix_rd *prd, /* RD */
struct bgp_table *table_rd, /* per-rd VPN route table */
- afi_t afi, struct bgp *bgp, struct prefix *prefix, /* unicast prefix */
- struct ecommunity *ecom, /* generated ecoms */
- uint32_t *local_pref, /* NULL = no local_pref */
+ afi_t afi, struct bgp *bgp,
+ const struct prefix *prefix, /* unicast prefix */
+ struct ecommunity *ecom, /* generated ecoms */
+ uint32_t *local_pref, /* NULL = no local_pref */
uint32_t *med, /* NULL = no med */
struct prefix *ubpi_nexthop) /* unicast nexthop */
{
}
static void vnc_import_bgp_add_route_mode_resolve_nve(
- struct bgp *bgp, struct prefix *prefix, /* unicast prefix */
- struct bgp_path_info *info) /* unicast info */
+ struct bgp *bgp, const struct prefix *prefix, /* unicast prefix */
+ struct bgp_path_info *info) /* unicast info */
{
afi_t afi = family2afi(prefix->family);
static void vnc_import_bgp_add_route_mode_plain(struct bgp *bgp,
- struct prefix *prefix,
+ const struct prefix *prefix,
struct bgp_path_info *info)
{
afi_t afi = family2afi(prefix->family);
ecommunity_free(&ecom);
}
-static void
-vnc_import_bgp_add_route_mode_nvegroup(struct bgp *bgp, struct prefix *prefix,
- struct bgp_path_info *info,
- struct rfapi_nve_group_cfg *rfg)
+static void vnc_import_bgp_add_route_mode_nvegroup(
+ struct bgp *bgp, const struct prefix *prefix,
+ struct bgp_path_info *info, struct rfapi_nve_group_cfg *rfg)
{
afi_t afi = family2afi(prefix->family);
struct peer *peer = info->peer;
}
static void vnc_import_bgp_del_route_mode_plain(struct bgp *bgp,
- struct prefix *prefix,
+ const struct prefix *prefix,
struct bgp_path_info *info)
{
struct prefix_rd prd;
}
static void vnc_import_bgp_del_route_mode_nvegroup(struct bgp *bgp,
- struct prefix *prefix,
+ const struct prefix *prefix,
struct bgp_path_info *info)
{
struct prefix_rd prd;
static void vnc_import_bgp_del_route_mode_resolve_nve_one_bi(
struct bgp *bgp, afi_t afi, struct bgp_path_info *bpi, /* VPN bpi */
struct prefix_rd *prd, /* RD */
- struct prefix *prefix) /* unicast route prefix */
+ const struct prefix *prefix) /* unicast route prefix */
{
struct prefix un;
static void vnc_import_bgp_del_route_mode_resolve_nve_one_rd(
struct prefix_rd *prd,
struct bgp_table *table_rd, /* per-rd VPN route table */
- afi_t afi, struct bgp *bgp, struct prefix *prefix, /* unicast prefix */
- struct prefix *ubpi_nexthop) /* unicast bpi's nexthop */
+ afi_t afi, struct bgp *bgp,
+ const struct prefix *prefix, /* unicast prefix */
+ const struct prefix *ubpi_nexthop) /* unicast bpi's nexthop */
{
struct bgp_node *bn;
struct bgp_path_info *bpi;
static void
vnc_import_bgp_del_route_mode_resolve_nve(struct bgp *bgp, afi_t afi,
- struct prefix *prefix,
+ const struct prefix *prefix,
struct bgp_path_info *info)
{
struct ecommunity *ecom = NULL;
void vnc_import_bgp_add_vnc_host_route_mode_resolve_nve(
struct bgp *bgp, struct prefix_rd *prd, /* RD */
struct bgp_table *table_rd, /* per-rd VPN route table */
- struct prefix *prefix, /* VPN prefix */
+ const struct prefix *prefix, /* VPN prefix */
struct bgp_path_info *bpi) /* new VPN host route */
{
afi_t afi = family2afi(prefix->family);
void vnc_import_bgp_del_vnc_host_route_mode_resolve_nve(
struct bgp *bgp, struct prefix_rd *prd, /* RD */
struct bgp_table *table_rd, /* per-rd VPN route table */
- struct prefix *prefix, /* VPN prefix */
+ const struct prefix *prefix, /* VPN prefix */
struct bgp_path_info *bpi) /* old VPN host route */
{
afi_t afi = family2afi(prefix->family);
*/
static void vnc_import_bgp_exterior_add_route_it(
struct bgp *bgp, /* exterior instance, we hope */
- struct prefix *prefix, /* unicast prefix */
- struct bgp_path_info *info, /* unicast info */
+ const struct prefix *prefix, /* unicast prefix */
+ struct bgp_path_info *info, /* unicast info */
struct rfapi_import_table *it_only) /* NULL, or limit to this IT */
{
struct rfapi *h;
}
void vnc_import_bgp_exterior_add_route(
- struct bgp *bgp, /* exterior instance, we hope */
- struct prefix *prefix, /* unicast prefix */
- struct bgp_path_info *info) /* unicast info */
+ struct bgp *bgp, /* exterior instance, we hope */
+ const struct prefix *prefix, /* unicast prefix */
+ struct bgp_path_info *info) /* unicast info */
{
vnc_import_bgp_exterior_add_route_it(bgp, prefix, info, NULL);
}
* right routes.
*/
void vnc_import_bgp_exterior_del_route(
- struct bgp *bgp, struct prefix *prefix, /* unicast prefix */
- struct bgp_path_info *info) /* unicast info */
+ struct bgp *bgp, const struct prefix *prefix, /* unicast prefix */
+ struct bgp_path_info *info) /* unicast info */
{
struct rfapi *h;
struct rfapi_cfg *hc;
* Generic add/delete unicast routes
***********************************************************************/
-void vnc_import_bgp_add_route(struct bgp *bgp, struct prefix *prefix,
+void vnc_import_bgp_add_route(struct bgp *bgp, const struct prefix *prefix,
struct bgp_path_info *info)
{
afi_t afi = family2afi(prefix->family);
/*
* "Withdrawing a Route" import process
*/
-void vnc_import_bgp_del_route(struct bgp *bgp, struct prefix *prefix,
+void vnc_import_bgp_del_route(struct bgp *bgp, const struct prefix *prefix,
struct bgp_path_info *info) /* unicast info */
{
afi_t afi = family2afi(prefix->family);
extern int vnc_prefix_cmp(const void *pfx1, const void *pfx2);
-extern void vnc_import_bgp_add_route(struct bgp *bgp, struct prefix *prefix,
+extern void vnc_import_bgp_add_route(struct bgp *bgp,
+ const struct prefix *prefix,
struct bgp_path_info *info);
-extern void vnc_import_bgp_del_route(struct bgp *bgp, struct prefix *prefix,
+extern void vnc_import_bgp_del_route(struct bgp *bgp,
+ const struct prefix *prefix,
struct bgp_path_info *info);
extern void vnc_import_bgp_redist_enable(struct bgp *bgp, afi_t afi);
extern void vnc_import_bgp_exterior_add_route(
struct bgp *bgp, /* exterior instance, we hope */
- struct prefix *prefix, /* unicast prefix */
+ const struct prefix *prefix, /* unicast prefix */
struct bgp_path_info *info); /* unicast info */
extern void vnc_import_bgp_exterior_del_route(
- struct bgp *bgp, struct prefix *prefix, /* unicast prefix */
- struct bgp_path_info *info); /* unicast info */
+ struct bgp *bgp, const struct prefix *prefix, /* unicast prefix */
+ struct bgp_path_info *info); /* unicast info */
extern void vnc_import_bgp_add_vnc_host_route_mode_resolve_nve(
struct bgp *bgp, struct prefix_rd *prd, /* RD */
struct bgp_table *table_rd, /* per-rd VPN route table */
- struct prefix *prefix, /* VPN prefix */
+ const struct prefix *prefix, /* VPN prefix */
struct bgp_path_info *bpi); /* new VPN host route */
extern void vnc_import_bgp_del_vnc_host_route_mode_resolve_nve(
struct bgp *bgp, struct prefix_rd *prd, /* RD */
struct bgp_table *table_rd, /* per-rd VPN route table */
- struct prefix *prefix, /* VPN prefix */
+ const struct prefix *prefix, /* VPN prefix */
struct bgp_path_info *bpi); /* old VPN host route */
#endif /* _QUAGGA_RFAPI_VNC_IMPORT_BGP_H_ */