| 862 | #endif |
| 863 | |
| 864 | static void |
| 865 | rt_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 | |
| 878 | static void |
| 879 | init_sockaddrs_family(int family, union sockaddr_union *dst, union sockaddr_union *mask) |
no test coverage detected