| 233 | #endif |
| 234 | |
| 235 | static int |
| 236 | get_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 | |
| 251 | bool |
| 252 | rt_is_host(const struct rtentry *rt) |
no outgoing calls
no test coverage detected