|
|
1.1 root 1: #ifndef _CHCONSTANTS_
2: #define _CHCONSTANTS_
3: /*
4: * This file contains constants defined in the basic chaos protocol,
5: * including the built-in RFC's (status, etc.)
6: */
7: #define CHMAXDATA 488 /* Maximum data per packet */
8: #define CHSTATNAME 32 /* Length of node name in STATUS protocol */
9: #define CHSP (040)
10: #define CHNL (0200|'\r')
11: #define CHTAB (0200|'\t')
12: #define CHFF (0200|'\f')
13: #define CHBS (0200|'\b')
14: #define CHLF (0200|'\n')
15: /*
16: * These are the connection states
17: */
18: #define CSCLOSED 0 /* Closed */
19: #define CSLISTEN 1 /* Listening */
20: #define CSRFCRCVD 2 /* RFC received (used?) */
21: #define CSRFCSENT 3 /* RFC sent */
22: #define CSOPEN 4 /* Open */
23: #define CSLOST 5 /* Broken by receipt of a LOS */
24: #define CSINCT 6 /* Broken by incomplete transmission */
25:
26: /*
27: * These are the packet opcode types
28: */
29: #define RFCOP 001 /* Request for connection */
30: #define OPNOP 002 /* Open connection */
31: #define CLSOP 003 /* Close connection */
32: #define FWDOP 004 /* Forward this packet */
33: #define ANSOP 005 /* Answer packet */
34: #define SNSOP 006 /* Sense packet */
35: #define STSOP 007 /* Status packet */
36: #define RUTOP 010 /* Routing information packet */
37: #define LOSOP 011 /* Losing connection packet */
38: #define LSNOP 012 /* Listen packet (never transmitted) */
39: #define MNTOP 013 /* Maintenance packet */
40: #define EOFOP 014 /* End of File packet */
41: #define UNCOP 015 /* Uncontrolled data packet */
42: #define MAXOP 016 /* Maximum legal opcode */
43: #define DATOP 0200 /* Ordinary character data */
44: #define DWDOP 0300 /* 16 bit word data */
45:
46: /*
47: * Modes available in CHIOCSMODE call.
48: */
49: #define CHTTY 1
50: #define CHSTREAM 2
51: #define CHRECORD 3
52: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.