summaryrefslogtreecommitdiff
path: root/dev.h
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2016-01-26 22:25:00 +0200
committerTobias Klauser <tklauser@distanz.ch>2016-01-28 16:04:47 +0100
commitb5100e276763a03c255dd1e7a4147c55c901419c (patch)
treecdd4cfd2915d4ce04ca2d6cd494b2264635dc1b4 /dev.h
parente476a36e65cd8508c6473a19e497fb04487e2214 (diff)
dev: Add function to get device hardware address
Add device_hw_address() function to get device MAC address. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> [tk: Add len parameter and error out on too short buffers] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'dev.h')
-rw-r--r--dev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/dev.h b/dev.h
index a9e4ccf..06e51d2 100644
--- a/dev.h
+++ b/dev.h
@@ -7,6 +7,7 @@
extern size_t device_mtu(const char *ifname);
extern int device_address(const char *ifname, int af, struct sockaddr_storage *ss);
extern int __device_ifindex(const char *ifname);
+extern int device_hw_address(const char *ifname, uint8_t *addr, size_t len);
extern int device_ifindex(const char *ifname);
extern int device_type(const char *ifname);
extern short device_get_flags(const char *ifname);