implement inet_lnaof, inet_netof, and inet_makeaddr

also move all legacy inet_* functions into a single file to avoid
wasting object file and compile time overhead on them.

the added functions are legacy interfaces for working with classful
ipv4 network addresses. they have no modern usefulness whatsoever, but
some programs unconditionally use them anyway, and they're tiny.
This commit is contained in:
Rich Felker
2013-06-25 21:35:49 -04:00
parent 83966b369d
commit e40f48a421
6 changed files with 59 additions and 40 deletions

View File

@ -1,7 +0,0 @@
#include <sys/socket.h>
#include <arpa/inet.h>
int inet_aton(const char *cp, struct in_addr *inp)
{
return inet_pton(AF_INET, cp, (void *)inp) > 0;
}