× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Host name associated with an IP address
  • From: "Scott Klement" <infosys@xxxxxxxxxxxx>
  • Date: 17 Dec 1999 18:51:02 -0600

To get a host name associated with an IP Address, you probably want
to use the gethostbyaddr API from the Sockets (Unix-Type) API stuff.

Likewise, you can use the gethostbyname API to get the IP address,
or alternate host names for a given host name.

Can you do it in an RPG/400 program? No. But you CAN do it in RPG IV
(ILE RPG/400) if you're familiar with the basics of converting C
prototypes and data structures to RPG :)

It'd be pretty much impossible to do in CL (even ILE CL) because of
the pointer logic thats involved.  So, I'd really recommend either
using RPG IV or ILE C/400.

If you'd like an example in RPG IV, let me know...



"Silvio Santos" <Silvio.Santos@brainag.com> wrote:
>
> Hi!
> Its possible to know the host name associated with an IP address, in
>  CL or an RPG/400 pgm ?
> Is there any API that can do this ?
>
> Any help would be great.
>
> TIA,
>
> Silvio.
>

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.