API for looking up server name based on IP?
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
Ben
Check %SYSTEM.INetInfo. I think it probably contains a method to serve your purpose
@Kenneth.Poindexter8571 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>
Unfortunately name <-> IP aren't always one to one
Despite being disappointing, this is actually a correct result - you would get the same with OS level tools