📄 Loading... Loading file...
Network Stack Flow Control
📡 UDP Packet Flow
1 / ? Loading...
← Prev
Next →
▶ Play
⏸ Pause
Call Stack (newest → oldest)
function_name() Layer
Before
After
Next: functions
UDP Packet Visualization
what are these fields? MAC Header:
  Bytes 0-5: Destination MAC: 00:50:56:C0:00:08
  Bytes 6-11: Source MAC: 00:0C:29:12:34:56
  Bytes 12-13: EtherType: 0x0800 (IPv4)

IP Header:
  Version: 4, Header Length: 20 bytes
  Total Length: 52 bytes, ID: 0x1234
  TTL: 64, Protocol: 17 (UDP), Checksum: 0x2675
  Source IP: 192.168.1.100
  Destination IP: 192.168.1.101

UDP Header:
  Source Port: 10000, Destination Port: 10001
  Length: 24 bytes, Checksum: 0x0000 (disabled)

Payload:
  Application data: "test message for demo!"
MAC IP UDP Data
Linux Network State
what are these structures? Key Linux kernel network data structures that change as packets flow:

📦 sk_buff (Socket Buffer):
The main packet data structure containing packet data and metadata:
len: Total packet length (headers + payload)
headroom/tailroom: Space for adding headers/trailers
protocol: Network layer protocol (0x0800 = IPv4)
mark/priority: Packet marking and QoS priority
csum: Checksum validation state
*_off: Header offsets from skb->head

🔌 Socket State:
Destination socket information (when packet reaches socket layer):
type: Socket type (SOCK_DGRAM for UDP)
state: Socket connection state
rcvbuf: Receive buffer size
family: Address family (AF_INET, AF_INET6)

🌐 Network Device:
Interface the packet arrived on:
name: Interface name (eth0, wlan0, etc.)
mtu: Maximum transmission unit
flags: Interface flags (UP, RUNNING, etc.)

Changed values are highlighted in yellow as the packet flows through the stack.

📖 Learn more: Linux Foundation sk_buff documentation
📚 Deep dive: sk_buff source code (skbuff.h)
📦 sk_buff
📊 Memory Layout:
Headroom grows as headers are consumed during processing
🔌 Socket
No socket data yet...
🌐 Network Device
No device data yet...