how to get domain name of an IP address in c++ -


how can domain name ip address in c++? there sites available in online that. need find out in c++ application. there apis that. found there ways available ip address domain name when googled. looking reverse of that..

that depend on particular networking library use. if have way determine ip name, use same way, name 4.3.2.1.in-addr.arpa figure out what's name ip address 1.2.3.4 (note reversed order in name). libraries allow automatically without bothering making weird name.

in qt, example, this:

printf("%s\n", qprintable(qhostinfo::fromname("188.35.142.38").hostname())); 

this prints cache.google.com.

but since don't specify library use, it's hard more. need read documentation figure out how reverse dns lookups there. it's performed same function in example above (fromname accepts both addresses , names).


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -