| 198 | } |
| 199 | |
| 200 | void |
| 201 | ipsec_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 | |
| 221 | static void print_ahstats(const struct ahstat *ahstat); |
nothing calls this directly
no test coverage detected