/********************************************************************
Copyright ?2007 LGC Wireless, Inc. All rights reserved
File Name: 		aifg_type_def.h
Description:	Data structure definition of AIFG module
Version:		v9.0.0
Author:			Roy Jiang
Create Date:	2007-3-12

History:
2007-3-6		v9.0.12	Create
*********************************************************************/
#ifndef _WXC2_AIFG_TYPE_DEF_H
#define _WXC2_AIFG_TYPE_DEF_H

#include "aifg_public.h"
#include "aifg_msg.h"
#include "../../../sccp/src/include/scoc_if.h"

#ifndef NULL
#define NULL 		0
#endif

#ifndef TRUE
#define TRUE 		1
#endif

#ifndef FALSE
#define FALSE 		0
#endif

#define SCCP_SAP_AIFG			3

#define AIFG_PROC_FINISH		1
#define AIFG_PROC_CONTINUE		0

#define AIFG_MAX_CG       		256
#define AIFG_MAX_SAP       		2
#define MSG_PROC_EACH_TIME 		64
#define AIFG_MAX_PORT      		8192
#define AIFG_MAX_MSG_LENGTH 	256
#define AIFG_MAX_TI_PER_LINK	16
#define AIFG_MAX_MESSAGE		128
#define SCCP_MAX_LINK			8192

typedef struct{
	int		port;
	BYTE	*data_ptr;
}aifg_raw_msg;

enum {AIFG_CG_AVAILABLE, AIFG_CG_UNAVAILABLE};
typedef struct{
	BYTE		enable;
	int			(*callback_func)(aifg_indication, aifg_msg_pre_decoded *);
}aifg_sap;

typedef struct{
	BYTE		mode;
}aifg_dual_server;

typedef enum{
	AIFG_CG_STATE_DOWN,
	AIFG_CG_STATE_UP,
}aifg_cg_state;

//port status definition
typedef enum {
	AIFG_PORT_IDLE, 
	AIFG_PORT_INIT,
	AIFG_PORT_PAGING,
	AIFG_PORT_RESET,
	AIFG_PORT_TRANSACTION,
	AIFG_PORT_TRANSPARENT,
	AIFG_PORT_RELEASE,
	AIFG_PORT_FINISH,
}AIFG_PORT_STATE;

typedef enum{
	AIFG_TRANS_UNKNOW = -1,
	AIFG_TRANS_LU = 1,
	AIFG_TRANS_CC = AIFG_PD_DTAP_CC,	//3
	AIFG_TRANS_SMS = AIFG_PD_DTAP_SMS,	//9
	AIFG_TRANS_SS = AIFG_PD_DTAP_SS,	//11
}AIFG_TRANS_TYPE;

typedef struct aifg_port_t{
	aifg_sap_type			sapid;			//SAP id
	BYTE					cgid;			//circuit group id
	int						link_id;		//link id
	int						new_link;		//for handover, new link id to which the call will be handover to
	int						upper_port;		//process port of upper layer
	AIFG_PORT_STATE			stat;			//port status
	int						timer;			//process timer
	struct aifg_port_t		*pNextOpenPort;	//pointer to the next port in the opened port list
	struct aifg_port_t		*pPrevOpenPort;	//pointer to the previous port in the opened port list
	struct aifg_port_t		*pNextPort;		//pointer to the next port of the same BSSMAP transaction, such as paging/block
	struct aifg_port_t		*pPrevPort;		//pointer to the previous port of the same BSSMAP transaction, such as paging/block
	char					ti;				//TI value, including the TI flag
	AIFG_TRANS_TYPE			ti_type;		//Transaction type of this port (CC/SS/SMS)
	BYTE					ti_stat;		//Transaction status
	BYTE					rel_cause;		//release cause
	BYTE					diagnostic[32];	//diagnostic for release
	BYTE					diag_len;		//diagnostic length
	BYTE					imsi[16];		//associated mobile IMSI
	BYTE					imsi_len;		//associated mobile IMSI length
	BYTE					ho_stat;		//handover status
	int						app_ho_port;	//application handover process port
	SP_UiPriPara			sd_buffer;		//send message buffer, used in case when message re-send is needed

	BYTE					app_rel_flag;	//flag to indicate whether app is released
	BYTE					trace_flag;		//for debug trace
#ifdef _AIFG_DEBUG_
	unsigned int			dead_timer;		//for resource leak checking
#endif
}aifg_port;

//timer definition, second
#define T1S_MULTIPLIER 100
enum{
	AIFG_TIMER_T2		= 3 * T1S_MULTIPLIER,	//Reset guard period at the MSC
	AIFG_TIMER_T13		= 3 * T1S_MULTIPLIER,	//Reset guard period at the BSS
	AIFG_TIMER_T14 		= 60 * T1S_MULTIPLIER,	//Time to receive RESET ACKNOWLEDGE at the BSS
	AIFG_TIMER_T16		= 60 * T1S_MULTIPLIER,	//Time to receive RESET ACKNOWLEDGE at the MSC
	AIFG_TIMER_T3113	= 15 * T1S_MULTIPLIER,	//Time to receive PAGING RESPONSE at MSC
	AIFG_TIMER_REPAGE	= 8 * T1S_MULTIPLIER,	//Time to resend PAGING REQUEST at MSC

	AIFG_TIMER_TRANS_TIMEOUT	= 120 * T1S_MULTIPLIER,	//120s
	AIFG_TIMER_CLEAR_TIMEOUT 	= 10 * T1S_MULTIPLIER,	//10s
	AIFG_TIMER_RELEASE_TIMEOUT 	= 10 * T1S_MULTIPLIER,	//10s
	AIFG_TIMER_WAIT_RELEASE_CMP	= 50					//500ms
};

typedef struct{
	BYTE			enable;
	int				dpc;
	aifg_ni			ni;
	BYTE			sapid;		//SAP which owns this CG
	int				tgid;		//MSC trunk group id
}aifg_circuit_group;

typedef struct{
	BYTE			en_flag;
	BYTE			cleared;	//if the link was cleared, all the ports belongs to it will be released
	aifg_sap_type	sapid;		//SAP which owns this link

	int				cur_port;	//in MSC:current activated local port
								//in BSC:current activated upper port, for no AIFG local port need at BSC side
	BYTE			ti_number;	//number of current activated ti, used at MSC side
	BYTE			next_ti;	//TI value for next network initiate transaction
	struct{
		BYTE		en_flag;
		BYTE		tio;
		int			port;		//corresponding port number
	}ti[3][AIFG_MAX_TI_PER_LINK];	//0-7 is assigned by network, 8-15 is assigned by mobile, used at MSC side
									//totally 3 types of TI according to different SAP: CC, SMS or SS
}aifg_link_info;
enum TI_TYPE{
	TI_FOR_CC,
	TI_FOR_SMS,
	TI_FOR_SS,
};

typedef enum{ 
	AIFG_SUCCEED					= 0,
	AIFG_ERROR						= -1,
		
	//Error definition 1 ~ 1023
	AIFG_ERR_OUT_OF_RESOURCE = 1,
	AIFG_ERR_UNKNOW_MSG,
	AIFG_ERR_UNKNOW_IE,
	AIFG_ERR_ERROR_MSG,
	AIFG_ERR_ERROR_IE,
	AIFG_ERR_UP_NOT_EXIST,
	AIFG_ERR_NO_UD_IN_CR,
	AIFG_ERR_UNEXPECTED_DT1,
	AIFG_ERR_UNEXPECTED_UDT,
	AIFG_ERR_UNEXPECTED_CC,
	AIFG_ERR_OVERLOAD,
	AIFG_ERR_CG_NOT_READY,
	AIFG_ERR_UNEXPECTED_PAGING_RESP,
	AIFG_ERR_INVALID_TI,
	AIFG_ERR_MISS_MANDATORY,
	AIFG_ERR_MSG_RV_TO_IDLE_PORT,
	AIFG_ERR_MSG_SD_TO_IDLE_PORT,
	AIFG_ERR_ASSIGN_PORT_FAIL,
	AIFG_ERR_SAP_NOT_CREATED,
	AIFG_ERR_PORT_TIMER_OUT,
	AIFG_ERR_CAN_NOT_FIND_TI,
	AIFG_ERR_PAGING_NOT_RESP,
	AIFG_ERR_PORT_RELEASED,

	//event definition	1024 ~ 2048
	AIFG_EVENT_SD_MSG = 1024,	//Message sent to sccp
	AIFG_EVENT_RV_MSG,			//Message received from sccp
	AIFG_EVENT_SD_IND,			//Indication sent to upper app
	AIFG_EVENT_RV_REQ,			//Request received from upper app
	AIFG_EVENT_REDIR_MSG,		//Message redirected
	AIFG_EVENT_CG_UP,			//Circuit come up
	AIFG_EVENT_LINK_RELEASE,	//Link release
	AIFG_EVENT_PORT_RELEASE,
}aifg_event_code;

typedef enum{
	//DTAP
	//RR
	AIFG_MSG_T_PAGING_RESP			=	0x27,	//Paging response
	AIFG_MSG_T_RR_HO_CMD			=	0x2B,	//RR Handover command
	
	//MM
	AIFG_MSG_T_IMSI_DETACH_IND		=	0x01,	//IMSI detach indication
	AIFG_MSG_T_LU_ACCEPT		 	= 	0x02,	//Location updating accept
	AIFG_MSG_T_LU_REJECT			=	0x04,	//Location updating reject
	AIFG_MSG_T_LU_REQUEST			=	0x08,	//Location updating request
	AIFG_MSG_T_AUTH_REJECT			=	0x11,	//Authentication reject
	AIFG_MSG_T_AUTH_REQUEST			=	0x12,	//Authentication request
	AIFG_MSG_T_AUTH_RESPONSE		=	0x14,	//Authentication response
	AIFG_MSG_T_ID_REQUEST			=	0x18,	//Identity request
	AIFG_MSG_T_ID_RESPONSE			=	0x19,	//Identity response
	AIFG_MSG_T_TMSI_REALLOC_CMD		=	0x1A,	//TMSI reallocation command
	AIFG_MSG_T_TMSI_REALLOC_CMP		=	0x1B,	//TMSI reallocation complete
	AIFG_MSG_T_CM_ACCEPT			=	0x21,	//CM service accept
	AIFG_MSG_T_CM_REJECT			=	0x22,	//CM service reject
	AIFG_MSG_T_CM_ABORT				=	0x23,	//CM service abort
	AIFG_MSG_T_CM_REQUEST			=	0x24,	//CM service request
	AIFG_MSG_T_CM_PROMPT			=	0x25,	//CM service prompt
	AIFG_MSG_T_CM_REEST_REQUEST		=	0x28,	//CM re-establishment request
	AIFG_MSG_T_ABORT				=	0x29,	//Abort
	AIFG_MSG_T_MM_NULL				=	0x30,	//MM NULL
	AIFG_MSG_T_MM_STATUS			=	0x31,	//MM status
	AIFG_MSG_T_MM_INFO				=	0x32,	//MM information

	//CC
	AIFG_MSG_T_ALERTING				=	0x01,	//Alerting
	AIFG_MSG_T_CALL_CONFIRMED		=	0x08,	//Call confirmed
	AIFG_MSG_T_CALL_PROCEEDING		=	0x02,	//Call proceeding
	AIFG_MSG_T_CONNECT				=	0x07,	//Connect
	AIFG_MSG_T_CONNECT_ACK			=	0x0F,	//Connect ack
	AIFG_MSG_T_EMERGENCY_SETUP		=	0x0E,	//Emergency setup
	AIFG_MSG_T_PROGRESS				=	0x03,	//Progress
	AIFG_MSG_T_SETUP				=	0x05,	//Setup
	AIFG_MSG_T_MODIFY				=	0x17,	//Modify
	AIFG_MSG_T_MODIFY_CMP			=	0x1F,	//Modify complete
	AIFG_MSG_T_MODIFY_REJECT		=	0x13,	//Modify reject
	AIFG_MSG_T_USER_INFO			=	0x10,	//User information
	AIFG_MSG_T_HOLD					=	0x18,	//Hold
	AIFG_MSG_T_HOLD_ACK				=	0x19,	//Hold ack
	AIFG_MSG_T_HOLD_REJECT			=	0x1A,	//Hold reject
	AIFG_MSG_T_RETRIEVE				=	0x1C,	//Retrieve
	AIFG_MSG_T_RETRIEVE_ACK			=	0x1D,	//Retrieve ack
	AIFG_MSG_T_RETRIEVE_REJECT		=	0x1E,	//Retrieve reject
	AIFG_MSG_T_DISCONNECT			=	0x25,	//Disconnect
	AIFG_MSG_T_RELEASE				=	0x2D,	//Release
	AIFG_MSG_T_RELEASE_CMP			=	0x2A,	//Release complete
	AIFG_MSG_T_CONGESTION_CTRL		=	0x39,	//Congestion control
	AIFG_MSG_T_NOTIFY				=	0x3E,	//Notify
	AIFG_MSG_T_STATUS				=	0x3D,	//Status
	AIFG_MSG_T_STATUS_ENQ			=	0x34,	//Status enquiry
	AIFG_MSG_T_START_DTMF			=	0x35,	//Start DTMF
	AIFG_MSG_T_STOP_DTMF			=	0x31,	//Stop DTMF
	AIFG_MSG_T_STOP_DTMF_ACK		=	0x32,	//Stop DTMF ack
	AIFG_MSG_T_START_DTMF_ACK		=	0x36,	//Start DTMF ack
	AIFG_MSG_T_START_DTMF_REJECT	=	0x37,	//Start DTMF reject
	AIFG_MSG_T_FACILITY				=	0x3A,	//Facility

	//SMS
	AIFG_MSG_T_CP_DATA				=	0x01,	//CP-DATA
	AIFG_MSG_T_CP_ACK				=	0x04,	//CP-ACK
	AIFG_MSG_T_CP_ERROR				=	0x10,	//CP-ERRPR

	AIFG_MSG_T_RP_DATA_MS			=	0x00,	//RP-DATA MS side
	AIFG_MSG_T_RP_ACK_MS			=	0x02,	//RP-ACK MS side
	AIFG_MSG_T_RP_ERROR_MS			=	0x04,	//RP-ERRPR MS side
	AIFG_MSG_T_RP_SMMA				=	0x06,	//RP-SMMA MS side
	AIFG_MSG_T_RP_DATA_NW			=	0x01,	//RP-DATA network side
	AIFG_MSG_T_RP_ACK_NW			=	0x03,	//RP-ACK network side
	AIFG_MSG_T_RP_ERROR_NW			=	0x05,	//RP-ERRPR network side

	//SS
	AIFG_MSG_T_FACILITY_SS			=	0x3A,	//Facility SS
	AIFG_MSG_T_REGISTER				=	0x3B,	//Register
	AIFG_MSG_T_RELEASE_CMP_SS		=	0x2A,	//Release complete SS

	//BSSMAP
	AIFG_MSG_T_ASSIGN_REQ			=	0x01,	//Assign request
	AIFG_MSG_T_ASSIGN_CMP			=	0x02,	//Assign complete
	AIFG_MSG_T_ASSIGN_FAIL			=	0x03,	//Assign failure
	AIFG_MSG_T_HO_REQUEST			=	0x10,	//Handover request
	AIFG_MSG_T_HO_REQUIRED			=	0x11,	//Handover required
	AIFG_MSG_T_HO_REQ_ACK			=	0x12,	//Handover request ack
	AIFG_MSG_T_HO_CMD				=	0x13,	//Handover command
	AIFG_MSG_T_HO_CMP				=	0x14,	//Handover complete
	AIFG_MSG_T_HO_SUC				=	0x15,	//Handover succeeded
	AIFG_MSG_T_HO_FAIL				=	0x16,	//Handover failure
	AIFG_MSG_T_HO_PERFORMED			=	0x17,	//Handover performed
	AIFG_MSG_T_HO_CAN_ENQ			=	0x18,	//Handover candidate enquire
	AIFG_MSG_T_HO_CAN_RESP			=	0x19,	//Handover candidate response
	AIFG_MSG_T_HO_REQ_REJ			=	0x1A,	//Handover required reject
	AIFG_MSG_T_HO_DETECT			=	0x1B,	//Handover detect
	AIFG_MSG_T_CLR_CMD				=	0x20,	//Clear command
	AIFG_MSG_T_CLR_CMP				=	0x21,	//Clear complete
	AIFG_MSG_T_CLR_REQ				=	0x22,	//Clear request
	AIFG_MSG_T_SAPI_REJ				=	0x25,	//SAPI 'n' reject
	AIFG_MSG_T_CONFUSION			=	0x26,	//Confusion
	AIFG_MSG_T_SUSPEND				=	0x28,	//Suspend
	AIFG_MSG_T_RESUME				=	0x29,	//Resume
	AIFG_MSG_T_LOC_INFO_CMD			=	0x2A,	//Location information command
	AIFG_MSG_T_LOC_INFO_RPT			=	0x2B,	//Location information report
	AIFG_MSG_T_RESET				=	0x30,	//Reset
	AIFG_MSG_T_RESET_ACK			=	0x31,	//Reset ack
	AIFG_MSG_T_OVERLOAD				=	0x32,	//Overload
	AIFG_MSG_T_RESET_CC				=	0x34,	//Reset circuit
	AIFG_MSG_T_RESET_CC_ACK			=	0x35,	//Reset circuit ack
	AIFG_MSG_T_MSC_INVK_TRACE		=	0x36,	//MSC invoke trace
	AIFG_MSG_T_BSC_INVK_TRACE		=	0x37,	//BSC invoke trace
	AIFG_MSG_T_BLOCK				=	0x40,	//Block
	AIFG_MSG_T_BLOCK_ACK			=	0x41,	//Blocking ack
	AIFG_MSG_T_UNBLOCK				=	0x42,	//Unblock
	AIFG_MSG_T_UNBLOCK_ACK			=	0x43,	//Unblocking ack
	AIFG_MSG_T_CC_GROUP_BLK			=	0x44,	//Circuit group block
	AIFG_MSG_T_CC_GROUP_BLK_ACK		=	0x45,	//Circuit group block ack
	AIFG_MSG_T_CC_GROUP_UNBLK		=	0x46,	//Circuit group unblock
	AIFG_MSG_T_CC_GROUP_UNBLK_ACK	=	0x47,	//Circuit group unblock ack
	AIFG_MSG_T_UNEQUIP_CC			=	0x48,	//Unequipped circuit
	AIFG_MSG_T_CHANGE_CC			=	0x4E,	//Change circuit
	AIFG_MSG_T_CHANGE_CC_ACK		=	0x4F,	//Change circuit ack
	AIFG_MSG_T_RESRC_REQ			=	0x50,	//Resource request
	AIFG_MSG_T_RESRC_IND			=	0x51,	//Resource indication
	AIFG_MSG_T_PAGING				=	0x52,	//Paging
	AIFG_MSG_T_CIPHER_MODE_CMD		=	0x53,	//Cipher mode command
	AIFG_MSG_T_CM_UPDATE			=	0x54,	//Classmark update
	AIFG_MSG_T_CIPHER_MODE_CMP		=	0x55,	//Cipher mode complete
	AIFG_MSG_T_QUEUE_IND			=	0x56,	//Queuing indication
	AIFG_MSG_T_L3_INFO				=	0x57,	//Complete layer 3 information
	AIFG_MSG_T_CLASSMARK_REQ		=	0x58,	//Classmark request
	AIFG_MSG_T_CIPHER_MODE_REJ		=	0x59,	//Cipher mode reject
	AIFG_MSG_T_LOAD_IND				=	0x5A,	//Load indication
}aifg_msg_type;

typedef enum _aifg_iei_coding{
	//For BSSMAP
	AIFG_IEI_BM_CIC 				= 0x01,	//CIC
	AIFG_IEI_BM_RESOURCEAVAIL 		= 0x03,	//Resource available
	AIFG_IEI_BM_CAUSE 				= 0x04,	//Cause
	AIFG_IEI_BM_CELLID 				= 0x05,	//Cell identifier
	AIFG_IEI_BM_PRIORITY 			= 0x06,	//Priority
	AIFG_IEI_BM_L3HEADERINFO		= 0x07,	//Layer 3 header information
	AIFG_IEI_BM_IMSI				= 0x08,	//IMSI
	AIFG_IEI_BM_TMSI				= 0x09,	//TMSI
	AIFG_IEI_BM_ENCRYPTINFO			= 0x0A,	//Encrypt information
	AIFG_IEI_BM_CHANNELTYPE			= 0x0B,	//Channel type
	AIFG_IEI_BM_PERIODICITY			= 0x0C,	//Periodicity
	AIFG_IEI_BM_EXTRESOURCEIND		= 0x0D,	//Extended resource indicator
	AIFG_IEI_BM_MSNUM				= 0x0E,	//Number of MSs
	AIFG_IEI_BM_CLASSMARKINFO2		= 0x12,	//Classmark information type 2
	AIFG_IEI_BM_CLASSMARKINFO3		= 0x13,	//Classmark information type 3
	AIFG_IEI_BM_BANDUSED			= 0x14,	//Band to be used
	AIFG_IEI_BM_RRCAUSE				= 0x15,	//RR cause
	AIFG_IEI_BM_L3INFO				= 0x17,	//Layer 3 information
	AIFG_IEI_BM_DLCI				= 0x18,	//DLCI
	AIFG_IEI_BM_DTXFLAG				= 0x19,	//DTC flag
	AIFG_IEI_BM_CELLIDLIST			= 0x1A,	//Cell identity list
	AIFG_IEI_BM_RESPREQ				= 0x1B,	//Response request
	AIFG_IEI_BM_RESOURCEINDMEHTOD	= 0x1C,	//Resource indication method
	AIFG_IEI_BM_CLASSMARKINFO1		= 0x1D,	//Classmark information type 1
	AIFG_IEI_BM_CICLIST				= 0x1E,	//CIC list
	AIFG_IEI_BM_DIGNOSTIC			= 0x1F,	//Dignostic
	AIFG_IEI_BM_L3MSGCONTENT		= 0x20,	//Layer 3 message content
	AIFG_IEI_BM_CHOSENCHANNEL		= 0x21,	//Chosen channel
	AIFG_IEI_BM_TOTALRESOURCE		= 0x22,	//Total resource accessible
	AIFG_IEI_BM_CIPHERRESPMODE		= 0x23,	//Cipher response mode
	AIFG_IEI_BM_CHANNELNEEDED		= 0x24,	//Channel needed
	AIFG_IEI_BM_TRACETYPE			= 0x25,	//Trace type
	AIFG_IEI_BM_TRIGGERID			= 0x26,	//Trigger ID
	AIFG_IEI_BM_TRACEREF			= 0x27,	//Trace reference
	AIFG_IEI_BM_TRANSACTIONID		= 0x28,	//Transaction ID
	AIFG_IEI_BM_MOBILEID			= 0x29,	//Mobile identity
	AIFG_IEI_BM_OMCID				= 0x2A,	//OMC ID
	AIFG_IEI_BM_FORWARDIND			= 0x2B,	//Forward indication
	AIFG_IEI_BM_CHOSENENCRYPT		= 0x2C,	//Chosen encrypt algorithm
	AIFG_IEI_BM_CIRCUITPOOL			= 0x2D,	//Circuit pool
	AIFG_IEI_BM_CIRCUITPOOLLIST		= 0x2E,	//Circuit pool list
	AIFG_IEI_BM_TIMEIND				= 0x2F,	//Time indicator
	AIFG_IEI_BM_RESOURCESITUATION	= 0x30,	//Resource situation
	AIFG_IEI_BM_CURCHANNELTYPE1		= 0x31,	//Current channel type 1
	AIFG_IEI_BM_QUEUEIND			= 0x32,	//Queuing indicator
	AIFG_IEI_BM_ASSIGNREQUIREMENT	= 0x33,	//Assignment requirement
	AIFG_IEI_BM_TALKERFLAG			= 0x34,	//Talker flag
	AIFG_IEI_BM_CONNRELREQ			= 0x35,	//Connection release request
	AIFG_IEI_BM_GROUPCALLREF		= 0x36,	//Group call reference
	AIFG_IEI_BM_EMLPP				= 0x37,	//eMLPP
	AIFG_IEI_BM_CFGEVOIND			= 0x38,	//Configuration evolution indication
	AIFG_IEI_BM_BSSOLDTONEW			= 0x39,	//Old BSS to new BSS
	AIFG_IEI_BM_LSAID				= 0x3A,	//LSA identity
	AIFG_IEI_BM_LSAIDLIST			= 0x3B,	//LSA identity list
	AIFG_IEI_BM_LSAINFO				= 0x3C,	//LSA information
	AIFG_IEI_BM_LOCATIONINFO		= 0x3D,	//Location information
	AIFG_IEI_BM_SPEECHVER			= 0x40,	//Speech version

	//For DTAP
	//common
	AIFG_IEI_DT_LAI					= 0x13,	//location area identification
	AIFG_IEI_DT_MOBILEID			= 0x17,	//mobile identity
	AIFG_IEI_DT_MSCM3				= 0x20,	//mobile station classmark 3
	//MM
	AIFG_IEI_DT_FLONPROCEED			= 0xa1,	//Follow on proceed
	AIFG_IEI_DT_CTS					= 0xa2,	//CTS permission
	AIFG_IEI_DT_FULL_NWNAME			= 0x43,	//Full name for network
	AIFG_IEI_DT_SHORT_NWNAME		= 0x45,	//Short name for network
	AIFG_IEI_DT_TIMEZONE			= 0x46,	//Network time zone
	AIFG_IEI_DT_TZTIME				= 0x47,	//Universal time and time zone
	AIFG_IEI_DT_LSAID				= 0x48,	//LSA Identity
	//CC
	AIFG_IEI_DT_PRIORITYLEVEL		= 0x80,	//Priority Level
	AIFG_IEI_DT_SHIFT				= 0x90,	//Locking and non-locking shift procedure
	AIFG_IEI_DT_REPEATIND			= 0xD0,	//Repease indicator
	AIFG_IEI_DT_MOREDATA			= 0xA0,	//More data
	AIFG_IEI_DT_CLIRSUP				= 0xA1,	//CLIR Suppression
	AIFG_IEI_DT_CLIRIVO				= 0xA2,	//CLIR Invocation
	AIFG_IEI_DT_REVCALLDIR			= 0xA3,	//Reverse call setup direction
	AIFG_IEI_DT_BEARERCAP			= 0x04, //Bearer capability
	AIFG_IEI_DT_CAUSE				= 0x08,	//Cause
	AIFG_IEI_DT_CCCAP				= 0x15,	//Call Control Capabilities
	AIFG_IEI_DT_FACILITY			= 0x1C,	//Facility
	AIFG_IEI_DT_PROGIND				= 0x1E,	//Progress indicator
	AIFG_IEI_DT_AUXSTAT				= 0x24,	//Auxiliary states
	AIFG_IEI_DT_CALLEDBCD			= 0x5E,	//Called party BCD
	AIFG_IEI_DT_CALLEDSUBADDR		= 0x6D,	//Called party subaddress
	AIFG_IEI_DT_CALLERBCD			= 0x5C,	//Calling party BCD
	AIFG_IEI_DT_CALLERSUBADDR		= 0x5D,	//Calling party subaddress
	AIFG_IEI_DT_CONNNUM				= 0x4C,	//Connected number
	AIFG_IEI_DT_CONNSUBADDR			= 0x4D,	//Connected subaddress
	AIFG_IEI_DT_HIGHCOM				= 0x7D,	//Higher layer compatibility
	AIFG_IEI_DT_KEYPAD				= 0x2C,	//Keypad facility
	AIFG_IEI_DT_LOWCOM				= 0x7C,	//Lower layer compatibility
	AIFG_IEI_DT_REDIRBCD			= 0x74,	//Redirecting party BCD
	AIFG_IEI_DT_REDIRSUBADDR		= 0x75,	//Redirecting party subaddress
	AIFG_IEI_DT_SIGNAL				= 0x34,	//Signal
	AIFG_IEI_DT_SSVER				= 0x7F,	//SS version indicator
	AIFG_IEI_DT_USERUSER			= 0x7E,	//User-user
	AIFG_IEI_DT_ALERTPATTERN		= 0x19, //Alert pattern
	//SMS
	AIFG_IEI_DT_RP_UD				= 0x41, //RP User data
	AIFG_IEI_DT_RP_CAUSE			= 0x42,	//RP Cause	
}aifg_iei;

#endif
