2 * EAP-IKEv2 definitions
3 * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
12 * See README and COPYING for more details.
15 #ifndef EAP_IKEV2_COMMON_H
16 #define EAP_IKEV2_COMMON_H
23 /* incorrect bit order */
24 #define IKEV2_FLAGS_LENGTH_INCLUDED 0x01
25 #define IKEV2_FLAGS_MORE_FRAGMENTS 0x02
26 #define IKEV2_FLAGS_ICV_INCLUDED 0x04
28 #define IKEV2_FLAGS_LENGTH_INCLUDED 0x80
29 #define IKEV2_FLAGS_MORE_FRAGMENTS 0x40
30 #define IKEV2_FLAGS_ICV_INCLUDED 0x20
33 #define IKEV2_FRAGMENT_SIZE 1400
37 int eap_ikev2_derive_keymat(int prf, struct ikev2_keys *keys,
38 const u8 *i_nonce, size_t i_nonce_len,
39 const u8 *r_nonce, size_t r_nonce_len,
41 struct wpabuf * eap_ikev2_build_frag_ack(u8 id, u8 code);
42 int eap_ikev2_validate_icv(int integ_alg, struct ikev2_keys *keys,
43 int initiator, const struct wpabuf *msg,
44 const u8 *pos, const u8 *end);
50 #endif /* EAP_IKEV2_COMMON_H */