]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/if_arp.h
[VLAN]: Turn __constant_htons into htons where possible
[linux-2.6-omap-h63xx.git] / include / linux / if_arp.h
index a8b1a2071838f70794fc7605b0b44f5def7f44d4..296e8e86e91d1c33052ea2b27ad3b1d8f86895db 100644 (file)
@@ -52,6 +52,7 @@
 #define ARPHRD_ROSE    270
 #define ARPHRD_X25     271             /* CCITT X.25                   */
 #define ARPHRD_HWX25   272             /* Boards with X.25 in firmware */
+#define ARPHRD_CAN     280             /* Controller Area Network      */
 #define ARPHRD_PPP     512
 #define ARPHRD_CISCO   513             /* Cisco HDLC                   */
 #define ARPHRD_HDLC    ARPHRD_CISCO
@@ -130,11 +131,11 @@ struct arpreq_old {
 
 struct arphdr
 {
-       unsigned short  ar_hrd;         /* format of hardware address   */
-       unsigned short  ar_pro;         /* format of protocol address   */
+       __be16          ar_hrd;         /* format of hardware address   */
+       __be16          ar_pro;         /* format of protocol address   */
        unsigned char   ar_hln;         /* length of hardware address   */
        unsigned char   ar_pln;         /* length of protocol address   */
-       unsigned short  ar_op;          /* ARP opcode (command)         */
+       __be16          ar_op;          /* ARP opcode (command)         */
 
 #if 0
         /*
@@ -148,4 +149,13 @@ struct arphdr
 
 };
 
+#ifdef __KERNEL__
+#include <linux/skbuff.h>
+
+static inline struct arphdr *arp_hdr(const struct sk_buff *skb)
+{
+       return (struct arphdr *)skb_network_header(skb);
+}
+#endif
+
 #endif /* _LINUX_IF_ARP_H */