28 V5 TCP/IP Applications on the IBM Eserver iSeries Server
from 172.23.10.* and a virtual device name that starts with GERMANY for all
connections from 172.23.11.*
– To ensure that virtual devices starting with SPAIN and starting with GERMANY go into
subsystems SPAIN and GERMANY respectively, the workstation entries are set up as
ADDWSE SBSD(QINTER) WRKSTN(SPAIN*) AT(*ENTER)
ADDWSE SBSD(QINTER) WRKSTN(GERMANY*) AT(*ENTER)
ADDWSE SBSD(SPAIN) WRKSTN(SPAIN*) AT(*SIGNON)
ADDWSE SBSD(GERMANY) WRKSTN(GERMANY*) AT(*SIGNON)
This scenario, and the complete instructions for configuration can be found at:
Select Geographic Location -> Language/Release. In the navigation window (left panel)
select Networking -> TCP/IP -> Telnet -> Manage the Telnet server -> Use Telnet exit
point programs. In the window on the right select Sample Telnet exit programs. This
page contains a description of the sample programs that are available. If you scroll down
to the bottom of the page you will find instructions to download the sample files named
telnet.zip and telnet.savf.
2.4 Telnet device initialization and termination exit points
An exit point is a specific point in the TCP/IP application program where control may be
passed to an exit program for customized processing.
The Telnet server exit point processing flow shown in Figure 2-4 consists of the following:
1. TCP/IP application passes request parameters to the exit program
2. The exit program processes request parameters
3. The exit program returns information to the TCP/IP application
4. The TCP/IP application performs an operation based on the exit program response.
Figure 2-4 iSeries Telnet exit point processing
The iSeries Telnet server application now has exit points in its session initialization and
termination logic. They are respectively:
QIBM_QTG_DEVINIT (Exit Point Format is INIT0100)
QIBM_QTG_DEVTERM (Exit Point Format is TERM0100)
iSeries Telnet server code
Chapter 2. Telnet on the iSeries 29
When a Telnet client attempts to connect to the Telnet server, any exit program registered to
the QIBM_QTG_DEVINIT exit point is triggered.
The QIBM_QTG_DEVTERM exit point occurs when a Telnet client ends the Telnet session.
When the iSeries Telnet server executes the exit program, control is transferred through the
exit point to the exit program. After the exit program has performed its tasks, it transfers
control back to the iSeries Telnet server. The return parameters are used by the exit program
to direct the Telnet server to perform some action (for example, the exit program may tell the
iSeries Telnet server which virtual device has to be assigned to a specific session).
The exit points give the exit programs full control over connections. The exit points allow them
to determine whether a specific user is allowed to connect, which virtual device is allocated,
whether the user can bypass the OS/400 sign-on panel, and so on.
For a complete description of the QIBM _QTG_DEVINIT exit point format INIT0100 and the
QIBM_QTG_DEVTERM exit point format TERM0100, refer to Section 5.1.7 in the redbook V4
TCP/IP for AS/400: More Cool Things Than Ever, SG24-5190, or online at:
Select the appropriate geography -> Language and version -> Networking -> TCP/IP
-> Telnet -> Manage the Telnet server -> Use Telnet exit point programs
2.4.1 Registering an exit program
Once you have created your exit program, you must tell the Telnet server the name of the
program and the library in which it is located. You do this by using the Work with Registration
Information (WRKREGINF) or Add Exit Program (ADDEXITPGM) commands (the
parameters are similar).
In order to register an exit program for exit point QIBM_QTG_DEVINIT, follow these steps:
1. Issue the command:
WRKREGINF EXITPNT(QIBM_QTG_DEV*) FORMAT(*ALL)
2. You get a screen as shown in Figure 2-1 where you find the Telnet Device Initialization and
the Telnet Device Termination Exit Points.
Figure 2-5 WRKREGINF command output
Work with Registration Information
Type options, press Enter.
5=Display exit point 8=Work with exit programs
Opt Point Format Registered Text
8 QIBM_QTG_DEVINIT INIT0100 *YES Telnet Device Initialization
QIBM_QTG_DEVTERM TERM0100 *YES Telnet Device Termination
F3=Exit F4=Prompt F9=Retrieve F12=Cancel