routing: constantify nh/nhg argument in <nhop|nhgrp>_get_origin().
MFC after: 1 month
This commit is contained in:
parent
000250be0d
commit
e762417077
@ -853,9 +853,9 @@ nhgrp_get_idx(const struct nhgrp_object *nhg)
|
||||
}
|
||||
|
||||
uint8_t
|
||||
nhgrp_get_origin(struct nhgrp_object *nhg)
|
||||
nhgrp_get_origin(const struct nhgrp_object *nhg)
|
||||
{
|
||||
return (NHGRP_PRIV(nhg)->nhg_origin);
|
||||
return (NHGRP_PRIV_CONST(nhg)->nhg_origin);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -205,7 +205,7 @@ void nhop_set_transmit_ifp(struct nhop_object *nh, struct ifnet *ifp);
|
||||
#define NH_ORIGIN_BOOT 3 /* kernel-originated routes at boot */
|
||||
#define NH_ORIGIN_STATIC 4 /* route(8) routes */
|
||||
void nhop_set_origin(struct nhop_object *nh, uint8_t origin);
|
||||
uint8_t nhop_get_origin(struct nhop_object *nh);
|
||||
uint8_t nhop_get_origin(const struct nhop_object *nh);
|
||||
|
||||
uint32_t nhop_get_idx(const struct nhop_object *nh);
|
||||
uint32_t nhop_get_uidx(const struct nhop_object *nh);
|
||||
@ -225,7 +225,7 @@ struct rib_head *nhop_get_rh(const struct nhop_object *nh);
|
||||
|
||||
struct nhgrp_object;
|
||||
uint32_t nhgrp_get_uidx(const struct nhgrp_object *nhg);
|
||||
uint8_t nhgrp_get_origin(struct nhgrp_object *nhg);
|
||||
uint8_t nhgrp_get_origin(const struct nhgrp_object *nhg);
|
||||
void nhgrp_set_origin(struct nhgrp_object *nhg, uint8_t origin);
|
||||
#endif /* _KERNEL */
|
||||
|
||||
|
@ -1013,7 +1013,7 @@ nhop_get_rh(const struct nhop_object *nh)
|
||||
}
|
||||
|
||||
uint8_t
|
||||
nhop_get_origin(struct nhop_object *nh)
|
||||
nhop_get_origin(const struct nhop_object *nh)
|
||||
{
|
||||
return (nh->nh_priv->nh_origin);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user