engine.h File Reference

Go to the source code of this file.

Data Structures

struct  host_allow

Defines

#define DEFAULT_QUEUE_LEN   10

Typedefs

typedef host_allowHostsAllow

Functions

void start_httpd (int port, int backlog, char *bindAddr)
 Start the HTTPD server.

void stop_httpd ()
 Stop the HTTPD server.

int add_host_allow (char *)
 Add hosts allowed to connect to this server.

int has_hosts_allow ()
 Are any hosts present in the host allow list?

void destroy_hosts_allow ()
 Free the host allow list.


Define Documentation

#define DEFAULT_QUEUE_LEN   10
 

Definition at line 34 of file engine.h.


Typedef Documentation

typedef struct host_allow* HostsAllow
 

Definition at line 41 of file engine.h.


Function Documentation

int add_host_allow char *    name
 

Add hosts allowed to connect to this server.

Parameters:
name  A hostname (A-Record) or IP address to be added to the hosts allow list
Returns:
FALSE if the given host does not resolve, otherwise TRUE

Definition at line 230 of file engine.c.

References END_LOCK, LOCK, host_allow::name, NEW, host_allow::next, and xstrdup().

void destroy_hosts_allow  
 

Free the host allow list.

Definition at line 303 of file engine.c.

References END_LOCK, has_hosts_allow(), and LOCK.

int has_hosts_allow  
 

Are any hosts present in the host allow list?

Returns:
TRUE if the host allow list is non-empty, otherwise FALSE

Definition at line 287 of file engine.c.

References END_LOCK, and LOCK.

Referenced by can_http(), and destroy_hosts_allow().

void start_httpd int    port,
int    backlog,
char *    bindAddr
 

Start the HTTPD server.

Parameters:
port  The Port number to start the server at
backlog  The maximum length of the incomming connection queue
bindAddr  the local address the server will bind to

Definition at line 111 of file engine.c.

References check_socket(), create_server_socket(), destroy_wrapper(), embed_accepted_ssl_socket(), error(), http_processor(), myrun::httpdssl, myrun::httpsslclientpem, myrun::httpsslpem, init_ssl_server(), insert_accepted_ssl_socket(), mySSLServerConnection, Run, requestwrapper::socket, requestwrapper::ssl, requestwrapper::status, and STRERROR.

void stop_httpd  
 

Stop the HTTPD server.

Definition at line 213 of file engine.c.

References close_socket(), delete_ssl_server_socket(), and mySSLServerConnection.

Referenced by monit_http().