linux/include/uapi/linux/if_ether.h

/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
 * INET		An implementation of the TCP/IP protocol suite for the LINUX
 *		operating system.  INET is implemented using the  BSD Socket
 *		interface as the means of communication with the user level.
 *
 *		Global definitions for the Ethernet IEEE 802.3 interface.
 *
 * Version:	@(#)if_ether.h	1.0.1a	02/08/94
 *
 * Author:	Fred N. van Kempen, <[email protected]>
 *		Donald Becker, <[email protected]>
 *		Alan Cox, <[email protected]>
 *		Steve Whitehouse, <[email protected]>
 *
 *		This program is free software; you can redistribute it and/or
 *		modify it under the terms of the GNU General Public License
 *		as published by the Free Software Foundation; either version
 *		2 of the License, or (at your option) any later version.
 */

#ifndef _UAPI_LINUX_IF_ETHER_H
#define _UAPI_LINUX_IF_ETHER_H

#include <linux/types.h>

/*
 *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
 *	and FCS/CRC (frame check sequence).
 */

#define ETH_ALEN
#define ETH_TLEN
#define ETH_HLEN
#define ETH_ZLEN
#define ETH_DATA_LEN
#define ETH_FRAME_LEN
#define ETH_FCS_LEN

#define ETH_MIN_MTU
#define ETH_MAX_MTU

/*
 *	These are the defined Ethernet Protocol ID's.
 */

#define ETH_P_LOOP
#define ETH_P_PUP
#define ETH_P_PUPAT
#define ETH_P_TSN
#define ETH_P_ERSPAN2
#define ETH_P_IP
#define ETH_P_X25
#define ETH_P_ARP
#define ETH_P_BPQ
#define ETH_P_IEEEPUP
#define ETH_P_IEEEPUPAT
#define ETH_P_BATMAN
#define ETH_P_DEC
#define ETH_P_DNA_DL
#define ETH_P_DNA_RC
#define ETH_P_DNA_RT
#define ETH_P_LAT
#define ETH_P_DIAG
#define ETH_P_CUST
#define ETH_P_SCA
#define ETH_P_TEB
#define ETH_P_RARP
#define ETH_P_ATALK
#define ETH_P_AARP
#define ETH_P_8021Q
#define ETH_P_ERSPAN
#define ETH_P_IPX
#define ETH_P_IPV6
#define ETH_P_PAUSE
#define ETH_P_SLOW
#define ETH_P_WCCP
#define ETH_P_MPLS_UC
#define ETH_P_MPLS_MC
#define ETH_P_ATMMPOA
#define ETH_P_PPP_DISC
#define ETH_P_PPP_SES
#define ETH_P_LINK_CTL
#define ETH_P_ATMFATE
#define ETH_P_PAE
#define ETH_P_PROFINET
#define ETH_P_REALTEK
#define ETH_P_AOE
#define ETH_P_ETHERCAT
#define ETH_P_8021AD
#define ETH_P_802_EX1
#define ETH_P_PREAUTH
#define ETH_P_TIPC
#define ETH_P_LLDP
#define ETH_P_MRP
#define ETH_P_MACSEC
#define ETH_P_8021AH
#define ETH_P_MVRP
#define ETH_P_1588
#define ETH_P_NCSI
#define ETH_P_PRP
#define ETH_P_CFM
#define ETH_P_FCOE
#define ETH_P_IBOE
#define ETH_P_TDLS
#define ETH_P_FIP
#define ETH_P_80221
#define ETH_P_HSR
#define ETH_P_NSH
#define ETH_P_LOOPBACK
#define ETH_P_QINQ1
#define ETH_P_QINQ2
#define ETH_P_QINQ3
#define ETH_P_EDSA
#define ETH_P_DSA_8021Q
#define ETH_P_DSA_A5PSW
#define ETH_P_IFE
#define ETH_P_AF_IUCV

#define ETH_P_802_3_MIN

/*
 *	Non DIX types. Won't clash for 1500 types.
 */

#define ETH_P_802_3
#define ETH_P_AX25
#define ETH_P_ALL
#define ETH_P_802_2
#define ETH_P_SNAP
#define ETH_P_DDCMP
#define ETH_P_WAN_PPP
#define ETH_P_PPP_MP
#define ETH_P_LOCALTALK
#define ETH_P_CAN
#define ETH_P_CANFD
#define ETH_P_CANXL
#define ETH_P_PPPTALK
#define ETH_P_TR_802_2
#define ETH_P_MOBITEX
#define ETH_P_CONTROL
#define ETH_P_IRDA
#define ETH_P_ECONET
#define ETH_P_HDLC
#define ETH_P_ARCNET
#define ETH_P_DSA
#define ETH_P_TRAILER
#define ETH_P_PHONET
#define ETH_P_IEEE802154
#define ETH_P_CAIF
#define ETH_P_XDSA
#define ETH_P_MAP
#define ETH_P_MCTP

/*
 *	This is an Ethernet frame header.
 */

/* allow libcs like musl to deactivate this, glibc does not implement this. */
#ifndef __UAPI_DEF_ETHHDR
#define __UAPI_DEF_ETHHDR
#endif

#if __UAPI_DEF_ETHHDR
struct ethhdr {} __attribute__((packed));
#endif


#endif /* _UAPI_LINUX_IF_ETHER_H */