Path of UDP packet in linux kernel

前端 未结 3 1067
夕颜
夕颜 2020-12-12 23:32

I want to find the path of a UDP packet in the Linux kernel. For this, I want to read up on some documentation ( I have this so far, which is for TCP) and then have some pri

3条回答
  •  鱼传尺愫
    2020-12-12 23:44

    The linux networking stack is a big piece of the kernel and you need to spend some time studying it. I think that this books may help (Focused on older kernels 2.4 and 2.6, but the logic remain the same for the latest kernels 3.x):

    Understanding Linux Network Internals

    The Linux Networking Architecture - Design and Implementation of Network Protocols in the Linux Kernel

    You can also checkout this links:

    http://e-university.wisdomjobs.com/linux/chapter-189-277/sending-the-data-from-the-socket-through-udp-and-tcp.html

    http://www.linuxfoundation.org/collaborate/workgroups/networking/kernel_flow

    http://wiki.openwrt.org/doc/networking/praxis

    http://www.ibm.com/developerworks/linux/library/l-linux-networking-stack/?ca=dgr-lnxw01lnxNetStack

    http://gicl.cs.drexel.edu/people/sevy/network/Linux_network_stack_walkthrough.html

    You need also to browse the kernel source :

    http://lxr.linux.no/#linux+v3.7.3/

    Begin your road to the network sub-system with this function : ip_rcv which is called when a packet is received. other functions are then called (ip_rcv_finish, ip_local_deliver and ip_local_deliver_finish=> This function is responsible for choosing the good transport layer)

提交回复
热议问题