tli(3)

SYNOPSIS

popen tli id provider-id [flags]
pclose tli id
pinit tli pkt length [data]
pget pkt tli field-name
id.rcv pkt [timeout]
id.snd pkt [snd-flags]
id.bind [[/]port-number [qlen value]]
id.state
id.error
id.event
id.unbind
id.connect host port [timeout]
id.rcvconnect
id.listen [timeout]
id.accept [new-id]
id.atmark arg
id.snddis
id.sndrel
id.rcvdis
id.rcvrel
id.peek
id.info [field-name]
id.mib field-name
id.getopt level opt-name
id.setopt level opt-name opt-value1 [opt-value2]
id.setipsr [!] hop1 hop2 ... dst
id.getname type
id.sndudata pkt host port
id.rcvudata pkt [timeout]
id.rcvuderr

DESCRIPTION

popen tli id provider-id [flags]
    Open the communication end-point, specifying the type of communication provider desired. The TCP and UDP transport providers (provider-id = tcp, provider-id = udp) are implemented.

pclose tli id
    Close the communication end-point id.

pinit tli pkt length [data]
    Initialize a TLI packet variable, with the desired data as the contents.

pget pkt tli field-name
    Fetch the indicated field field-name from the indicated packet pkt. The valid fields are the following: buflen, datalen, data.

id.bind [[/]port-number [qlen value]]
    Bind an address to a transport endpoint id. If '/' port-number prefix present, bind operation uses localhost (127.0.0.1) as host part of IP address. The [qlen value] parameter defines the maximum length the queue of pending connections may grow to. On success bind returns "OK" or "ADDR_IN_USE".

id.state
    Return the current state of id in literal form.

id.error
    Return the current t_errno in literal form.

id.event
    Return the current event(s) of id in literal form.

id.unbind
    Disable a transport endpoint id.

id.connect host port [timeout]
    Establish (or initiate) a connection with another transport user. It will wait only timeout (if present) milliseconds for a confirmation to be received. On success it returns "connection" or "timeout" or "TNODATA".

id.rcvconnect
    Received the confirmation from a connect request. Rcvconnect is used in asynchronous mode. On success it returns "connection" or "TNODATA".

id.listen [timeout]
    Listen for a connect request. It will wait only timeout (if present) milliseconds for a connect request to be received. On success it returns "conn_request" or "timeout" or "TNODATA".

id.accept [new-id]
    Accept a connect request. New-id (if present) should be binded to the TLI endpoint other then id. On sucess it returns "connection".

id.atmark arg
    Performs an ioctl(I_ATMARK) to determine whether at the atmark. It returns either "mark" or "!mark" with the endpoint associated with id. The valid args are the following: ANYMARK, LASTMARK.

id.rcv pkt [timeout]
    Receive the next packet on id. If the timeout parameter is present, it will wait only timeout milliseconds for a packet to be received. On success it returns "packet" or "expedited_packet" or "timeout" or "TNODATA".

id.snd pkt [snd-flags]
    Send data or expedited data over a connection.

id.snddis
    Send user-initiated disconnect request.

id.sndrel
    Initiate an orderly release.

id.rcvdis
    This operation is used to identify the cause of a disconnect. On success it returns "DIS" or "TNODIS".

id.rcvrel
    Acknowledge receipt of an orderly release indication. On success it returns "REL" or "TNOREL".

id.peek
    Peek for a data or expedided data in id. On success it returns "TDATA" or "TNODATA".

id.sync
    Synchronize transport library. On success it returns the current state of id in literal form.

id.info [field-name]
    Get protocol-specific service information. If field-name is used, it returns the value of specified field-name. The valid fields are the following: addr, options, tsdu, etsdu, connect, discon, servtype. If field-name is omitted, it returns a list of pairs field-name value.

id.mib field-name
    Get MIB (Management Information Base) information about the TCP group. It returns the value of specified field-name. The valid fields for tcp (see struct mib2_tcp <inet/mib2.h>) are the following: tcpRtoAlgorithm tcpRtoMin tcpMaxConn tcpActiveOpens tcpPassiveOpens tcpAttemptFails tcpEstabResets tcpCurrEstab tcpOutSegs tcpOutDataSegs tcpOutDataBytes tcpRetransSegs tcpRetransBytes tcpOutAck tcpOutAckDelayed tcpOutUrg tcpOutWinUpdate tcpOutWinProbe tcpOutControl tcpOutRsts tcpOutFastRetrans tcpInDataPartDupSegs tcpInAckSegs tcpInAckBytes tcpInDataDupSegs tcpRtoMax tcpInClosed tcpInSegs tcpInDupAck tcpInAckUnsent tcpInDataInorderSegs tcpTimRetransDrop tcpInDataUnorderBytes tcpInDataPartDupBytes tcpTimRetrans tcpInWinProbe tcpInWinUpdate tcpRttNoUpdate tcpRttUpdate tcpInDataPastWinBytes tcpTimKeepalive tcpTimKeepaliveProbe tcpTimKeepaliveDrop tcpListenDrop tcpInDataInorderBytes tcpInDataUnorderSegs tcpInDataDupBytes tcpInDataPastWinSegs tcpConnTableSize tcpListenDropQ0 tcpHalfOpenDrop The valid fields for udp (see struct mib2_udp <inet/mib2.h>) are the following: udpInDatagrams udpInErrors udpOutDatagrams udpEntrySize

id.getopt level opt-name
    Get option for a transport endpoint. On success it returns the value of specified option. The valid levels opt-names see below.

id.setopt level opt-name opt-value1 [opt-value2]
    Negotiate options for a transport endpoint. opt-value2 is needed for SO_LINGER opt-name only. On success it returns the negotiated value of specified option.

    The valid levels (for getopt and setopt) are the following: SOL_SOCKET, IPPROTO_TCP. The valid opt-names (for getopt and setopt) are the following: SO_BROADCAST, SO_DEBUG, SO_DONTROUTE, SO_ERROR *, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF, SO_SNDBUF, SO_RCVLOWAT, SO_SNDLOWAT, SO_RCVTIMEO, SO_SNDTIMEO, SO_REUSEADDR, SO_TYPE *, SO_USELOOPBACK, TCP_NODELAY, TCP_MAXSEG *, TCP_NOTIFY_THRESHOLD, TCP_ABORT_THRESHOLD, TCP_CONN_NOTIFY_THRESHOLD, TCP_CONN_ABORT_THRESHOLD. note: * - means "use in getopt only".

id.getname type
    Get local or remote address for a transport endpoint. On success getname returns the address of specified type. The valid types are the following: LOCALNAME, REMOTENAME.

id.sndudata pkt host port
    Send a data unit (pkt) to another transport user. It is used in connectionless (udp) mode.

id.rcvudata pkt [timeout]
    Receive a data unit (pkt) from another transport user. It is used in connectionless (udp) mode. If the timeout parameter is present, it will wait only timeout milliseconds for a packet to be received. On success it returns "packet" or "timeout" or "TNODATA".

id.rcvuderr
    Simply clear the error indication on a previously sent data unit. It is used in connectionless (udp) mode. On success it returns "UDERR" or "TNOUDERR".

FILES

/opt/psh/lib/tli
    Dynamically linked library protocol for TLI.

SEE ALSO
xpsh(1), psh(1), protolib(3).