port more changes to make PCI work
[linux-2.4.git] / net / khttpd / prototypes.h
1 #ifndef _INCLUDE_GUARD_PROTOTYPES_H
2 #define _INCLUDE_GUARD_PROTOTYPES_H
3
4
5 #include <linux/config.h>
6 #include <linux/kernel.h>
7 #include <linux/net.h>
8 #include <linux/time.h>
9 #include <linux/types.h>
10 #include <linux/wait.h>
11 #include <net/sock.h>
12 #include <asm/uaccess.h>
13
14 #include "structure.h"
15
16
17 /* General defines and stuff */
18
19
20 #define CONFIG_KHTTPD_NUMCPU 16    /* Maximum number of threads */
21
22 #ifdef OOPSTRACE
23 #define EnterFunction(x)   printk("Enter: %s, %s line %i\n",x,__FILE__,__LINE__)
24 #define LeaveFunction(x)   printk("Leave: %s, %s line %i\n",x,__FILE__,__LINE__)
25 #else
26 #define EnterFunction(x)   do {} while (0)
27 #define LeaveFunction(x)   do {} while (0)
28 #endif
29
30
31
32 /* sockets.c */
33 int  StartListening(const int Port);
34 void StopListening(void);
35
36 extern struct socket *MainSocket;
37
38
39 /* sysctl.c */
40 void StartSysctl(void);
41 void EndSysctl(void);
42
43 extern int sysctl_khttpd_stop;
44
45
46 /* main.c */
47
48
49 extern struct khttpd_threadinfo threadinfo[CONFIG_KHTTPD_NUMCPU];
50 extern char CurrentTime[];
51 extern atomic_t ConnectCount;
52
53 /* misc.c */
54
55 void CleanUpRequest(struct http_request *Req);
56 int SendBuffer(struct socket *sock, const char *Buffer,const size_t Length);
57 int SendBuffer_async(struct socket *sock, const char *Buffer,const size_t Length);
58 void Send403(struct socket *sock);
59 void Send304(struct socket *sock);
60 void Send50x(struct socket *sock);
61
62 /* accept.c */
63
64 int AcceptConnections(const int CPUNR,struct socket *Socket);
65
66 /* waitheaders.c */
67
68 int WaitForHeaders(const int CPUNR);
69 void StopWaitingForHeaders(const int CPUNR);
70 int InitWaitHeaders(int ThreadCount);
71
72 /* datasending.c */
73
74 int DataSending(const int CPUNR);
75 void StopDataSending(const int CPUNR);
76 int InitDataSending(int ThreadCount);
77
78
79 /* userspace.c */
80
81 int Userspace(const int CPUNR);
82 void StopUserspace(const int CPUNR);
83 void InitUserspace(const int CPUNR);
84
85
86 /* rfc_time.c */
87
88 void time_Unix2RFC(const time_t Zulu,char *Buffer);
89 void UpdateCurrentDate(void);
90 time_t mimeTime_to_UnixTime(char *Q);
91 extern int CurrentTime_i;
92
93 /* rfc.c */
94
95 void ParseHeader(char *Buffer,const int length, struct http_request *Head);
96 char *ResolveMimeType(const char *File,__kernel_size_t *Len);
97 void AddMimeType(const char *Ident,const char *Type);
98 void SendHTTPHeader(struct http_request *Request);
99
100
101
102 /* security.c */
103
104 struct file *OpenFileForSecurity(char *Filename);
105 void AddDynamicString(const char *String);
106 void GetSecureString(char *String);
107
108
109 /* logging.c */
110
111 int Logging(const int CPUNR);
112 void StopLogging(const int CPUNR);
113
114
115 /* Other prototypes */
116
117
118
119 #endif