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

Function rt_getmetrics

lib/ff_route.c:864–876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

862#endif
863
864static void
865rt_getmetrics(const struct rtentry *rt, const struct nhop_object *nh,
866 struct rt_metrics *out)
867{
868
869 bzero(out, sizeof(*out));
870 out->rmx_mtu = nh->nh_mtu;
871 out->rmx_weight = rt->rt_weight;
872 out->rmx_nhidx = nhop_get_idx(nh);
873 /* Kernel -> userland timebase conversion. */
874 out->rmx_expire = rt->rt_expire ?
875 rt->rt_expire - time_uptime + time_second : 0;
876}
877
878static void
879init_sockaddrs_family(int family, union sockaddr_union *dst, union sockaddr_union *mask)

Callers 2

update_rtm_from_rcFunction · 0.70
ff_rtioctl_oldFunction · 0.70

Calls 2

bzeroFunction · 0.85
nhop_get_idxFunction · 0.85

Tested by

no test coverage detected