summaryrefslogtreecommitdiff
path: root/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'dev.c')
-rw-r--r--dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dev.c b/dev.c
index f109a61..3fafbde 100644
--- a/dev.c
+++ b/dev.c
@@ -2,6 +2,8 @@
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/socket.h>
+#include <linux/if_arp.h>
#include <ifaddrs.h>
#include "dev.h"
@@ -40,7 +42,7 @@ int device_type(const char *ifname)
struct ifreq ifr;
if (!strncmp("any", ifname, strlen("any")))
- return 0;
+ return ARPHRD_ETHER;
sock = af_socket(AF_INET);