MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_info_weight

Function get_info_weight

freebsd/net/route/route_ctl.c:235–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233#endif
234
235static int
236get_info_weight(const struct rt_addrinfo *info, uint32_t default_weight)
237{
238 uint32_t weight;
239
240 if (info->rti_mflags & RTV_WEIGHT)
241 weight = info->rti_rmx->rmx_weight;
242 else
243 weight = default_weight;
244 /* Keep upper 1 byte for adm distance purposes */
245 if (weight > RT_MAX_WEIGHT)
246 weight = RT_MAX_WEIGHT;
247
248 return (weight);
249}
250
251bool
252rt_is_host(const struct rtentry *rt)

Callers 3

create_rtentryFunction · 0.85
change_mpath_routeFunction · 0.85
change_routeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected