32#ifndef PROTOCORE_IKEV2_NATT_H
33#define PROTOCORE_IKEV2_NATT_H
37#if PROTOCORE_ENABLE_IKEV2
47#define PROTOCORE_IKE_N_NAT_DETECTION_SOURCE_IP 16388
49#define PROTOCORE_IKE_N_NAT_DETECTION_DESTINATION_IP 16389
51#define PROTOCORE_IKE_NATD_HASH_LEN 20
53#define PROTOCORE_NATT_PORT 4500
55#define PROTOCORE_NATT_NON_ESP_MARKER_LEN 4
57#define PROTOCORE_NATT_KEEPALIVE_BYTE 0xFF
66 const uint8_t *init_spi;
67 const uint8_t *resp_spi;
82 const uint8_t *received;
90 IkePayloadType next_payload;
128 IkeNattAddrArgs addr;
129 IkeNattDigestArgs digest;
137extern IkeNattVars IkeNattV;
142 void (*
const hash)(uint8_t *work);
143 void (*
const source_build)(uint8_t *work);
144 void (*
const dest_build)(uint8_t *work);
145 void (*
const match)(uint8_t *work);
146 void (*
const peer_behind_nat)(uint8_t *work);
147 void (*
const self_behind_nat)(uint8_t *work);
148 void (*
const is_keepalive)(uint8_t *work);
149 void (*
const is_ike)(uint8_t *work);
154void protocore_ike_natt_hash(uint8_t *work);
155void protocore_ike_natt_source_build(uint8_t *work);
156void protocore_ike_natt_dest_build(uint8_t *work);
157void protocore_ike_natt_match(uint8_t *work);
158void protocore_ike_natt_peer_behind_nat(uint8_t *work);
159void protocore_ike_natt_self_behind_nat(uint8_t *work);
160void protocore_ike_natt_is_keepalive(uint8_t *work);
161void protocore_ike_natt_is_ike(uint8_t *work);
167static const IkeNattNs IkeNatt __attribute__((unused)) = {
168 .hash = protocore_ike_natt_hash,
169 .source_build = protocore_ike_natt_source_build,
170 .dest_build = protocore_ike_natt_dest_build,
171 .match = protocore_ike_natt_match,
172 .peer_behind_nat = protocore_ike_natt_peer_behind_nat,
173 .self_behind_nat = protocore_ike_natt_self_behind_nat,
174 .is_keepalive = protocore_ike_natt_is_keepalive,
175 .is_ike = protocore_ike_natt_is_ike,
IKEv2 (RFC 7296): the message and payload codec, the key schedule, and the handshake driver.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS