#include <netinet6/ipsec.h>
netinet6/ipsec.h
$FreeBSD: src/sys/netinet6/ipsec.h,v 1.4.2.2 2001/07/03 11:01:54 ume Exp $
macroIPSEC_PORT_ANY
according to IANA assignment, port 0x0000 and proto 0xff are reserved.
#define IPSEC_PORT_ANY 0
macroIPSEC_ULPROTO_ANY
#define IPSEC_ULPROTO_ANY 255
macroIPSEC_PROTO_ANY
#define IPSEC_PROTO_ANY 255
macroIPSEC_MODE_ANY
mode of security protocol
NOTE: DON'T use IPSEC_MODE_ANY at SPD. It's only use in SAD
#define IPSEC_MODE_ANY 0
i.e. wildcard.
macroIPSEC_MODE_TRANSPORT
#define IPSEC_MODE_TRANSPORT 1
macroIPSEC_MODE_TUNNEL
#define IPSEC_MODE_TUNNEL 2
macroIPSEC_DIR_ANY
Direction of security policy.
NOTE: Since INVALID is used just as flag.
The other are used for loop counter too.
#define IPSEC_DIR_ANY 0
macroIPSEC_DIR_INBOUND
#define IPSEC_DIR_INBOUND 1
macroIPSEC_DIR_OUTBOUND
#define IPSEC_DIR_OUTBOUND 2
macroIPSEC_DIR_MAX
#define IPSEC_DIR_MAX 3
macroIPSEC_DIR_INVALID
#define IPSEC_DIR_INVALID 4
macroIPSEC_POLICY_DISCARD
Policy level
IPSEC, ENTRUST and BYPASS are allowed for setsockopt() in PCB,
DISCARD, IPSEC and NONE are allowed for setkey() in SPD.
DISCARD and NONE are allowed for system default.
#define IPSEC_POLICY_DISCARD 0
discarding packet
macroIPSEC_POLICY_GENERATE
#define IPSEC_POLICY_GENERATE 5
same as discard - IKE daemon can override with generated policy
macroIPSEC_LEVEL_DEFAULT
Security protocol level
#define IPSEC_LEVEL_DEFAULT 0
reference to system default
macroIPSEC_MANUAL_REQID_MAX
#define IPSEC_MANUAL_REQID_MAX 0x3fff
macroIPSEC_REPLAYWSIZE
if security policy level == unique, this id
indicate to a relative SA for use, else is
zero.
1 - 0x3fff are reserved for manual keying.
0 are reserved for above reason. Others is
for kernel use.
Note that this id doesn't identify SA
by only itself.
#define IPSEC_REPLAYWSIZE 32
macroIPSEC_KEY_AUTH_MAX_BYTES
Maximum key sizes in bytes expected to be passed from userspace.
These values are based on the NULL algorithms for AH and ESP,
which both specify a keymax of 2048 bits.
#define IPSEC_KEY_AUTH_MAX_BYTES 256
macroIPSEC_KEY_ENCRYPT_MAX_BYTES
#define IPSEC_KEY_ENCRYPT_MAX_BYTES 256
structipsecstat
statistics for ipsec processing
| u_quad_t | in_success | succeeded inbound process |
| u_quad_t | in_polvio | |
| u_quad_t | in_nosa | security policy violation for inbound process inbound SA is unavailable |
| u_quad_t | in_inval | inbound processing failed due to EINVAL |
| u_quad_t | in_nomem | inbound processing failed due to ENOBUFS |
| u_quad_t | in_badspi | failed getting a SPI |
| u_quad_t | in_ahreplay | AH replay check failed |
| u_quad_t | in_espreplay | ESP replay check failed |
| u_quad_t | in_ahauthsucc | AH authentication success |
| u_quad_t | in_ahauthfail | AH authentication failure |
| u_quad_t | in_espauthsucc | ESP authentication success |
| u_quad_t | in_espauthfail | ESP authentication failure |
| u_quad_t[256] | in_esphist | |
| u_quad_t[256] | in_ahhist | |
| u_quad_t[256] | in_comphist | |
| u_quad_t | out_success | succeeded outbound process |
| u_quad_t | out_polvio | |
| u_quad_t | out_nosa | security policy violation for outbound process outbound SA is unavailable |
| u_quad_t | out_inval | outbound process failed due to EINVAL |
| u_quad_t | out_nomem | outbound processing failed due to ENOBUFS |
| u_quad_t | out_noroute | there is no route |
| u_quad_t[256] | out_esphist | |
| u_quad_t[256] | out_ahhist | |
| u_quad_t[256] | out_comphist |
macroIPSEC_MAX_WAKE_PKT_LEN
#define IPSEC_MAX_WAKE_PKT_LEN 100
structipsec_wake_pkt_info
| u_int8_t[100] | wake_pkt | |
| uuid_string_t | wake_uuid | |
| u_int32_t | wake_pkt_spi | |
| u_int32_t | wake_pkt_seq | |
| u_int16_t | wake_pkt_len |
structipsec_wake_pkt_event_data
| uuid_string_t | wake_uuid |