A good introduction but through my personal journey to learn about raw socket programming in Linux, I can't recommend just diving in and reading the kernel source code enough.
I feared this as C is a hobby for me so I assumed it would be too difficult but for me it turned out to be the best way to understand how everything works and I was able to understand the Kernel source, I wish I had done this earlier.
E.g. AF_PACKET is mentioned in this tutorial as one of the potential socket families, I wanted to learn more about the PACKET_MMAP feature AF_PACKET provides however the kernel documentation and examples weren't clear to me. I ended up reading the kernel source last because I was intimidated and should have done that first.
I actually need to upload the receive notes. But before I've had time to do that, v4 has been written and is about to drop in the latest kernel version. So making notes in relation to kernel version I have found to be very helpful. Also this site is super helpful for reading and searching the kernel source:
http://elixir.free-electrons.com/linux/latest/source
I feared this as C is a hobby for me so I assumed it would be too difficult but for me it turned out to be the best way to understand how everything works and I was able to understand the Kernel source, I wish I had done this earlier.
E.g. AF_PACKET is mentioned in this tutorial as one of the potential socket families, I wanted to learn more about the PACKET_MMAP feature AF_PACKET provides however the kernel documentation and examples weren't clear to me. I ended up reading the kernel source last because I was intimidated and should have done that first.
If anyone is going to do this I recommend you take notes. Note that features change between kernel versions. I started making notes on how v2 and v3 transmition of PACKET_MMAP works here: https://github.com/jwbensley/EtherateMT/wiki/Linux-Kernel-tr...
I actually need to upload the receive notes. But before I've had time to do that, v4 has been written and is about to drop in the latest kernel version. So making notes in relation to kernel version I have found to be very helpful. Also this site is super helpful for reading and searching the kernel source: http://elixir.free-electrons.com/linux/latest/source