Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

t_getinfo() - get protocol-specific information

&pagelevel(4)&pagelevel

#include <xti.h>

int t_getinfo(int fd, struct t_info *info);

Description

The t_getinfo() function supplies the user with information about the current characteristics of the underlying transport protocol bound to transport endpoint (file descriptor) fdt_getinfo() returns the same information in the t_info structure, to which the info parameter points, that was returned by t_open() when transport endpoint fd was set up. This allows the user to access the information supplied by t_open() at any time with t_getinfo().

The t_info structure, to which the info parameter points, is declared in <xti.h> as follows:

struct t_info {
  long addr;     /* Maximum length of the transport protocol address */
  long options;  /* Maximum number of bytes of the protocol-specific options */
  long tsdu;     /* Maximum size of a data packet (TSDU) */
  long etsdu;    /* Maximum size of a packet for expedited data (ETSDU) */
  long connect;  /* Maximum amount of data allowed for connection setup function */
  long discon;   /* Maximum amount of data allowed for t_snddis() and t_rcvdis() */
  long servtype; /* Service type offered by the transport provider */
  long flags;    /* Other transport provider information /*
};

The values of the t_info components have the following meaning:

addr

A value ≥ 0 defines the maximum length of a transport protocol address. The value -1 indicates that the address length is unlimited. The value -2 indicates that the transport provider does not support user accesses to the transport protocol address.

options

A value ≥ 0 defines the maximum length in bytes that the transport provider supports for protocol-specific options. The value -1 indicates that the length of the options is unlimited. The value  -2 indicates that the transport provider does not support options that can be influenced by the user.

tsdu

A value > 0 defines the maximum length of a transport service data unit (TSDU). The value 0 indicates that the transport provider does not support the TSDU concept although he does offer sending a data stream over the connection without maintaining logical block limits. The value -1 indicates that the length of a TSDU is unlimited. The value -2 indicates that the transport provider does not support transferring normal data.

etsdu

A value > 0 defines the maximum length of an expedited transport service data unit (ETSDU). The value 0 indicates that the transport provider does not support the ETSDU concept although he does offer sending a data stream over the connection without maintaining logical block limits. The value -1 indicates that the length of an ETSDU is unlimited. The value -2 indicates that the transport provider does not support transferring expedited data.

connect

A value ≥ 0 defines the maximum amount of data that can be sent with connection setup functions. The value -1 indicates that the amount of data that can be sent during connection setup is unlimited. The value -2 indicates that the transport provider does not support sending data with connection setup functions.

discon

A value ≥ 0 defines the maximum amount of data that can be sent with the t_snddis() and t_rcvdis() functions. The value -1 indicates that the amount of data that can be sent with connection shutdown functions is unlimited. The value -2 indicates that the transport provider does not support sending data with connection shutdown functions.

servtype

This component specifies the service type supported by the transport provider (see following page).

flags

This field specifies other transport provider information (no information is currently supplied).

If the transport service user wishes to be independent of protocols, he can use the above values to determine the size of buffers required for storing the separate pieces of information. The user can also alternatively call the t_alloc() function to reserve memory for these buffers. An error occurs if a user exceeds the permissible limits with an XTI function call.
The values stored in the separate t_info components can be changed as a result of option negotiation (with t_optmgmt()). The user can get information on the current characteristics with the t_getinfo() function.

After t_getinfo() is executed, the info->servtype component contains one of the following values:

T_COTS_ORD

The transport provider supports a connection-oriented service with an optional orderly connection shutdown. t_getinfo() returns the value -2 for etsdu, connect and discon for this service type.

T_CLTS

The transport provider supports a connectionless service. t_getinfo() returns the value -2 for etsdu, connect and discon for this service type.

Return value

0:

If successful.

-1:

If an error occurs. t_ errno is set to indicate the error.

Errors

TBADF

The specified file descriptor does not reference a transport endpoint.

TSYSERR

A system error occurred during execution of this function.

See also

t_open()