SyntaxFix
Write A Post
Hire A Developer
Questions
To convert string to in-addr:
in_addr maskAddr; inet_aton(netMaskStr, &maskAddr);
To convert in_addr to string:
char saddr[INET_ADDRSTRLEN]; inet_ntop(AF_INET, &inaddr, saddr, INET_ADDRSTRLEN);