#ifndef __DEFS_H
#define __DEFS_H




#define MIN_DLCI	16
#define MAX_DLCI	991

#define MIN_CIR		75
#define MAX_CIR		2048000

#define L3PLPMODE_DCE 0
#define L3PLPMODE_DTE 1
#define L3PLPMODE_DXE 2

#define GFI_G8_WINDOWSIZE   7
#define GFI_G128_WINDOWSIZE 127

// structure defined for WAN,FrameRelay,LAPB and X25
// All these structure member variables have been named to match the
// name they appear under in the registry.

typedef struct tagWan
{
	int ext_baud;
	int wan_maxframe;
	int wan_interface;
	int wan_baud;
}WAN;


typedef struct tagFrameRelay
{
	int Flags;
	int lmi_dlci;
	int mT1;
	int mT2;
	int mT3;
	int mP1;
	int mP10;
	int mN1;
	int mN2;
	int mN3;
	int mN4;
	int max_frsize;
}FRAMERELAY;


typedef struct tagLAPB
{
	int ack_delay;
	int llconform;
	int max_l_len;
	int N2;
	int notack_max;
	int T1;
	int Tbusy;
	int Tidle;
	int Tpf;
	int Trej;
	int tx_probe;
	int tx_window;
}LAPB;

typedef struct tagX25
{
	int accessdelay;
	int ACKDELAY;
	int CUG_CONTROL;
	int connectvalue;
	int dbit_control;
	int dnic2;
	int dnic1;
	int HTC;
	int HOC;
	int HIC;
	int HPC;
	int intl_prioritised;
	int intl_addr_recogn;
	int idlevalue;
	int ll_class;
	int locminthclass;
	int locdefthclass;
	int locmaxthclass;
	int localdelay;
	int LOCDEFWSIZE;
	int LOCMAXWSIZE;
	int LOCDEFPKTSIZE;
	int LOCMAXPKTSIZE;
	int LTC;
	int LOC;
	int LIC;
	int LPC;
	int L3PLPMODE;
	int MAXNSDULEN;
	int Net_Mode;
	int prty_pkt_forced_value;
	int prty_encode_control;
	int remminthclass;
	int remdefthclass;
	int remmaxthclass;
	int R23value;
	int R22value;
	int R20value;
	int REMDEFWSIZE;
	int REMMAXWSIZE;
	int REMDEFPKTSIZE;
	int REMMAXPKTSIZE;
	int src_addr_control;
	int SNMODES;
	int SUB_MODES;
	int TotalRASPorts;
	int thclass_type;
	int thclass_neg_to_def;
	int Tvalue;
	int T26value;
	int T25value;
	int T23value;
	int T22value;
	int T21value;
	int T20value;
	int THISGFI;
	int X25_VSN;
	BYTE thclass_wmap[16];
	BYTE thclass_pmap[16];

	CString Alias;
	CString lsap_address;

}X25;


// internal class used by CRouter
class CRoute
{
public :
	CString m_Address;
	CString m_Alias;
};

// internal class used by CRouter
class CAlias
{
public:
	CString m_Device;
	CString m_SNID;
	DWORD m_NumPorts;

	CAlias() { m_NumPorts = 0; };
};

typedef CArray<CRoute, CRoute&>CRoutingTable;
typedef CMap<CString,LPCTSTR, CAlias, const CAlias&>CAliasMap;

#if !NT5_BUILD && !_M_IA64
// NT5 and newer DDKs define these types.  They float (at compile time) from 32 to 64
// bit width depending on the size of pointers in the system being compiled for.
// Define it for NT4.
typedef DWORD        DWORD_PTR, *PDWORD_PTR;
#endif

#endif