File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / ucb / talk / ctl.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:29:26 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v121, HEAD
Power 6/32 Unix version 1.21

/* $Header: /var/lib/cvsd/repos/cci/cci/usr/src/ucb/talk/ctl.h,v 1.1.1.1 2019/07/28 12:29:26 root Exp $ */

/* ctl.h describes the structure that talk and talkd pass back
   and forth
 */

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>

#define NAME_SIZE 9
#define TTY_SIZE 16
#define HOST_NAME_LENGTH 256

#define MAX_LIFE 60 /* maximum time an invitation is saved by the
			 talk daemons */
#define RING_WAIT 30  /* time to wait before refreshing invitation 
			 should be 10's of seconds less than MAX_LIFE */

    /* the values for type */

#define LEAVE_INVITE 0
#define LOOK_UP 1
#define DELETE 2
#define ANNOUNCE 3

    /* the values for answer */

#define SUCCESS 0
#define NOT_HERE 1
#define FAILED 2
#define MACHINE_UNKNOWN 3
#define PERMISSION_DENIED 4
#define UNKNOWN_REQUEST 5

typedef struct {
    char ctlr_type;
    char ctlr_answer;
    int ctlr_id_num;
    struct sockaddr_in ctlr_addr;
} CTL_RESPONSE;

typedef struct {
    char rtype;
    char ranswer;
    char pad[2];			/* to align in VAX style */
    char rid_num[sizeof (int)];
    char raddr[sizeof (struct sockaddr_in)];
} NETCTL_RESPONSE;

typedef struct {
    char ctlm_type;
    char ctlm_l_name[NAME_SIZE];
    char ctlm_r_name[NAME_SIZE];
    int ctlm_id_num;
    int ctlm_pid;
    char ctlm_r_tty[TTY_SIZE];
    struct sockaddr_in ctlm_addr;
    struct sockaddr_in ctlm_ctl_addr;
} CTL_MSG;

typedef struct {
    char mtype; 
    char ml_name[NAME_SIZE];
    char mr_name[NAME_SIZE];
    char pad;				/* to align in VAX style */
    char mid_num[sizeof (int)];
    char mpid[sizeof (int)];
    char mr_tty[TTY_SIZE];
    char maddr[sizeof(struct sockaddr_in)];
    char mctl_addr[sizeof(struct sockaddr_in)];
} NETCTL_MSG;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.