1 /* 2 * DATAKIT VCS Data Structures for a DR-11C interface 3 * @(#)dkdr.h 1.1 Garage 84/03/27 4 */ 5 6 /* 7 * Structure for each Datakit channel 8 */ 9 10 struct dkchan { 11 short dk_state; 12 struct ifqueue dk_outq; 13 int (*dk_endfcn)(); 14 caddr_t dk_endparm; 15 int (*dk_supfcn)(); /* who to tell of circuit supervision */ 16 caddr_t dk_raddr; /* address of received data */ 17 unsigned dk_rlen; /* length of pending receive */ 18 short dk_rmode; /* possible completion modes */ 19 unsigned dk_xlen; /* length of xmit */ 20 struct mbuf *dk_curout; /* current buffer */ 21 struct dkpkbufr *dk_rq; /* un-acked input */ 22 struct dkpkbufr *dk_rb; /* un-checked input */ 23 short dk_rblen; /* len of unchecked */ 24 char dk_S; /* protocol parameters */ 25 char dk_R; 26 char dk_X; 27 char dk_A; 28 char dk_C; 29 char dk_trmode; 30 char dk_rseq; 31 short dk_tail1; 32 short dk_tail2; 33 int dk_rejcnt; /* Reject messages received */ 34 int dk_srejcnt; /* Reject messages sent */ 35 int dk_ackrejcnt; /* Acks that cause retransmit */ 36 int dk_enqcnt; /* ENQs sent */ 37 }; 38 39 /* Flags for dk_X */ 40 #define XM_OFF ((char) 0xff) /* transmitter off */ 41 #define XM_INIT ((char) 02) /* transmitter initialized */ 42 #define XM_REJ ((char) 04) /* Sent REJ */ 43 #define XM_ENQ ((char) 010) /* send ENQ next timeout */ 44 45 /* 46 * Packet buffers 47 */ 48 49 struct dkpkbufr { 50 struct dkpkbufr *Pnext; 51 short Phibits; 52 char Pseq; 53 char Plen; 54 char Pdata[16]; 55 }; 56 57 /* 58 * Structure to save completion status until processed 59 */ 60 61 struct dkstat { 62 short k_type; /* type of completion status */ 63 short k_chan; /* channel number */ 64 short k_info1; /* misc info */ 65 short k_info2; 66 }; 67