| 309 | } |
| 310 | |
| 311 | static void |
| 312 | prepare_nh_map(int fibnum, int af) |
| 313 | { |
| 314 | struct nhops_dump nd; |
| 315 | struct nhop_external *nh; |
| 316 | struct rt_msghdr *rtm; |
| 317 | |
| 318 | dump_nhops_sysctl(fibnum, af, &nd); |
| 319 | |
| 320 | for (size_t i = 0; i < nd.nh_count; i++) { |
| 321 | rtm = nd.nh_map[i].rtm; |
| 322 | nh = (struct nhop_external *)(rtm + 1); |
| 323 | update_global_map(nh); |
| 324 | } |
| 325 | |
| 326 | free(nd.nh_buf); |
| 327 | } |
| 328 | |
| 329 | void |
| 330 | nhgrp_print(int fibnum, int af) |
no test coverage detected