|
|
|
|
|
X25/9000: X.25/9000 Programmer's Guide > Chapter 2 X.25 AddressingPreparing Address Variables |
|
All addressing information for both the client and server is contained in the x25addrstr structure. This structure is defined in the include file x25/ x25addrstr.h. It is used by the client in the connect() system call and by the server in the bind() system call. How the client and server use these calls is described in Chapter 3 “ Establishing and Terminating a Socket Connection” The x25addrstr structure consists of the following declarations:
x25_familySpecifies the address family and must be set to AF_CCITT, which is defined in the sys/socket.h include file. x25hostlenSpecifies the offset for the end of the numeric string in the X.121 address specified in the x25_host field described below. Range: 0 to 15 (including subaddress digits). x25pidlenSpecifies the offset for the end of the character string that describes the protocol ID data. This field is not used in connect() system calls; the protocol ID must be explicitly set in the user data field by the application. Range: 0 to 8. Set this field to 0 in a connect() system call or (if protocol IDs are not used) in your application. x25pid[8]Specifies the protocol ID data in a bind() system call. The protocol ID data is located in the call-user data field of the CALL INDICATION packet. See "Addressing Options for Servers" below. x25_host[16]Specifies a destination X.121 address in a connect() system call with a decimal string (digits 0-9). In a bind() system call, this field specifies the range of X.121 addresses that it will receive with a decimal string and (optionally) with wildcard characters ("?" and "*"). See "Addressing Options for Servers" below. This field may also include a subaddress. x25ifname[13]Specifies the name of the X.25 interface set during X.25 configuration. The null string ("\0") specifies the default interface in connect() and all interfaces in bind(). Range: 1 to 12 alphanumeric characters terminated by the null character ("\0"). Refer to the AF_CCITT(7F) entry in your man pages for more information on the x25addrstr structure. |
|||||||||||||||||||||||||||
|
|
|||||||||