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

Function pfsync_acts_stats

tools/netstat/if.c:114–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112};
113
114static void
115pfsync_acts_stats(const char *list, const char *desc, uint64_t *a)
116{
117 int i;
118
119 xo_open_list(list);
120 for (i = 0; i < PFSYNC_ACT_MAX; i++, a++) {
121 if (*a || sflag <= 1) {
122 xo_open_instance(list);
123 xo_emit("\t\t{e:name}{:count/%ju} {N:/%s%s %s}\n",
124 pfsyncacts_name[i], (uintmax_t)(*a),
125 pfsyncacts[i], plural(*a), desc);
126 xo_close_instance(list);
127 }
128 }
129 xo_close_list(list);
130}
131
132/*
133 * Dump pfsync statistics structure.

Callers 1

pfsync_statsFunction · 0.85

Calls 6

xo_open_listFunction · 0.85
xo_open_instanceFunction · 0.85
xo_emitFunction · 0.85
pluralFunction · 0.85
xo_close_instanceFunction · 0.85
xo_close_listFunction · 0.85

Tested by

no test coverage detected