wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ikev2.h
Go to the documentation of this file.
1 
5 #ifndef IKEV2_H
6 #define IKEV2_H
7 
9 
10 struct ikev2_proposal_data {
11  u8 proposal_num;
12  int integ;
13  int prf;
14  int encr;
15  int dh;
16 };
17 
18 
20  enum { SA_INIT, SA_AUTH, CHILD_SA, IKEV2_DONE } state;
21  u8 i_spi[IKEV2_SPI_LEN];
22  u8 r_spi[IKEV2_SPI_LEN];
23  u8 i_nonce[IKEV2_NONCE_MAX_LEN];
24  size_t i_nonce_len;
25  u8 r_nonce[IKEV2_NONCE_MAX_LEN];
26  size_t r_nonce_len;
27  struct wpabuf *r_dh_public;
28  struct wpabuf *i_dh_private;
29  struct ikev2_proposal_data proposal;
30  const struct dh_group *dh;
31  struct ikev2_keys keys;
32  u8 *IDi;
33  size_t IDi_len;
34  u8 *IDr;
35  size_t IDr_len;
36  u8 IDr_type;
37  struct wpabuf *r_sign_msg;
38  struct wpabuf *i_sign_msg;
39  u8 *shared_secret;
40  size_t shared_secret_len;
41  enum { PEER_AUTH_CERT, PEER_AUTH_SECRET } peer_auth;
42  u8 *key_pad;
43  size_t key_pad_len;
44 
45  const u8 * (*get_shared_secret)(void *ctx, const u8 *IDr,
46  size_t IDr_len, size_t *secret_len);
47  void *cb_ctx;
48  int unknown_user;
49 };
50 
51 
52 void ikev2_initiator_deinit(struct ikev2_initiator_data *data);
53 int ikev2_initiator_process(struct ikev2_initiator_data *data,
54  const struct wpabuf *buf);
55 struct wpabuf * ikev2_initiator_build(struct ikev2_initiator_data *data);
56 
57 #endif /* IKEV2_H */
Definition: ikev2.h:19
IKEv2 definitions.
Definition: wpabuf.h:16
Definition: dh_groups.h:8
Definition: ikev2_common.h:235
Definition: ikev2.h:10