Content-type: text/html
const char *atoaddr(const char *src, size_t srclen,
struct in_addr *addr);
size_t addrtoa(struct in_addr addr, int format,
char *dst, size_t dstlen);
const char *atosubnet(const char *src, size_t srclen,
struct in_addr *addr, struct in_addr *mask);
size_t subnettoa(struct in_addr addr, struct in_addr mask,
int format, char *dst, size_t dstlen);
Atoaddr converts an ASCII name or dotted-decimal address into a binary address (in network byte order). Addrtoa does the reverse conversion, back to an ASCII dotted-decimal address. Atosubnet and subnettoa do likewise for the ``address/mask'' ASCII form used to write a specification of a subnet.
An address is specified in ASCII as a dotted-decimal address (e.g. 1.2.3.4), an eight-digit network-order hexadecimal number with the usual C prefix (e.g. 0x01020304, which is synonymous with 1.2.3.4), an eight-digit hostnce from interoperability tests. See our interop document. When twenty products all claim to implement 3DES, and they all talk to each other, you can be fairly sure they have it right. Of course, you might wonder whether all the implementers are consipring to trick you or, more plausibly, whether some implementations might have "back doors" so they can get also it wrong when required.. If you're seriously worried about things like that, you need to get the code you use audited (good luck if it is not Open Source), or perhaps to talk to a psychiatrist about treatments for paranoia.
Additional information on testing can be found in these mailing list messages: