xref: /original-bsd/sys/vax/datakit/dkit.h (revision 5d92277f)
1 /*
2  * 	DATAKIT VCS Interface Definitions
3  *		@(#)dkit.h	1.4 Garage 84/03/30
4  *		   @(#)dkit.h	1.2 (Berkeley) 09/03/90
5  */
6 
7 /*
8  *	Host Software Version number
9  */
10 
11 #define	HOSTVERSION	2	/* Change the string below when you update this */
12 #define	S_HOSTVERSION	"@(#) Datakit Host Protocol Version 2"
13 
14 /*
15  *   bits defined in channel flag
16  */
17 
18 #define DK_OPEN 	01	/* channel is open flag */
19 #define DK_LINGR	02	/* closed by user, waiting sync */
20 #define DK_BUSY		04	/* output in progress */
21 #define DK_RESET	010	/* cmc told us to close this channel */
22 #define DK_RCV		020	/* receive active on channel */
23 #define	DK_RCVQ		040	/* receive done queued 'cause timer */
24 #define	DK_SPND		0100	/* output is currently suspended */
25 
26 
27 
28 /*
29  *   command codes passed to dkit_cmd
30  */
31 
32 #define	DKC_XINIT	01	/* re-init transmitter section */
33 #define	DKC_FLUSH	02	/* flush all pending output */
34 #define	DKC_SPND	04	/* suspend further output */
35 #define	DKC_RSME	010	/* resume output after suspend */
36 
37 
38 /*
39  *   receive mode, and completion indicators
40  */
41 
42 #define	DKR_FULL	01	/* buffer full, normal read done */
43 #define	DKR_CNTL	02	/* read terminated on control character */
44 #define	DKR_ABORT	010	/* receive aborted by higher level command */
45 #define	DKR_BLOCK	040	/* end of block */
46 #define	DKR_TIME	0100	/* end of time limit reached */
47 
48 /*
49  *   Datakit-specific mbuf types
50  */
51 #define	DKMT_HDR	16		/* Header packet with driver stuff */
52 #define	DKMT_DATA	DKMT_HDR+1	/* Data */
53 #define	DKMT_CTL	DKMT_HDR+2	/* Control bytes */
54 #define	DKMT_PCB	DKMT_HDR+3	/* Setup request block */
55 #define	DKMT_ROUTE	DKMT_HDR+4	/* dkip routing table entry */
56 #define	DKMT_ITTY	DKMT_HDR+5	/* dktty input buffer */
57 #define	DKMT_OTTY	DKMT_HDR+6	/* dktty output buffer */
58 #define	DKMT_CTYPE	DKMT_HDR+7	/* Connection source/dest */
59