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

Function prepare_nh_map

tools/netstat/nhgrp.c:311–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311static void
312prepare_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
329void
330nhgrp_print(int fibnum, int af)

Callers 1

nhgrp_printFunction · 0.85

Calls 3

dump_nhops_sysctlFunction · 0.85
update_global_mapFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected