areaDetector  3-5-0
EPICS areaDetector framework
Classes | Macros | Functions | Variables
nullhttpd.h File Reference
#include <ctype.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/stat.h>
#include <dirent.h>
#include <netdb.h>
#include <paths.h>
#include <pthread.h>
#include <signal.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>

Go to the source code of this file.

Classes

struct  CONFIG
 
struct  CONNDATA
 
struct  CONNECTION
 
struct  pipe_fd
 

Macros

#define NULLHTTPD_SHARE
 
#define DEFAULT_BASE_DIR   "/usr/local/httpd"
 
#define SERVER_NAME   "Null httpd 0.5.1"
 
#define MAX_POSTSIZE   33554432 /* arbitrary 32 MB limit for POST request sizes */
 
#define MAX_REPLYSIZE   65536 /* arbitrary 64 KB limit for reply buffering */
 

Functions

void dorequest (int sid)
 This is called whenever a client requests a stream. More...
 
int config_read (void)
 this dummy function is here to satisfy nullhttpd More...
 
void decodeurl (char *pEncoded)
 
void fixslashes (char *pOriginal)
 
int hex2int (char *pChars)
 
void striprn (char *string)
 
void swapchar (char *string, char oldchar, char newchar)
 
char * nullhttpd_strcasestr (const char *src, const char *query)
 
char * strcatf (char *dest, const char *format,...)
 
int printhex (const char *format,...)
 
int printht (const char *format,...)
 
void printerror (int sid, int status, char *title, char *text)
 
char * get_mime_type (char *name)
 
void ReadPOSTData (int sid)
 
int read_header (int sid)
 
void send_header (int sid, int cacheable, int status, char *title, char *extra_header, char *mime_type, int length, time_t mod)
 
void send_fileheader (int sid, int cacheable, int status, char *title, char *extra_header, char *mime_type, int length, time_t mod)
 
void logaccess (int loglevel, const char *format,...)
 
void logerror (const char *format,...)
 
int nullhttpd_getsid (void)
 
void flushbuffer (int sid)
 
int prints (const char *format,...)
 
int sgets (char *buffer, int max, int fd)
 
int closeconnect (int sid, int exitflag)
 
void server_shutdown ()
 
int sockinit (void)
 
void cgiinit (void)
 
NULLHTTPD_SHARE void init (void)
 
NULLHTTPD_SHARE void accept_loop (void *x)
 

Variables

struct {
   pthread_mutex_t   Crypt
 
   pthread_mutex_t   Global
 
   pthread_mutex_t   SQL
 
Lock
 
char program_name [255]
 
CONFIG config
 
CONNECTIONconn
 

Macro Definition Documentation

◆ DEFAULT_BASE_DIR

#define DEFAULT_BASE_DIR   "/usr/local/httpd"

◆ MAX_POSTSIZE

#define MAX_POSTSIZE   33554432 /* arbitrary 32 MB limit for POST request sizes */

◆ MAX_REPLYSIZE

#define MAX_REPLYSIZE   65536 /* arbitrary 64 KB limit for reply buffering */

◆ NULLHTTPD_SHARE

#define NULLHTTPD_SHARE

◆ SERVER_NAME

#define SERVER_NAME   "Null httpd 0.5.1"

Function Documentation

◆ accept_loop()

NULLHTTPD_SHARE void accept_loop ( void *  x)

◆ cgiinit()

void cgiinit ( void  )

◆ closeconnect()

int closeconnect ( int  sid,
int  exitflag 
)

◆ config_read()

int config_read ( void  )

this dummy function is here to satisfy nullhttpd

◆ decodeurl()

void decodeurl ( char *  pEncoded)

◆ dorequest()

void dorequest ( int  sid)

This is called whenever a client requests a stream.

◆ fixslashes()

void fixslashes ( char *  pOriginal)

◆ flushbuffer()

void flushbuffer ( int  sid)

◆ get_mime_type()

char* get_mime_type ( char *  name)

◆ hex2int()

int hex2int ( char *  pChars)

◆ init()

NULLHTTPD_SHARE void init ( void  )

◆ logaccess()

void logaccess ( int  loglevel,
const char *  format,
  ... 
)

◆ logerror()

void logerror ( const char *  format,
  ... 
)

◆ nullhttpd_getsid()

int nullhttpd_getsid ( void  )

◆ nullhttpd_strcasestr()

char* nullhttpd_strcasestr ( const char *  src,
const char *  query 
)

◆ printerror()

void printerror ( int  sid,
int  status,
char *  title,
char *  text 
)

◆ printhex()

int printhex ( const char *  format,
  ... 
)

◆ printht()

int printht ( const char *  format,
  ... 
)

◆ prints()

int prints ( const char *  format,
  ... 
)

◆ read_header()

int read_header ( int  sid)

◆ ReadPOSTData()

void ReadPOSTData ( int  sid)

◆ send_fileheader()

void send_fileheader ( int  sid,
int  cacheable,
int  status,
char *  title,
char *  extra_header,
char *  mime_type,
int  length,
time_t  mod 
)

◆ send_header()

void send_header ( int  sid,
int  cacheable,
int  status,
char *  title,
char *  extra_header,
char *  mime_type,
int  length,
time_t  mod 
)

◆ server_shutdown()

void server_shutdown ( )

◆ sgets()

int sgets ( char *  buffer,
int  max,
int  fd 
)

◆ sockinit()

int sockinit ( void  )

◆ strcatf()

char* strcatf ( char *  dest,
const char *  format,
  ... 
)

◆ striprn()

void striprn ( char *  string)

◆ swapchar()

void swapchar ( char *  string,
char  oldchar,
char  newchar 
)

Variable Documentation

◆ config

CONFIG config

◆ conn

CONNECTION* conn

◆ Crypt

pthread_mutex_t Crypt

◆ Global

pthread_mutex_t Global

◆ Lock

struct { ... } Lock

◆ program_name

char program_name[255]

◆ SQL

pthread_mutex_t SQL