HPlogo DTC Device File Access Utilities and Telnet Port Identification: HP 9000 Computers > Chapter 2 Overview of DDFA And Telnet Port Identification

Setting Up Outgoing and Incoming Connections

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

A print job sent from the system to a printer creates an outgoing connection. When a user logs in at a terminal on a DTC and receives a system prompt from the host to complete the login, an incoming connection is created. Both operations require the use of a device file name.

Whenever an application on the host needs to access a MUX device, the application can read and write to the tty device file that belongs to the MUX device. However, if an application wants to open a DTC device, difficulties arise, since no pty device file is assigned before the connection to the device is established. DDFA makes this connection setup process transparent to the application. All the application needs to do is to issue standard HP-UX open(), read(), write(), close() and ioctl() calls to the known pty.

Whenever a MUX-connected terminal logs onto a system, the device file associated with the session is always the same. The user can find out what MUX port the terminal is connected to by typing the tty command . In the example below, the device file name is shown to be /dev/tty2p3 for MUX card 2, port 3.

tty

/dev/tty2p3

The Telnet daemon (telnetd) assigns a pty to the connection when a user logs into the system from a terminal on a DTC. The pty device files refer to logical devices, and the Telnet daemon selects them randomly from the pool of free ptys in the /dev directory and its subdirectories. Even though you can use the HP-UX who or tty command to find the name of the device file associated with your Telnet session, the result does not show which DTC port is yours. The assigned pty is different each time you login, even from the same terminal.

Figure 2-2 illustrates the system and DTC interaction on an incoming connection with Telnet port identification. When the system accepts an incoming Telnet connection, it asks the calling DTC to give it the board and port numbers of the DTC port. If a mapping between the DTC port and a pty device file was defined in the /etc/ddfa/dp file, then the defined pty device file is used to service the incoming connection.

Figure 2-2 Incoming Connection Using Telnet Port Identification

[Incoming Connection Using Telnet Port Identification]