Inside the Linux Packet Filter, Part II

Gianluca concludes the packet's journey through the kernel, picking up with TCP processing.
Conclusion

Following a packet's journey through the kernel can be an interesting experience. In our trip we encountered typical kernel data structures (such as skbuffs), discovered idiomatic programming techniques (such as the use of structures with function pointers as an efficient alternative to C++ objects) and met some new 2.4 mechanisms (softirqs).

If you are eager to learn more on the subject, arm yourself with kernel sources and a comfortable editor, swallow a good cup of coffee and start peeking here and there. The price is cheap, and fun is guaranteed!

Creation of PF_PACKET Sockets

Resources

Gianluca Insolvibile has been a Linux enthusiast since kernel 0.99pl4. He currently deals with networking and digital video research and development. He can be reached at g.insolvibile@cpr.it.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Great article... I also found

Anonymous's picture

Great article... I also found the below url interesting http://yusufonlinux.blogspot.com/

Packet Sniffer at application layer

Anonymous's picture

i have a pacet sniifer at application layer that can sniff ARP through IPv4, TCP, UDP, IPv6

-tuhin

Have to express my appreciation

Jinping Yang's picture

The best walk-through of Linux's PF_PACKET socket implementation and packet reception I've ever seen!

Re: Kernel Korner: Inside the Linux Packet Filter, Part II

Anonymous's picture

Thank you!

Re: Kernel Korner: Inside the Linux Packet Filter, Part II

Anonymous's picture

Thanks alot!

Re: Kernel Korner: Inside the Linux Packet Filter, Part II

Anonymous's picture

Hi all,

by examining the kernel sources (especially the

network modules'), I see that there functions

embedded by the __initfunc(). Can anybody tell

me what is the role of the __initfunc() ? It denotes

a special function needed to be invoked at kernel

initialisation ?

Any answer is appreciated.

Kiss Jozsef, jkiss@pele.ilab.sztaki.hu

Re: Kernel Korner: Inside the Linux Packet Filter, Part II

Anonymous's picture

Thanks a lot!

Both chapters have been very useful for me. Im making an analyse of kernel structures and functions to measure network and kernel activity in distributed applications.

Javier Mendiara Ca

thanks

Anonymous's picture

Good reading thank you ....

White Paper
Fabric-Based Computing Enables Optimized Hyperscale Data Centers

Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.

Learn More

Sponsored by AMD

White Paper
Red Hat White Paper: Using an Open Source Framework to Catch the Bad Guy

Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6

Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.

Learn more about catching the bad guy in this free white paper.

Learn More

Sponsored by DLT Solutions