#ifndef _NET_PFKEYV2_H
#define _NET_PFKEYV2_H
#ifdef __cplusplus
extern "C" {
#endif
#define PF_KEY_V2 2
#define PFKEYV2_REVISION 200109L
typedef struct sadb_msg {
uint8_t sadb_msg_version;
uint8_t sadb_msg_type;
uint8_t sadb_msg_errno;
uint8_t sadb_msg_satype;
uint16_t sadb_msg_len;
uint16_t sadb_msg_reserved;
#define sadb_x_msg_diagnostic sadb_msg_reserved
union {
struct {
uint32_t sadb_x_msg_useq;
uint32_t sadb_x_msg_upid;
} sadb_x_msg_actual;
uint64_t sadb_x_msg_alignment;
} sadb_x_msg_u;
#define sadb_msg_seq sadb_x_msg_u.sadb_x_msg_actual.sadb_x_msg_useq
#define sadb_msg_pid sadb_x_msg_u.sadb_x_msg_actual.sadb_x_msg_upid
} sadb_msg_t;
typedef struct sadb_ext {
union {
struct {
uint16_t sadb_x_ext_ulen;
uint16_t sadb_x_ext_utype;
} sadb_x_ext_actual;
uint64_t sadb_x_ext_alignment;
} sadb_x_ext_u;
#define sadb_ext_len sadb_x_ext_u.sadb_x_ext_actual.sadb_x_ext_ulen
#define sadb_ext_type sadb_x_ext_u.sadb_x_ext_actual.sadb_x_ext_utype
} sadb_ext_t;
typedef struct sadb_sa {
union {
struct {
uint16_t sadb_x_sa_ulen;
uint16_t sadb_x_sa_uexttype;
uint32_t sadb_x_sa_uspi;
} sadb_x_sa_uactual;
uint64_t sadb_x_sa_alignment;
} sadb_x_sa_u;
#define sadb_sa_len sadb_x_sa_u.sadb_x_sa_uactual.sadb_x_sa_ulen
#define sadb_sa_exttype sadb_x_sa_u.sadb_x_sa_uactual.sadb_x_sa_uexttype
#define sadb_sa_spi sadb_x_sa_u.sadb_x_sa_uactual.sadb_x_sa_uspi
uint8_t sadb_sa_replay;
uint8_t sadb_sa_state;
uint8_t sadb_sa_auth;
uint8_t sadb_sa_encrypt;
uint32_t sadb_sa_flags;
} sadb_sa_t;
typedef struct sadb_lifetime {
uint16_t sadb_lifetime_len;
uint16_t sadb_lifetime_exttype;
uint32_t sadb_lifetime_allocations;
uint64_t sadb_lifetime_bytes;
uint64_t sadb_lifetime_addtime;
uint64_t sadb_lifetime_usetime;
} sadb_lifetime_t;
typedef struct sadb_address {
union {
struct {
uint16_t sadb_x_address_ulen;
uint16_t sadb_x_address_uexttype;
uint8_t sadb_x_address_uproto;
uint8_t sadb_x_address_uprefixlen;
uint16_t sadb_x_address_ureserved;
} sadb_x_address_actual;
uint64_t sadb_x_address_alignment;
} sadb_x_address_u;
#define sadb_address_len \
sadb_x_address_u.sadb_x_address_actual.sadb_x_address_ulen
#define sadb_address_exttype \
sadb_x_address_u.sadb_x_address_actual.sadb_x_address_uexttype
#define sadb_address_proto \
sadb_x_address_u.sadb_x_address_actual.sadb_x_address_uproto
#define sadb_address_prefixlen \
sadb_x_address_u.sadb_x_address_actual.sadb_x_address_uprefixlen
#define sadb_address_reserved \
sadb_x_address_u.sadb_x_address_actual.sadb_x_address_ureserved
} sadb_address_t;
typedef struct sadb_key {
union {
struct {
uint16_t sadb_x_key_ulen;
uint16_t sadb_x_key_uexttype;
uint16_t sadb_x_key_ubits;
uint16_t sadb_x_key_ureserved;
} sadb_x_key_actual;
uint64_t sadb_x_key_alignment;
} sadb_x_key_u;
#define sadb_key_len sadb_x_key_u.sadb_x_key_actual.sadb_x_key_ulen
#define sadb_key_exttype sadb_x_key_u.sadb_x_key_actual.sadb_x_key_uexttype
#define sadb_key_bits sadb_x_key_u.sadb_x_key_actual.sadb_x_key_ubits
#define sadb_key_reserved sadb_x_key_u.sadb_x_key_actual.sadb_x_key_ureserved
} sadb_key_t;
typedef struct sadb_ident {
uint16_t sadb_ident_len;
uint16_t sadb_ident_exttype;
uint16_t sadb_ident_type;
uint16_t sadb_ident_reserved;
uint64_t sadb_ident_id;
} sadb_ident_t;
typedef struct sadb_sens {
union {
struct {
uint16_t sadb_x_sens_ulen;
uint16_t sadb_x_sens_uexttype;
uint32_t sadb_x_sens_udpd;
} sadb_x_sens_actual;
uint64_t sadb_x_sens_alignment;
} sadb_x_sens_u;
#define sadb_sens_len sadb_x_sens_u.sadb_x_sens_actual.sadb_x_sens_ulen
#define sadb_sens_exttype sadb_x_sens_u.sadb_x_sens_actual.sadb_x_sens_uexttype
#define sadb_sens_dpd sadb_x_sens_u.sadb_x_sens_actual.sadb_x_sens_udpd
uint8_t sadb_sens_sens_level;
uint8_t sadb_sens_sens_len;
uint8_t sadb_sens_integ_level;
uint8_t sadb_sens_integ_len;
uint32_t sadb_x_sens_flags;
} sadb_sens_t;
#define sadb_sens_reserved sadb_x_sens_flags
#define SADB_X_SENS_IMPLICIT 0x1
#define SADB_X_SENS_UNLABELED 0x2
typedef struct sadb_x_propbase {
uint16_t sadb_x_propb_len;
uint16_t sadb_x_propb_exttype;
union {
struct {
uint8_t sadb_x_propb_lenres_replay;
uint8_t sadb_x_propb_lenres_eres;
uint16_t sadb_x_propb_lenres_numecombs;
} sadb_x_propb_lenres;
struct {
uint8_t sadb_x_propb_oldres_replay;
uint8_t sadb_x_propb_oldres_reserved[3];
} sadb_x_propb_oldres;
} sadb_x_propb_u;
#define sadb_x_propb_replay \
sadb_x_propb_u.sadb_x_propb_lenres.sadb_x_propb_lenres_replay
#define sadb_x_propb_reserved \
sadb_x_propb_u.sadb_x_propb_oldres.sadb_x_propb_oldres_reserved
#define sadb_x_propb_ereserved \
sadb_x_propb_u.sadb_x_propb_lenres.sadb_x_propb_lenres_eres
#define sadb_x_propb_numecombs \
sadb_x_propb_u.sadb_x_propb_lenres.sadb_x_propb_lenres_numecombs
} sadb_x_propbase_t;
typedef struct sadb_prop {
union {
sadb_x_propbase_t sadb_x_prop_actual;
uint64_t sadb_x_prop_alignment;
} sadb_x_prop_u;
#define sadb_prop_len sadb_x_prop_u.sadb_x_prop_actual.sadb_x_propb_len
#define sadb_prop_exttype sadb_x_prop_u.sadb_x_prop_actual.sadb_x_propb_exttype
#define sadb_prop_replay sadb_x_prop_u.sadb_x_prop_actual.sadb_x_propb_replay
#define sadb_prop_reserved \
sadb_x_prop_u.sadb_x_prop_actual.sadb_x_propb_reserved
#define sadb_x_prop_ereserved \
sadb_x_prop_u.sadb_x_prop_actual.sadb_x_propb_ereserved
#define sadb_x_prop_numecombs \
sadb_x_prop_u.sadb_x_prop_actual.sadb_x_propb_numecombs
} sadb_prop_t;
typedef struct sadb_comb {
uint8_t sadb_comb_auth;
uint8_t sadb_comb_encrypt;
uint16_t sadb_comb_flags;
uint16_t sadb_comb_auth_minbits;
uint16_t sadb_comb_auth_maxbits;
uint16_t sadb_comb_encrypt_minbits;
uint16_t sadb_comb_encrypt_maxbits;
uint8_t sadb_x_comb_encrypt_saltbits;
uint8_t sadb_x_comb_reserved;
uint16_t sadb_comb_reserved;
uint32_t sadb_comb_soft_allocations;
uint32_t sadb_comb_hard_allocations;
uint64_t sadb_comb_soft_bytes;
uint64_t sadb_comb_hard_bytes;
uint64_t sadb_comb_soft_addtime;
uint64_t sadb_comb_hard_addtime;
uint64_t sadb_comb_soft_usetime;
uint64_t sadb_comb_hard_usetime;
} sadb_comb_t;
typedef struct sadb_x_ecomb {
uint8_t sadb_x_ecomb_numalgs;
uint8_t sadb_x_ecomb_reserved;
uint16_t sadb_x_ecomb_flags;
uint32_t sadb_x_ecomb_reserved2;
uint32_t sadb_x_ecomb_soft_allocations;
uint32_t sadb_x_ecomb_hard_allocations;
uint64_t sadb_x_ecomb_soft_bytes;
uint64_t sadb_x_ecomb_hard_bytes;
uint64_t sadb_x_ecomb_soft_addtime;
uint64_t sadb_x_ecomb_hard_addtime;
uint64_t sadb_x_ecomb_soft_usetime;
uint64_t sadb_x_ecomb_hard_usetime;
} sadb_x_ecomb_t;
typedef struct sadb_x_algdesc {
union {
struct {
uint8_t sadb_x_algdesc_usatype;
uint8_t sadb_x_algdesc_ualgtype;
uint8_t sadb_x_algdesc_ualg;
uint8_t sadb_x_algdesc_usaltbits;
uint16_t sadb_x_algdesc_uminbits;
uint16_t sadb_x_algdesc_umaxbits;
} sadb_x_algdesc_actual;
uint64_t sadb_x_algdesc_alignment;
} sadb_x_algdesc_u;
#define sadb_x_algdesc_satype \
sadb_x_algdesc_u.sadb_x_algdesc_actual.sadb_x_algdesc_usatype
#define sadb_x_algdesc_algtype \
sadb_x_algdesc_u.sadb_x_algdesc_actual.sadb_x_algdesc_ualgtype
#define sadb_x_algdesc_alg \
sadb_x_algdesc_u.sadb_x_algdesc_actual.sadb_x_algdesc_ualg
#define sadb_x_algdesc_saltbits \
sadb_x_algdesc_u.sadb_x_algdesc_actual.sadb_x_algdesc_usaltbits
#define sadb_x_algdesc_minbits \
sadb_x_algdesc_u.sadb_x_algdesc_actual.sadb_x_algdesc_uminbits
#define sadb_x_algdesc_maxbits \
sadb_x_algdesc_u.sadb_x_algdesc_actual.sadb_x_algdesc_umaxbits
} sadb_x_algdesc_t;
typedef struct sadb_supported {
union {
struct {
uint16_t sadb_x_supported_ulen;
uint16_t sadb_x_supported_uexttype;
uint32_t sadb_x_supported_ureserved;
} sadb_x_supported_actual;
uint64_t sadb_x_supported_alignment;
} sadb_x_supported_u;
#define sadb_supported_len \
sadb_x_supported_u.sadb_x_supported_actual.sadb_x_supported_ulen
#define sadb_supported_exttype \
sadb_x_supported_u.sadb_x_supported_actual.sadb_x_supported_uexttype
#define sadb_supported_reserved \
sadb_x_supported_u.sadb_x_supported_actual.sadb_x_supported_ureserved
} sadb_supported_t;
typedef struct sadb_x_algb {
uint8_t sadb_x_algb_id;
uint8_t sadb_x_algb_ivlen;
uint16_t sadb_x_algb_minbits;
uint16_t sadb_x_algb_maxbits;
union {
uint16_t sadb_x_algb_ureserved;
uint8_t sadb_x_algb_udefaults[2];
} sadb_x_algb_union;
#define sadb_x_algb_reserved sadb_x_algb_union.sadb_x_algb_ureserved
#define sadb_x_algb_increment sadb_x_algb_union.sadb_x_algb_udefaults[0]
#define sadb_x_algb_saltbits sadb_x_algb_union.sadb_x_algb_udefaults[1]
} sadb_x_algb_t;
typedef struct sadb_alg {
union {
sadb_x_algb_t sadb_x_alg_actual;
uint64_t sadb_x_alg_alignment;
} sadb_x_alg_u;
#define sadb_alg_id sadb_x_alg_u.sadb_x_alg_actual.sadb_x_algb_id
#define sadb_alg_ivlen sadb_x_alg_u.sadb_x_alg_actual.sadb_x_algb_ivlen
#define sadb_alg_minbits sadb_x_alg_u.sadb_x_alg_actual.sadb_x_algb_minbits
#define sadb_alg_maxbits sadb_x_alg_u.sadb_x_alg_actual.sadb_x_algb_maxbits
#define sadb_alg_reserved sadb_x_alg_u.sadb_x_alg_actual.sadb_x_algb_reserved
#define sadb_x_alg_increment \
sadb_x_alg_u.sadb_x_alg_actual.sadb_x_algb_increment
#define sadb_x_alg_saltbits sadb_x_alg_u.sadb_x_alg_actual.sadb_x_algb_saltbits
} sadb_alg_t;
typedef struct sadb_spirange {
uint16_t sadb_spirange_len;
uint16_t sadb_spirange_exttype;
uint32_t sadb_spirange_min;
union {
struct {
uint32_t sadb_x_spirange_umax;
uint32_t sadb_x_spirange_ureserved;
} sadb_x_spirange_actual;
uint64_t sadb_x_spirange_alignment;
} sadb_x_spirange_u;
#define sadb_spirange_max \
sadb_x_spirange_u.sadb_x_spirange_actual.sadb_x_spirange_umax
#define sadb_spirange_reserved \
sadb_x_spirange_u.sadb_x_spirange_actual.sadb_x_spirange_ureserved
} sadb_spirange_t;
typedef struct sadb_x_ereg {
union {
struct {
uint16_t sadb_x_ereg_ulen;
uint16_t sadb_x_ereg_uexttype;
uint8_t sadb_x_ereg_usatypes[4];
} sadb_x_ereg_actual;
uint64_t sadb_x_ereg_alignment;
} sadb_x_ereg_u;
#define sadb_x_ereg_len \
sadb_x_ereg_u.sadb_x_ereg_actual.sadb_x_ereg_ulen
#define sadb_x_ereg_exttype \
sadb_x_ereg_u.sadb_x_ereg_actual.sadb_x_ereg_uexttype
#define sadb_x_ereg_satypes \
sadb_x_ereg_u.sadb_x_ereg_actual.sadb_x_ereg_usatypes
} sadb_x_ereg_t;
typedef struct sadb_x_kmc {
uint16_t sadb_x_kmc_len;
uint16_t sadb_x_kmc_exttype;
uint32_t sadb_x_kmc_proto;
union {
struct {
uint32_t sadb_x_kmc_ucookie;
uint32_t sadb_x_kmc_ureserved;
} sadb_x_kmc_actual;
uint64_t sadb_x_kmc_ucookie64;
} sadb_x_kmc_u;
#define sadb_x_kmc_cookie sadb_x_kmc_u.sadb_x_kmc_actual.sadb_x_kmc_ucookie
#define sadb_x_kmc_reserved sadb_x_kmc_u.sadb_x_kmc_actual.sadb_x_kmc_ureserved
#define sadb_x_kmc_cookie64 sadb_x_kmc_u.sadb_x_kmc_ucookie64
} sadb_x_kmc_t;
typedef struct sadb_x_pair {
union {
struct {
uint16_t sadb_x_pair_ulen;
uint16_t sadb_x_pair_uexttype;
uint32_t sadb_x_pair_uspi;
} sadb_x_pair_actual;
uint64_t sadb_x_ext_alignment;
} sadb_x_pair_u;
#define sadb_x_pair_len sadb_x_pair_u.sadb_x_pair_actual.sadb_x_pair_ulen
#define sadb_x_pair_exttype \
sadb_x_pair_u.sadb_x_pair_actual.sadb_x_pair_uexttype
#define sadb_x_pair_spi sadb_x_pair_u.sadb_x_pair_actual.sadb_x_pair_uspi
} sadb_x_pair_t;
typedef struct sadb_x_replay_ctr {
uint16_t sadb_x_rc_len;
uint16_t sadb_x_rc_exttype;
uint32_t sadb_x_rc_replay32;
uint64_t sadb_x_rc_replay64;
} sadb_x_replay_ctr_t;
typedef struct sadb_x_edump {
uint16_t sadb_x_edump_len;
uint16_t sadb_x_edump_exttype;
uint32_t sadb_x_edump_reserved;
uint64_t sadb_x_edump_timeout;
} sadb_x_edump_t;
#define SADB_RESERVED 0
#define SADB_GETSPI 1
#define SADB_UPDATE 2
#define SADB_ADD 3
#define SADB_DELETE 4
#define SADB_GET 5
#define SADB_ACQUIRE 6
#define SADB_REGISTER 7
#define SADB_EXPIRE 8
#define SADB_FLUSH 9
#define SADB_DUMP 10
#define SADB_X_PROMISC 11
#define SADB_X_INVERSE_ACQUIRE 12
#define SADB_X_UPDATEPAIR 13
#define SADB_X_DELPAIR 14
#define SADB_X_DELPAIR_STATE 15
#define SADB_MAX 15
#define SADB_SAFLAGS_PFS 0x1
#define SADB_SAFLAGS_NOREPLAY 0x2
#define SADB_X_SAFLAGS_USED 0x80000000
#define SADB_X_SAFLAGS_UNIQUE 0x40000000
#define SADB_X_SAFLAGS_AALG1 0x20000000
#define SADB_X_SAFLAGS_AALG2 0x10000000
#define SADB_X_SAFLAGS_EALG1 0x8000000
#define SADB_X_SAFLAGS_EALG2 0x4000000
#define SADB_X_SAFLAGS_KM1 0x2000000
#define SADB_X_SAFLAGS_KM2 0x1000000
#define SADB_X_SAFLAGS_KM3 0x800000
#define SADB_X_SAFLAGS_KM4 0x400000
#define SADB_X_SAFLAGS_KRES1 0x200000
#define SADB_X_SAFLAGS_NATT_LOC 0x100000
#define SADB_X_SAFLAGS_NATT_REM 0x80000
#define SADB_X_SAFLAGS_KRES2 0x40000
#define SADB_X_SAFLAGS_TUNNEL 0x20000
#define SADB_X_SAFLAGS_PAIRED 0x10000
#define SADB_X_SAFLAGS_OUTBOUND 0x8000
#define SADB_X_SAFLAGS_INBOUND 0x4000
#define SADB_X_SAFLAGS_TCPSIG 0x2000
#define SADB_X_SAFLAGS_NATTED 0x1000
#define SADB_X_SAFLAGS_KRES \
SADB_X_SAFLAGS_KRES1 | SADB_X_SAFLAGS_KRES2
#define SADB_SASTATE_LARVAL 0
#define SADB_SASTATE_MATURE 1
#define SADB_SASTATE_DYING 2
#define SADB_SASTATE_DEAD 3
#define SADB_X_SASTATE_ACTIVE_ELSEWHERE 4
#define SADB_X_SASTATE_IDLE 5
#define SADB_X_SASTATE_ACTIVE 6
#define SADB_SASTATE_MAX 6
#define SADB_SATYPE_UNSPEC 0
#define SADB_SATYPE_AH 2
#define SADB_SATYPE_ESP 3
#define SADB_X_SATYPE_TCPSIG 4
#define SADB_SATYPE_RSVP 5
#define SADB_SATYPE_OSPFV2 6
#define SADB_SATYPE_RIPV2 7
#define SADB_SATYPE_MIP 8
#define SADB_SATYPE_MAX 8
#define TCPSIG_MD5_KEY_LEN 80
#define SADB_AALG_NONE 0
#define SADB_AALG_MD5 1
#define SADB_AALG_MD5HMAC 2
#define SADB_AALG_SHA1HMAC 3
#define SADB_AALG_SHA256HMAC 5
#define SADB_AALG_SHA384HMAC 6
#define SADB_AALG_SHA512HMAC 7
#define SADB_AALG_MAX 7
#define SADB_EALG_NONE 0
#define SADB_EALG_DESCBC 2
#define SADB_EALG_3DESCBC 3
#define SADB_EALG_BLOWFISH 7
#define SADB_EALG_NULL 11
#define SADB_EALG_AES 12
#define SADB_EALG_AES_CCM_8 14
#define SADB_EALG_AES_CCM_12 15
#define SADB_EALG_AES_CCM_16 16
#define SADB_EALG_AES_GCM_8 18
#define SADB_EALG_AES_GCM_12 19
#define SADB_EALG_AES_GCM_16 20
#define SADB_EALG_MAX 20
#define SADB_EXT_RESERVED 0
#define SADB_EXT_SA 1
#define SADB_EXT_LIFETIME_CURRENT 2
#define SADB_EXT_LIFETIME_HARD 3
#define SADB_EXT_LIFETIME_SOFT 4
#define SADB_EXT_ADDRESS_SRC 5
#define SADB_EXT_ADDRESS_DST 6
#define SADB_EXT_ADDRESS_PROXY 7
#define SADB_X_EXT_ADDRESS_INNER_SRC SADB_EXT_ADDRESS_PROXY
#define SADB_EXT_KEY_AUTH 8
#define SADB_EXT_KEY_ENCRYPT 9
#define SADB_EXT_IDENTITY_SRC 10
#define SADB_EXT_IDENTITY_DST 11
#define SADB_EXT_SENSITIVITY 12
#define SADB_EXT_PROPOSAL 13
#define SADB_EXT_SUPPORTED_AUTH 14
#define SADB_EXT_SUPPORTED_ENCRYPT 15
#define SADB_EXT_SPIRANGE 16
#define SADB_X_EXT_EREG 17
#define SADB_X_EXT_EPROP 18
#define SADB_X_EXT_KM_COOKIE 19
#define SADB_X_EXT_ADDRESS_NATT_LOC 20
#define SADB_X_EXT_ADDRESS_NATT_REM 21
#define SADB_X_EXT_ADDRESS_INNER_DST 22
#define SADB_X_EXT_PAIR 23
#define SADB_X_EXT_REPLAY_VALUE 24
#define SADB_X_EXT_EDUMP 25
#define SADB_X_EXT_LIFETIME_IDLE 26
#define SADB_X_EXT_OUTER_SENS 27
#define SADB_X_EXT_STR_AUTH 28
#define SADB_EXT_MAX 28
#define SADB_IDENTTYPE_RESERVED 0
#define SADB_IDENTTYPE_PREFIX 1
#define SADB_IDENTTYPE_FQDN 2
#define SADB_IDENTTYPE_USER_FQDN 3
#define SADB_X_IDENTTYPE_DN 4
#define SADB_X_IDENTTYPE_GN 5
#define SADB_X_IDENTTYPE_KEY_ID 6
#define SADB_X_IDENTTYPE_ADDR_RANGE 7
#define SADB_IDENTTYPE_MAX 7
#define SADB_DPD_NONE 0
#define SADB_DPD_MAX 1
#define SADB_X_DIAGNOSTIC_PRESET -1
#define SADB_X_DIAGNOSTIC_NONE 0
#define SADB_X_DIAGNOSTIC_UNKNOWN_MSG 1
#define SADB_X_DIAGNOSTIC_UNKNOWN_EXT 2
#define SADB_X_DIAGNOSTIC_BAD_EXTLEN 3
#define SADB_X_DIAGNOSTIC_UNKNOWN_SATYPE 4
#define SADB_X_DIAGNOSTIC_SATYPE_NEEDED 5
#define SADB_X_DIAGNOSTIC_NO_SADBS 6
#define SADB_X_DIAGNOSTIC_NO_EXT 7
#define SADB_X_DIAGNOSTIC_BAD_SRC_AF 8
#define SADB_X_DIAGNOSTIC_BAD_DST_AF 9
#define SADB_X_DIAGNOSTIC_BAD_PROXY_AF 10
#define SADB_X_DIAGNOSTIC_BAD_INNER_SRC_AF 10
#define SADB_X_DIAGNOSTIC_AF_MISMATCH 11
#define SADB_X_DIAGNOSTIC_BAD_SRC 12
#define SADB_X_DIAGNOSTIC_BAD_DST 13
#define SADB_X_DIAGNOSTIC_ALLOC_HSERR 14
#define SADB_X_DIAGNOSTIC_BYTES_HSERR 15
#define SADB_X_DIAGNOSTIC_ADDTIME_HSERR 16
#define SADB_X_DIAGNOSTIC_USETIME_HSERR 17
#define SADB_X_DIAGNOSTIC_MISSING_SRC 18
#define SADB_X_DIAGNOSTIC_MISSING_DST 19
#define SADB_X_DIAGNOSTIC_MISSING_SA 20
#define SADB_X_DIAGNOSTIC_MISSING_EKEY 21
#define SADB_X_DIAGNOSTIC_MISSING_AKEY 22
#define SADB_X_DIAGNOSTIC_MISSING_RANGE 23
#define SADB_X_DIAGNOSTIC_DUPLICATE_SRC 24
#define SADB_X_DIAGNOSTIC_DUPLICATE_DST 25
#define SADB_X_DIAGNOSTIC_DUPLICATE_SA 26
#define SADB_X_DIAGNOSTIC_DUPLICATE_EKEY 27
#define SADB_X_DIAGNOSTIC_DUPLICATE_AKEY 28
#define SADB_X_DIAGNOSTIC_DUPLICATE_RANGE 29
#define SADB_X_DIAGNOSTIC_MALFORMED_SRC 30
#define SADB_X_DIAGNOSTIC_MALFORMED_DST 31
#define SADB_X_DIAGNOSTIC_MALFORMED_SA 32
#define SADB_X_DIAGNOSTIC_MALFORMED_EKEY 33
#define SADB_X_DIAGNOSTIC_MALFORMED_AKEY 34
#define SADB_X_DIAGNOSTIC_MALFORMED_RANGE 35
#define SADB_X_DIAGNOSTIC_AKEY_PRESENT 36
#define SADB_X_DIAGNOSTIC_EKEY_PRESENT 37
#define SADB_X_DIAGNOSTIC_PROP_PRESENT 38
#define SADB_X_DIAGNOSTIC_SUPP_PRESENT 39
#define SADB_X_DIAGNOSTIC_BAD_AALG 40
#define SADB_X_DIAGNOSTIC_BAD_EALG 41
#define SADB_X_DIAGNOSTIC_BAD_SAFLAGS 42
#define SADB_X_DIAGNOSTIC_BAD_SASTATE 43
#define SADB_X_DIAGNOSTIC_BAD_AKEYBITS 44
#define SADB_X_DIAGNOSTIC_BAD_EKEYBITS 45
#define SADB_X_DIAGNOSTIC_ENCR_NOTSUPP 46
#define SADB_X_DIAGNOSTIC_WEAK_EKEY 47
#define SADB_X_DIAGNOSTIC_WEAK_AKEY 48
#define SADB_X_DIAGNOSTIC_DUPLICATE_KMP 49
#define SADB_X_DIAGNOSTIC_DUPLICATE_KMC 50
#define SADB_X_DIAGNOSTIC_MISSING_NATT_LOC 51
#define SADB_X_DIAGNOSTIC_MISSING_NATT_REM 52
#define SADB_X_DIAGNOSTIC_DUPLICATE_NATT_LOC 53
#define SADB_X_DIAGNOSTIC_DUPLICATE_NATT_REM 54
#define SADB_X_DIAGNOSTIC_MALFORMED_NATT_LOC 55
#define SADB_X_DIAGNOSTIC_MALFORMED_NATT_REM 56
#define SADB_X_DIAGNOSTIC_DUPLICATE_NATT_PORTS 57
#define SADB_X_DIAGNOSTIC_MISSING_INNER_SRC 58
#define SADB_X_DIAGNOSTIC_MISSING_INNER_DST 59
#define SADB_X_DIAGNOSTIC_DUPLICATE_INNER_SRC 60
#define SADB_X_DIAGNOSTIC_DUPLICATE_INNER_DST 61
#define SADB_X_DIAGNOSTIC_MALFORMED_INNER_SRC 62
#define SADB_X_DIAGNOSTIC_MALFORMED_INNER_DST 63
#define SADB_X_DIAGNOSTIC_PREFIX_INNER_SRC 64
#define SADB_X_DIAGNOSTIC_PREFIX_INNER_DST 65
#define SADB_X_DIAGNOSTIC_BAD_INNER_DST_AF 66
#define SADB_X_DIAGNOSTIC_INNER_AF_MISMATCH 67
#define SADB_X_DIAGNOSTIC_BAD_NATT_REM_AF 68
#define SADB_X_DIAGNOSTIC_BAD_NATT_LOC_AF 69
#define SADB_X_DIAGNOSTIC_PROTO_MISMATCH 70
#define SADB_X_DIAGNOSTIC_INNER_PROTO_MISMATCH 71
#define SADB_X_DIAGNOSTIC_DUAL_PORT_SETS 72
#define SADB_X_DIAGNOSTIC_PAIR_INAPPROPRIATE 73
#define SADB_X_DIAGNOSTIC_PAIR_ADD_MISMATCH 74
#define SADB_X_DIAGNOSTIC_PAIR_ALREADY 75
#define SADB_X_DIAGNOSTIC_PAIR_SA_NOTFOUND 76
#define SADB_X_DIAGNOSTIC_BAD_SA_DIRECTION 77
#define SADB_X_DIAGNOSTIC_SA_NOTFOUND 78
#define SADB_X_DIAGNOSTIC_SA_EXPIRED 79
#define SADB_X_DIAGNOSTIC_BAD_CTX 80
#define SADB_X_DIAGNOSTIC_INVALID_REPLAY 81
#define SADB_X_DIAGNOSTIC_MISSING_LIFETIME 82
#define SADB_X_DIAGNOSTIC_BAD_LABEL 83
#define SADB_X_DIAGNOSTIC_MISSING_ASTR 84
#define SADB_X_DIAGNOSTIC_DUPLICATE_ASTR 85
#define SADB_X_DIAGNOSTIC_MALFORMED_ASTR 86
#define SADB_X_DIAGNOSTIC_MAX 86
#define SADB_X_ALGTYPE_NONE 0
#define SADB_X_ALGTYPE_AUTH 1
#define SADB_X_ALGTYPE_CRYPT 2
#define SADB_X_ALGTYPE_COMPRESS 3
#define SADB_X_ALGTYPE_MAX 3
#define SADB_X_KMP_MANUAL 0
#define SADB_X_KMP_IKE 1
#define SADB_X_KMP_KINK 2
#define SADB_X_KMP_IKEV2 3
#define SADB_X_KMP_MAX SADB_X_KMP_IKEV2
#define SADB_64TO8(x) ((x) << 3)
#define SADB_8TO64(x) ((x) >> 3)
#define SADB_8TO1(x) ((x) << 3)
#define SADB_1TO8(x) ((x) >> 3)
#ifdef __cplusplus
}
#endif
#endif