SSS SSS - 3 months ago 47x
Linux Question

windows equivalent of inet_aton

I'm converting some code written for a linux system to a windows system. I'm using C++ for my windows system and wanted to know the equivalent of the function inet_aton.

caf caf

Windows supports inet_pton, which has a similar interface to inet_aton (but that works with IPV6 addresses too). Just supply AF_INET as the first parameter, and it will otherwise work like inet_aton.

(If you can change the Linux source, inet_pton will also work there).