aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/if_ether.h
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2024-08-27 21:07:52 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2024-08-31 21:35:02 +0000
commit273cf7d36336eeed5fc2ad42e5e12a36e36650a0 (patch)
tree3f8bbe85dd7d4aa136c0222dde7f45c433b42b48 /sys/compat/linuxkpi/common/include/linux/if_ether.h
parent8adb745dc9716e769ef0f7e993cea8a07735d5d8 (diff)
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/if_ether.h')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/if_ether.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/if_ether.h b/sys/compat/linuxkpi/common/include/linux/if_ether.h
index 3735ad2f5527..6676e8fc142f 100644
--- a/sys/compat/linuxkpi/common/include/linux/if_ether.h
+++ b/sys/compat/linuxkpi/common/include/linux/if_ether.h
@@ -34,6 +34,7 @@
#define _LINUXKPI_LINUX_IF_ETHER_H_
#include <linux/types.h>
+#include <linux/skbuff.h>
#include <net/ethernet.h>
@@ -69,4 +70,13 @@ struct ethhdr {
uint16_t h_proto;
} __packed;
+static inline struct ethhdr *
+eth_hdr(const struct sk_buff *skb)
+{
+ struct ethhdr *hdr;
+
+ hdr = (struct ethhdr *)skb_mac_header(skb);
+ return (hdr);
+}
+
#endif /* _LINUXKPI_LINUX_IF_ETHER_H_ */