Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net/pfkeyv2.h
Show First 20 Lines • Show All 217 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
/* XXX Policy Extension */ | /* XXX Policy Extension */ | ||||
struct sadb_x_policy { | struct sadb_x_policy { | ||||
u_int16_t sadb_x_policy_len; | u_int16_t sadb_x_policy_len; | ||||
u_int16_t sadb_x_policy_exttype; | u_int16_t sadb_x_policy_exttype; | ||||
u_int16_t sadb_x_policy_type; /* See policy type of ipsec.h */ | u_int16_t sadb_x_policy_type; /* See policy type of ipsec.h */ | ||||
u_int8_t sadb_x_policy_dir; /* direction, see ipsec.h */ | u_int8_t sadb_x_policy_dir; /* direction, see ipsec.h */ | ||||
u_int8_t sadb_x_policy_reserved; | u_int8_t sadb_x_policy_scope; /* scope, see ipsec.h */ | ||||
u_int32_t sadb_x_policy_id; | u_int32_t sadb_x_policy_id; | ||||
u_int32_t sadb_x_policy_priority; | u_int32_t sadb_x_policy_priority; | ||||
#define sadb_x_policy_reserved sadb_x_policy_scope | |||||
/* Policy with ifnet scope uses priority field to store ifindex */ | |||||
#define sadb_x_policy_ifindex sadb_x_policy_priority | |||||
}; | }; | ||||
_Static_assert(sizeof(struct sadb_x_policy) == 16, "struct size mismatch"); | _Static_assert(sizeof(struct sadb_x_policy) == 16, "struct size mismatch"); | ||||
/* | /* | ||||
* When policy_type == IPSEC, it is followed by some of | * When policy_type == IPSEC, it is followed by some of | ||||
* the ipsec policy request. | * the ipsec policy request. | ||||
* [total length of ipsec policy requests] | * [total length of ipsec policy requests] | ||||
* = (sadb_x_policy_len * sizeof(uint64_t) - sizeof(struct sadb_x_policy)) | * = (sadb_x_policy_len * sizeof(uint64_t) - sizeof(struct sadb_x_policy)) | ||||
▲ Show 20 Lines • Show All 216 Lines • Show Last 20 Lines |