|
|
1.1 ! root 1: #include "../chaos/constants.h" ! 2: /* ! 3: * Definitions needed by user programs. ! 4: */ ! 5: #define CHMAXPKT 488 /* Maximum data length in packet */ ! 6: #define CHMAXRFC CHMAXPKT /* Maximum length of a rfc string */ ! 7: #define CHMAXARGS 50 /* Maximum number of words in a RFC */ ! 8: #define CHRFCDEV "/dev/chaos" /* Path name for sending RFC's */ ! 9: #define CHRFCADEV "/dev/chaosa" /* Path name for asynchronous RFC's */ ! 10: #define CHLISTDEV "/dev/chlisten" /* Path name for listen */ ! 11: #define CHURFCDEV "/dev/churfc" /* Path name for unmatched RFC list */ ! 12: #define CHNETCHAR '^' ! 13: #define CHSYSPREF "/dev/ch" ! 14: #define CHCPRODEV "/dev/chcproto" /* Path name for channel driver ! 15: * prototype - for major device number ! 16: * and canonical invalid minor device ! 17: */ ! 18: /* ! 19: * This structure returned by the CHIOCGSTAT ioctl to return ! 20: * connection status information. ! 21: */ ! 22: struct chstatus { ! 23: short st_fhost; /* remote host */ ! 24: short st_cnum; /* local channel number */ ! 25: short st_rwsize; /* receive window size */ ! 26: short st_twsize; /* transmit window size */ ! 27: short st_state; /* connection state */ ! 28: short st_ptype; /* Opcode of next packet to read */ ! 29: short st_plength; /* Length of next packet to read */ ! 30: short st_cmode; /* Mode of connection */ ! 31: short st_oroom; /* Output window space left */ ! 32: /* etc - anything else useful? */ ! 33: }; ! 34: /* ! 35: * Record mode packet structure. ! 36: */ ! 37: struct chpacket { ! 38: unsigned char cp_op; ! 39: char cp_data[CHMAXDATA]; ! 40: }; ! 41: /* ! 42: * FILE server login record structure. ! 43: */ ! 44: struct chlogin { ! 45: int cl_pid; /* Process id of server */ ! 46: short cl_cnum; /* Chaos channel number of server */ ! 47: short cl_haddr; /* Host address of other end */ ! 48: long cl_ltime; /* Login time */ ! 49: long cl_atime; /* Last time used. */ ! 50: char cl_user[8]; /* User name */ ! 51: }; ! 52: /* ! 53: * Structure for CHIOCILADDR ! 54: */ ! 55: struct chiladdr { ! 56: unsigned short cil_device; ! 57: unsigned short cil_address; ! 58: }; ! 59: ! 60: /* ! 61: * Chaos net io control commands ! 62: */ ! 63: #define CHIOCRSKIP (('c'<<8)|1) /* Skip the last read unmatched RFC */ ! 64: #define CHIOCPREAD (('c'<<8)|2) /* Read my next data or control pkt */ ! 65: #define CHIOCSMODE (('c'<<8)|3) /* Set the mode of this channel */ ! 66: #define CHIOCFLUSH (('c'<<8)|4) /* flush current output packet */ ! 67: #define CHIOCGSTAT (('c'<<8)|5) /* Make input reading like a tty */ ! 68: #define CHIOCSWAIT (('c'<<8)|6) /* Wait for a different state */ ! 69: #define CHIOCANSWER (('c'<<8)|7) /* Answer an RFC (in RFCRECVD state) */ ! 70: #define CHIOCREJECT (('c'<<8)|8) /* Reject an RFC. Arg is string addr. */ ! 71: #define CHIOCACCEPT (('c'<<8)|9) /* Accept an RFC, opening the connection. */ ! 72: #define CHIOCOWAIT (('c'<<8)|10) /* Wait until all output acked. */ ! 73: #define CHIOCADDR (('c'<<8)|11) /* Set my address */ ! 74: #define CHIOCNAME (('c'<<8)|12) /* Set my name */ ! 75: #define CHIOCILADDR (('c'<<8)|13) /* Set chaos address for Interlan ethernet */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.