TCP/IP Programming Manual
LISTNER Process
The LISTNER process functions as a “super server” for some application servers provided by HP
(such as the FTP server). LISTNER invokes the appropriate NonStop server as connection requests
for services are received on well-known TCP ports (in the default configuration). These services do
not apply to UDP ports. The use of a single super server—in this case, the LISTNER process—to
invoke several other servers, effectively reduces the load on the system.
To use the LISTNER process, you must configure the PORTCONF file and start the LISTNER process.
The PORTCONF file defines the servers to be invoked when a request comes in from another system
on the Internet. Once started, LISTNER reads the SERVICES file to resolve the services configured
in the PORTCONF file. (The SERVICES file is provided with the NonStop TCP/IP, Parallel Library
TCP/IP, NonStop TCP/IPv6, and CIP software.) LISTNER checks that the service name and
corresponding port are valid.
You can configure the SERVICES and PORTCONF files using port numbers other than the well-known
port numbers for the services. For information about configuring and starting the LISTNER process,
see the TCP/IP Applications and Utilities User Guide.
Once the accuracy of the PORTCONF file contents is verified by using the SERVICES file, LISTNER
“listens” to the configured ports that are waiting for incoming connection requests from the remote
client. The TCP/IP process notifies the LISTNER process when a request is pending.
When the LISTNER process receives the notification, it starts the server targeted by the request.
The target server creates a socket using host-name and source-port information, then accepts the
pending connection request on the newly created socket.
Data can be transferred between the NonStop target server and the remote client through the newly
created socket until either the remote client or the target server terminates the connection.
Port Numbers
Both TCP and UDP use a 16-bit port number to select a socket on the host. Client programs normally
use more or less random port numbers; however, specific port numbers—called well-known
ports—are assigned for use by server programs.
Each well-known port is associated with a specific service. A client requesting a particular service
(such as file transfer) specifies as the destination port the port associated with that particular service.
The server program monitors that port for file-transfer requests. The well-known port numbers for
TCP and UDP are listed in Appendix A (page 241) in this manual.
In TCP, the combined remote IP address, remote port number, local IP address, and local port
number uniquely identify a connection. In UDP, the same four parameters identify a temporary
source and destination. These four parameters are part of every TCP or UDP packet that passes
over the Internet.
Each separate session must have a unique combination of these four parameters. However, any
three of the parameters can be the same as long as the fourth is different. For instance, two different
applications on the same host can send files at the same time to another host, which can also be
the same, as follows:
IP Addresses Port Numbers
(source, destination) (source, destination)
Session 1 122.1.7.19, 101.3.5.2 1281, 21
Session 2 122.1.7.19, 101.3.5.2 1282, 21
Because the same host systems are involved, the IP addresses are the same. Because both sessions
are file transfers, one end of both sessions involves the well-known FTP port number 21 (for the
file-transfer service). The only difference in the two sessions lies in the port numbers for the
applications requesting the service.
TCP/IP Programming Fundamentals 31