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
19 /* incorrect bit order */
20 #define IKEV2_FLAGS_LENGTH_INCLUDED 0x01
21 #define IKEV2_FLAGS_MORE_FRAGMENTS 0x02
22 #define IKEV2_FLAGS_ICV_INCLUDED 0x04
24 #define IKEV2_FLAGS_LENGTH_INCLUDED 0x80
25 #define IKEV2_FLAGS_MORE_FRAGMENTS 0x40
26 #define IKEV2_FLAGS_ICV_INCLUDED 0x20
29 #define IKEV2_FRAGMENT_SIZE 1400
33 int eap_ikev2_derive_keymat(int prf
, struct ikev2_keys
*keys
,
34 const u8
*i_nonce
, size_t i_nonce_len
,
35 const u8
*r_nonce
, size_t r_nonce_len
,
37 struct wpabuf
* eap_ikev2_build_frag_ack(u8 id
, u8 code
);
38 int eap_ikev2_validate_icv(int integ_alg
, struct ikev2_keys
*keys
,
39 int initiator
, const struct wpabuf
*msg
,
40 const u8
*pos
, const u8
*end
);
42 #endif /* EAP_IKEV2_COMMON_H */