|
|
DataMuseum.dkPresents historical artifacts from the history of: Regnecentalen RC-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Regnecentalen RC-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T U
Length: 9934 (0x26ce)
Types: TextFile
Notes: Uncompressed file
└─⟦0f0f313e4⟧ Bits:30004764 SW95709I.2F TCP/IP Update 1
└─⟦0f0f313e4⟧ UNIX Filesystem
└─⟦a844f3e00⟧ »SSU.4a/new/usr/include/sys/sohdr.h.Z«
└─⟦this⟧
/*
* Definitions for the Socket interface protocol.
*
* Copyrighted as an unpublished work.
* (c) Copyright 1988 INTERACTIVE Systems Corporation
* All rights reserved.
*
* RESTRICTED RIGHTS:
*
* These programs are supplied under a license. They may be used,
* disclosed, and/or copied only as permitted under such license
* agreement. Any copy must contain the above copyright notice and
* this restricted rights notice. Use, copying, and/or disclosure
* of the programs is strictly prohibited unless otherwise provided
* in the license agreement.
*/
#ident "@(#)sohdr.h 1.3 - 90/08/28"
/*
* The following are the definitions of the Socket-TLI Interface
* primitives.
*/
/*
* Primitives that are initiated by the socket library.
*/
#define SO_SOCKET 0 /* socket request */
#define SO_BIND 1 /* bind request */
#define SO_CONNECT 2 /* connect request */
#define SO_LISTEN 3 /* listen request */
#define SO_ACCEPT 4 /* accept request */
#define SO_FDINSERT 5 /* fdinsert request */
#define SO_SEND 6 /* send request */
#define SO_SETOPT 7 /* setopt request */
#define SO_GETOPT 8 /* getopt request */
#define SO_GETNAME 9 /* getname request */
#define SO_GETPEER 10 /* getpeer request */
#define SO_SHUTDOWN 11 /* shutdown request */
#define SO_DISC_REQ 19 /* disconnect request */
/*
* Primitives that are initiated by the socket module.
*/
#define SO_ACCEPT_ACK 12 /* accept acknowledgement */
#define SO_UNITDATA_IND 13 /* unitdata indication */
#define SO_GETOPT_ACK 14 /* getopt acknowledgement */
#define SO_GETNAME_ACK 15 /* getname acknowledgement */
#define SO_GETPEER_ACK 16 /* getpeer acknowledgement */
#define SO_ERROR_ACK 17 /* error acknowledgement */
#define SO_OK_ACK 18 /* ok acknowledgement */
/*
* Primitive non-fatal error return codes
*/
#define SO_OUTSTATE 1
#define SO_SYSERR 2
/*
* The following are the events that drive the state machine.
*
* Initialization events */
#define SE_SOCKET_REQ 0 /* socket request */
#define SE_BIND_REQ 1 /* bind request */
#define SE_LISTEN_REQ 2 /* listen request */
#define SE_SETOPT_REQ 3 /* setopt request */
#define SE_GETOPT_REQ 4 /* getopt request */
#define SE_GETNAME_REQ 5 /* getname request */
#define SE_BIND_ACK 6 /* bind ack */
#define SE_GETOPT_ACK 7 /* getopt ack */
#define SE_GETNAME_ACK 8 /* getname ack */
#define SE_ERROR_ACK 9 /* error acknowledgement */
#define SE_OK_ACK 10 /* ok acknowledgement */
/* Connection oriented events */
#define SE_ACCEPT_REQ 11 /* accept request */
#define SE_ACCEPT_ACK 12 /* accept ack */
#define SE_CONN_REQ 13 /* connect request */
#define SE_GETPEER_REQ 14 /* getpeer request */
#define SE_GETPEER_ACK 15 /* getpeer ack */
#define SE_DATA_REQ 16 /* write request */
#define SE_DATA_IND 17 /* data indication */
#define SE_SHUTDOWN_REQ 18 /* shutdown request */
/* Unit data events */
#define SE_SEND_REQ 19 /* send request */
#define SE_UNITDATA_IND 20 /* unitdata indication */
#define SE_UDERROR_IND 21 /* unitdata error indication */
#define SE_NOEVENTS 22
/*
* The following are the possible states of the Socket Interface.
*/
#define SS_OPENED 0 /* just opened; no info */
#define SS_UNBND 1 /* unbound */
#define SS_WACK_BREQ 2 /* waiting ack of T_BIND_REQ */
#define SS_BOUND 3 /* bound */
#define SS_PASSIVE 4 /* listening but not accepting */
#define SS_ACCEPTING 5 /* accepting */
#define SS_WAIT_FD 6 /* waiting for stream pointer */
#define SS_WACK_CREQ 7 /* waiting ack of T_CONN_REQ */
#define SS_WCON_CREQ 8 /* waiting confirmation of T_CONN_REQ */
#define SS_WACK_CRES 9 /* waiting ack of T_CONN_RES */
#define SS_CONNECTED 10 /* connected */
#define SS_CONN_RONLY 11 /* connected with write shutdown */
#define SS_CONN_WONLY 12 /* connected with read shutdown */
#define SS_SHUTDOWN 13 /* connected but shutdown */
#define SS_LINGER 14 /* closing with outstanding data */
#define SS_NOSTATES 15
/*
* The following structure definitions define the format of the
* stream message block of the above primitives.
* (everything is declared long to ensure proper alignment
* across different machines)
*/
/* socket request */
struct SO_socket {
long PRIM_type; /* always SO_SOCKET */
long SOCK_domain; /* socket domain */
long SOCK_type; /* socket type */
long SOCK_prot; /* socket protocol */
};
#define SO_SOCKET_SIZE sizeof (struct SO_socket)
/* bind request */
struct SO_bind {
long PRIM_type; /* always SO_BIND */
long ADDR_length; /* addr length */
long ADDR_offset; /* addr offset */
long CONN_queue; /* connect indications requested */
};
#define SO_BIND_SIZE sizeof (struct SO_bind)
/* listen request */
struct SO_listen {
long PRIM_type; /* always SO_LISTEN */
long CONN_queue; /* connect indications requested */
};
#define SO_LISTEN_SIZE sizeof (struct SO_listen)
/* accept request */
struct SO_accept {
long PRIM_type; /* always SO_ACCEPT */
};
#define SO_ACCEPT_SIZE sizeof (struct SO_accept)
/* fdinsert request */
struct SO_fdinsert {
long PRIM_type; /* always SO_FDINSERT */
long SEQ_number; /* sequence number from T_conn_ind */
struct queue *STR_ptr; /* pointer to read queue of driver */
};
#define SO_FDINSERT_SIZE sizeof (struct SO_fdinsert)
/* connection request */
struct SO_connect {
long PRIM_type; /* always SO_CONNECT */
long DEST_length; /* dest addr length */
long DEST_offset; /* dest addr offset */
};
#define SO_CONNECT_SIZE sizeof (struct SO_connect)
/* send request */
struct SO_send {
long PRIM_type; /* always SO_SEND */
long DEST_length; /* dest addr length */
long DEST_offset; /* dest addr offset */
long DATA_flags; /* data flags */
};
#define SO_SEND_SIZE sizeof (struct SO_send)
/* setopt request */
struct SO_setopt {
long PRIM_type; /* always SO_SETOPT */
long PROT_level; /* protocol level */
long OPT_name; /* option name */
long OPT_length; /* options length */
long OPT_offset; /* options offset */
};
#define SO_SETOPT_SIZE sizeof (struct SO_setopt)
/* getopt request */
struct SO_getopt {
long PRIM_type; /* always SO_GETOPT */
long PROT_level; /* protocol level */
long OPT_name; /* option name */
};
#define SO_GETOPT_SIZE sizeof (struct SO_getopt)
/* getname request */
struct SO_getname {
long PRIM_type; /* always SO_GETNAME */
};
#define SO_GETNAME_SIZE sizeof (struct SO_getname)
/* getpeer request */
struct SO_getpeer {
long PRIM_type; /* always SO_GETPEER */
};
#define SO_GETPEER_SIZE sizeof (struct SO_getpeer)
/* shutdown request */
struct SO_shutdown {
long PRIM_type; /* always SO_SHUTDOWN */
long SHUT_down; /* shutdown flags */
};
#define SO_SHUTDOWN_SIZE sizeof (struct SO_shutdown)
/* accept acknowledgment */
struct SO_accept_ack {
long PRIM_type; /* always SO_ACCEPT_ACK */
long ADDR_length; /* addr length */
long ADDR_offset; /* addr offset */
long SOCK_domain; /* socket domain */
long SOCK_type; /* socket type */
long SOCK_prot; /* socket protocol */
long SEQ_number; /* sequence number from T_conn_ind */
};
#define SO_ACCEPT_ACK_SIZE sizeof (struct SO_accept_ack)
/* unitdata indication */
struct SO_unitdata_ind {
long PRIM_type; /* always SO_UNITDATA_IND */
long SRC_length; /* source addr length */
long SRC_offset; /* source addr offset */
long DATA_flags; /* data flags */
};
#define SO_UNITDATA_IND_SIZE sizeof (struct SO_unitdata_ind)
/* getopt acknowledgment */
struct SO_getopt_ack {
long PRIM_type; /* always SO_GETOPT_ACK */
long PROT_level; /* protocol level */
long OPT_name; /* options name */
long OPT_length; /* options length */
long OPT_offset; /* options offset */
};
#define SO_GETOPT_ACK_SIZE sizeof (struct SO_getopt_ack)
/* getname acknowledgment */
struct SO_getname_ack {
long PRIM_type; /* always SO_GETNAME_ACK */
long NAME_length; /* name length */
long NAME_offset; /* name offset */
};
#define SO_GETNAME_ACK_SIZE sizeof (struct SO_getname_ack)
/* getpeer acknowledgment */
struct SO_getpeer_ack {
long PRIM_type; /* always SO_GETPEER_ACK */
long PEER_length; /* peer name length */
long PEER_offset; /* peer name offset */
};
#define SO_GETPEER_ACK_SIZE sizeof (struct SO_getpeer_ack)
/* error acknowledgment */
struct SO_error_ack {
long PRIM_type; /* always SO_ERROR_ACK */
long ERROR_prim; /* primitive in error */
long SOCK_error; /* SOCKET error code */
long UNIX_error; /* UNIX error code */
};
#define SO_ERROR_ACK_SIZE sizeof (struct SO_error_ack)
/* ok acknowledgment */
struct SO_ok_ack {
long PRIM_type; /* always SO_OK_ACK */
long CORRECT_prim; /* correct primitive */
};
#define SO_OK_ACK_SIZE sizeof (struct SO_ok_ack)
struct SO_disc_req {
long PRIM_type; /* always SO_FDINSERT */
long SEQ_number; /* sequence number from T_conn_ind */
};
#define SO_DISC_REQ_SIZE sizeof (struct SO_disc_req)
/*
* The following is a union of the primitives
*/
union SO_primitives {
long SP_type; /* primitive type */
struct SO_socket SP_socket; /* socket request */
struct SO_bind SP_bind; /* bind request */
struct SO_listen SP_listen; /* listen request */
struct SO_accept SP_accept; /* accept response */
struct SO_fdinsert SP_fdinsert; /* fdinsert request */
struct SO_connect SP_connect; /* connect request */
struct SO_send SP_send; /* send data request */
struct SO_setopt SP_setopt; /* setopt request */
struct SO_getopt SP_getopt; /* getopt request */
struct SO_getname SP_getname; /* getname request */
struct SO_getpeer SP_getpeer; /* getpeer request */
struct SO_shutdown SP_shutdown; /* shutdown request */
struct SO_accept_ack SP_accept_ack; /* accept ack */
struct SO_unitdata_ind SP_unitdata_ind;/* unitdata ind */
struct SO_getopt_ack SP_getopt_ack; /* getopt ack */
struct SO_getname_ack SP_getname_ack; /* getname ack */
struct SO_getpeer_ack SP_getpeer_ack; /* getpeer ack */
struct SO_error_ack SP_error_ack; /* error ack */
struct SO_ok_ack SP_ok_ack; /* ok ack */
struct SO_disc_req SP_disc_req; /* disconnect request */
};
#define SO_PRIMITIVES_SIZE sizeof (union SO_primitives)