lkml.org 
[lkml]   [1999]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.049 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site