about summary refs log tree commit diff
path: root/include/netinet/ether.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-06-25 21:15:27 -0400
committerRich Felker <dalias@aerifal.cx>2013-06-25 21:15:27 -0400
commit83966b369d2fa105a58a35830f75662e18273965 (patch)
tree73d3648ede6d3427c23efeaa2f026400c652de92 /include/netinet/ether.h
parentef5507867b59d19f21437970e87b5d0415c07b2e (diff)
downloadmusl-83966b369d2fa105a58a35830f75662e18273965.tar.gz
musl-83966b369d2fa105a58a35830f75662e18273965.tar.xz
musl-83966b369d2fa105a58a35830f75662e18273965.zip
add ether_aton[_r] and ether_ntoa[_r] functions
based on patch by Strake with minor stylistic changes, and combined
into a single file. this patch remained open for a long time due to
some question as to whether ether_aton would be better implemented in
terms of sscanf, and it's time something was committed, so here it is.
Diffstat (limited to 'include/netinet/ether.h')
-rw-r--r--include/netinet/ether.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/netinet/ether.h b/include/netinet/ether.h
new file mode 100644
index 00000000..c5179d5e
--- /dev/null
+++ b/include/netinet/ether.h
@@ -0,0 +1,14 @@
+#ifndef _NETINET_ETHER_H
+#define _NETINET_ETHER_H
+
+#include <netinet/if_ether.h>
+
+char *ether_ntoa (const struct ether_addr *);
+
+struct ether_addr *ether_aton (const char *);
+
+char *ether_ntoa_r (const struct ether_addr *, char *);
+
+struct ether_addr *ether_aton_r (const char *, struct ether_addr *);
+
+#endif