@@ -58,57 +58,61 @@ struct net_eth_addr {
5858
5959#define NET_ETH_HDR (pkt ) ((struct net_eth_hdr *)net_pkt_data(pkt))
6060
61+ /* zephyr-keep-sorted-start */
62+ #define NET_ETH_PTYPE_ALL 0x0003 /* from linux/if_ether.h */
63+ #define NET_ETH_PTYPE_ARP 0x0806
6164#define NET_ETH_PTYPE_CAN 0x000C /* CAN: Controller Area Network */
6265#define NET_ETH_PTYPE_CANFD 0x000D /* CANFD: CAN flexible data rate*/
66+ #define NET_ETH_PTYPE_EAPOL 0x888e
67+ #define NET_ETH_PTYPE_ECAT 0x88a4
6368#define NET_ETH_PTYPE_HDLC 0x0019 /* HDLC frames (like in PPP) */
64- #define NET_ETH_PTYPE_ARP 0x0806
69+ #define NET_ETH_PTYPE_IEEE802154 0x00F6 /* from linux/if_ether.h: IEEE802.15.4 frame */
6570#define NET_ETH_PTYPE_IP 0x0800
66- #define NET_ETH_PTYPE_TSN 0x22f0 /* TSN (IEEE 1722) packet */
6771#define NET_ETH_PTYPE_IPV6 0x86dd
68- #define NET_ETH_PTYPE_VLAN 0x8100
69- #define NET_ETH_PTYPE_PTP 0x88f7
7072#define NET_ETH_PTYPE_LLDP 0x88cc
71- #define NET_ETH_PTYPE_ALL 0x0003 /* from linux/if_ether.h */
72- #define NET_ETH_PTYPE_ECAT 0x88a4
73- #define NET_ETH_PTYPE_EAPOL 0x888e
74- #define NET_ETH_PTYPE_IEEE802154 0x00F6 /* from linux/if_ether.h: IEEE802.15.4 frame */
73+ #define NET_ETH_PTYPE_PTP 0x88f7
74+ #define NET_ETH_PTYPE_TSN 0x22f0 /* TSN (IEEE 1722) packet */
75+ #define NET_ETH_PTYPE_VLAN 0x8100
76+ /* zephyr-keep-sorted-stop */
7577
78+ /* zephyr-keep-sorted-start re(^#define) */
79+ #if !defined(ETH_P_8021Q )
80+ #define ETH_P_8021Q NET_ETH_PTYPE_VLAN
81+ #endif
7682#if !defined(ETH_P_ALL )
7783#define ETH_P_ALL NET_ETH_PTYPE_ALL
7884#endif
79- #if !defined(ETH_P_IP )
80- #define ETH_P_IP NET_ETH_PTYPE_IP
81- #endif
8285#if !defined(ETH_P_ARP )
8386#define ETH_P_ARP NET_ETH_PTYPE_ARP
8487#endif
85- #if !defined(ETH_P_IPV6 )
86- #define ETH_P_IPV6 NET_ETH_PTYPE_IPV6
88+ #if !defined(ETH_P_CAN )
89+ #define ETH_P_CAN NET_ETH_PTYPE_CAN
8790#endif
88- #if !defined(ETH_P_8021Q )
89- #define ETH_P_8021Q NET_ETH_PTYPE_VLAN
91+ #if !defined(ETH_P_CANFD )
92+ #define ETH_P_CANFD NET_ETH_PTYPE_CANFD
9093#endif
91- #if !defined(ETH_P_TSN )
92- #define ETH_P_TSN NET_ETH_PTYPE_TSN
94+ #if !defined(ETH_P_EAPOL )
95+ #define ETH_P_EAPOL NET_ETH_PTYPE_EAPOL
9396#endif
9497#if !defined(ETH_P_ECAT )
95- #define ETH_P_ECAT NET_ETH_PTYPE_ECAT
98+ #define ETH_P_ECAT NET_ETH_PTYPE_ECAT
9699#endif
97- #if !defined(ETH_P_EAPOL )
98- #define ETH_P_EAPOL NET_ETH_PTYPE_EAPOL
100+ #if !defined(ETH_P_HDLC )
101+ #define ETH_P_HDLC NET_ETH_PTYPE_HDLC
99102#endif
100103#if !defined(ETH_P_IEEE802154 )
101- #define ETH_P_IEEE802154 NET_ETH_PTYPE_IEEE802154
104+ #define ETH_P_IEEE802154 NET_ETH_PTYPE_IEEE802154
102105#endif
103- #if !defined(ETH_P_CAN )
104- #define ETH_P_CAN NET_ETH_PTYPE_CAN
106+ #if !defined(ETH_P_IP )
107+ #define ETH_P_IP NET_ETH_PTYPE_IP
105108#endif
106- #if !defined(ETH_P_CANFD )
107- #define ETH_P_CANFD NET_ETH_PTYPE_CANFD
109+ #if !defined(ETH_P_IPV6 )
110+ #define ETH_P_IPV6 NET_ETH_PTYPE_IPV6
108111#endif
109- #if !defined(ETH_P_HDLC )
110- #define ETH_P_HDLC NET_ETH_PTYPE_HDLC
112+ #if !defined(ETH_P_TSN )
113+ #define ETH_P_TSN NET_ETH_PTYPE_TSN
111114#endif
115+ /* zephyr-keep-sorted-stop */
112116
113117/** @endcond */
114118
0 commit comments