diff options
| -rw-r--r-- | bgpd/bgp_attr.c | 29 | ||||
| -rw-r--r-- | bgpd/bgp_attr.h | 26 | ||||
| -rw-r--r-- | bgpd/bgp_bmp.c | 9 | ||||
| -rw-r--r-- | bgpd/bgp_debug.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_debug.h | 9 | ||||
| -rw-r--r-- | bgpd/bgp_evpn.c | 15 | ||||
| -rw-r--r-- | bgpd/bgp_evpn.h | 11 | ||||
| -rw-r--r-- | bgpd/bgp_rd.c | 6 | ||||
| -rw-r--r-- | bgpd/bgp_rd.h | 5 | ||||
| -rw-r--r-- | bgpd/bgp_route.c | 56 | ||||
| -rw-r--r-- | bgpd/bgp_route.h | 19 | ||||
| -rw-r--r-- | bgpd/rfapi/vnc_export_table.c | 5 | ||||
| -rw-r--r-- | bgpd/rfapi/vnc_export_table.h | 5 | ||||
| -rw-r--r-- | lib/stream.c | 2 | ||||
| -rw-r--r-- | lib/stream.h | 2 |
15 files changed, 104 insertions, 97 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 0bdd079e0b..c9878e2f1c 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -898,14 +898,11 @@ struct attr *bgp_attr_default_set(struct attr *attr, uint8_t origin) } /* Create the attributes for an aggregate */ -struct attr *bgp_attr_aggregate_intern(struct bgp *bgp, uint8_t origin, - struct aspath *aspath, - struct community *community, - struct ecommunity *ecommunity, - struct lcommunity *lcommunity, - struct bgp_aggregate *aggregate, - uint8_t atomic_aggregate, - struct prefix *p) +struct attr *bgp_attr_aggregate_intern( + struct bgp *bgp, uint8_t origin, struct aspath *aspath, + struct community *community, struct ecommunity *ecommunity, + struct lcommunity *lcommunity, struct bgp_aggregate *aggregate, + uint8_t atomic_aggregate, const struct prefix *p) { struct attr attr; struct attr *new; @@ -3416,10 +3413,10 @@ size_t bgp_packet_mpattr_start(struct stream *s, struct peer *peer, afi_t afi, } void bgp_packet_mpattr_prefix(struct stream *s, afi_t afi, safi_t safi, - struct prefix *p, struct prefix_rd *prd, - mpls_label_t *label, uint32_t num_labels, - int addpath_encode, uint32_t addpath_tx_id, - struct attr *attr) + const struct prefix *p, + const struct prefix_rd *prd, mpls_label_t *label, + uint32_t num_labels, int addpath_encode, + uint32_t addpath_tx_id, struct attr *attr) { if (safi == SAFI_MPLS_VPN) { if (addpath_encode) @@ -3445,7 +3442,8 @@ void bgp_packet_mpattr_prefix(struct stream *s, afi_t afi, safi_t safi, stream_put_prefix_addpath(s, p, addpath_encode, addpath_tx_id); } -size_t bgp_packet_mpattr_prefix_size(afi_t afi, safi_t safi, struct prefix *p) +size_t bgp_packet_mpattr_prefix_size(afi_t afi, safi_t safi, + const struct prefix *p) { int size = PSIZE(p->prefixlen); if (safi == SAFI_MPLS_VPN) @@ -4079,8 +4077,9 @@ size_t bgp_packet_mpunreach_start(struct stream *s, afi_t afi, safi_t safi) return attrlen_pnt; } -void bgp_packet_mpunreach_prefix(struct stream *s, struct prefix *p, afi_t afi, - safi_t safi, struct prefix_rd *prd, +void bgp_packet_mpunreach_prefix(struct stream *s, const struct prefix *p, + afi_t afi, safi_t safi, + const struct prefix_rd *prd, mpls_label_t *label, uint32_t num_labels, int addpath_encode, uint32_t addpath_tx_id, struct attr *attr) diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index 04b3a20d6b..98a9a620f7 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -310,14 +310,11 @@ extern void bgp_attr_unintern_sub(struct attr *); extern void bgp_attr_unintern(struct attr **); extern void bgp_attr_flush(struct attr *); extern struct attr *bgp_attr_default_set(struct attr *attr, uint8_t); -extern struct attr *bgp_attr_aggregate_intern(struct bgp *bgp, uint8_t origin, - struct aspath *aspath, - struct community *community, - struct ecommunity *ecommunity, - struct lcommunity *lcommunity, - struct bgp_aggregate *aggregate, - uint8_t atomic_aggregate, - struct prefix *p); +extern struct attr *bgp_attr_aggregate_intern( + struct bgp *bgp, uint8_t origin, struct aspath *aspath, + struct community *community, struct ecommunity *ecommunity, + struct lcommunity *lcommunity, struct bgp_aggregate *aggregate, + uint8_t atomic_aggregate, const struct prefix *p); extern bgp_size_t bgp_packet_attribute(struct bgp *bgp, struct peer *, struct stream *, struct attr *, struct bpacket_attr_vec_arr *vecarr, @@ -372,20 +369,21 @@ extern size_t bgp_packet_mpattr_start(struct stream *s, struct peer *peer, struct bpacket_attr_vec_arr *vecarr, struct attr *attr); extern void bgp_packet_mpattr_prefix(struct stream *s, afi_t afi, safi_t safi, - struct prefix *p, struct prefix_rd *prd, + const struct prefix *p, + const struct prefix_rd *prd, mpls_label_t *label, uint32_t num_labels, int addpath_encode, uint32_t addpath_tx_id, struct attr *); extern size_t bgp_packet_mpattr_prefix_size(afi_t afi, safi_t safi, - struct prefix *p); + const struct prefix *p); extern void bgp_packet_mpattr_end(struct stream *s, size_t sizep); extern size_t bgp_packet_mpunreach_start(struct stream *s, afi_t afi, safi_t safi); -extern void bgp_packet_mpunreach_prefix(struct stream *s, struct prefix *p, - afi_t afi, safi_t safi, - struct prefix_rd *prd, mpls_label_t *, - uint32_t, int, uint32_t, struct attr *); +extern void bgp_packet_mpunreach_prefix( + struct stream *s, const struct prefix *p, afi_t afi, safi_t safi, + const struct prefix_rd *prd, mpls_label_t *label, uint32_t num_labels, + int addpath_encode, uint32_t addpath_tx_id, struct attr *attr); extern void bgp_packet_mpunreach_end(struct stream *s, size_t attrlen_pnt); extern bgp_attr_parse_ret_t bgp_attr_nexthop_valid(struct peer *peer, diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c index 65a032abd5..8f46551593 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -765,8 +765,8 @@ static void bmp_eor(struct bmp *bmp, afi_t afi, safi_t safi, uint8_t flags) stream_free(s); } -static struct stream *bmp_update(struct prefix *p, struct peer *peer, - struct attr *attr, afi_t afi, safi_t safi) +static struct stream *bmp_update(const struct prefix *p, struct peer *peer, + struct attr *attr, afi_t afi, safi_t safi) { struct bpacket_attr_vec_arr vecarr; struct stream *s; @@ -813,7 +813,8 @@ static struct stream *bmp_update(struct prefix *p, struct peer *peer, return s; } -static struct stream *bmp_withdraw(struct prefix *p, afi_t afi, safi_t safi) +static struct stream *bmp_withdraw(const struct prefix *p, afi_t afi, + safi_t safi) { struct stream *s; size_t attrlen_pos = 0, mp_start, mplen_pos; @@ -853,7 +854,7 @@ static struct stream *bmp_withdraw(struct prefix *p, afi_t afi, safi_t safi) } static void bmp_monitor(struct bmp *bmp, struct peer *peer, uint8_t flags, - struct prefix *p, struct attr *attr, afi_t afi, + const struct prefix *p, struct attr *attr, afi_t afi, safi_t safi, time_t uptime) { struct stream *hdr, *msg; diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index ee5f75a079..897b78132e 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -2553,7 +2553,7 @@ bool bgp_debug_zebra(const struct prefix *p) } const char *bgp_debug_rdpfxpath2str(afi_t afi, safi_t safi, - struct prefix_rd *prd, + const struct prefix_rd *prd, union prefixconstptr pu, mpls_label_t *label, uint32_t num_labels, int addpath_valid, uint32_t addpath_id, diff --git a/bgpd/bgp_debug.h b/bgpd/bgp_debug.h index 4ce1e1dcef..7352b7917a 100644 --- a/bgpd/bgp_debug.h +++ b/bgpd/bgp_debug.h @@ -171,10 +171,11 @@ extern bool bgp_debug_update(struct peer *peer, const struct prefix *p, extern bool bgp_debug_bestpath(struct bgp_node *rn); extern bool bgp_debug_zebra(const struct prefix *p); -extern const char *bgp_debug_rdpfxpath2str(afi_t, safi_t, struct prefix_rd *, - union prefixconstptr, mpls_label_t *, - uint32_t, int, uint32_t, char *, - int); +extern const char * +bgp_debug_rdpfxpath2str(afi_t afi, safi_t safi, const struct prefix_rd *prd, + union prefixconstptr pu, mpls_label_t *label, + uint32_t num_labels, int addpath_valid, + uint32_t addpath_id, char *str, int size); const char *bgp_notify_admin_message(char *buf, size_t bufsz, uint8_t *data, size_t datalen); diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 5202f6801e..4e675bfb16 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -4297,13 +4297,14 @@ static int process_type5_route(struct peer *peer, afi_t afi, safi_t safi, return ret; } -static void evpn_mpattr_encode_type5(struct stream *s, struct prefix *p, - struct prefix_rd *prd, mpls_label_t *label, - uint32_t num_labels, struct attr *attr) +static void evpn_mpattr_encode_type5(struct stream *s, const struct prefix *p, + const struct prefix_rd *prd, + mpls_label_t *label, uint32_t num_labels, + struct attr *attr) { int len; char temp[16]; - struct evpn_addr *p_evpn_p; + const struct evpn_addr *p_evpn_p; memset(&temp, 0, 16); if (p->family != AF_EVPN) @@ -5030,8 +5031,8 @@ char *bgp_evpn_route2str(const struct prefix_evpn *p, char *buf, int len) /* * Encode EVPN prefix in Update (MP_REACH) */ -void bgp_evpn_encode_prefix(struct stream *s, struct prefix *p, - struct prefix_rd *prd, mpls_label_t *label, +void bgp_evpn_encode_prefix(struct stream *s, const struct prefix *p, + const struct prefix_rd *prd, mpls_label_t *label, uint32_t num_labels, struct attr *attr, int addpath_encode, uint32_t addpath_tx_id) { @@ -6264,7 +6265,7 @@ void bgp_evpn_vrf_delete(struct bgp *bgp_vrf) /* * Get the prefixlen of the ip prefix carried within the type5 evpn route. */ -int bgp_evpn_get_type5_prefixlen(struct prefix *pfx) +int bgp_evpn_get_type5_prefixlen(const struct prefix *pfx) { struct prefix_evpn *evp = (struct prefix_evpn *)pfx; diff --git a/bgpd/bgp_evpn.h b/bgpd/bgp_evpn.h index 219321fc68..a48a707b94 100644 --- a/bgpd/bgp_evpn.h +++ b/bgpd/bgp_evpn.h @@ -157,10 +157,11 @@ extern char *bgp_evpn_label2str(mpls_label_t *label, uint32_t num_labels, extern char *bgp_evpn_route2str(const struct prefix_evpn *p, char *buf, int len); extern void bgp_evpn_route2json(const struct prefix_evpn *p, json_object *json); -extern void bgp_evpn_encode_prefix(struct stream *s, struct prefix *p, - struct prefix_rd *prd, mpls_label_t *label, - uint32_t num_labels, struct attr *attr, - int addpath_encode, uint32_t addpath_tx_id); +extern void bgp_evpn_encode_prefix(struct stream *s, const struct prefix *p, + const struct prefix_rd *prd, + mpls_label_t *label, uint32_t num_labels, + struct attr *attr, int addpath_encode, + uint32_t addpath_tx_id); 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, @@ -195,7 +196,7 @@ extern void bgp_evpn_flood_control_change(struct bgp *bgp); extern void bgp_evpn_cleanup_on_disable(struct bgp *bgp); 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 int bgp_evpn_get_type5_prefixlen(const 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); diff --git a/bgpd/bgp_rd.c b/bgpd/bgp_rd.c index 5facf3269e..6a229602b2 100644 --- a/bgpd/bgp_rd.c +++ b/bgpd/bgp_rd.c @@ -87,7 +87,7 @@ void decode_rd_ip(const uint8_t *pnt, struct rd_ip *rd_ip) #if ENABLE_BGP_VNC /* type == RD_TYPE_VNC_ETH */ -void decode_rd_vnc_eth(uint8_t *pnt, struct rd_vnc_eth *rd_vnc_eth) +void decode_rd_vnc_eth(const uint8_t *pnt, struct rd_vnc_eth *rd_vnc_eth) { rd_vnc_eth->type = RD_TYPE_VNC_ETH; rd_vnc_eth->local_nve_id = pnt[1]; @@ -159,9 +159,9 @@ out: return lret; } -char *prefix_rd2str(struct prefix_rd *prd, char *buf, size_t size) +char *prefix_rd2str(const struct prefix_rd *prd, char *buf, size_t size) { - uint8_t *pnt; + const uint8_t *pnt; uint16_t type; struct rd_as rd_as; struct rd_ip rd_ip; diff --git a/bgpd/bgp_rd.h b/bgpd/bgp_rd.h index 439dfd4a31..56b9023a2e 100644 --- a/bgpd/bgp_rd.h +++ b/bgpd/bgp_rd.h @@ -61,11 +61,12 @@ 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(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); +extern void decode_rd_vnc_eth(const uint8_t *pnt, + struct rd_vnc_eth *rd_vnc_eth); #endif extern int str2prefix_rd(const char *, struct prefix_rd *); -extern char *prefix_rd2str(struct prefix_rd *, char *, size_t); +extern char *prefix_rd2str(const struct prefix_rd *, char *, size_t); extern void form_auto_rd(struct in_addr router_id, uint16_t rd_id, struct prefix_rd *prd); diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 842d305f80..0d18977aad 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1381,7 +1381,7 @@ static int bgp_input_modifier(struct peer *peer, const struct prefix *p, return RMAP_PERMIT; } -static int bgp_output_modifier(struct peer *peer, struct prefix *p, +static int bgp_output_modifier(struct peer *peer, const struct prefix *p, struct attr *attr, afi_t afi, safi_t safi, const char *rmap_name) { @@ -4910,7 +4910,7 @@ static void bgp_static_free(struct bgp_static *bgp_static) XFREE(MTYPE_BGP_STATIC, bgp_static); } -void bgp_static_update(struct bgp *bgp, struct prefix *p, +void bgp_static_update(struct bgp *bgp, const struct prefix *p, struct bgp_static *bgp_static, afi_t afi, safi_t safi) { struct bgp_node *rn; @@ -5139,7 +5139,7 @@ void bgp_static_update(struct bgp *bgp, struct prefix *p, aspath_unintern(&attr.aspath); } -void bgp_static_withdraw(struct bgp *bgp, struct prefix *p, afi_t afi, +void bgp_static_withdraw(struct bgp *bgp, const struct prefix *p, afi_t afi, safi_t safi) { struct bgp_node *rn; @@ -5173,7 +5173,7 @@ void bgp_static_withdraw(struct bgp *bgp, struct prefix *p, afi_t afi, /* * Used for SAFI_MPLS_VPN and SAFI_ENCAP */ -static void bgp_static_withdraw_safi(struct bgp *bgp, struct prefix *p, +static void bgp_static_withdraw_safi(struct bgp *bgp, const struct prefix *p, afi_t afi, safi_t safi, struct prefix_rd *prd) { @@ -5208,7 +5208,7 @@ static void bgp_static_withdraw_safi(struct bgp *bgp, struct prefix *p, bgp_unlock_node(rn); } -static void bgp_static_update_safi(struct bgp *bgp, struct prefix *p, +static void bgp_static_update_safi(struct bgp *bgp, const struct prefix *p, struct bgp_static *bgp_static, afi_t afi, safi_t safi) { @@ -6058,14 +6058,11 @@ static bool bgp_aggregate_info_same(struct bgp_path_info *pi, uint8_t origin, return true; } -static void bgp_aggregate_install(struct bgp *bgp, afi_t afi, safi_t safi, - struct prefix *p, uint8_t origin, - struct aspath *aspath, - struct community *community, - struct ecommunity *ecommunity, - struct lcommunity *lcommunity, - uint8_t atomic_aggregate, - struct bgp_aggregate *aggregate) +static void bgp_aggregate_install( + struct bgp *bgp, afi_t afi, safi_t safi, const struct prefix *p, + uint8_t origin, struct aspath *aspath, struct community *community, + struct ecommunity *ecommunity, struct lcommunity *lcommunity, + uint8_t atomic_aggregate, struct bgp_aggregate *aggregate) { struct bgp_node *rn; struct bgp_table *table; @@ -6142,9 +6139,8 @@ static void bgp_aggregate_install(struct bgp *bgp, afi_t afi, safi_t safi, } /* Update an aggregate as routes are added/removed from the BGP table */ -void bgp_aggregate_route(struct bgp *bgp, struct prefix *p, - afi_t afi, safi_t safi, - struct bgp_aggregate *aggregate) +void bgp_aggregate_route(struct bgp *bgp, const struct prefix *p, afi_t afi, + safi_t safi, struct bgp_aggregate *aggregate) { struct bgp_table *table; struct bgp_node *top; @@ -6314,8 +6310,8 @@ void bgp_aggregate_route(struct bgp *bgp, struct prefix *p, aggregate); } -void bgp_aggregate_delete(struct bgp *bgp, struct prefix *p, afi_t afi, - safi_t safi, struct bgp_aggregate *aggregate) +void bgp_aggregate_delete(struct bgp *bgp, const struct prefix *p, afi_t afi, + safi_t safi, struct bgp_aggregate *aggregate) { struct bgp_table *table; struct bgp_node *top; @@ -6405,7 +6401,8 @@ void bgp_aggregate_delete(struct bgp *bgp, struct prefix *p, afi_t afi, bgp_unlock_node(top); } -static void bgp_add_route_to_aggregate(struct bgp *bgp, struct prefix *aggr_p, +static void bgp_add_route_to_aggregate(struct bgp *bgp, + const struct prefix *aggr_p, struct bgp_path_info *pinew, afi_t afi, safi_t safi, struct bgp_aggregate *aggregate) @@ -6511,7 +6508,7 @@ static void bgp_remove_route_from_aggregate(struct bgp *bgp, afi_t afi, safi_t safi, struct bgp_path_info *pi, struct bgp_aggregate *aggregate, - struct prefix *aggr_p) + const struct prefix *aggr_p) { uint8_t origin; struct aspath *aspath = NULL; @@ -7934,8 +7931,9 @@ void route_vty_out(struct vty *vty, const struct prefix *p, } /* called from terminal list command */ -void route_vty_out_tmp(struct vty *vty, struct prefix *p, struct attr *attr, - safi_t safi, bool use_json, json_object *json_ar) +void route_vty_out_tmp(struct vty *vty, const struct prefix *p, + struct attr *attr, safi_t safi, bool use_json, + json_object *json_ar) { json_object *json_status = NULL; json_object *json_net = NULL; @@ -8314,9 +8312,10 @@ void route_vty_out_overlay(struct vty *vty, const struct prefix *p, } /* dampening route */ -static void damp_route_vty_out(struct vty *vty, struct prefix *p, - struct bgp_path_info *path, int display, afi_t afi, - safi_t safi, bool use_json, json_object *json) +static void damp_route_vty_out(struct vty *vty, const struct prefix *p, + struct bgp_path_info *path, int display, + afi_t afi, safi_t safi, bool use_json, + json_object *json) { struct attr *attr; int len; @@ -8378,9 +8377,10 @@ static void damp_route_vty_out(struct vty *vty, struct prefix *p, } /* flap route */ -static void flap_route_vty_out(struct vty *vty, struct prefix *p, - struct bgp_path_info *path, int display, afi_t afi, - safi_t safi, bool use_json, json_object *json) +static void flap_route_vty_out(struct vty *vty, const struct prefix *p, + struct bgp_path_info *path, int display, + afi_t afi, safi_t safi, bool use_json, + json_object *json) { struct attr *attr; struct bgp_damp_info *bdi; diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h index 5f6a15891c..9438b328ad 100644 --- a/bgpd/bgp_route.h +++ b/bgpd/bgp_route.h @@ -544,9 +544,10 @@ extern void bgp_static_add(struct bgp *); extern void bgp_static_delete(struct bgp *); extern void bgp_static_redo_import_check(struct bgp *); extern void bgp_purge_static_redist_routes(struct bgp *bgp); -extern void bgp_static_update(struct bgp *, struct prefix *, - struct bgp_static *, afi_t, safi_t); -extern void bgp_static_withdraw(struct bgp *, struct prefix *, afi_t, safi_t); +extern void bgp_static_update(struct bgp *bgp, const struct prefix *p, + struct bgp_static *s, afi_t afi, safi_t safi); +extern void bgp_static_withdraw(struct bgp *bgp, const struct prefix *p, + afi_t afi, safi_t safi); extern int bgp_static_set_safi(afi_t afi, safi_t safi, struct vty *vty, const char *, const char *, const char *, @@ -584,10 +585,12 @@ extern void bgp_config_write_network(struct vty *, struct bgp *, afi_t, safi_t); extern void bgp_config_write_distance(struct vty *, struct bgp *, afi_t, safi_t); -extern void bgp_aggregate_delete(struct bgp *bgp, struct prefix *p, afi_t afi, - 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_delete(struct bgp *bgp, const struct prefix *p, + afi_t afi, safi_t safi, + struct bgp_aggregate *aggregate); +extern void bgp_aggregate_route(struct bgp *bgp, const struct prefix *p, + afi_t afi, safi_t safi, + struct bgp_aggregate *aggregate); extern void bgp_aggregate_increment(struct bgp *bgp, const struct prefix *p, struct bgp_path_info *path, afi_t afi, safi_t safi); @@ -613,7 +616,7 @@ extern void route_vty_out(struct vty *vty, const struct prefix *p, extern void route_vty_out_tag(struct vty *vty, const struct prefix *p, struct bgp_path_info *path, int display, safi_t safi, json_object *json); -extern void route_vty_out_tmp(struct vty *vty, struct prefix *p, +extern void route_vty_out_tmp(struct vty *vty, const struct prefix *p, struct attr *attr, safi_t safi, bool use_json, json_object *json_ar); extern void route_vty_out_overlay(struct vty *vty, const struct prefix *p, diff --git a/bgpd/rfapi/vnc_export_table.c b/bgpd/rfapi/vnc_export_table.c index 8bf1479a25..255f868bdf 100644 --- a/bgpd/rfapi/vnc_export_table.c +++ b/bgpd/rfapi/vnc_export_table.c @@ -165,8 +165,9 @@ void vnc_eti_delete(struct vnc_export_info *goner) struct vnc_export_info *vnc_eti_checktimer(struct bgp *bgp, vnc_export_type_t etype, - struct prefix *p, struct peer *peer, - uint8_t type, uint8_t subtype) + const struct prefix *p, + struct peer *peer, uint8_t type, + uint8_t subtype) { struct agg_node *etn; struct vnc_export_info *eti; diff --git a/bgpd/rfapi/vnc_export_table.h b/bgpd/rfapi/vnc_export_table.h index 5dcf4e6c1d..8a1fc9aaef 100644 --- a/bgpd/rfapi/vnc_export_table.h +++ b/bgpd/rfapi/vnc_export_table.h @@ -58,8 +58,9 @@ vnc_eti_get(struct bgp *bgp, vnc_export_type_t etype, const struct prefix *p, extern void vnc_eti_delete(struct vnc_export_info *goner); extern struct vnc_export_info * -vnc_eti_checktimer(struct bgp *bgp, vnc_export_type_t etype, struct prefix *p, - struct peer *peer, uint8_t type, uint8_t subtype); +vnc_eti_checktimer(struct bgp *bgp, vnc_export_type_t etype, + const struct prefix *p, struct peer *peer, uint8_t type, + uint8_t subtype); #endif /* _QUAGGA_VNC_VNC_EXPORT_TABLE_H_ */ diff --git a/lib/stream.c b/lib/stream.c index dd4d5bd96d..f046572f41 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -898,7 +898,7 @@ int stream_put_prefix(struct stream *s, const struct prefix *p) } /* Put NLRI with label */ -int stream_put_labeled_prefix(struct stream *s, struct prefix *p, +int stream_put_labeled_prefix(struct stream *s, const struct prefix *p, mpls_label_t *label, int addpath_encode, uint32_t addpath_tx_id) { diff --git a/lib/stream.h b/lib/stream.h index 425f0c5edd..6fcf9a53cf 100644 --- a/lib/stream.h +++ b/lib/stream.h @@ -196,7 +196,7 @@ extern int stream_put_prefix_addpath(struct stream *s, int addpath_encode, uint32_t addpath_tx_id); extern int stream_put_prefix(struct stream *s, const struct prefix *p); -extern int stream_put_labeled_prefix(struct stream *, struct prefix *, +extern int stream_put_labeled_prefix(struct stream *, const struct prefix *, mpls_label_t *, int addpath_encode, uint32_t addpath_tx_id); extern void stream_get(void *, struct stream *, size_t); |
