cleanup
[linux-2.4.21-pre4.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 extern struct wait_queue main_wait[CONFIG_KHTTPD_NUMCPU];
53
54 /* misc.c */
55
56 void CleanUpRequest(struct http_request *Req);
57 int SendBuffer(struct socket *sock, const char *Buffer,const size_t Length);
58 int SendBuffer_async(struct socket *sock, const char *Buffer,const size_t Length);
59 void Send403(struct socket *sock);
60 void Send304(struct socket *sock);
61 void Send50x(struct socket *sock);
62
63 /* accept.c */
64
65 int AcceptConnections(const int CPUNR,struct socket *Socket);
66
67 /* waitheaders.c */
68
69 int WaitForHeaders(const int CPUNR);
70 void StopWaitingForHeaders(const int CPUNR);
71 int InitWaitHeaders(int ThreadCount);
72
73 /* datasending.c */
74
75 int DataSending(const int CPUNR);
76 void StopDataSending(const int CPUNR);
77 int InitDataSending(int ThreadCount);
78
79
80 /* userspace.c */
81
82 int Userspace(const int CPUNR);
83 void StopUserspace(const int CPUNR);
84 void InitUserspace(const int CPUNR);
85
86
87 /* rfc_time.c */
88
89 void time_Unix2RFC(const time_t Zulu,char *Buffer);
90 void UpdateCurrentDate(void);
91 time_t mimeTime_to_UnixTime(char *Q);
92 extern int CurrentTime_i;
93
94 /* rfc.c */
95
96 void ParseHeader(char *Buffer,const int length, struct http_request *Head);
97 char *ResolveMimeType(const char *File,__kernel_size_t *Len);
98 void AddMimeType(const char *Ident,const char *Type);
99 void SendHTTPHeader(struct http_request *Request);
100
101
102
103 /* security.c */
104
105 struct file *OpenFileForSecurity(char *Filename);
106 void AddDynamicString(const char *String);
107 void GetSecureString(char *String);
108
109
110 /* logging.c */
111
112 int Logging(const int CPUNR);
113 void StopLogging(const int CPUNR);
114
115
116 /* Other prototypes */
117
118
119
120 #endif