| 382 | ) |
| 383 | |
| 384 | static IPSEC_KMOD_METHOD(int, ipsec_kmod_caps, sc, |
| 385 | capability, METHOD_DECL(struct ipsec_support * const sc, struct mbuf *m, |
| 386 | u_int cap), METHOD_ARGS(m, cap) |
| 387 | ) |
| 388 | |
| 389 | int |
| 390 | ipsec_kmod_capability(struct ipsec_support * const sc, struct mbuf *m, |
| 391 | u_int cap) |
| 392 | { |
| 393 | |
| 394 | /* |
| 395 | * Since PF_KEY is build in the kernel, we can directly |
| 396 | * call key_havesp() without additional synchronizations. |
| 397 | */ |
| 398 | if (cap == IPSEC_CAP_OPERABLE) |
| 399 | return (key_havesp(IPSEC_DIR_INBOUND) != 0 || |
| 400 | key_havesp(IPSEC_DIR_OUTBOUND) != 0); |
| 401 | return (ipsec_kmod_caps(sc, m, cap)); |
| 402 | } |
| 403 | |
| 404 | void |
| 405 | ipsec_support_enable(struct ipsec_support * const sc, |
nothing calls this directly
no test coverage detected