#ifndef __BMC_MAIN_H__
#define __BMC_MAIN_H__


#define MAX_THREAD		256


#include "pthread.h"
#include "bmc_type.h"
#include "bmc_conf.h"
#include "hook.h"
#include "Types.h"
#include <stdio.h>
#include <stdint.h>
#include <errno.h>
#include "semaphore.h"
#include <fcntl.h>
#include "IPMIDefs.h"
#include "Support.h"
#include <string.h>
#include <memory.h>
#include <time.h>
#include "sensor_driver.h"

#include "SharedMem.h"


#include "App.h"
#include "Chassis.h"
#include "Bridge.h"
#include "SensorEvent.h"
#include "Storage.h"

#include "DeviceConfig.h"
#include "IPMI_App.h"
#include "IPMI_Chassis.h"
#include "IPMI_Bridge.h"
#include "IPMI_SensorEvent.h"
#include "IPMI_Storage.h"
#include "IPMI_Oem.h"
#include "cmdselect.h"
//#include "Support.h"
#include "session.h"

/*------------------------------------------------------------------
 *  * Timeout Macros
 *   *------------------------------------------------------------------*/
#define 	WAIT_NONE			0
#define 	WAIT_INFINITE			(-1)
#define		MAX_PENDING_SEQ_NO		50
#define		SEQ_NO_EXPIRATION_TIME		5

#define 	FALSE				0
#define 	TRUE				1
#define   	MAX_IPMI_IFCQ 			256

#define 	MSG_HNDLR_Q         MSG_PIPES_PATH "MsgHndlrQ"
#define 	OBSM_TASK_Q         MSG_PIPES_PATH "ObsmTaskQ"

#define 	NO_RESPONSE		        0x10
#define 	NORMAL_RESPONSE		        0x11
#define 	BRIDGING_REQUEST	        0x12







extern char             SessionSequenceNumberCount;
extern pthread_t	gthreadIDs[MAX_THREAD];
extern int		gthreadIndex;
extern BMCInfo_t 	g_BMCInfo;
extern pthread_mutex_t	sensorSdr_mutex;
extern pthread_mutex_t	powerSta_mutex;
extern IPMIQueue_T 	g_IPMIIfcQueue[MAX_IPMI_IFCQ];




#endif /* __BMC_MAIN_H__ */
