|
|
1.1 ! root 1: /* $Header: ctl.h,v 1.2 85/01/09 13:05:15 rcs Exp $ */ ! 2: ! 3: /* ctl.h describes the structure that talk and talkd pass back ! 4: and forth ! 5: */ ! 6: ! 7: #include <sys/types.h> ! 8: #include <sys/socket.h> ! 9: #include <netinet/in.h> ! 10: #include <netdb.h> ! 11: ! 12: #define NAME_SIZE 9 ! 13: #define TTY_SIZE 16 ! 14: #define HOST_NAME_LENGTH 256 ! 15: ! 16: #define MAX_LIFE 60 /* maximum time an invitation is saved by the ! 17: talk daemons */ ! 18: #define RING_WAIT 30 /* time to wait before refreshing invitation ! 19: should be 10's of seconds less than MAX_LIFE */ ! 20: ! 21: /* the values for type */ ! 22: ! 23: #define LEAVE_INVITE 0 ! 24: #define LOOK_UP 1 ! 25: #define DELETE 2 ! 26: #define ANNOUNCE 3 ! 27: ! 28: /* the values for answer */ ! 29: ! 30: #define SUCCESS 0 ! 31: #define NOT_HERE 1 ! 32: #define FAILED 2 ! 33: #define MACHINE_UNKNOWN 3 ! 34: #define PERMISSION_DENIED 4 ! 35: #define UNKNOWN_REQUEST 5 ! 36: ! 37: typedef struct { ! 38: char ctlr_type; ! 39: char ctlr_answer; ! 40: int ctlr_id_num; ! 41: struct sockaddr_in ctlr_addr; ! 42: } CTL_RESPONSE; ! 43: ! 44: typedef struct { ! 45: char rtype; ! 46: char ranswer; ! 47: char pad[2]; /* to align in VAX style */ ! 48: char rid_num[sizeof (int)]; ! 49: char raddr[sizeof (struct sockaddr_in)]; ! 50: } NETCTL_RESPONSE; ! 51: ! 52: typedef struct { ! 53: char ctlm_type; ! 54: char ctlm_l_name[NAME_SIZE]; ! 55: char ctlm_r_name[NAME_SIZE]; ! 56: int ctlm_id_num; ! 57: int ctlm_pid; ! 58: char ctlm_r_tty[TTY_SIZE]; ! 59: struct sockaddr_in ctlm_addr; ! 60: struct sockaddr_in ctlm_ctl_addr; ! 61: } CTL_MSG; ! 62: ! 63: typedef struct { ! 64: char mtype; ! 65: char ml_name[NAME_SIZE]; ! 66: char mr_name[NAME_SIZE]; ! 67: char pad; /* to align in VAX style */ ! 68: char mid_num[sizeof (int)]; ! 69: char mpid[sizeof (int)]; ! 70: char mr_tty[TTY_SIZE]; ! 71: char maddr[sizeof(struct sockaddr_in)]; ! 72: char mctl_addr[sizeof(struct sockaddr_in)]; ! 73: } NETCTL_MSG;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.