aboutsummaryrefslogtreecommitdiff
path: root/include/arpa/inet.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-06-25 21:35:49 -0400
committerRich Felker <dalias@aerifal.cx>2013-06-25 21:35:49 -0400
commite40f48a421a9176e3e298b5bac75f0355b219e58 (patch)
tree23255d3b92b410810a16eb5fd5853e3fe62bf05e /include/arpa/inet.h
parent83966b369d2fa105a58a35830f75662e18273965 (diff)
downloadmusl-e40f48a421a9176e3e298b5bac75f0355b219e58.zip
musl-e40f48a421a9176e3e298b5bac75f0355b219e58.tar.gz
musl-e40f48a421a9176e3e298b5bac75f0355b219e58.tar.bz2
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 'include/arpa/inet.h')
-rw-r--r--include/arpa/inet.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/arpa/inet.h b/include/arpa/inet.h
index fdc501a..e47a41f 100644
--- a/include/arpa/inet.h
+++ b/include/arpa/inet.h
@@ -29,7 +29,10 @@ char *inet_ntoa (struct in_addr);
int inet_pton (int, const char *__restrict, void *__restrict);
const char *inet_ntop (int, const void *__restrict, char *__restrict, socklen_t);
-int inet_aton (const char *, struct in_addr *); /* nonstandard but widely used */
+int inet_aton (const char *, struct in_addr *);
+struct in_addr inet_makeaddr(int, int);
+in_addr_t inet_lnaof(struct in_addr);
+in_addr_t inet_netof(struct in_addr);
#undef INET_ADDRSTRLEN
#undef INET6_ADDRSTRLEN