123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- #ifndef _PROTOCOLS_TALKD_H
- #define _PROTOCOLS_TALKD_H 1
- #include <sys/types.h>
- #include <sys/socket.h>
- typedef struct {
- u_char vers;
- u_char type;
- u_char answer;
- u_char pad;
- u_int32_t id_num;
- struct osockaddr addr;
- struct osockaddr ctl_addr;
- int32_t pid;
- #define NAME_SIZE 12
- char l_name[NAME_SIZE];
- char r_name[NAME_SIZE];
- #define TTY_SIZE 16
- char r_tty[TTY_SIZE];
- } CTL_MSG;
- typedef struct {
- u_char vers;
- u_char type;
- u_char answer;
- u_char pad;
- u_int32_t id_num;
- struct osockaddr addr;
- } CTL_RESPONSE;
- #define TALK_VERSION 1
- #define LEAVE_INVITE 0
- #define LOOK_UP 1
- #define DELETE 2
- #define ANNOUNCE 3
- #define SUCCESS 0
- #define NOT_HERE 1
- #define FAILED 2
- #define MACHINE_UNKNOWN 3
- #define PERMISSION_DENIED 4
- #define UNKNOWN_REQUEST 5
- #define BADVERSION 6
- #define BADADDR 7
- #define BADCTLADDR 8
- #define MAX_LIFE 60
- #define RING_WAIT 30
- #endif
|