packet travelling
This is very basic question. With the help of skbuff structure we can able to play with tcp udp and mac header. Is it possible to read the contents of http header from kernel. Even though we can able to handle this situation in userspace itself. Just for the sake of understandability m开发者_如何学编程e asking this question.
If so it is possible, where does the http header will be stored in skbuff structure. (i.e.) in data part
Thanks
Paavaanan.
You may wish to look into the TUX in-kernel web server for guidance in your project. I wouldn't recommend using TUX (the sendfile(2)
system call obviates a huge part of TUX's potential speed advantage by allowing single-copy file sending, and the risks of running a server in the kernel far outweigh any potential remaining speed advantage due to reducing context switching).
But for learning purposes, TUX should do nicely.
From the point of view of the kernel, the HTTP header is just part of the data on the connection. Note however that it may be spread across multiple skb
s.
精彩评论