Applications written to compilation environments earlier than
those required by this issue of the specification (see
The function definitions in this appendix conform to the ISO C standard (see referenced documents.
Values specified for some of the symbolic constants
in this XTI header definition are designated as
not mandatory
for conformance purposes. These are identified by the comment:
in the following definitions.
Certain items in this appendix are marked LEGACY. This which means that they are being retained for compatibility with older applications, but have limitations which make them inappropriate for developing portable applications. New applications should use alternative means of obtaining equivalent functionality.
#define TBADADDR
1
/* incorrect addr format */
#define TBADOPT
2
/* incorrect option format */
#define TACCES
3
/* incorrect permissions */
#define TBADF
4
/* illegal transport fd */
#define TNOADDR
5
/* couldn't allocate addr */
#define TOUTSTATE
6
/* out of state */
#define TBADSEQ
7
/* bad call sequence number */
#define TSYSERR
8
/* system error */
#define TLOOK
9
/* event requires attention */
#define TBADDATA
10
/* illegal amount of data */
#define TBUFOVFLW
11
/* buffer not large enough */
#define TFLOW
12
/* flow control */
#define TNODATA
13
/* no data */
#define TNODIS
14
/* discon_ind not found on queue */
#define TNOUDERR
15
/* unitdata error not found */
#define TBADFLAG
16
/* bad flags */
#define TNOREL
17
/* no ord rel found on queue */
#define TNOTSUPPORT
18
/* primitive/action not supported */
#define TSTATECHNG
19
/* state is in process of changing */
#define TNOSTRUCTYPE
20
/* unsupported struct-type requested */
#define TBADNAME
21
/* invalid transport provider name */
#define TBADQLEN
22
/* qlen is zero */
#define TADDRBUSY
23
/* address in use */
#define TINDOUT
24
/* outstanding connection indications */
#define TPROVMISMATCH
25
/* transport provider mismatch */
#define TRESQLEN
26
/* resfd specified to accept w/qlen >0 */
#define TRESADDR
27
/* resfd not bound to same addr as fd */
#define TQFULL
28
/* incoming connection queue full */
#define TPROTO
29
/* XTI protocol error */
#define T_LISTEN
0x0001
/* connection indication received */
#define T_CONNECT
0x0002
/* connection confirmation received */
#define T_DATA
0x0004
/* normal data received */
#define T_EXDATA
0x0008
/* expedited data received */
#define T_DISCONNECT
0x0010
/* disconnection received */
#define T_UDERR
0x0040
/* datagram error indication */
#define T_ORDREL
0x0080
/* orderly release indication */
#define T_GODATA
0x0100
/* sending normal data is again possible */
#define T_GOEXDATA
0x0200
/* sending expedited data is again */
"/* possible */
#define T_MORE
0x001
/* more data */
#define T_EXPEDITED
0x002
/* expedited data */
#define T_PUSH
0x004
/* send data immediately */
#define T_NEGOTIATE
0x004
/* set opts */
#define T_CHECK
0x008
/* check opts */
#define T_DEFAULT
0x010
/* get default opts */
#define T_SUCCESS
0x020
/* successful */
#define T_FAILURE
0x040
/* failure */
#define T_CURRENT
0x080
/* get current options */
#define T_PARTSUCCESS
0x100
/* partial success */
#define T_READONLY
0x200
/* read-only */
#define T_NOTSUPPORT
0x400
/* not supported */
/* t_errno is a modifiable lvalue of type int */
/* In a single threaded environment a typical definition of t_errno is: */
extern int t_errno;
/* In a multi-threading environment a typical definition of t_errno is: */
extern int *_t_errno(void);
#define t_errno (*(_t_errno()))
#define T_COTS
01
/* connection-mode transport service */
#define T_COTS_ORD
02
/* connection-mode with orderly release */
#define T_CLTS
03
/* connectionless-mode transport service */
#define T_SENDZERO
0x001
/* supports 0-length TSDUs */
#define T_ORDRELDATA
0x002
/* supports orderly release data */
struct netbuf {
unsigned int
maxlen;
unsigned int
len;
void
*buf;
};
struct t_bind {
struct netbuf
addr;
unsigned int
qlen;
};
struct t_optmgmt {
struct netbuf
opt;
t_scalar_t
flags;
};
struct t_discon {
struct netbuf
udata;
/* user data */
int
reason;
/* reason code */
int
sequence;
/* sequence number */
};
struct t_call {
struct netbuf
addr;
/* address */
struct netbuf
opt;
/* options */
struct netbuf
udata;
/* user data */
int
sequence;
/* sequence number */
};
struct t_unitdata {
struct netbuf
addr;
/* address */
struct netbuf
opt;
/* options */
struct netbuf
udata;
/* user data */
};
struct t_uderr {
struct netbuf
addr;
/* address */
struct netbuf
opt;
/* options */
t_scalar_t
error;
/* error code */
};
#define T_BIND
1
/* struct t_bind */
#define T_OPTMGMT
2
/* struct t_optmgmt */
#define T_CALL
3
/* struct t_call */
#define T_DIS
4
/* struct t_discon */
#define T_UNITDATA
5
/* struct t_unitdata */
#define T_UDERROR
6
/* struct t_uderr */
#define T_INFO
7
/* struct t_info */
#define T_ADDR
0x01
/* address */
#define T_OPT
0x02
/* options */
#define T_UDATA
0x04
/* user data */
#define T_ALL
0xffff
/* all the above fields supported */
#define T_UNBND
1
/* unbound */
#define T_IDLE
2
/* idle */
#define T_OUTCON
3
/* outgoing connection pending */
#define T_INCON
4
/* incoming connection pending */
#define T_DATAXFER
5
/* data transfer */
#define T_OUTREL
6
/* outgoing release pending */
#define T_INREL
7
/* incoming release pending */
#define
T_YES
1
#define
T_NO
0
#define
T_NULL
0
#define
T_ABSREQ
0x8000
#define
T_INFINITE
(-1)
#define
T_INVALID
(-2)
/*
* XTI Level
*
* The values defined for the XTI Level are recommended-only,
* not mandatory.
*/
#define
XTI_GENERIC
0xffff
#define
XTI_DEBUG
0x0001
/* enable debugging */
#define
XTI_LINGER
0x0080
/* linger on close if data present */
#define
XTI_RCVBUF
0x1002
/* receive buffer size */
#define
XTI_RCVLOWAT
0x1004
/* receive low-water mark */
#define
XTI_SNDBUF
0x1001
/* send buffer size */
#define
XTI_SNDLOWAT
0x1003
/* send low-water mark */
/*
* Definition of the ISO transport classes
*/
#define
T_CLASS0
0
#define
T_CLASS1
1
#define
T_CLASS2
2
#define
T_CLASS3
3
#define
T_CLASS4
4
#define
T_PRITOP
0
#define
T_PRIHIGH
1
#define
T_PRIMID
2
#define
T_PRILOW
3
#define
T_PRIDFLT
4
#define
T_NOPROTECT
1
#define
T_PASSIVEPROTECT
2
#define
T_ACTIVEPROTECT
4
#define
T_LTPDUDFLT
128
/* define obsolete in XPG4 */
#define
T_ISO_TP
0x0100
#define
ISO_TP
0x0100
(LEGACY)
#define
T_TCO_THROUGHPUT
0x0001
#define
TCO_THROUGHPUT
0x0001
(LEGACY)
#define
T_TCO_TRANSDEL
0x0002
#define
TCO_TRANSDEL
0x0002
(LEGACY)
#define
T_TCO_RESERRORRATE
0x0003
#define
TCO_RESERRORRATE
0x0003
(LEGACY)
#define
T_TCO_TRANSFFAILPROB
0x0004
#define
TCO_TRANSFFAILPROB
0x0004
(LEGACY)
#define
T_TCO_ESTFAILPROB
0x0005
#define
TCO_ESTFAILPROB
0x0005
(LEGACY)
#define
T_TCO_RELFAILPROB
0x0006
#define
TCO_RELFAILPROB
0x0006
(LEGACY)
#define
T_TCO_ESTDELAY
0x0007
#define
TCO_ESTDELAY
0x0007
(LEGACY)
#define
T_TCO_RELDELAY
0x0008
#define
TCO_RELDELAY
0x0008
(LEGACY)
#define
T_TCO_CONNRESIL
0x0009
#define
TCO_CONNRESIL
0x0009
(LEGACY)
#define
T_TCO_PROTECTION
0x000a
#define
TCO_PROTECTION
0x000a
(LEGACY)
#define
T_TCO_PRIORITY
0x000b
#define
TCO_PRIORITY
0x000b
(LEGACY)
#define
T_TCO_EXPD
0x000c
#define
TCO_EXPD
0x000c
(LEGACY)
#define
T_TCL_TRANSDEL
0x000d
#define
TCL_TRANSDEL
0x000d
(LEGACY)
#define
T_TCL_RESERRORRATE
T_TCO_RESERRORRATE
#define
TCL_RESERRORRATE
T_TCO_RESERRORRATE
(LEGACY)
#define
T_TCL_PROTECTION
T_TCO_PROTECTION
#define
TCL_PROTECTION
T_TCO_PROTECTION
(LEGACY)
#define
T_TCL_PRIORITY
T_TCO_PRIORITY
#define
TCL_PRIORITY
T_TCO_PRIORITY
(LEGACY)
#define
T_TCO_LTPDU
0x0100
#define
TCO_LTPDU
0x0100
#define
T_TCO_ACKTIME
0x0200
#define
TCO_ACKTIME
0x0200
#define
T_TCO_REASTIME
0x0300
#define
TCO_REASTIME
0x0300
#define
T_TCO_EXTFORM
0x0400
#define
TCO_EXTFORM
0x0400
#define
T_TCO_FLOWCTRL
0x0500
#define
TCO_FLOWCTRL
0x0500
#define
T_TCO_CHECKSUM
0x0600
#define
TCO_CHECKSUM
0x0600
#define
T_TCO_NETEXP
0x0700
#define
TCO_NETEXP
0x0700
#define
T_TCO_NETRECPTCF
0x0800
#define
TCO_NETRECPTCF
0x0800
#define
T_TCO_PREFCLASS
0x0900
#define
TCO_PREFCLASS
0x0900
#define
T_TCO_ALTCLASS1
0x0a00
#define
TCO_ALTCLASS1
0x0a00
#define
T_TCO_ALTCLASS2
0x0b00
#define
TCO_ALTCLASS2
0x0b00
#define
T_TCO_ALTCLASS3
0x0c00
#define
TCO_ALTCLASS3
0x0c00
#define
T_TCO_ALTCLASS4
0x0d00
#define
TCO_ALTCLASS4
0x0d00
#define
T_TCL_CHECKSUM
T_TCO_CHECKSUM
#define
TCL_CHECKSUM
T_TCO_CHECKSUM
/*
* TCP level
*
* The values defined for the TCP Level are recommended-only,
* not mandatory.
*/
#define
T_INET_TCP
0x6
#define
INET_TCP
0x6
(LEGACY)
#define
T_TCP_NODELAY
0x1
/* don't delay packets to coalesce */
#define
TCP_NODELAY
0x1
/* (LEGACY) */
#define
T_TCP_MAXSEG
0x2
/* get maximum segment size */
#define
TCP_MAXSEG
0x2
/* (LEGACY) */
#define
T_TCP_KEEPALIVE
0x8
/* check, if connections are alive */
#define
TCP_KEEPALIVE
0x8
/* (LEGACY) */
#define
T_GARBAGE
0x02
/* LEGACY */
#define
T_INET_UDP
0x11
#define
INET_UDP
0x11
(LEGACY)
#define
T_UDP_CHECKSUM
T_TCO_CHECKSUM
/* checksum computation */
#define
UDP_CHECKSUM
T_TCO_CHECKSUM
/* LEGACY */
#define
T_INET_IP
0x0
#define
INET_IP
0x0
(LEGACY)
#define
T_IP_OPTIONS
0x1
/* IP per-packet options */
#define
IP_OPTIONS
0x1
/* (LEGACY) */
#define
T_IP_TOS
0x2
/* IP per-packet type of service */
#define
IP_TOS
0x2
/* (LEGACY) */
#define
T_IP_TTL
0x3
/* IP per-packet time to live */
#define
IP_TTL
0x3
/* (LEGACY) */
#define
T_IP_REUSEADDR
0x4
/* allow local address reuse */
#define
IP_REUSEADDR
0x4
/* (LEGACY) */
#define
T_IP_DONTROUTE
0x10
/* just use interface addresses */
#define
IP_DONTROUTE
0x10
/* (LEGACY) */
#define
T_IP_BROADCAST
0x20
/* permit sending of broadcast msgs */
#define
IP_BROADCAST
0x20
/* (LEGACY) */
#define
T_ROUTINE
0
#define
T_PRIORITY
1
#define
T_IMMEDIATE
2
#define
T_FLASH
3
#define
T_OVERRIDEFLASH
4
#define
T_CRITIC_ECP
5
#define
T_INETCONTROL
6
#define
T_NETCONTROL
7
#define
T_NOTOS
0
#define
T_LDELAY
(1 << 4)
#define
T_HITHRPT
(1 << 3)
#define
T_HIREL
(1 << 2)
#define
T_LOCOST
(1 << 1)
#define
SET_TOS(prec, tos)
((0x7 & (prec)) << 5 | (0x1c & (tos)))
[??] Some characters or strings that appear in the printed document are not easily representable using HTML.
Contents | Next section | Index |