API for looking up server name based on IP?

Primary tabs

ObjectScript, Caché

Does anyone know of an API that will do a hostname look-up based on IP?  We could of course use call-out but the format of the results vary based on OS and if there is already an ObjectScript tool which will parse this then we'd rather use what is already available.

Thanks!
Ben

  • 0
  • 0
  • 87
  • 3
  • 1

Answers

Ben

Check %SYSTEM.INetInfo.   I think it probably contains a method to serve your purpose 

 

 

@Jenna Poindexter   this is correct
though the result might be disappointing.
 
See: >ping www.intersystems.com

Antwort von 172.227.166.122: Bytes=32 Zeit=22ms TTL=55

But:

USER>w $system.INetInfo.AddrToHostName($C(172,227,166,122))
a172-227-166-122.deploy.static.akamaitechnologies.com
USER>

 


 

Despite being disappointing, this is actually a correct result - you would get the same with OS level tools