I have sent in a fix for this already, but someone broke it again in
the last couple versions of the kernel. So, I sent in another fix about
five minutes ago, which I'm including below.
In particular, #include <linux/netdevice.h> is a bad idea. In fact,
I introduced that change when I first released arpd, but all of a sudden
the world started complaining that most C++ code (and even a bit of C
code) which requires if_arp.h no longer compiled. So, I just got rid
of the MAX_ADDR_SIZE constant and replaced it with the number 7. If
the size of MAC addresses ever changes, a whole lot more than if_arp.h
is going to break, so I'm not too worried about it.
Someone also removed the #include <linux/socket.h> from if_arp.h, which
is a bad idea, since that means users must include socket.h before if_arp.h
in their code, and order-dependent header files drive me nuts.
Jonathan
--- linux-1.3.89.orig/include/linux/if_arp.h Mon Apr 1 02:46:30 1996
+++ linux/include/linux/if_arp.h Tue Apr 16 08:55:19 1996
@@ -22,6 +22,8 @@
#ifndef _LINUX_IF_ARP_H
#define _LINUX_IF_ARP_H
+#include <linux/socket.h>
+
/* ARP protocol HARDWARE identifiers. */
#define ARPHRD_NETROM 0 /* from KA9Q: NET/ROM pseudo */
#define ARPHRD_ETHER 1 /* Ethernet 10Mbps */
@@ -116,7 +118,7 @@
unsigned short req; /* request type */
__u32 ip; /* ip address of entry */
__u32 mask; /* netmask - used for proxy */
- unsigned char ha[MAX_ADDR_LEN]; /* Hardware address */
+ unsigned char ha[7]; /* Hardware address */
unsigned long last_used; /* For expiry */
unsigned long last_updated; /* For expiry */
unsigned int flags; /* Control status */