#define DADDLEN 6		/* ethernet address length */
#define	MTU 1500		/* maximum ethernet transmission unit */
#define WINDOWSIZE 4096		/* 4Kbytes */
#define TSENDSIZE 1024
#define SLIPSENDSIZE 768
#define	IMAXLEN	(MTU - 20)	/* max IP data length */
#define UMAXLEN (IMAXLEN - 8)	/* max UDP data length */
#define TMAXSIZE (IMAXLEN - 20)	/* max TCP data length */
#define ICMPMAX 300 
#define	AMAXLEN 64		/* max ARP packet length */

#define NPORTS	32

#define MINRTO	18		/* actually 18.2 ticks per second */
#define MAXRTO	1820		/* this makes MAXRTO 100 seconds */
#define CONNWAITTIME 20		/* default contime in seconds */
#ifdef __HIGHC__
extern unsigned short htons(unsigned short);
extern unsigned short ntohs(unsigned short);
#else
#ifdef __WATCOMC__
unsigned short	_sswap(unsigned short);
#pragma aux	_sswap =	\
	0x86 0xe0	/* XCHG	AH,AL */ \
	parm	[ax] \
	modify exact	[ax] \
	value	[ax];

unsigned long	_lswap(unsigned long);
#pragma	aux	_lswap =	\
	0x86 0xe0	/* XCHG	AH,AL */ \
	0xc1 0xc0 0x10	/* ROL	EAX,16 */ \
	0x86 0xe0	/* XCHG	AH,AL */ \
	parm	[eax] \
	modify exact	[eax] \
	value	[eax];

#define	htons(s)	_sswap(s)
#define	ntohs(s)	_sswap(s)
#define	htonl(l)	_lswap(l)
#define	ntohl(l)	_lswap(l)
#define	ffsl(l)		_ffsl(l)
#else
#define htons(x) ((u_int)((u_char)(x) << 8) | (u_char)((unsigned int)(x) >> 8))
#define ntohs(x) ((u_int)((u_char)(x) << 8) | (u_char)((unsigned int)(x) >> 8))
#endif
#endif
