Utility routines exist for converting from string representations of IP and Ethernet addresses to their structural counterparts and vice-versa.
Returns a pointer to a string with a ``dotted-decimal'' representation of IP host host (e.g., ``192.12.69.1''). This string is in a static buffer, so it must be copied if its value is to be preserved.
char *ipHostStr(IPhost *host)
Interprets str as a ``dotted-decimal'' representation of an IP host and assigns the fields of host accordingly. The operation fails if str does not seem to be in dotted-decimal form.
XkReturn str2ipHost(IPhost *host, char *str)
Returns a pointer to a string with a representation of Ethernet host host (e.g., ``8:0:2b:ef:23:11''). This string is in a static buffer, so it must be copied if its value is to be preserved.
char *ethHostStr(ETHhost *host)
Interprets str as a six-hex-digit-colon-separated representation of an Ethernet host and assigns the fields of host accordingly. The operation fails if str does not seem to be in the correct format.
XkReturn str2ethHost(ETHhost *host, char *str)