	IFND	DIGNET_I
DIGNET_I	SET	1

**
**	dignet.library include
**
**	Copyright © 1997 by Kenneth "Kenny" Nilsen/Digital Surface
**
**	$VER: DIGNET_I 1.1 (13.3.97)
**
**

	IFND	EXEC_TYPES_I
	include	"exec/types.i"
	ENDC

* Error codes

DNETERROR_OK		EQU	0	;everything is ok
DNETERROR_OVERFLOW	EQU	-1	;buffer overflow (your string buffer)
DNETERROR_WRONGNET	EQU	-2	;you tried to free wrong net structure
DNETERROR_TIMEOUT	EQU	-3	;timed out waiting to receivce chars

* IOEXT

DNIOEXT_SIZEOF		EQU	80	;max size for IOEXT structure

* InitModem buffer size

INITMODEMBUFFER		EQU	16	;minimum length of initmodem's buffer

* Resource tracking public structure

   STRUCTURE DIGNETRT,0
	ULONG	DNRT_ID			;net ID
	APTR	DNRT_NET		;ptr. to netstructure
	APTR	DNRT_TASK		;ptr. to task structure using the net
	APTR	DNRT_TASKNAME		;ptr. to task name of that task
	APTR	DNRT_DEVICENAME		;ptr. to device name in use
	UWORD	DNRT_UNIT		;unit number in use
	APTR	DNRT_SP			;return address
	APTR	DNRT_MESSAGEPORT	;ptr. to message port of device
	APTR	DNRT_MESSAGESTRUCT	;ptr. to IO message of device
	ULONG	DNRT_LASTCOMMAND	;command number on last librarycall
	WORD	DNRT_TASKSTATUS		;BOOL on the tasks existance (true=ok)
	ULONG	DNRT_reserved0		;reserved for future extensions
	ULONG	DNRT_reserved1
	ULONG	DNRT_reserved2
	ULONG	DNRT_reserved3
	ULONG	DNRT_reserved4
	ULONG	DNRT_reserved5
	LABEL	DNRT_SIZEOF

	ENDC	;DIGNET_I

* Command numbers:

CMDFREENET		EQU	1
CMDREADNET		EQU	2
CMDWRITENET		EQU	3
CMDQUERYNET		EQU	4
CMDABORTNET		EQU	5
CMDINITIOEXT		EQU	6
CMDREADIOEXT		EQU	7
CMDSENDNET		EQU	8
CMDRECEIVENET		EQU	9
CMDTIMEOUT		EQU	10
CMDREADSTRING		EQU	11
CMDWRITESTRING		EQU	12
CMDGETNETPORT		EQU	13
CMDINITMODEM		EQU	14
CMDCALLMODEMDT		EQU	15
CMDCALLMODEMDP		EQU	16
CMDWAITMODEM		EQU	17
CMDHANGUPMODEM		EQU	18
CMDSTOPWAITING		EQU	19
CMDFLUSHNET		EQU	20
CMDSETBAUD		EQU	21
CMDCONVERTMODEMSTRING	EQU	22
CMDGETIOMSG		EQU	23
CMDGETMODEMSTATUS	EQU	24
CMDGETCURRENTDEVICE	EQU	25
CMDGETCURRENTUNIT	EQU	26
CMDGETBAUDRATE		EQU	27
CMDPARSECONNECT		EQU	28
CMDSETDEFAULT		EQU	29
CMDCONVERTTOPC		EQU	30
CMDCONVERTTOAMIGA	EQU	31
CMDFREECONVERT		EQU	32
CMDOBTAINNET		EQU	33
