Rev | Line | |
---|
[9] | 1 | /* talk.h Copyright Michael Temari 07/22/1996 All Rights Reserved */
|
---|
| 2 |
|
---|
| 3 | #define USER_SIZE 12
|
---|
| 4 | #define TTY_SIZE 16
|
---|
| 5 | #define HOST_SIZE 255
|
---|
| 6 |
|
---|
| 7 | struct osockaddr {
|
---|
| 8 | u16_t sa_family;
|
---|
| 9 | u16_t sin_port;
|
---|
| 10 | ipaddr_t sin_addr;
|
---|
| 11 | char junk[8];
|
---|
| 12 | };
|
---|
| 13 |
|
---|
| 14 | struct talk_request {
|
---|
| 15 | u8_t version;
|
---|
| 16 | u8_t type;
|
---|
| 17 | u8_t answer;
|
---|
| 18 | u8_t junk;
|
---|
| 19 | u32_t id;
|
---|
| 20 | struct osockaddr addr;
|
---|
| 21 | struct osockaddr ctl_addr;
|
---|
| 22 | long pid;
|
---|
| 23 | char luser[USER_SIZE];
|
---|
| 24 | char ruser[USER_SIZE];
|
---|
| 25 | char rtty[TTY_SIZE];
|
---|
| 26 | };
|
---|
| 27 |
|
---|
| 28 | struct talk_reply {
|
---|
| 29 | u8_t version;
|
---|
| 30 | u8_t type;
|
---|
| 31 | u8_t answer;
|
---|
| 32 | u8_t junk;
|
---|
| 33 | u32_t id;
|
---|
| 34 | struct osockaddr addr;
|
---|
| 35 | };
|
---|
| 36 |
|
---|
| 37 | #define TALK_VERSION 1
|
---|
| 38 |
|
---|
| 39 | /* message type values */
|
---|
| 40 | #define LEAVE_INVITE 0 /* leave invitation with server */
|
---|
| 41 | #define LOOK_UP 1 /* check for invitation by callee */
|
---|
| 42 | #define DELETE 2 /* delete invitation by caller */
|
---|
| 43 | #define ANNOUNCE 3 /* announce invitation by caller */
|
---|
| 44 |
|
---|
| 45 | /* answer values */
|
---|
| 46 | #define SUCCESS 0 /* operation completed properly */
|
---|
| 47 | #define NOT_HERE 1 /* callee not logged in */
|
---|
| 48 | #define FAILED 2 /* operation failed for unexplained reason */
|
---|
| 49 | #define MACHINE_UNKNOWN 3 /* caller's machine name unknown */
|
---|
| 50 | #define PERMISSION_DENIED 4 /* callee's tty doesn't permit announce */
|
---|
| 51 | #define UNKNOWN_REQUEST 5 /* request has invalid type value */
|
---|
| 52 | #define BADVERSION 6 /* request has invalid protocol version */
|
---|
| 53 | #define BADADDR 7 /* request has invalid addr value */
|
---|
| 54 | #define BADCTLADDR 8 /* request has invalid ctl_addr value */
|
---|
| 55 |
|
---|
| 56 | #define MAX_LIFE 60 /* max time daemon saves invitations */
|
---|
| 57 | #define RING_WAIT 30 /* time to wait before resending invitation */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.