For V4R5 and above, is there any way to retrieve the Telnet port for a device WITHOUT using a Telnet exit program? The API QDCRDEVD does not seem to provide that information, though it CAN provide the IP address.
Not as far as I know. The port used on the local system may not be the same port used on the remote system. In addition, the remote IP may only be the IP of a firewall if the firewall masks the remote IP address. As a result, the remote port would not be available at all. The local port would be a telnet port.
- For V5R1 there are new API's that can do what you want. Click here, for more information.
I have used (with some help from the 400 community) the QtocLstNetCnn and QtocRtvNetCnnDta. These two API's return data that the NETSTAT command uses. I am finishing up some modifications to the freeware SHOWIP program I wrote many years ago. Take advantage of these API's. — Bryan Dietz
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Dig Deeper on RPG iSeries programming
Related Q&A from John Brandt
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.