• Subject: Retrieve Dynamic IP Addresses via the QDCRDEVD API
  • From: Jeffrey Stevens <jssteven@xxxxxxxxxx>
  • Date: Wed, 22 Oct 1997 08:53:47 -0400

Is there any interest in this kind of information?  It was published in
NEWS/400...they have a link to the code.  It's under

I should mention, the following is only one possiblity when retrieving the IP
address, you can do other things like switch your interactive job to another
subsystem, etc.

Retrieve Dynamic IP Addresses via the QDCRDEVD API
by Jeff Stevens

AS/400 TCP/IP now supplies essential application print support to help control
and direct printing over TCP/IP networks.  This support is supplied in an
enhancement to the Retrieve Device Description (QDCRDEVD) API that lets
applications retrieve IP addresses of Telnet clients.

The QDCRDEVD API now supports additional fields for Telnet devices, such as
IBM's Network Station and other types of display devices.  Thus, you can use
the API to retrieve a Telnet display device description, which includes the IP
address, to direct printing to a particular device for that client.

To use the new fields, you must add them to the existing record format
DEVD0600, which indicates a display device.  The table in Figure 1 lists the
new fields, formats, and descriptions.  These new fields can also be seen in
the DEVD0600_t structure in the code example.  You also must apply the
following PTFs, depending on the OS/400 release you use (PTFs will be included
in the base code for subsequent releases):

PTF's Required
5763TC1:  SF38885
5763SS1:  SF38876, SF38688, SF38886
(PTF Cover letter SF38876 describes API field offsets)

5763TC1: SF38535
5763SS1: SF37172, SF38357, SF38536
(PTF cover letter SF38565 describes API field offsets)

Sample Program
I've written a C program - QRMTWTR.C - that shows how to use the QDCRDEVD API
Telnet enhancements to let a Telnet client set the queue and IP address of the
default print output queue based on the client's IP address.

Jeff Stevens - AS/400 TCP/IP Applications (LPD/WSG/Telnet)
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| Questions should be directed to the list owner/operator: david@midrange.com

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].