typedef struct Application_s { unsigned char cPacketType; MessageType_et MessageType; union { unsigned char ApplicationId[BROWSER_MAX_TAG_LEN]; MsgInfo_t MsgInfo; } AppData; } Application_t ; typedef enum { MSG_CONNECTION, MSG_RESPONSE }MessageType_et; typedef struct MsgInfo_s { unsigned char DataEncoding; NetworkInfo_t NetworkData; ErrorReturn_et Error; FreeFlow_State_t FreeFlow_RespType; Param_t Response; } MsgInfo_t ; typedef struct NetworkInfo_s { unsigned char Msisdn[BROWSER_MAX_ADDR_LEN]; unsigned char Msc[BROWSER_MAX_ADDR_LEN]; unsigned char Hlr[BROWSER_MAX_ADDR_LEN]; unsigned char Imsi[BROWSER_MAX_ADDR_LEN]; unsigned char Location[BROWSER_MAX_TAG_LEN]; unsigned char ConnectionType[BROWSER_MAX_TAG_LEN]; unsigned char wimax_id[MAX_WIMAX_ID_LEN]; } NetworkInfo_t ; typedef enum { ERROR_SUCCESS, ERROR_FAILURE } ErrorReturn_et; typedef enum { FREEFLOW_CONT, FREEFLOW_BREAK, FREEFLOW_ENABLED, FREEFLOW_DISABLED }FreeFlow_State_t; typedef struct Param_s { unsigned short DataLen; unsigned char sDataTag[BROWSER_MAX_TAG_LEN]; union { unsigned char sData[BROWSER_MAX_DATA_LEN]; wchar_t wData[BROWSER_MAX_DATA_LEN/2]; } DataText; } Param_t;
assuming
------------------
public static final int BROWSER_MAX_TAG_LEN = 10; public static final int BROWSER_MAX_ADDR_LEN = 21; public static final int MAX_WIMAX_ID_LEN = 13; public static final int BROWSER_MAX_DATA_LEN = 200; public static final int BROWSER_MAX_LANGCODE_LEN = 2; public static final int BROWSER_MAX_PARAM_COUNT = 5;