/* ****************************************************************************** * INTERPEAK INTERNAL API HEADER FILE * * Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipeap_aka.h,v $ $Revision: 1.4 $ * $Source: /home/interpeak/CVSRoot/ipeap/src/ipeap_aka.h,v $ * $Author: hchowdhu $ $Date: 2010-06-28 22:03:11 $ * $State: Exp $ $Locker: $ * * INTERPEAK_COPYRIGHT_STRING * Design and implementation by Roger Boden ****************************************************************************** */ #if !defined(IPEAP_AKA_H) && defined(IPEAP_USE_EAP_AKA) #define IPEAP_AKA_H /* **************************************************************************** * 1 DESCRIPTION **************************************************************************** */ /* **************************************************************************** * 2 CONFIGURATION **************************************************************************** */ #include "ipeap_config.h" /* **************************************************************************** * 3 INCLUDE FILES **************************************************************************** */ #include "ipeap.h" #include "ipeap_h.h" #ifdef __cplusplus extern "C" { #endif /* **************************************************************************** * 4 DEFINES **************************************************************************** */ #define IPEAP_AKA_VERSION 1 /* Non-skippable attributes (0-127) */ #define IPEAP_AKA_AT_RAND 1 #define IPEAP_AKA_AT_AUTN 2 #define IPEAP_AKA_AT_RES 3 #define IPEAP_AKA_AT_AUTS 4 #define IPEAP_AKA_AT_PADDING 6 #define IPEAP_AKA_AT_PERMANENT_ID_REQ 10 #define IPEAP_AKA_AT_MAC 11 #define IPEAP_AKA_AT_NOTIFICATION 12 #define IPEAP_AKA_AT_ANY_ID_REQ 13 #define IPEAP_AKA_AT_IDENTITY 14 #define IPEAP_AKA_AT_VERSION_LIST 15 #define IPEAP_AKA_AT_SELECTED_VERSION 16 #define IPEAP_AKA_AT_FULLAUTH_ID_REQ 17 #define IPEAP_AKA_AT_COUNTER 19 #define IPEAP_AKA_AT_COUNTER_TOO_SMALL 20 #define IPEAP_AKA_AT_NONCE_S 21 #define IPEAP_AKA_AT_CLIENT_ERROR_CODE 22 /* Skippable attributes (128-) */ #define IPEAP_AKA_AT_IV 129 #define IPEAP_AKA_AT_ENCR_DATA 130 #define IPEAP_AKA_AT_NEXT_PSEUDONYM 132 #define IPEAP_AKA_AT_NEXT_REAUTH_ID 133 #define IPEAP_AKA_AT_CHECKCODE 134 #define IPEAP_AKA_AT_RESULT_IND 135 /* Subtypes */ #define IPEAP_AKA_SUBTYPE_CHALLENGE 1 #define IPEAP_AKA_SUBTYPE_AUTHENTICATION_REJECT 2 #define IPEAP_AKA_SUBTYPE_SYNCHRONIZATION_FAILURE 4 #define IPEAP_AKA_SUBTYPE_IDENTITY 5 #define IPEAP_AKA_SUBTYPE_NOTIFICATION 12 #define IPEAP_AKA_SUBTYPE_REAUTHENTICATION 13 #define IPEAP_AKA_SUBTYPE_CLIENT_ERROR 14 /* AT_CLIENT_ERROR_CODE values */ #define IPEAP_AKA_UNABLE_TO_PROCESS_PACKET 0 #define IPEAP_AKA_UNSUPPORTED_VERSION 1 #define IPEAP_AKA_INSUFFICIENT_NUM_OF_CHAL 2 #define IPEAP_AKA_RAND_NOT_FRESH 3 /* AT_NOTIFICATION values */ #define IPEAP_AKA_FAILURE_AFTER_AUTH 0x0000 #define IPEAP_AKA_TEMPORARILY_DENIED 0x0402 #define IPEAP_AKA_NOT_SUBSCRIBED 0x0407 #define IPEAP_AKA_FAILURE_BEFORE_AUTH 0x4000 #define IPEAP_AKA_SUCCESS 0x8000 /* Constants */ #define IPEAP_AKA_HEADER_LEN 8 #define IPEAP_AKA_RAND_LEN 16 #define IPEAP_AKA_AUTN_LEN 16 #define IPEAP_AKA_AUTS_LEN 14 #define IPEAP_AKA_NONCE_S_LEN 16 #define IPEAP_AKA_MAC_LEN 16 #define IPEAP_AKA_CHECKCODE_LEN 20 #define IPEAP_AKA_RES_LEN 16 #define IPEAP_AKA_IK_LEN 16 #define IPEAP_AKA_CK_LEN 16 #define IPEAP_AKA_K_AUTH_LEN 16 #define IPEAP_AKA_K_ENCR_LEN 16 #define IPEAP_AKA_MSK_LEN 64 #define IPEAP_AKA_SESSION_ID_LEN (1 + IPEAP_AKA_RAND_LEN + IPEAP_AKA_AUTN_LEN) /* **************************************************************************** * 5 TYPES **************************************************************************** */ /* **************************************************************************** * 6 FUNCTIONS **************************************************************************** */ /* *=========================================================================== * ipeap_aka_methods_get *=========================================================================== * Description: Return a structure containing pointer to all functions * required by EAP. * Parameters: * Returns: */ IP_PUBLIC Ipeap_methods* ipeap_aka_methods_get(void); /* *=========================================================================== * ipeap_aka_get_identity *=========================================================================== * Description: Read identity from card (IMSI number). * Parameters: identity - buffer that will receive the null-terminated * identity. * identityLen - Size of identity buffer. * Returns: IPCOM_SUCCESS * IPCOM_ERR_FAILED */ IP_PUBLIC Ip_err ipeap_aka_get_identity(char *identity, Ip_u32 identityLen); #ifdef __cplusplus } #endif #endif /* **************************************************************************** * END OF FILE **************************************************************************** */