× 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: "Silvio Santos" <Silvio.Santos@xxxxxxxxxxx>
  • Date: Sat, 18 Dec 1999 17:22:29 +0000



Hi Scott it would be great if you give me an example so I can call it from
RPG/400,
Thanks,

Silvio.







"Scott Klement" <infosys@klements.com> on 12/18/99 12:51:02 AM

Please respond to RPG400-L@midrange.com
                                                              
                                                              
                                                              
  To:          RPG400-L@midrange.com                          
                                                              
  cc:          (bcc: Silvio Santos/VC/PT/BRAIN)               
                                                              
                                                              
                                                              
  Subject      Re: Host name associated with an IP address    
  :                                                           
                                                              







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
+---



+---
| 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.