Import 2.4.0-test5pre4
[davej-history.git] / net / khttpd / structure.h
blob5f6f2a619eba30260a692c551d7b461f22361cb7
1 #ifndef _INCLUDE_GUARD_STRUCTURE_H_
2 #define _INCLUDE_GUARD_STRUCTURE_H_
4 #include <linux/time.h>
5 #include <linux/wait.h>
8 struct http_request;
10 struct http_request
12 /* Linked list */
13 struct http_request *Next;
15 /* Network and File data */
16 struct socket *sock;
17 struct file *filp;
19 /* Raw data about the file */
21 int FileLength; /* File length in bytes */
22 int Time; /* mtime of the file, unix format */
23 int BytesSent; /* The number of bytes already sent */
24 int IsForUserspace; /* 1 means let Userspace handle this one */
26 /* Wait queue */
28 wait_queue_t sleep; /* For putting in the socket's waitqueue */
30 /* HTTP request information */
31 char FileName[256]; /* The requested filename */
32 int FileNameLength; /* The length of the string representing the filename */
33 char Agent[128]; /* The agent-string of the remote browser */
34 char IMS[128]; /* If-modified-since time, rfc string format */
35 char Host[128]; /* Value given by the Host: header */
36 int HTTPVER; /* HTTP-version; 9 for 0.9, 10 for 1.0 and above */
39 /* Derived date from the above fields */
40 int IMS_Time; /* if-modified-since time, unix format */
41 char TimeS[64]; /* File mtime, rfc string representation */
42 char LengthS[14]; /* File length, string representation */
43 char *MimeType; /* Pointer to a string with the mime-type
44 based on the filename */
45 __kernel_size_t MimeLength; /* The length of this string */
53 struct khttpd_threadinfo represents the four queues that 1 thread has to deal with.
54 It is padded to occupy 1 (Intel) cache-line, to avoid "cacheline-pingpong".
57 struct khttpd_threadinfo
59 struct http_request* WaitForHeaderQueue;
60 struct http_request* DataSendingQueue;
61 struct http_request* LoggingQueue;
62 struct http_request* UserspaceQueue;
63 char dummy[16]; /* Padding for cache-lines */
68 #endif