#include "PalmType.h"
#include "p_util.h"
#include "p_tcpip.h"

XCHAR Sys_iServiceType;
XCHAR Sys_pAccount[MAX_ACCOUNT_LEN+1];
XCHAR Sys_pPin[MAX_PIN_LEN+1];

XCHAR Sys_pServiceIP[IP_ALEN];
XCHAR Sys_pGWIP[IP_ALEN];
BOOLEAN Sys_bUseService;
XCHAR Sys_pServiceID[MAX_SERVICE_ID_LEN+1];

volatile DCHAR Sys_iDtmfType;
XCHAR Sys_iDtmfPayloadType;
XCHAR Sys_iIlbcPType;
XSHORT Sys_iSignalPort;
XSHORT Sys_iControlPort;
XSHORT Sys_iRegisterPort;
XSHORT Sys_iServicePort;
XSHORT Sys_iNatPort;

XCHAR Sys_iCallType;
XCHAR Sys_iLocalType;
XCHAR Sys_iForwardType;
XCHAR Sys_pForwardNumber[FORWARD_NUMBER_LEN+1];

XSHORT Sys_iRtpPort;
XCHAR Sys_iAudioType, Sys_iAudioFrames;
XCHAR Sys_pLocalNumber[PHONE_NUMBER_LEN+1];
XCHAR Sys_pRemoteNumber[DIALED_MAX_LEN+1];
XCHAR Sys_pPeerDisplay[PHONE_NUMBER_LEN+1];
XCHAR Sys_pCodecType[SYS_CODEC_NUM];

// dial plan settings
XCHAR Sys_pCountryCode[MAX_COUNTRY_CODE_LEN+1];
XCHAR Sys_pIntlPrefix[MAX_INTL_PREFIX_LEN+1];
XCHAR Sys_iUseDialPlan;
XCHAR Sys_pAreaCode[MAX_AREA_CODE_LEN+1];
XCHAR Sys_pLongPrefix[MAX_LONG_PREFIX_LEN+1];
XCHAR Sys_iInnerLine;
XCHAR Sys_pDualModePrefix[MAX_DUALMODE_PREFIX_LEN+1];
XCHAR Sys_pInnerLinePrefix[MAX_INNERLINE_PREFIX_LEN+1];
XCHAR Sys_iDualMode;

// System settings
XCHAR Sys_pPassword[MAX_PASSWORD_LEN+1];
XCHAR Sys_pSuperPassword[MAX_SUPERPASSWORD_LEN+1];
XCHAR Sys_pServiceAddr[MAX_DNS_ADDR_LEN+1];
XCHAR Sys_pUpgradeUrl[MAX_DNS_ADDR_LEN+1];
XCHAR Sys_pNatAddr[MAX_DNS_ADDR_LEN+1];
XCHAR Sys_pDialNumber[DIAL_NUMBER_LEN+1];
XCHAR Sys_iUpgradeType;
XCHAR Sys_iUpgradeProtocol;
PXCHAR Sys_pUpgradeAddr;

// Time settings
XCHAR Sys_iTimeZone;
XCHAR Sys_pNtsIP[IP_ALEN];

// Proxy settings
XCHAR Sys_iNatTraversal;
XCHAR Sys_pProxyIP[IP_ALEN];
BOOLEAN Sys_bNATed;
XCHAR Sys_pProxyServerIP[IP_ALEN];
XSHORT Sys_iNatTTL;

// Tcpip settings
XCHAR Local_pIPAddress[IP_ALEN];
XCHAR Local_pSubnetMask[IP_ALEN];
XCHAR Local_pRouteIP[IP_ALEN];
XCHAR Local_pMacAddress[HW_ALEN];
XCHAR Dns_pServerIP[IP_ALEN];
XCHAR Dns_pServerIP2[IP_ALEN];
XCHAR Udp_iOutputDebug;
// BOOLEAN PPPoE_bEnable;
// BOOLEAN Dhcp_bEnable;
XCHAR	Sys_iIPType;
XCHAR PPP_pID[PPP_ID_LEN+1];
XCHAR PPP_pPassword[PPP_PASSWORD_LEN+1];
BOOLEAN VLAN_bEnable;
XSHORT VLAN_iID;

// Dsp settings
// XCHAR Dsp_iUseVad;
// XCHAR Dsp_iUseHighRate;
// XCHAR Dsp_iUseAgc;
// XCHAR Dsp_iUseAec;
XCHAR Dsp_iOptions;

// DigitMap settings
XCHAR	Map_iTimeOut;
BOOLEAN Sys_bUseDigitMap;
XCHAR	Sys_iDigitMapNum;


// Misc
XCHAR Sys_pRemoteIP[IP_ALEN];
XLONG Sys_lCurrentTime;

XCHAR	Sys_pProgramButtons[PROGRAM_BUTTONS_NUM];
XCHAR	Sys_iPhoneAttr;

XSHORT	Sys_iHttpsPort;

XCHAR	Sys_iNetRetry;
XSHORT	Sys_iRegisterTTL;
XCHAR	Sys_iJitterSize;

XCHAR	Rtp_iTos;

XCHAR	Sys_iProtocol;
XCHAR	Sys_iDeviceAttr;
