Table of Contents
Functions
- add_accept_header Adds a mime_type to a request's accept char buffer
- add_alias add an Alias, Redirect, or ScriptAlias to the alias hash table
- add_cgi_env adds a variable to CGI's environment Used for HTTP_ headers
- add_mime_type associates a mime-type with a filename extension
- ascii_sockaddr Converts a struct SOCKADDR *s to its ascii representation
- bind_server Binds to the existing server_s, based on the configuration string in server_ip
- block_request Moves a request from the ready queue to the blocked queue
- boa_perror logs an error to user and error file both
- c_add_alias simply calls add_alias with its arguments
- c_add_type calls add_mime_type with its arguments
- c_set_group takes a group and sets, if possible, the server's GID number
- c_set_int Sets a pointer to the value of an integer
- c_set_string takes a string and a pointer, and sets the pointer to a strdup of the string
- c_set_unity Sets a variable to true;
- c_set_user takes a user and sets, if possible, the server's UID number
- clean_pathname Cleans pathname of safe/incorrect character sequences
- close_access_log closes access_log file
- complete_env adds the known client header env variables and terminates the environment array
- create_common_env Set up the environment variables that are common to all CGI scripts
- create_env Allocates memory for environment before execing a CGI script
- dequeue Removes a request from its current queue
- dump_alias Empties the alias hashtable, deallocating any allocated memory
- dump_mime Empties mime hash table, deallocating as it goes
- dump_passwd Empties passwd hash table, deallocating as it goes
- enqueue Adds a request to the head of a queue
- env_gen_extra Takes a key and a value and converts them for CGI use
- escape_string escapes the string inp
- fdset_update Iterate through the blocked requests, checking whether that file descriptor has been set by select, and update the fd_set to reflect current status
- find_alias Locates uri in the alias hashtable if it exists
- find_mmap Either locates the entry for an already-mmapped-file, or mmap's the file and returns a new entry
- find_named_mmap takes a filename and locates the mmap struct associated with it
- fixup_server_root Makes sure the server root is valid
- fopen_gen_fd Attempts to use open_gen_fd to open a file, otherwise returns fdopen
- free_request Deallocates memory for a finished request and closes down socket
- free_requests Deallocates each of the request* structures in request_free
- get_alias_hash_value adds the ASCII values of the file letters and mods by the hashtable size to get the hash value
- get_cachedir_file obtains the cache file associated with a particular directory
- get_commonlog_time Returns the current time in common log format in a static char buffer
- get_dir Called from process_get if the request is a directory
- get_home_dir Returns a char pointer to the supplied user's home directory
- get_mime_hash_value adds the ASCII values of the file extension letters and mods by the hashtable size to get the hash value
- get_mime_type Returns the mime type for a supplied filename
- get_request accepts a new request on server_s, does some basic initialization and adds it to the ready queue
- index_directory Called from get_cachedir_file if a directory html has to be generated on the fly
- init_cgi Called for GET/POST requests that refer to ScriptAlias directories or application/x-httpd-cgi files
- init_get Initializes a non-script GET or HEAD request
- init_script_alias Performs full parsing on a ScriptAlias request Sets path_info and script_name
- init_signals Sets up signal handlers for all our friends
- lame_duck_mode_run When the server comes around to discovering that lame_duck_mode==1, it runs this code, which closes the server socket and sets lame_duck_mode to 2
- log_access Writes access log data to access_log
- log_error_doc Logs the current time and transaction identification to the stderr (the error log)
- log_error_mesg performs a log_error_time, writes the file and line number to stderr (saving errno), and then a perror with message
- log_error_time Logs the current time to the stderr (the error log)
- lookup_keyword Takes a keyword and returns a ccommand struct, if one exists
- modified_since Decides whether a file's mtime is newer than the If-Modified-Since header of a request
- month2int Turns a three letter month into a 0-11 int
- net_port convert struct SOCKADDR *s->sin_port from network to host byte order
- new_request Obtains a request struct off the free list, or if the free list is empty, allocates memory
- open_gen_fd Like popen, but gives fd instead of FILE *
- open_logs Opens up the error log, ties it to stderr, and line buffers it
- open_net_fd Like popen, but gives fd instead of FILE *
- open_pipe_fd Like popen, but gives fd instead of FILE *
- print_content_length prints the content-length of the resource as "Content-Length: xxx\r\n"
- print_content_type prints the mime-type of the resource as "Content-Type: \r\n"
- print_http_headers prints the Date, the Server, and the keepalive headers
- print_ka_phrase prints the keepalive header information
- print_last_modified prints the last modified time of the resource as "Last-Modified: xx\r\n"
- process_cgi_header Processes the first buffer-full from a non-NPH CGI
- process_get Writes a chunk of data to the socket
- process_header_end Takes a request and performs some final checking before init_cgi or init_get
- process_logline Parses request logline to determine request type and method, then passed to translate_uri for further parsing
- process_option_line Parses the contents of req->header_line and takes appropriate action
- process_requests Iterates through the ready queue, passing each request to the appropriate handler for processing
- read_body Reads body data from a request socket for POST CGI
- read_config_files Reads config files via yyparse, then makes sure that all required variables are set properly
- read_from_pipe Reads data from a pipe into the requests buffer
- read_header Reads header data from a request socket
- ready_request Moves a request from the blocked queue to the ready queue
- release_mmap decrements the entry's use count by one, and if it is 0, deallocates it and removes it completely
- req_flush Sends any backlogged buffer to client
- req_write Buffers data before sending to client
- req_write_escape_html Buffers and HTML "escapes" data before sending to client
- req_write_escape_http Buffers and HTTP "escapes" data before sending to client
- rfc822_time_buf Writes rfc822 (1123) time directly into the request's buffer
- send_r_bad_request R_BAD_REQUEST: 400
- send_r_bad_version R_NOT_IMP: 505
- send_r_error R_ERROR: 500
- send_r_forbidden R_FORBIDDEN: 403
- send_r_not_found R_NOT_FOUND: 404
- send_r_not_implemented R_NOT_IMP: 501
- send_r_not_modified R_NOT_MODIFIED: 304
- send_r_request_ok R_REQUEST_OK: 200
- send_r_unauthorized R_UNAUTHORIZED: 401
- send_redirect_perm R_MOVED_PERM: 301
- send_redirect_temp R_MOVED_TEMP: 302
- sigalrm The SIGALRM handler
- sigbus The SIGBUS handler
- sigchld The SIGCHLD handler
- sigchld_run When the server comes around to discovering that sigchld_flag != 0, it runs this code
- sighup The SIGHUP handler
- sighup_run When the server comes around to discovering that sighub_flag != 0, it runs this code
- sigint The SIGINT handler
- sigsegv The SIGSEGV handler
- sigterm The SIGTERM handler
- simple_itoa Fast routine to convert an integer into its ascii representation
- strdup strdup defined for systems that don't have it
- strstr strstr defined for systems that don't have it
- to_upper Turns a string into all upper case (for HTTP_ header forming) AND changes - into _
- translate_uri Parse a request's virtual path
- unescape_uri Decodes a uri, changing %xx encodings with the actual character
- write_body Writes a chunk of data to a file
- write_from_pipe Writes data previously read from a pipe to a socket
Variables
Enums, Unions, Structs
- _hash_struct_ a fairly simple hash structure, with a key, a value, and a next pointer
- alias The alias structure
- ccommand The config parser structure
- mmap_entry A mmap entry structure
- request The request structure itself
- status The status structure
Hierarchy of classes
This page was generated with the help of DOC++.