source: trunk/third/nmh/h/vmhsbr.h @ 12455

Revision 12455, 1.1 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
1
2/*
3 * vmhsbr.h -- definitions for the vmh protocol
4 *
5 * $Id: vmhsbr.h,v 1.1.1.1 1999-02-07 18:14:07 danw Exp $
6 */
7
8#define RC_VRSN 1
9
10/* flags for rh_type */
11#define RC_INI  0x01            /* must be greater than OK */
12#define RC_ACK  0x02
13#define RC_ERR  0x03
14#define RC_CMD  0x04
15#define RC_QRY  0x05
16#define RC_TTY  0x06
17#define RC_WIN  0x07
18#define RC_DATA 0x08
19#define RC_EOF  0x09
20#define RC_FIN  0x0a
21#define RC_XXX  0x0b
22
23struct record {
24    struct rcheader {
25        char rh_type;           /* type of record   */
26        int  rh_len;            /* length of data   */
27    } rc_header;
28    char *rc_data;              /* extensible array */
29};
30
31#define rc_head(rc)     (&rc->rc_header)
32#define RHSIZE(rc)      (sizeof rc->rc_header)
33#define rc_type         rc_header.rh_type
34#define rc_len          rc_header.rh_len
35
36#define initrc(rc) rc->rc_data = NULL
37
38/*
39 * prototypes
40 */
41int rcinit (int, int);
42int rcdone (void);
43int rc2rc (char, int, char *, struct record *);
44int str2rc (char, char *, struct record *);
45int peer2rc (struct record *);
46int rc2peer (char, int, char *);
47int str2peer (char, char *);
48int fmt2peer (char, char *, ...);
49int err2peer (char, char *, char *, ...);
50int verr2peer (char, char *, char *, va_list);
51
Note: See TracBrowser for help on using the repository browser.