blob: 5a897e09582fc71ec7856d810ee2817ccc25cf09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
$NetBSD: patch-ac,v 1.3 2016/04/18 08:34:35 leot Exp $
--- arp.c.orig 2000-11-14 15:51:03.000000000 +0000
+++ arp.c
@@ -17,7 +17,7 @@
#include <sys/sysctl.h>
#include <net/if_dl.h>
#include <net/route.h>
-#ifdef __FreeBSD__ /* XXX */
+#if defined(__FreeBSD__) || defined(__DragonFly__) /* XXX */
#define ether_addr_octet octet
#endif
#else /* !BSD */
@@ -32,6 +32,7 @@
#include <netinet/if_ether.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#ifdef BSD
@@ -51,7 +52,11 @@ arp_cache_lookup(in_addr_t ip, struct et
mib[2] = 0;
mib[3] = AF_INET;
mib[4] = NET_RT_FLAGS;
+#ifdef RTF_LLDATA
+ mib[5] = RTF_LLDATA;
+#else
mib[5] = RTF_LLINFO;
+#endif
if (sysctl(mib, 6, NULL, &len, NULL, 0) < 0)
return (-1);
|