HP X.25/9000 Programmer's Guide

Chapter 2 15
X.25 Addressing
Addressing Options for Servers
Addressing Options for Servers
A server uses the X.25 socket address information to identify which calls
it will process. Each server uses the bind(2) system call to define the
addressing information for calls it will process. The bind() system call is
described in Chapter 3 , “Establishing and Terminating a Socket
Connection,” and in your HP-UX man pages.
The discussion of incoming call-matching methods includes:
Call-matching by interface name. An X.25 interface name is specified
in the
x25ifname[]
field of the x25addrstr structure. Only calls
arriving over that interface can be connected to the socket.
Call-matching by called X.121 address. The called address (with
wildcards) is stored in the
x25_host
field of the x25addrstr
structure. Only calls with the specified called address (or matching
wildcard address) can be connected to the socket.
Call-matching by called X.121 address and a subaddress. The
subaddress is stored in the
x25_host
field of the x25addrstr
structure. Only calls with the specified called address (or matching
wildcard address) and subaddress can be connected to the socket.
Call-matching by protocol ID. The protocol ID is set in the
x25_pid[]
field of the x25addrstr structure. Only calls with the correct protocol
ID can be connected.
Addressing conflicts in bind() calls.
When a CALL REQUEST packet arrives, three tests are performed to
attempt to match the call to a listen socket:
The name of the local interface over which the call arrived is matched
against the
x25ifname
field specified in the bind().
The called address field is matched against the
x25_host
field
specified in the bind().
The first bytes of the user data field in the CALL REQUEST packet
are matched against the
x25pid
field specified in the bind().
If all of these tests succeed, the call is connected to the socket. If the
incoming call does not match with any of the specified addresses, the call
is cleared.
36960-90061.bk Page 15 Friday, November 10, 2000 3:42 PM