File server.c


Included Files


Preprocessor definitions

#define UNIX_SOCKET_NAME "/tmp/autoproc-0"

#define CONN_REFUSED "Connection refused.\n.\n"


Local Variables

m_inet_socket
static int m_inet_socket
Used in: server_close_sockets()  
  server_main_thread()  
  server_open_sockets()  

m_unix_socket
static int m_unix_socket

Used in: server_close_sockets()  
  server_main_thread()  
  server_open_sockets()  

m_socket_mutex
static pth_mutex_t m_socket_mutex

Used in: server_main_thread()  

Global Function server_close_sockets()

void server_close_sockets ( void )
Prototyped in: server.h
Calls: close()
Called by: server_shutdown() server.c
References Variables: m_inet_socket server.c
  m_unix_socket server.c

Global Function server_main_thread()

void* server_main_thread ( void* arg )
Prototyped in: server.h
Calls: log_debug() log.c
  log_info() log.c
  log_perror() log.c
  server_is_access_permitted() server.c
  server_open_sockets() server.c
  server_shutdown() server.c
  setup_get_configuration() setup.c
  __errno_location(), close(), fcntl(), free(), inet_ntoa(), malloc(), pth_accept(), pth_attr_new(), pth_attr_set(), pth_mutex_acquire(), pth_mutex_init(), pth_mutex_release(), pth_select(), pth_spawn(), pth_write(), strerror()
Used in: main() autoprocd.c
References Functions: server_tcp_connection_thread() server.c
References Variables: m_inet_socket server.c
  m_socket_mutex server.c
  m_unix_socket server.c

Global Function server_shutdown()

void server_shutdown ( void )
Prototyped in: server.h
Calls: log_debug() log.c
  server_close_sockets() server.c
  unlink()
Called by: main() autoprocd.c
  server_main_thread() server.c
  server_open_sockets() server.c

Local Function __bswap_16()

static unsigned short int __bswap_16 ( unsigned short int __bsx )
Included from: /usr/include/bits/byteswap.h

Local Function __bswap_32()

static unsigned int __bswap_32 ( unsigned int __bsx )
Included from: /usr/include/bits/byteswap.h

Local Function server_create_unix_socket()

static int server_create_unix_socket ( char* socketname )
Calls: log_debug() log.c
  log_fatal() log.c
  setup_get_configuration() setup.c
  sockets_unix_create() sockets.c
  chmod(), exit(), unlink()
Called by: server_open_sockets() server.c

Local Function server_is_access_permitted()

static int server_is_access_permitted ( struct sockaddr_in* sa )
Calls: hosts_access(), inet_ntoa(), request_init()
Called by: server_main_thread() server.c

Local Function server_open_sockets()

static void server_open_sockets ( void )
Prototyped in: server.c
Calls: log_debug() log.c
  log_fatal() log.c
  server_create_unix_socket() server.c
  server_shutdown() server.c
  setup_get_configuration() setup.c
  sockets_inet_create() sockets.c
  __errno_location(), exit(), fcntl(), getservbyname(), getuid(), listen(), strerror()
Called by: server_main_thread() server.c
References Variables: m_inet_socket server.c
  m_unix_socket server.c

Local Function server_tcp_connection_thread()

static void* server_tcp_connection_thread ( void* arg )
Calls: interpreter_process_input() interpreter.c
  log_debug() log.c
  free()
Used in: server_main_thread() server.c