HP X.25/9000 Programmer's Guide

14 Chapter2
X.25 Addressing
Addressing Options for Clients
Addressing Options for Clients
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 in the x25addrstr structure used in a connect() system call
are shown below.
x25_family Specifies the address family and must be set to AF_CCITT (as defined in
the sys/socket.h include file).
x25hostlen Specifies the number of Binary Coded Decimal (BCD) digits in the X.121
address including the subaddress specified in the
x25_host
field (range:
0 to 15).
x25pidlen This field is not used and should be set to 0.
x25pid[8] This field is not used and should be set to the null string (“\0”). If a
protocol ID must be specified, set this field using the
ioctl(X25_WR_USER_DATA) call.
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 (set during X.25 configuration). Range: 1 to 12 alphanumeric
characters terminated by the null string (“\0”). To use the default
interface, specify only the null string (“\0”). If the local host has more
than one interface with equal connectivity, the client can select the
interface offering the best throughput and response time.
36960-90061.bk Page 14 Friday, November 10, 2000 3:42 PM