user598043
user598043

Reputation: 1

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 me 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.

Upvotes: 0

Views: 110

Answers (2)

caf
caf

Reputation: 239041

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 skbs.

Upvotes: 0

sarnold
sarnold

Reputation: 104050

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.

Upvotes: 1

Related Questions