|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1983 Regents of the University of California. ! 3: * All rights reserved. The Berkeley software License Agreement ! 4: * specifies the terms and conditions for redistribution. ! 5: * ! 6: * @(#)ctl.h 5.1 (Berkeley) 6/6/85 ! 7: */ ! 8: ! 9: /* ! 10: * ctl.h describes the structure that ! 11: * talk and talkd pass back and forth. ! 12: */ ! 13: ! 14: #include <sys/types.h> ! 15: #include <sys/socket.h> ! 16: #include <netinet/in.h> ! 17: #include <netdb.h> ! 18: ! 19: #define NAME_SIZE 9 ! 20: #define TTY_SIZE 16 ! 21: #define HOST_NAME_LENGTH 256 ! 22: ! 23: #define MAX_LIFE 60 /* max time daemon saves invitations */ ! 24: /* RING_WAIT should be 10's of seconds less than MAX_LIFE */ ! 25: #define RING_WAIT 30 /* time to wait before refreshing invitation */ ! 26: ! 27: /* type values */ ! 28: #define LEAVE_INVITE 0 ! 29: #define LOOK_UP 1 ! 30: #define DELETE 2 ! 31: #define ANNOUNCE 3 ! 32: ! 33: /* answer values */ ! 34: #define SUCCESS 0 ! 35: #define NOT_HERE 1 ! 36: #define FAILED 2 ! 37: #define MACHINE_UNKNOWN 3 ! 38: #define PERMISSION_DENIED 4 ! 39: #define UNKNOWN_REQUEST 5 ! 40: ! 41: typedef struct ctl_response { ! 42: char type; ! 43: char answer; ! 44: int id_num; ! 45: struct sockaddr_in addr; ! 46: } CTL_RESPONSE; ! 47: ! 48: typedef struct ctl_msg { ! 49: char type; ! 50: char l_name[NAME_SIZE]; ! 51: char r_name[NAME_SIZE]; ! 52: int id_num; ! 53: int pid; ! 54: char r_tty[TTY_SIZE]; ! 55: struct sockaddr_in addr; ! 56: struct sockaddr_in ctl_addr; ! 57: } CTL_MSG;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.