1 // SPDX-License-Identifier: GPL-2.0
9 #define ETH_P_802_3_MIN 0x0600
10 #define ETH_P_8021Q 0x8100
11 #define ETH_P_8021AD 0x88A8
12 #define ETH_P_IP 0x0800
13 #define ETH_P_IPV6 0x86DD
14 #define ETH_P_ARP 0x0806
15 #define IPPROTO_ICMPV6 58
22 #if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
23 __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
24 #define bpf_ntohs(x) __builtin_bswap16(x)
25 #define bpf_htons(x) __builtin_bswap16(x)
26 #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && \
27 __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
28 #define bpf_ntohs(x) (x)
29 #define bpf_htons(x) (x)
31 # error "Endianness detection needs to be set up for your compiler?!"