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