t_open --
establish a transport endpoint connected to a transport provider
Synopsis
#include "ipx_app.h"
int t_open(
char *ipxPath,
int oflag,
struct t_info *ipxInfo )
Parameters
(IN) ipxPath
Passes a pointer to the path of the IPX driver.
The path on most systems is /dev/ipx.
(IN) oflag
Passes the option flags for the opened stream.
(IN) ipxInfo
Passes the address of a t_info structure. See below for the format of the structure.
(OUT) ipxInfo
Receives the initialized t_info structure. See below for the format of the structure.
Return values
>0
Successful
-1
Unsuccessful
If the t_open call is successful, it returns a file descriptor that
identifies the local transport endpoint.
Refer to
t_open(3xti)
for any errors that occur.
Remarks
The t_open function creates a local transport endpoint and returns protocol-specific information associated with that endpoint. It also returns a file descriptor that serves as the local identifier of the endpoint.
The t_open function returns a TLI information structure upon the successful return of an open. The t_info structure contains the following information about IPX:
IPX Information in the t_info Structure
Field
Value
Description
addr
12 (bytes)
This is the number of bytes required for an IPX address,
which consists of three components: network address (4 bytes), node
address (6 bytes), socket number (2 bytes).
options
3 (bytes)
This is the maximum number of bytes in an options buffer.
tsdu
n
Size in bytes of a LAN's maximum transport service data unit.
If connected to more than one LAN, the smallest value is returned.
etsdu
-2
Not supported
connect
-2
Not supported
discon
-2
Not supported
servtype
T_CLTS
The service type for IPX is always T_CLTS
(connectionless mode service).
The t_optmgmt function cannot be used to negotiate any of the values listed above.
The tsdu value can be obtained for a specific LAN by using the t_getinfo call after the endpoint has been bound using t_bind.
Examples
int ipxFd;
char *ipxPath = "/dev/ipx";
struct t_info ipxInfo;
if ((ipxFd=t_open(ipxPath,O_RDWR,&ipxInfo))<0) {
t_error( "t_open failed");
...
}