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

Function print_nhgrp_sysctl

tools/netstat/nhgrp.c:252–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252static void
253print_nhgrp_sysctl(int fibnum, int af)
254{
255 struct nhops_dump nd;
256 struct nhgrp_external *nhg;
257 struct rt_msghdr *rtm;
258
259 dump_nhgrp_sysctl(fibnum, af, &nd);
260
261 xo_open_container("nhgrp-table");
262 xo_open_list("rt-family");
263 if (nd.nh_count > 0) {
264 wid_gw = WID_GW_DEFAULT(af);
265 xo_open_instance("rt-family");
266 pr_family(af);
267 xo_open_list("nhgrp-entry");
268
269 print_nhgroup_header(af);
270
271 for (size_t i = 0; i < nd.nh_count; i++) {
272 rtm = nd.nh_map[i].rtm;
273 nhg = (struct nhgrp_external *)(rtm + 1);
274 print_nhgroup_entry_sysctl("nhgrp-entry", rtm, nhg);
275 }
276 }
277 xo_close_list("rt-family");
278 xo_close_container("nhgrp-table");
279 free(nd.nh_buf);
280}
281
282static void
283update_global_map(struct nhop_external *nh)

Callers 1

nhgrp_printFunction · 0.85

Calls 10

dump_nhgrp_sysctlFunction · 0.85
xo_open_containerFunction · 0.85
xo_open_listFunction · 0.85
xo_open_instanceFunction · 0.85
pr_familyFunction · 0.85
print_nhgroup_headerFunction · 0.85
xo_close_listFunction · 0.85
xo_close_containerFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected