The
client process specifies the address to which it wants to connect
an SVC. The client uses the x25addrstr
structure in the connect()
system call to specify most of the addressing information. If protocol
IDs are used for call matching, the client process will also use
ioctl(X25_WR_USER_DATA).
In general clients have no real addressing options. The client
must specify the addressing information that the network and server
need to connect and handle the call properly. This information must
be obtained from some authority for the server's host, such as the
application designer or the system administrator.
The fields employed in the x25addrstr
structure when a connect()
system call is used are given below.
x25_family
Specifies the address family and must be set to AF_CCITT,
which is defined in the sys/socket.h
include file.
x25hostlen
Specifies the number of BCD digits in the X.121 address including
the subaddress specified in the x25_host field.
Range: 0 to 15.
x25pidlen
Is not used and should be set to 0.
x25pid[8]
Is not used and should be set to the null string ("\0").
If a protocol ID must be specified, the ioctl(X25_WR_USER_DATA)
must be used.
x25_host[16]
Contains a character string of decimal digits (0-9) representing
the remote host's X.121 address and subaddress if any.
x25ifname[13]
Specifies the name of the local X.25 interface to be used
when sending a call request. The interface name is set during X.25
configuration. Specify the null string ("\0")
to use the default interface. Range: 1 to
12 alphanumeric characters terminated by the null character ("\0").
If the local host has more than one interface with equal connectivity
the client may choose between them for reasons of throughput and
response time.