1 | /* |
---|
2 | * Copyright 1996 by Paul Mattes. |
---|
3 | * Permission to use, copy, modify, and distribute this software and its |
---|
4 | * documentation for any purpose and without fee is hereby granted, |
---|
5 | * provided that the above copyright notice appear in all copies and that |
---|
6 | * both that copyright notice and this permission notice appear in |
---|
7 | * supporting documentation. |
---|
8 | */ |
---|
9 | |
---|
10 | /* Data Stream definitions for CUT-style file transfers. */ |
---|
11 | |
---|
12 | /* Primary Area */ |
---|
13 | #define O_FRAME_TYPE 0 /* offset to frame type */ |
---|
14 | #define FT_CONTROL_CODE 0xc3 /* frame type: control code (host->) */ |
---|
15 | #define O_CC_FRAME_SEQ 1 /* offset to frame sequence */ |
---|
16 | #define O_CC_STATUS_CODE 2 /* offset to status code */ |
---|
17 | #define SC_HOST_ACK 0x8181 /* ack of IND$FILE command */ |
---|
18 | #define SC_XFER_COMPLETE 0x8189 /* file transfer complete */ |
---|
19 | #define SC_ABORT_FILE 0x8194 /* abort, file error */ |
---|
20 | #define SC_ABORT_XMIT 0x8198 /* abort, transmission error */ |
---|
21 | #define O_CC_MESSAGE 4 /* offset of message text */ |
---|
22 | #define FT_DATA_REQUEST 0xc2 /* frame type: data request (host->) */ |
---|
23 | #define O_DR_SF 1 /* offset to start field */ |
---|
24 | #define O_DR_DATA_CODE 2 /* offset to data code */ |
---|
25 | #define O_DR_FRAME_SEQ 3 /* offset to frame sequence */ |
---|
26 | #define FT_RETRANSMIT 0x4c /* frame type: retransmit (host->) */ |
---|
27 | #define FT_DATA 0xc1 /* frame type: data (bidirectional) */ |
---|
28 | #define O_DT_FRAME_SEQ 1 /* offset to frame sequence */ |
---|
29 | #define O_DT_CSUM 2 /* offset to checksum */ |
---|
30 | #define O_DT_LEN 3 /* offset to length */ |
---|
31 | #define O_DT_DATA 5 /* offset to data */ |
---|
32 | |
---|
33 | /* Response Area */ |
---|
34 | #define O_RESPONSE 1914 /* offset to response area */ |
---|
35 | #define RO_FRAME_TYPE (O_RESPONSE+1) /* response frame type */ |
---|
36 | #define RFT_RETRANSMIT 0x4c /* response frame type: retransmit */ |
---|
37 | #define RFT_CONTROL_CODE 0xc3 /* response frame type: control code */ |
---|
38 | #define RO_FRAME_SEQ (O_RESPONSE+2) /* response frame sequence */ |
---|
39 | #define RO_REASON_CODE (O_RESPONSE+3) /* response reason code */ |
---|
40 | |
---|
41 | /* Special Data */ |
---|
42 | #define EOF_DATA1 0x5c /* special data for EOF */ |
---|
43 | #define EOF_DATA2 0xa9 |
---|
44 | |
---|
45 | /* Acknowledgement AIDs */ |
---|
46 | #define ACK_OK AID_ENTER |
---|
47 | #define ACK_RETRANSMIT AID_PF1 |
---|
48 | #define ACK_RESYNC_VM AID_CLEAR |
---|
49 | #define ACK_RESYNC_TSO AID_PA2 |
---|
50 | #define ACK_ABORT AID_PF2 |
---|
51 | |
---|
52 | /* Data area for uploads. */ |
---|
53 | #define O_UP_DATA_CODE 2 /* offset to data code */ |
---|
54 | #define O_UP_FRAME_SEQ 3 /* offset to frame sequence */ |
---|
55 | #define O_UP_CSUM 4 /* offset to checksum */ |
---|
56 | #define O_UP_LEN 5 /* offset to length */ |
---|
57 | #define O_UP_DATA 7 /* offset to start of data */ |
---|
58 | #define O_UP_MAX (1919 - O_UP_DATA) /* max upload data */ |
---|