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

Function print_nhop_header

tools/netstat/nhops.c:178–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176
177
178static void
179print_nhop_header(int af1 __unused)
180{
181
182 if (Wflag) {
183 xo_emit("{T:/%-*.*s} {T:/%-*.*s} {T:/%-*.*s} {T:/%-*.*s} {T:/%*.*s} "
184 "{T:/%*.*s} {T:/%-*.*s} {T:/%*.*s} {T:/%*.*s} {T:/%*.*s} {T:/%*s}\n",
185 wid_nhidx, wid_nhidx, "Idx",
186 wid_nhtype, wid_nhtype, "Type",
187 wid_dst, wid_dst, "IFA",
188 wid_gw, wid_gw, "Gateway",
189 wid_flags, wid_flags, "Flags",
190 wid_pksent, wid_pksent, "Use",
191 wid_mtu, wid_mtu, "Mtu",
192 wid_if, wid_if, "Netif",
193 wid_if, wid_if, "Addrif",
194 wid_refcnt, wid_refcnt, "Refcnt",
195 wid_prepend, "Prepend");
196 } else {
197 xo_emit("{T:/%-*.*s} {T:/%-*.*s} {T:/%-*.*s} {T:/%-*.*s} {T:/%*.*s} "
198 " {T:/%*s}\n",
199 wid_nhidx, wid_nhidx, "Idx",
200 wid_dst, wid_dst, "IFA",
201 wid_gw, wid_gw, "Gateway",
202 wid_flags, wid_flags, "Flags",
203 wid_if, wid_if, "Netif",
204 wid_prepend, "Refcnt");
205 }
206}
207
208void
209nhop_map_update(struct nhop_map *map, uint32_t idx, char *gw, char *ifname)

Callers 1

print_nhops_sysctlFunction · 0.85

Calls 1

xo_emitFunction · 0.85

Tested by

no test coverage detected