ikev2.h

Go to the documentation of this file.
00001 
00016 #ifndef IKEV2_H
00017 #define IKEV2_H
00018 
00019 #include "eap_common/ikev2_common.h"
00020 
00021 struct ikev2_proposal_data {
00022         u8 proposal_num;
00023         int integ;
00024         int prf;
00025         int encr;
00026         int dh;
00027 };
00028 
00029 
00030 struct ikev2_initiator_data {
00031         enum { SA_INIT, SA_AUTH, CHILD_SA, IKEV2_DONE } state;
00032         u8 i_spi[IKEV2_SPI_LEN];
00033         u8 r_spi[IKEV2_SPI_LEN];
00034         u8 i_nonce[IKEV2_NONCE_MAX_LEN];
00035         size_t i_nonce_len;
00036         u8 r_nonce[IKEV2_NONCE_MAX_LEN];
00037         size_t r_nonce_len;
00038         struct wpabuf *r_dh_public;
00039         struct wpabuf *i_dh_private;
00040         struct ikev2_proposal_data proposal;
00041         const struct dh_group *dh;
00042         struct ikev2_keys keys;
00043         u8 *IDi;
00044         size_t IDi_len;
00045         u8 *IDr;
00046         size_t IDr_len;
00047         u8 IDr_type;
00048         struct wpabuf *r_sign_msg;
00049         struct wpabuf *i_sign_msg;
00050         u8 *shared_secret;
00051         size_t shared_secret_len;
00052         enum { PEER_AUTH_CERT, PEER_AUTH_SECRET } peer_auth;
00053         u8 *key_pad;
00054         size_t key_pad_len;
00055 
00056         const u8 * (*get_shared_secret)(void *ctx, const u8 *IDr,
00057                                         size_t IDr_len, size_t *secret_len);
00058         void *cb_ctx;
00059         int unknown_user;
00060 };
00061 
00062 
00063 void ikev2_initiator_deinit(struct ikev2_initiator_data *data);
00064 int ikev2_initiator_process(struct ikev2_initiator_data *data,
00065                             const struct wpabuf *buf);
00066 struct wpabuf * ikev2_initiator_build(struct ikev2_initiator_data *data);
00067 
00068 #endif /* IKEV2_H */
00069 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:16:52 2009 for hostapd by  doxygen 1.6.1