0
|
1 /* vmhsbr.h - definitions for the vmh protocol */
|
|
2
|
|
3
|
|
4 #define RC_VRSN 1
|
|
5
|
|
6 struct record {
|
|
7 struct rcheader {
|
|
8 char rh_type; /* type of record */
|
|
9 #define RC_INI 0x01 /* must be greater than OK */
|
|
10 #define RC_ACK 0x02
|
|
11 #define RC_ERR 0x03
|
|
12 #define RC_CMD 0x04
|
|
13 #define RC_QRY 0x05
|
|
14 #define RC_TTY 0x06
|
|
15 #define RC_WIN 0x07
|
|
16 #define RC_DATA 0x08
|
|
17 #define RC_EOF 0x09
|
|
18 #define RC_FIN 0x0a
|
|
19 #define RC_XXX 0x0b
|
|
20
|
|
21 int rh_len; /* length of data */
|
|
22 } rc_header;
|
|
23 #define rc_head(rc) (&rc -> rc_header)
|
|
24 #define RHSIZE(rc) (sizeof rc -> rc_header)
|
|
25 #define rc_type rc_header.rh_type
|
|
26 #define rc_len rc_header.rh_len
|
|
27
|
|
28 char *rc_data; /* extensible array */
|
|
29 };
|
|
30 #define initrc(rc) rc -> rc_data = NULL
|
|
31
|
|
32
|
|
33 int rcinit (), rcdone (), rc2rc (), str2rc (), peer2rc (), rc2peer (),
|
|
34 str2peer (), fmt2peer (), err2peer ();
|