linux-old/net/khttpd/prototypes.h
<<
>>
Prefs
   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 */
  33int  StartListening(const int Port);
  34void StopListening(void);
  35
  36extern struct socket *MainSocket;
  37
  38
  39/* sysctl.c */
  40void StartSysctl(void);
  41void EndSysctl(void);
  42
  43extern int sysctl_khttpd_stop;
  44
  45
  46/* main.c */
  47
  48
  49extern struct khttpd_threadinfo threadinfo[CONFIG_KHTTPD_NUMCPU];
  50extern char CurrentTime[];
  51extern atomic_t ConnectCount;
  52extern struct wait_queue main_wait[CONFIG_KHTTPD_NUMCPU];
  53
  54/* misc.c */
  55
  56void CleanUpRequest(struct http_request *Req);
  57int SendBuffer(struct socket *sock, const char *Buffer,const size_t Length);
  58int SendBuffer_async(struct socket *sock, const char *Buffer,const size_t Length);
  59void Send403(struct socket *sock);
  60void Send304(struct socket *sock);
  61void Send50x(struct socket *sock);
  62
  63/* accept.c */
  64
  65int AcceptConnections(const int CPUNR,struct socket *Socket);
  66
  67/* waitheaders.c */
  68
  69int WaitForHeaders(const int CPUNR);
  70void StopWaitingForHeaders(const int CPUNR);
  71int InitWaitHeaders(int ThreadCount);
  72
  73/* datasending.c */
  74
  75int DataSending(const int CPUNR);
  76void StopDataSending(const int CPUNR);
  77int InitDataSending(int ThreadCount);
  78
  79
  80/* userspace.c */
  81
  82int Userspace(const int CPUNR);
  83void StopUserspace(const int CPUNR);
  84void InitUserspace(const int CPUNR);
  85
  86
  87/* rfc_time.c */
  88
  89void time_Unix2RFC(const time_t Zulu,char *Buffer);
  90void UpdateCurrentDate(void);
  91time_t mimeTime_to_UnixTime(char *Q);
  92extern int CurrentTime_i;
  93
  94/* rfc.c */
  95
  96void ParseHeader(char *Buffer,const int length, struct http_request *Head);
  97char *ResolveMimeType(const char *File,__kernel_size_t *Len);
  98void AddMimeType(const char *Ident,const char *Type);
  99void SendHTTPHeader(struct http_request *Request);
 100
 101
 102
 103/* security.c */
 104
 105struct file *OpenFileForSecurity(char *Filename);
 106void AddDynamicString(const char *String);
 107void GetSecureString(char *String);
 108
 109
 110/* logging.c */
 111
 112int Logging(const int CPUNR);
 113void StopLogging(const int CPUNR);
 114
 115
 116/* Other prototypes */
 117
 118
 119
 120#endif
 121
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.