| /****************************************************************************** |
| *(C) Copyright 2018 ASR Microelectronics |
| * All Rights Reserved |
| ******************************************************************************/ |
| /* ---------------------------------------------------------------------------- |
| * |
| * Filename: mbim_auth.h |
| * |
| * |
| * Description: all auth mbim related functions should be added here |
| * |
| * |
| * Notes: |
| * |
| ******************************************************************************/ |
| #ifndef MBIM_AUTH_H |
| #define MBIM_AUTH_H |
| |
| /****************************************************************************** |
| * Include files |
| ******************************************************************************/ |
| #include <stdlib.h> |
| |
| #include "mbim_types.h" |
| #include "mbim_protocol.h" |
| |
| /****************************************************************************** |
| * Macros |
| ******************************************************************************/ |
| |
| |
| /****************************************************************************** |
| * Defines |
| ******************************************************************************/ |
| #define AUTH_CID_PARAMS UINT32 cid, UINT32 transactionId, UINT32 commandType, UINT32 infoBufLen, char *infoBuf_p |
| #define AUTH_CID_PARAMS_USAGE cid, transactionId, commandType, infoBufLen, infoBuf_p |
| |
| typedef int (*authUuidProcessors)(AUTH_CID_PARAMS); |
| |
| /****************************************************************************** |
| * External variables |
| ******************************************************************************/ |
| |
| |
| /****************************************************************************** |
| * MBIM_CID_AKA_AUTH (Chapter 10.5.31) |
| ******************************************************************************/ |
| typedef struct _MBIM_AKA_AUTH_REQ |
| { |
| UINT8 Rand[16]; |
| UINT8 Autn[16]; |
| }MBIM_AKA_AUTH_REQ, *P_MBIM_AKA_AUTH_REQ; |
| |
| typedef struct _MBIM_AKA_AUTH_INFO |
| { |
| UINT8 Res[16]; |
| UINT32 ResLen; |
| UINT8 IK[16]; |
| UINT8 CK[16]; |
| UINT8 Auts[14]; |
| }MBIM_AKA_AUTH_INFO, *P_MBIM_AKA_AUTH_INFO; |
| |
| /****************************************************************************** |
| * MBIM_CID_AKAP_AUTH (Chapter 10.5.32) |
| ******************************************************************************/ |
| typedef struct _MBIM_AKAP_AUTH_REQ |
| { |
| UINT8 Rand[16]; |
| UINT8 Autn[16]; |
| UINT32 NetworkNameOffset; |
| UINT32 NetworkNameLength; |
| char *DataBuffer; |
| }MBIM_AKAP_AUTH_REQ, *P_MBIM_AKAP_AUTH_REQ; |
| |
| typedef struct _MBIM_AKAP_AUTH_INFO |
| { |
| UINT8 Res[16]; |
| UINT32 ResLen; |
| UINT8 IK[16]; |
| UINT8 CK[16]; |
| UINT8 Auts[14]; |
| }MBIM_AKAP_AUTH_INFO, *P_MBIM_AKAP_AUTH_INFO; |
| |
| |
| /****************************************************************************** |
| * MBIM_CID_SIM_AUTH (Chapter 10.5.33) |
| ******************************************************************************/ |
| typedef struct _MBIM_SIM_AUTH_REQ |
| { |
| UINT8 Rand1[16]; |
| UINT8 Rand2[16]; |
| UINT8 Rand3[16]; |
| UINT32 n; |
| }MBIM_SIM_AUTH_REQ, *P_MBIM_SIM_AUTH_REQ; |
| |
| typedef struct _MBIM_SIM_AUTH_INFO |
| { |
| UINT8 Sres1[4]; |
| UINT8 Kc1[8]; |
| UINT8 Sres2[4]; |
| UINT8 Kc2[8]; |
| UINT8 Sres3[4]; |
| UINT8 Kc3[8]; |
| UINT32 n; |
| }MBIM_SIM_AUTH_INFO, *P_MBIM_SIM_AUTH_INFO; |
| |
| #endif |