The Linux Channel

Vídeos :: Linux Kernel struct tcphdr data-structure

Written by: Kiran Kankipati - Published: 05-Jul-2016

Assista vídeo: Linux Kernel struct tcphdr data-structure - part2 - Sample Example Code
Linux Kernel struct tcphdr data-structure - part2 - Sample Example Code
* Clique na imagem para assistir este vídeo no Youtube ↗

Refer: Kernel Doc printk-formats.txt - http://elixir.free-electrons.com/linux/latest/source/Documentation/printk-formats.txt

Here is the screenshot of my Sample Example Code discussed in the video above:
Screenshot
Screenshot

Assista vídeo: Linux Kernel struct tcphdr data-structure - part1 - code walk, Example
Linux Kernel struct tcphdr data-structure - part1 - code walk, Example
* Clique na imagem para assistir este vídeo no Youtube ↗

Refer:
struct tcphdr data-structure - http://elixir.free-electrons.com/linux/latest/source/include/uapi/linux/tcp.h#L24
sk_buff to tcphdr APIs - http://elixir.free-electrons.com/linux/latest/source/include/linux/tcp.h
Definitions for the TCP module - http://elixir.free-electrons.com/linux/latest/source/include/net/tcp.h

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

struct tcphdr {
	__be16	source;
	__be16	dest;
	__be32	seq;
	__be32	ack_seq;
#if defined(__LITTLE_ENDIAN_BITFIELD)
	__u16	res1:4,
		doff:4,
		fin:1,
		syn:1,
		rst:1,
		psh:1,
		ack:1,
		urg:1,
		ece:1,
		cwr:1;
#elif defined(__BIG_ENDIAN_BITFIELD)
	__u16	doff:4,
		res1:4,
		cwr:1,
		ece:1,
		urg:1,
		ack:1,
		psh:1,
		rst:1,
		syn:1,
		fin:1;
#else
#error	"Adjust your  defines"
#endif	
	__be16	window;
	__sum16	check;
	__be16	urg_ptr;
};



Suggested Topics:


Linux Kernel programming :: Video Episodes
 Linux Kernel struct iphdr data-structure ↗
05-Jul-2016


 Linux Kernel dst_entry data-structure ↗
04-May-2017


 Linux Kernel struct socket and struct sock data-structure ↗
31-Oct-2017


 Linux Kernel - Containers and Namespaces ↗
11-Feb-2018


 Linux Kernel struct ethhdr data-structure ↗
02-Nov-2016


 Linux ioctl() API interface ↗
11-Oct-2017


 Linux Kernel Network Programming - struct net - struct netns_ipv4 - /proc/sys/net/ipv4 ↗
21-May-2018


 Linux Kernel Programming - Device Drivers ↗
30-Mar-2018


 Linux Kernel Network Programming ↗
05-Nov-2017


 Linux Kernel net_device data-structure ↗
05-Jul-2016


 Linux Kernel TCP Congestion Control Algorithms ↗
20-Nov-2017


 Linux Kernel Architecture - Generic ↗
13-May-2017


 Linux Kernel Networking Sub-system ↗
05-Jul-2016


 Linux Kernel sk_buff data-structure - Episode-1 to Episode-10 ↗
05-Jul-2016


 Linux Kernel FileSystems Subsystem ↗
16-Dec-2017


 Linux Kernel sk_buff data-structure - Episode-11 to Episode-18 ↗
26-Mar-2017


 Linux Kernel Compilation ↗
05-Jul-2016


 Linux Kernel Programming ↗
05-Jul-2016


 Linux Kernel /proc Interface ↗
22-Feb-2017


 Linux Kernel struct tcphdr data-structure ↗
05-Jul-2016


 Linux Operating System - User-space Processes ↗
22-Jan-2018


 Linux Kernel struct udphdr data-structure ↗
05-Jul-2016


 

Join The Linux Channel :: Facebook Group


Join a course:

💎 Linux, Kernel and Network Software Developer: PDF Brochure
💎 Linux, Kernel, Networking and Device Drivers: PDF Brochure
💎 PhD or equivalent (or Post Doctoral) looking for assistance: Details
💎 ... or unlimited life-time mentorship: Details


💗 Help shape the future: Sponsor/Donate


Tópicos recomendados:
Featured Video:
Assista vídeo: 162 Kompare GUI patch and diff tool in Linux
162 Kompare GUI patch and diff tool in Linux
* Clique na imagem para assistir este vídeo no Youtube ↗

Download: Linux Kernel Booting_1.pdf


Trending Video:
Assista vídeo: 0x1a5 My Frequent Job Changes - Q&A | The Linux Channel
0x1a5 My Frequent Job Changes - Q&A | The Linux Channel
* Clique na imagem para assistir este vídeo no Youtube ↗

TUTORIALS :: Linux Networking Stack :: RFS: Receive Flow Steering:


Linux ioctl() API interface:


Research :: Content Delivery Networks (CDN):
CDN Networks


Recommended Video:
Assista vídeo: 0x16a How to get a job as a Device Driver Programmer ?
0x16a How to get a job as a Device Driver Programmer ?
* Clique na imagem para assistir este vídeo no Youtube ↗