HOMECOURSESSTUDENTSDONATIONSVIDEOSEVENTSTUTORIALSLINKSNEWSCONTACT


VIDEOS 》 Linux Kernel struct ethhdr data-structure

For more details refer Linux Kernel Source:
struct ethhdr - http://elixir.free-electrons.com/linux/latest/source/include/uapi/linux/if_ether.h#L145
eth_hdr() API - http://elixir.free-electrons.com/linux/latest/source/include/linux/if_ether.h#L26
skb_mac_header() API - http://elixir.free-electrons.com/linux/latest/source/include/linux/skbuff.h#L2215
----
QUICK LINKS for students and advance developers:
Linux Kernel Network stack and architecture - http://the-linux-channel.the-toffee-project.org/index.php?page=3-links-linux-kernel-network-stack-and-architecture
----
Videos related to protocol header data-structures:
struct iphdr - http://the-linux-channel.the-toffee-project.org/index.php?page=48-videos-linux-kernel-struct-iphdr-data-structure
struct tcphdr - http://the-linux-channel.the-toffee-project.org/index.php?page=50-videos-linux-kernel-struct-tcphdr-data-structure
struct udphdr - http://the-linux-channel.the-toffee-project.org/index.php?page=49-videos-linux-kernel-struct-udphdr-data-structure

And here is the copy paste of struct ethhdr data-structure (/include/uapi/linux/if_ether.h) from the Kernel-source version 4.13 for quick reference:

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

struct ethhdr {
	unsigned char	h_dest[ETH_ALEN];	/* destination eth addr	*/
	unsigned char	h_source[ETH_ALEN];	/* source ether addr	*/
	__be16		h_proto;		/* packet type ID field	*/
} __attribute__((packed));

Where these are the various Ethernet Header related constants, which are defined in the same file (/include/uapi/linux/if_ether.h) from the Kernel-source version 4.13 for quick reference:

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

#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
#define ETH_HLEN	14		/* Total octets in header.	 */
#define ETH_ZLEN	60		/* Min. octets in frame sans FCS */
#define ETH_DATA_LEN	1500		/* Max. octets in payload	 */
#define ETH_FRAME_LEN	1514		/* Max. octets in frame sans FCS */
#define ETH_FCS_LEN	4		/* Octets in the FCS		 */

#define ETH_MIN_MTU	68		/* Min IPv4 MTU per RFC791	*/
#define ETH_MAX_MTU	0xFFFFU		/* 65535, same as IP_MAX_MTU	*/



Suggested Topics:


Video Episodes :: Linux Kernel programming

Linux Kernel Programming - Device Drivers ↗
Tuesday' 19-Jan-2021
Watch detailed videos and read topics on Linux Kernel Programming - Device Drivers

Linux Kernel - Containers and Namespaces ↗
Tuesday' 19-Jan-2021

Linux Kernel Architecture ↗
Wednesday' 20-Jan-2021

Linux Kernel Compilation ↗
Wednesday' 20-Jan-2021

Linux Kernel /proc Interface ↗
Tuesday' 19-Jan-2021

Linux Operating System - User-space Processes ↗
Tuesday' 19-Jan-2021

Linux Kernel FileSystems Subsystem ↗
Wednesday' 20-Jan-2021

Linux ioctl() API interface ↗
Tuesday' 19-Jan-2021
Watch detailed videos and read topics on Linux Kernel Programming and Linux ioctl() API interface

Linux Kernel Programming ↗
Tuesday' 19-Jan-2021

Join The Linux Channel :: Facebook Group ↗

Visit The Linux Channel :: on Youtube ↗


💗 Help shape the future: Sponsor/Donate


Recommended Topics:
Featured Video:
Watch on Youtube - Linux Kernel run-time performance vs GCC Compiler ↗

The Linux Channel :: Video Index ↗
Wednesday' 20-Jan-2021

Weekly News Digest - Week 03 - July 2020 ↗
Wednesday' 20-Jan-2021
The Linux Channel :: Weekly News Digest - Week 03 - July 2020
> Linux founder tells Intel to stop inventing 'magic instructions' and 'start fixing real problems'
> QNAP launches its first 2.5GbE network switch - QSW-1105-5T
> Japan's ARM-based Fugaku is the world's fastest supercomputer
> FreeBSD Back To Seeing Progress On 802.11ac WiFi Support, Ath10k Driver
> Sparkfun Launches the ZED-F9R GPS Dead Reckoning Raspberry Pi pHAT for Mobile Robots
> ODROID-N2 Plus SBC Gets Amlogic S922X Rev. C Processor Clocked at up to 2.4 GHz
> Rock Pi E SBC Comes with WiFi, Bluetooth, Two Ethernet Ports, and Optional PoE

Weekly News Digest - Week 03 - June 2020 ↗
Wednesday' 20-Jan-2021
The Linux Channel :: Weekly News Digest - Week 03 - June 2020 > KimĪ‡ Micro: A powerful alternative to the Raspberry Pi that supports PCIe cards > Linux Lands And Then Reverts Usage Of Flexible Array Members > AMD Ryzen 4000-Powered Asus Mini PC Challenges Intel's NUC > Aaeon's Raspberry Pi-like Board Bears An Intel 8th Gen Core i7 CPU and 16GB of DDR4 > Linus Torvalds Announces Massive Linux Kernel 5.8 Update > New Cisco Cloud Scale ASIC & 400G Line Card Announced > Key Differences of PoE vs PoE+ vs PoE++ Switches a STH Guide

Ubuntu installation, setup and upgrade ↗
Wednesday' 20-Jan-2021

Weekly News Digest - Week 01 - June 2020 ↗
Wednesday' 20-Jan-2021
> UDOO BOLT GEAR AMD Ryzen Embedded V1605B Mini PC with Arduino Subsystem Launched for $399 > Systemd Will Change How Your Linux Home Directory Works > How to Manage Systemd Services on a Linux System > Linux 5.7 Kernel Released With New Apple Driver, Official Intel Gen12 Graphics > 8GB Raspberry Pi 4 on sale now at $75 > Bye Raspbian! Long Live Raspberry Pi OS! > Ultra-narrow DipDuino Arduino Compatible Board is a Perfect Breadboard Companion

Generic VLOGs ↗
Wednesday' 20-Jan-2021
My general and tech VLOGs

CEO, CTO Talk ↗
Wednesday' 20-Jan-2021

Ubuntu Cloud Day Bangalore, India 2012 ↗
Wednesday' 20-Jan-2021

Linux and Open-Source Communities across the world ↗
Wednesday' 20-Jan-2021
Here is a small list of Linux (Kernel, Linux Users Group) and Open-Source Communities across the world.

MySQL database server installation ↗
Wednesday' 20-Jan-2021


Trending Video:
Watch on Youtube - 352 Linux user-space - Shared Memory IPC - Live Demo and Exa ↗

What is a Toolchain | gcc Cross-Compiler | Libraries | BSP (Board Support Package) | Embedded ↗
Wednesday' 20-Jan-2021



Recommended Video:
Watch on Youtube - Linux Kernel run-time performance vs GCC Compiler ↗