Messages in this thread | | | Date | Mon, 27 Dec 1999 18:25:59 -0500 (EST) | From | "Adam D. Bradley" <> | Subject | Re: Networking kernel: HTTP payload |
| |
On Tue, 21 Dec 1999, jordi ros wrote:
> I'm a new kernel programmer at the networking layer. Just to start, I've > been looking at the IP and TCP headers and taking out some performance > statistics such as number of packets/bytes rx and tx per connections or > number of connections in order to access a web page,... Now I would like > to extract info from the payload. More specifically, I would like to be > able to read the contents of the http fields. Reading the contents of > the TCP or IP headers was easy since from the linux network source code > I can get the iphdr (e.g. iphdr->ttl) and tcphdr structs. But I don't > know the way that the http fields are stored in the TCP payload.
I see someone else has told you how to get at the payloads. If you want to know how specific fields and values are stored, get a copy of RFC2616 and start writing a parser... HTTP is text based, so you have to parse a series of tokens to extract data; this is totally different from TCP and IP which pass values in binary form in fixed locations.
I haven't yet looked at khttpd's parser but that might be a good place to start looking at how an in-kernel context should examine HTTP headers.
Adam -- Adam D. Bradley -- artdodge@cs.bu.edu -- BU x8921 MCS211 --- <>< --- This message has been infected with a .signature virus. \ www.adbp.org Copy it into your .signature file or the turnip dies!!! \ 2Cor6:12-13
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |