Changeset View
Changeset View
Standalone View
Standalone View
sys/netipsec/ipsec.h
Show First 20 Lines • Show All 240 Lines • ▼ Show 20 Lines | |||||
#define IPSECCTL_INBOUND_CALL_IKE 7 | #define IPSECCTL_INBOUND_CALL_IKE 7 | ||||
#endif | #endif | ||||
#define IPSECCTL_AH_CLEARTOS 8 | #define IPSECCTL_AH_CLEARTOS 8 | ||||
#define IPSECCTL_AH_OFFSETMASK 9 | #define IPSECCTL_AH_OFFSETMASK 9 | ||||
#define IPSECCTL_DFBIT 10 | #define IPSECCTL_DFBIT 10 | ||||
#define IPSECCTL_ECN 11 | #define IPSECCTL_ECN 11 | ||||
#define IPSECCTL_DEBUG 12 | #define IPSECCTL_DEBUG 12 | ||||
#define IPSECCTL_ESP_RANDPAD 13 | #define IPSECCTL_ESP_RANDPAD 13 | ||||
#define IPSECCTL_MIN_PMTU 14 | |||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#include <sys/counter.h> | #include <sys/counter.h> | ||||
struct ipsec_ctx_data; | struct ipsec_ctx_data; | ||||
#define IPSEC_INIT_CTX(_ctx, _mp, _inp, _sav, _af, _enc) do { \ | #define IPSEC_INIT_CTX(_ctx, _mp, _inp, _sav, _af, _enc) do { \ | ||||
(_ctx)->mp = (_mp); \ | (_ctx)->mp = (_mp); \ | ||||
(_ctx)->inp = (_inp); \ | (_ctx)->inp = (_inp); \ | ||||
Show All 15 Lines | |||||
#endif | #endif | ||||
VNET_PCPUSTAT_DECLARE(struct ipsecstat, ipsec4stat); | VNET_PCPUSTAT_DECLARE(struct ipsecstat, ipsec4stat); | ||||
VNET_DECLARE(int, ip4_esp_trans_deflev); | VNET_DECLARE(int, ip4_esp_trans_deflev); | ||||
VNET_DECLARE(int, ip4_esp_net_deflev); | VNET_DECLARE(int, ip4_esp_net_deflev); | ||||
VNET_DECLARE(int, ip4_ah_trans_deflev); | VNET_DECLARE(int, ip4_ah_trans_deflev); | ||||
VNET_DECLARE(int, ip4_ah_net_deflev); | VNET_DECLARE(int, ip4_ah_net_deflev); | ||||
VNET_DECLARE(int, ip4_ipsec_dfbit); | VNET_DECLARE(int, ip4_ipsec_dfbit); | ||||
VNET_DECLARE(int, ip4_ipsec_min_pmtu); | |||||
VNET_DECLARE(int, ip4_ipsec_ecn); | VNET_DECLARE(int, ip4_ipsec_ecn); | ||||
VNET_DECLARE(int, crypto_support); | VNET_DECLARE(int, crypto_support); | ||||
VNET_DECLARE(int, async_crypto); | VNET_DECLARE(int, async_crypto); | ||||
VNET_DECLARE(int, natt_cksum_policy); | VNET_DECLARE(int, natt_cksum_policy); | ||||
#define IPSECSTAT_INC(name) \ | #define IPSECSTAT_INC(name) \ | ||||
VNET_PCPUSTAT_ADD(struct ipsecstat, ipsec4stat, name, 1) | VNET_PCPUSTAT_ADD(struct ipsecstat, ipsec4stat, name, 1) | ||||
#define V_ip4_esp_trans_deflev VNET(ip4_esp_trans_deflev) | #define V_ip4_esp_trans_deflev VNET(ip4_esp_trans_deflev) | ||||
#define V_ip4_esp_net_deflev VNET(ip4_esp_net_deflev) | #define V_ip4_esp_net_deflev VNET(ip4_esp_net_deflev) | ||||
#define V_ip4_ah_trans_deflev VNET(ip4_ah_trans_deflev) | #define V_ip4_ah_trans_deflev VNET(ip4_ah_trans_deflev) | ||||
#define V_ip4_ah_net_deflev VNET(ip4_ah_net_deflev) | #define V_ip4_ah_net_deflev VNET(ip4_ah_net_deflev) | ||||
#define V_ip4_ipsec_dfbit VNET(ip4_ipsec_dfbit) | #define V_ip4_ipsec_dfbit VNET(ip4_ipsec_dfbit) | ||||
#define V_ip4_ipsec_min_pmtu VNET(ip4_ipsec_min_pmtu) | |||||
#define V_ip4_ipsec_ecn VNET(ip4_ipsec_ecn) | #define V_ip4_ipsec_ecn VNET(ip4_ipsec_ecn) | ||||
#define V_crypto_support VNET(crypto_support) | #define V_crypto_support VNET(crypto_support) | ||||
#define V_async_crypto VNET(async_crypto) | #define V_async_crypto VNET(async_crypto) | ||||
#define V_natt_cksum_policy VNET(natt_cksum_policy) | #define V_natt_cksum_policy VNET(natt_cksum_policy) | ||||
#define ipseclog(x) do { if (V_ipsec_debug) log x; } while (0) | #define ipseclog(x) do { if (V_ipsec_debug) log x; } while (0) | ||||
/* for openbsd compatibility */ | /* for openbsd compatibility */ | ||||
#ifdef IPSEC_DEBUG | #ifdef IPSEC_DEBUG | ||||
Show All 36 Lines | void ipsec4_setsockaddrs(const struct mbuf *, union sockaddr_union *, | ||||
union sockaddr_union *); | union sockaddr_union *); | ||||
int ipsec4_in_reject(const struct mbuf *, struct inpcb *); | int ipsec4_in_reject(const struct mbuf *, struct inpcb *); | ||||
int ipsec4_input(struct mbuf *, int, int); | int ipsec4_input(struct mbuf *, int, int); | ||||
int ipsec4_forward(struct mbuf *); | int ipsec4_forward(struct mbuf *); | ||||
int ipsec4_pcbctl(struct inpcb *, struct sockopt *); | int ipsec4_pcbctl(struct inpcb *, struct sockopt *); | ||||
int ipsec4_output(struct mbuf *, struct inpcb *); | int ipsec4_output(struct mbuf *, struct inpcb *); | ||||
int ipsec4_capability(struct mbuf *, u_int); | int ipsec4_capability(struct mbuf *, u_int); | ||||
int ipsec4_common_input_cb(struct mbuf *, struct secasvar *, int, int); | int ipsec4_common_input_cb(struct mbuf *, struct secasvar *, int, int); | ||||
int ipsec4_ctlinput(int, struct sockaddr *, void *); | |||||
int ipsec4_process_packet(struct mbuf *, struct secpolicy *, struct inpcb *); | int ipsec4_process_packet(struct mbuf *, struct secpolicy *, struct inpcb *); | ||||
int ipsec_process_done(struct mbuf *, struct secpolicy *, struct secasvar *, | int ipsec_process_done(struct mbuf *, struct secpolicy *, struct secasvar *, | ||||
u_int); | u_int); | ||||
extern void m_checkalignment(const char* where, struct mbuf *m0, | extern void m_checkalignment(const char* where, struct mbuf *m0, | ||||
int off, int len); | int off, int len); | ||||
extern struct mbuf *m_makespace(struct mbuf *m0, int skip, int hlen, int *off); | extern struct mbuf *m_makespace(struct mbuf *m0, int skip, int hlen, int *off); | ||||
extern caddr_t m_pad(struct mbuf *m, int n); | extern caddr_t m_pad(struct mbuf *m, int n); | ||||
Show All 13 Lines |