eap_ikev2_common.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * EAP-IKEv2 definitions
  3. * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef EAP_IKEV2_COMMON_H
  9. #define EAP_IKEV2_COMMON_H
  10. #ifdef CCNS_PL
  11. /* incorrect bit order */
  12. #define IKEV2_FLAGS_LENGTH_INCLUDED 0x01
  13. #define IKEV2_FLAGS_MORE_FRAGMENTS 0x02
  14. #define IKEV2_FLAGS_ICV_INCLUDED 0x04
  15. #else /* CCNS_PL */
  16. #define IKEV2_FLAGS_LENGTH_INCLUDED 0x80
  17. #define IKEV2_FLAGS_MORE_FRAGMENTS 0x40
  18. #define IKEV2_FLAGS_ICV_INCLUDED 0x20
  19. #endif /* CCNS_PL */
  20. #define IKEV2_FRAGMENT_SIZE 1400
  21. struct ikev2_keys;
  22. int eap_ikev2_derive_keymat(int prf, struct ikev2_keys *keys,
  23. const u8 *i_nonce, size_t i_nonce_len,
  24. const u8 *r_nonce, size_t r_nonce_len,
  25. u8 *keymat);
  26. struct wpabuf * eap_ikev2_build_frag_ack(u8 id, u8 code);
  27. int eap_ikev2_validate_icv(int integ_alg, struct ikev2_keys *keys,
  28. int initiator, const struct wpabuf *msg,
  29. const u8 *pos, const u8 *end);
  30. #endif /* EAP_IKEV2_COMMON_H */