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

Function nptv6_stats

tools/ipfw/nptv6.c:326–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326static void
327nptv6_stats(const char *name, uint8_t set)
328{
329 struct ipfw_nptv6_stats stats;
330
331 if (nptv6_get_stats(name, set, &stats) != 0)
332 err(EX_OSERR, "Error retrieving stats");
333
334 if (g_co.use_set != 0 || set != 0)
335 printf("set %u ", set);
336 printf("nptv6 %s\n", name);
337 printf("\t%ju packets translated (internal to external)\n",
338 (uintmax_t)stats.in2ex);
339 printf("\t%ju packets translated (external to internal)\n",
340 (uintmax_t)stats.ex2in);
341 printf("\t%ju packets dropped due to some error\n",
342 (uintmax_t)stats.dropped);
343}
344
345/*
346 * Reset NPTv6 instance statistics specified by @oh->ntlv.

Callers 1

ipfw_nptv6_handlerFunction · 0.70

Calls 2

nptv6_get_statsFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected