Skip to Content
Understanding Linux Network Internals
book

Understanding Linux Network Internals

by Christian Benvenuti
December 2005
Intermediate to advanced
1066 pages
33h 38m
English
O'Reilly Media, Inc.
Content preview from Understanding Linux Network Internals

Chapter 19. Internet Protocol Version 4 (IPv4): Linux Foundations and Features

The previous chapter laid out what an operating system needs to do to support the IP protocol; this chapter introduces the data structures and basic activities through which Linux supports IP, such as how ingress IP packets are delivered to the IP reception routine, how the checksum is verified, and how IP options are processed.

Main IPv4 Data Structures

This section introduces the major data structures used by the IPv4 protocol. You can refer to Chapter 23 for a detailed description of their fields.

I have not included a picture to show the relationships among the data structures because most of them are independent and do not keep cross-references.

iphdr structure

IP header. The meaning of its fields has already been covered in the section "IP Header" in Chapter 18.

ip_options structure

This structure, defined in include/linux/ip.h, represents the options for a packet that needs to be transmitted or forwarded. The options are stored in this structure because it is easier to read than the corresponding portion of the IP header itself.

ipcm_cookie structure

This structure combines various pieces of information needed to transmit a packet.

ipq structure

Collection of fragments of an IP packet. See the section "Organization of the IP Fragments Hash Table" in Chapter 22.

inet_peer structure

The kernel keeps an instance of this structure for each remote host it has been talking to in the recent past. In the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Fundamentals

Linux Fundamentals

Sander van Vugt
Linux Kernel Debugging

Linux Kernel Debugging

Kaiwan N. Billimoria
Linux Observability with BPF

Linux Observability with BPF

David Calavera, Lorenzo Fontana

Publisher Resources

ISBN: 0596002556Errata Page