#ifndef _M2UA_EXT__H
#define _M2UA_EXT__H

#include "m2ua_pub.h"
#include "m2ua.h"
#include "m2ua_const.h"
#include "m2ua_struct.h"

extern const BYTE 			m2ua_ver[3];
extern BYTE					m2ua_command;

extern m2ua_sg_info_t 			m2ua_sg_info[M2UA_MAX_SG_FSM_NUM];
extern m2ua_lk_info_t				m2ua_lk_info[M2UA_MAX_LK_NUM];

extern m2ua_sctp_addr_t 	m2ua_sctp_addr;

extern m2ua_sctp_cmd_t 		m2ua_sctp_cmd;
extern BYTE					m2ua_sctp_dat[M2UA_SCTP_DAT_BUFSIZE];
extern BYTE					m2ua_sctp_dat_send[M2UA_SCTP_DAT_BUFSIZE];
extern int					m2ua_sctp_cmd_len;
extern int					m2ua_sctp_dat_len;

#ifndef _LKSCTP
extern struct strbuf 		m2ua_sctp_ctrl;
extern struct strbuf 		m2ua_sctp_data;
#else
extern m2ua_sctp_data_t		m2ua_sctp_data;
#endif

extern m2ua_para_t			m2ua_para;

extern BYTE					m2ua_mtp3_sd[M2UA_MAX_MSG_LEN * M2UA_MAX_M3MSG_NUM];
extern WORD					m2ua_mtp3_sd_h;
extern WORD					m2ua_mtp3_sd_t;

extern BYTE					m3ua_mtp3_sd[M2UA_MAX_MSG_LEN * M2UA_MAX_M3MSG_NUM];
extern WORD					m3ua_mtp3_sd_h;
extern WORD					m3ua_mtp3_sd_t;

extern BYTE					iua_q931_sd[M2UA_MAX_MSG_LEN * M2UA_MAX_M3MSG_NUM];
extern WORD					iua_q931_sd_h;
extern WORD					iua_q931_sd_t;

extern DWORD				x256[M2UA_MAX_M3MSG_NUM];

extern char					hostip[20];
extern char					hostname[50];
extern ulong				host_ip;
extern BYTE					plat_id;

extern m2ua_sctp_addr_t		m2ua_sctp_server_addr;
extern m2ua_csta_t			m2ua_csta;

extern char					m2ua_asciin_buf[MAX_ASCIIIN_LEN];
extern char					m2ua_asciout_buf[MAX_ASCIIOUT_LEN];
extern char					m2ua_ascitemp_buf[MAX_ASCITMP_LEN];
extern WORD					moniter_fg;

extern BYTE					m2ua_sg_mon_fg[M2UA_MAX_SG_FSM_NUM];
extern BYTE					m2ua_lk_mon_fg[M2UA_MAX_LK_NUM];
extern WORD					m2ua_sg_mon_count;
extern WORD					m2ua_lk_mon_count;

extern DWORD				err[64];
extern BYTE					init_flag;

#endif
