# 2.11BSD#431 - /usr/include/protocols/talkd.h

##### Macros

    ANNOUNCE          X
    BADADDR           X
    BADCTLADDR        X
    BADVERSION        X
    DELETE            X
    FAILED            X
    LEAVE_INVITE      X
    LOOK_UP           X
    MACHINE_UNKNOWN   X
    MAX_LIFE          X
    NAME_SIZE         X
    NOT_HERE          X
    PERMISSION_DENIED X
    RING_WAIT         X
    SUCCESS           X
    TALK_VERSION      X
    TTY_SIZE          X
    UNKNOWN_REQUEST   X

       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:  *	@(#)talkd.h	5.2 (Berkeley) 3/13/86
       7:  */
       8:
       9: #include <sys/types.h>
      10: #include <sys/socket.h>
      11: /*
      12:  * This describes the protocol used by the talk server and clients.
      13:  *
      14:  * The talk server acts a repository of invitations, responding to
      15:  * requests by clients wishing to rendezvous for the purpose of
      16:  * holding a conversation.  In normal operation, a client, the caller,
      17:  * initiates a rendezvous by sending a CTL_MSG to the server of
      18:  * type LOOK_UP.  This causes the server to search its invitation
      19:  * tables to check if an invitation currently exists for the caller
      20:  * (to speak to the callee specified in the message).  If the lookup
      21:  * fails, the caller then sends an ANNOUNCE message causing the server
      22:  * to broadcast an announcement on the callee's login ports requesting
      23:  * contact.  When the callee responds, the local server uses the
      24:  * recorded invitation to respond with the appropriate rendezvous
      25:  * address and the caller and callee client programs establish a
      26:  * stream connection through which the conversation takes place.
      27:  */
      28:
      29: /*
      30:  * Client->server request message format.
      31:  */
      32: typedef struct {
      33:     u_char  vers;       /* protocol version */
      34:     u_char  type;       /* request type, see below */
      35:     u_char  answer;     /* not used */
      36:     u_char  pad;
      37:     u_long  id_num;     /* message id */
      38:     struct  sockaddr addr;
      39:     struct  sockaddr ctl_addr;
      40:     long    pid;        /* caller's process id */
      41: #define NAME_SIZE   12
      42:     char    l_name[NAME_SIZE];/* caller's name */
      43:     char    r_name[NAME_SIZE];/* callee's name */
      44: #define TTY_SIZE    16
      45:     char    r_tty[TTY_SIZE];/* callee's tty name */
      46: } CTL_MSG;
      47:
      48: /*
      49:  * Server->client response message format.
      50:  */
      51: typedef struct {
      52:     u_char  vers;       /* protocol version */
      53:     u_char  type;       /* type of request message, see below */
      54:     u_char  answer;     /* respose to request message, see below */
      55:     u_char  pad;
      56:     u_long  id_num;     /* message id */
      57:     struct  sockaddr addr;  /* address for establishing conversation */
      58: } CTL_RESPONSE;
      59:
      60: #define TALK_VERSION    1       /* protocol version */
      61:
      62: /* message type values */
      63: #define LEAVE_INVITE    0   /* leave invitation with server */
      64: #define LOOK_UP     1   /* check for invitation by callee */
      65: #define DELETE      2   /* delete invitation by caller */
      66: #define ANNOUNCE    3   /* announce invitation by caller */
      67:
      68: /* answer values */
      69: #define SUCCESS     0   /* operation completed properly */
      70: #define NOT_HERE    1   /* callee not logged in */
      71: #define FAILED      2   /* operation failed for unexplained reason */
      72: #define MACHINE_UNKNOWN 3   /* caller's machine name unknown */
      73: #define PERMISSION_DENIED 4 /* callee's tty doesn't permit announce */
      74: #define UNKNOWN_REQUEST 5   /* request has invalid type value */
      75: #define BADVERSION  6   /* request has invalid protocol version */
      76: #define BADADDR     7   /* request has invalid addr value */
      77: #define BADCTLADDR  8   /* request has invalid ctl_addr value */
      78:
      79: /*
      80:  * Operational parameters.
      81:  */
      82: #define MAX_LIFE    60  /* max time daemon saves invitations */
      83: /* RING_WAIT should be 10's of seconds less than MAX_LIFE */
      84: #define RING_WAIT   30  /* time to wait before resending invitation */

#### Defined macros

ANNOUNCE defined in line 66; used 1 times

- in /usr/src/ucb/talk/invite.c line 115

BADADDR defined in line 76; used 1 times

- in /usr/src/libexec/talkd/process.c line 52

BADCTLADDR defined in line 77; used 1 times

- in /usr/src/libexec/talkd/process.c line 59

BADVERSION defined in line 75; used 1 times

- in /usr/src/libexec/talkd/process.c line 44

DELETE defined in line 65; used 4 times

- in /usr/src/ucb/talk/invite.c line 73-75(2), 133
- in /usr/src/ucb/talk/look_up.c line 46

FAILED defined in line 71; used 5 times

- in /usr/src/libexec/talkd/announce.c line 42, 50-54(2), 77
- in /usr/src/libexec/talkd/process.c line 161

LEAVE_INVITE defined in line 63; used 2 times

- in /usr/src/libexec/talkd/table.c line 77
- in /usr/src/ucb/talk/invite.c line 123

LOOK_UP defined in line 64; used 1 times

- in /usr/src/ucb/talk/look_up.c line 64

MACHINE_UNKNOWN defined in line 72; used 1 times

- in /usr/src/libexec/talkd/process.c line 121

MAX_LIFE defined in line 82; used 2 times

- in /usr/src/libexec/talkd/table.c line 65, 103

NAME_SIZE defined in line 41; used 6 times

- in line 42-43(2)
- in /usr/src/ucb/talk/get_names.c line 81-84(4)

NOT_HERE defined in line 70; used 3 times

- in /usr/src/libexec/talkd/process.c line 88, 164
- in /usr/src/libexec/talkd/table.c line 186

PERMISSION_DENIED defined in line 73; used 4 times

- in /usr/src/libexec/talkd/announce.c line 79, 87-89(2)
- in /usr/src/libexec/talkd/process.c line 169

RING_WAIT defined in line 84; used 1 times

- in /usr/src/ucb/talk/invite.c line 38

SUCCESS defined in line 69; used 9 times

- in /usr/src/libexec/talkd/announce.c line 92
- in /usr/src/libexec/talkd/process.c line 75, 86, 113, 141, 176-181(2)
- in /usr/src/libexec/talkd/table.c line 184
- in /usr/src/ucb/talk/invite.c line 117

TALK_VERSION defined in line 60; used 5 times

- in /usr/src/libexec/talkd/process.c line 39-42(2)
- in /usr/src/ucb/talk/ctl_transact.c line 76-78(2)
- in /usr/src/ucb/talk/get_names.c line 77

TTY_SIZE defined in line 44; used 3 times

- in line 45
- in /usr/src/ucb/talk/get_names.c line 85-86(2)

UNKNOWN_REQUEST defined in line 74; used 1 times

- in /usr/src/libexec/talkd/process.c line 96

#### Usage of this include

talkd.h used 7 times

- in /usr/src/libexec/talkd/announce.c line 21
- in /usr/src/libexec/talkd/print.c line 18
- in /usr/src/libexec/talkd/process.c line 26
- in /usr/src/libexec/talkd/table.c line 25
- in /usr/src/libexec/talkd/talkd.c line 26
- in /usr/src/ucb/talk/get_names.c line 13
- in /usr/src/ucb/talk/talk_ctl.h line 10

Last modified: 1989-01-06 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1334 |