The TOFFEE Project
The TOFFEE Project

Videos :: Linux Kernel struct ethhdr data-structure

Written by: Kiran Kankipati - Published: 02-Nov-2016

Download/watch this video - 264 Linux Kernel struct ethhdr data-structure - Introduction, code-walk, eth_hdr(), skb_mac_header() APIs - Ep1

For more details refer Linux Kernel Source:
struct ethhdr -
eth_hdr() API -
skb_mac_header() API -
QUICK LINKS for students and advance developers:
Linux Kernel Network stack and architecture -
Videos related to protocol header data-structures:
struct iphdr -
struct tcphdr -
struct udphdr -

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:

Linux Kernel programming
Linux Kernel TCP Congestion Control Algorithms
Linux Kernel struct socket and struct sock data-structure
Linux Kernel /proc Interface
Linux ioctl() API interface
Linux Kernel Network Programming
Linux Kernel Programming
Linux Kernel sk_buff data-structure - Episode-11 to Episode-18
Linux Kernel sk_buff data-structure - Episode-1 to Episode-10
Linux Kernel net_device data-structure
Linux Kernel dst_entry data-structure
Linux Kernel struct ethhdr data-structure
Linux Kernel struct iphdr data-structure
Linux Kernel struct tcphdr data-structure
Linux Kernel struct udphdr data-structure
Linux Kernel Networking Sub-system
Linux Kernel Compilation
Linux Kernel Architecture - Generic


Recommended Topics:

SD-WAN Last Mile Connectivity challenge:
Software-Defined Wide Area Networking (SD-WAN) is a new innovative way to provide optimal application performance by redefining branch office networking. Unlike traditional expensive private WAN connection technologies such as MPLS, etc., SD-WAN delivers increased network performance and cost reduction. SD-WAN solution decouple network software services from the underlying hardware via software abstraction.
TOFFEE-DataCenter WAN Optimization deployment in SD-WAN Applications

SD-WAN Infrastructure using TOFFEE-DataCenter as one of its building components:
TOFFEE-DataCenter WAN Optimization within SD-WAN Infrastructure

MySQL Database Network Data - WAN Acceleration:

Skype VOIP Data - WAN Acceleration:
  > reduce/eliminate Jitter
  > no more call drops
  > accelerate any VOIP (including long-distance Skype calls)

Hardware Compression and Decompression Accelerator Cards:
TOFFEE Architecture with Compression and Decompression Accelerator Card [CDN]

Learn Linux Systems Software and Kernel Programming:
Linux, Kernel, Networking and Systems-Software online classes

The TOFFEE Project - v8.15 :: Updated: 21-Apr-2018 :: © 2018 :: Author: Kiran Kankipati
Your IP: :: Browser: CCBot/2.0 (