I'm making a C++ wrapper for the standard C BSD sockets. In my object's "connect" function, I have a "host string" that can be either a host name or an ip address. Is there any C function, or any method, of determining if the string follows IP addressing format. I do *not* want to use any regex library or anything of that sort, as it adds unneeded bloat and complication. However, string parsing is nasty in C / C++ and I'd rather not write my own implementation either.
Find out if a string is an IP address or host name
Collapse
X
Comment