summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorHanhui <sylixos@gmail.com>2019-04-11 08:25:22 (GMT)
committer Hanhui <sylixos@gmail.com>2019-04-11 08:25:22 (GMT)
commitef5e2afc77d28a74117b13cf6333026785dfdb3b (patch)
tree6c3eb466a54179cee4aaadcb79c6be6b9d1841bf
parenta83134c23dcc66ad1b1a7f2d6529e6c12ae473f3 (diff)
downloadlibpcap-ef5e2afc77d28a74117b13cf6333026785dfdb3b.zip
libpcap-ef5e2afc77d28a74117b13cf6333026785dfdb3b.tar.gz
libpcap-ef5e2afc77d28a74117b13cf6333026785dfdb3b.tar.bz2
Add SylixOS WiFi monitor support.
-rw-r--r--libpcap/pcap-linux.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpcap/pcap-linux.c b/libpcap/pcap-linux.c
index 653f090..2fa186a 100644
--- a/libpcap/pcap-linux.c
+++ b/libpcap/pcap-linux.c
@@ -137,6 +137,7 @@
#include <linux/sockios.h>
#else
#include <net/if.h>
+#include <net/if_hwaddr.h>
#include <netpacket/packet.h>
#endif
#include <netinet/in.h>
@@ -6618,7 +6619,11 @@ iface_get_arptype(int fd, const char *device, char *ebuf)
return PCAP_ERROR;
}
+#ifndef SYLIXOS
return ifr.ifr_hwaddr.sa_family;
+#else /* !SYLIXOS */
+ return HALTYPE_FROM_SA(&ifr.ifr_hwaddr);
+#endif /* SYLIXOS */
}
#ifdef SO_ATTACH_FILTER