routing: constantify @rc in rib_decompose_notification().
Clarify the @rc immutability by explicitly marking @rc const. MFC after: 2 weeks
This commit is contained in:
parent
32faf071bd
commit
177f04d57f
@ -82,8 +82,8 @@ int rib_handle_ifaddr_info(uint32_t fibnum, int cmd, struct rt_addrinfo *info);
|
||||
int rib_add_default_route(uint32_t fibnum, int family, struct ifnet *ifp,
|
||||
struct sockaddr *gw, struct rib_cmd_info *rc);
|
||||
|
||||
typedef void route_notification_t(struct rib_cmd_info *rc, void *);
|
||||
void rib_decompose_notification(struct rib_cmd_info *rc,
|
||||
typedef void route_notification_t(const struct rib_cmd_info *rc, void *);
|
||||
void rib_decompose_notification(const struct rib_cmd_info *rc,
|
||||
route_notification_t *cb, void *cbdata);
|
||||
|
||||
int rib_add_redirect(u_int fibnum, struct sockaddr *dst,
|
||||
|
@ -292,7 +292,7 @@ notify_del(struct rib_cmd_info *rc, const struct weightened_nhop *wn_src,
|
||||
}
|
||||
|
||||
static void
|
||||
decompose_change_notification(struct rib_cmd_info *rc, route_notification_t *cb,
|
||||
decompose_change_notification(const struct rib_cmd_info *rc, route_notification_t *cb,
|
||||
void *cbdata)
|
||||
{
|
||||
uint32_t num_old, num_new;
|
||||
@ -379,7 +379,7 @@ decompose_change_notification(struct rib_cmd_info *rc, route_notification_t *cb,
|
||||
* Assumes at least one of the nexthops in @rc is multipath.
|
||||
*/
|
||||
void
|
||||
rib_decompose_notification(struct rib_cmd_info *rc, route_notification_t *cb,
|
||||
rib_decompose_notification(const struct rib_cmd_info *rc, route_notification_t *cb,
|
||||
void *cbdata)
|
||||
{
|
||||
const struct weightened_nhop *wn;
|
||||
|
@ -935,7 +935,7 @@ update_rtm_from_rc(struct rt_addrinfo *info, struct rt_msghdr **prtm,
|
||||
|
||||
#ifdef ROUTE_MPATH
|
||||
static void
|
||||
save_del_notification(struct rib_cmd_info *rc, void *_cbdata)
|
||||
save_del_notification(const struct rib_cmd_info *rc, void *_cbdata)
|
||||
{
|
||||
struct rib_cmd_info *rc_new = (struct rib_cmd_info *)_cbdata;
|
||||
|
||||
@ -944,7 +944,7 @@ save_del_notification(struct rib_cmd_info *rc, void *_cbdata)
|
||||
}
|
||||
|
||||
static void
|
||||
save_add_notification(struct rib_cmd_info *rc, void *_cbdata)
|
||||
save_add_notification(const struct rib_cmd_info *rc, void *_cbdata)
|
||||
{
|
||||
struct rib_cmd_info *rc_new = (struct rib_cmd_info *)_cbdata;
|
||||
|
||||
|
@ -1591,7 +1591,7 @@ nd6_free_redirect(const struct llentry *ln)
|
||||
* Updates status of the default router route.
|
||||
*/
|
||||
static void
|
||||
check_release_defrouter(struct rib_cmd_info *rc, void *_cbdata)
|
||||
check_release_defrouter(const struct rib_cmd_info *rc, void *_cbdata)
|
||||
{
|
||||
struct nd_defrouter *dr;
|
||||
struct nhop_object *nh;
|
||||
|
Loading…
Reference in New Issue
Block a user