path: root/src/network/inet_ntoa.c
diff options
authorRich Felker <>2013-06-25 21:35:49 -0400
committerRich Felker <>2013-06-25 21:35:49 -0400
commite40f48a421a9176e3e298b5bac75f0355b219e58 (patch)
tree23255d3b92b410810a16eb5fd5853e3fe62bf05e /src/network/inet_ntoa.c
parent83966b369d2fa105a58a35830f75662e18273965 (diff)
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_ntoa.c')
1 files changed, 0 insertions, 10 deletions
diff --git a/src/network/inet_ntoa.c b/src/network/inet_ntoa.c
deleted file mode 100644
index 71411e0b..00000000
--- a/src/network/inet_ntoa.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <arpa/inet.h>
-#include <stdio.h>
-char *inet_ntoa(struct in_addr in)
- static char buf[16];
- unsigned char *a = (void *)&in;
- snprintf(buf, sizeof buf, "%d.%d.%d.%d", a[0], a[1], a[2], a[3]);
- return buf;