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

Function ipsec_stats

tools/netstat/ipsec.c:200–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void
201ipsec_stats(u_long off, const char *name, int af1 __unused, int proto __unused)
202{
203 struct ipsecstat ipsecstat;
204
205 if (strcmp(name, "ipsec6") == 0) {
206 if (fetch_stats("net.inet6.ipsec6.ipsecstats", off,&ipsecstat,
207 sizeof(ipsecstat), kread_counters) != 0)
208 return;
209 } else {
210 if (fetch_stats("net.inet.ipsec.ipsecstats", off, &ipsecstat,
211 sizeof(ipsecstat), kread_counters) != 0)
212 return;
213 }
214
215 xo_emit("{T:/%s}:\n", name);
216
217 print_ipsecstats(&ipsecstat);
218}
219
220
221static void print_ahstats(const struct ahstat *ahstat);

Callers

nothing calls this directly

Calls 4

strcmpFunction · 0.85
fetch_statsFunction · 0.85
xo_emitFunction · 0.85
print_ipsecstatsFunction · 0.85

Tested by

no test coverage detected