#ifndef DIGNET_H
#define DIGNET_H

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


/*
 *  Error codes
 */

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

/*
 *  IOEXT
 */

#define DNIOEXT_SIZEOF		80	/* max size for IOEXT structure */

/*
 *  InitModem buffer size
 */

#define INITMODEMBUFFER		16	/* minimum length of initmodem's buffer */

/*
 *  The public resource list 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 */
	STRPTR	DNRT_TASKNAME		/* ptr. to task name of that task */
	STRPTR	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:
 */

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

#endif /* DIGNET_H */

