diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-06-25 21:35:49 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-06-25 21:35:49 -0400 |
commit | e40f48a421a9176e3e298b5bac75f0355b219e58 (patch) | |
tree | 23255d3b92b410810a16eb5fd5853e3fe62bf05e /src/network/inet_network.c | |
parent | 83966b369d2fa105a58a35830f75662e18273965 (diff) | |
download | musl-e40f48a421a9176e3e298b5bac75f0355b219e58.tar.gz musl-e40f48a421a9176e3e298b5bac75f0355b219e58.tar.xz musl-e40f48a421a9176e3e298b5bac75f0355b219e58.zip |
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.
Diffstat (limited to 'src/network/inet_network.c')
-rw-r--r-- | src/network/inet_network.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/network/inet_network.c b/src/network/inet_network.c deleted file mode 100644 index ae60d7f6..00000000 --- a/src/network/inet_network.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include "__dns.h" - -in_addr_t inet_network(const char *p) -{ - struct sockaddr_in sin; - if (__ipparse(&sin, AF_INET, p)) return -1; - return ntohl(sin.sin_addr.s_addr); -} |