File autoproc.c


Included Files


Preprocessor definitions

#define LOCAL_SOCKET "/tmp/autoproc-0"

#define HOSTNAME_SIZE 256

#define UNIX_FIFO_NAME "/tmp/autoproc-0"

#define INPUT_BUFFER_SIZE 128

#define LINE_BUFFER_SIZE 1024


Global Variable m_current_socket

int m_current_socket
Visible in:   autoproc.c
Used in: autoproc_close_connection() autoproc.c
  autoproc_open_connection() autoproc.c
  main() autoproc.c

Local Variables

m_hostname
static char m_hostname[256]
Used in: autoproc_open_connection()  
  autoproc_print_prompt()  
  autoproc_set_host()  
  autoproc_set_host_port()  
  main()  

m_port
static int m_port

Used in: autoproc_open_connection()  
  autoproc_set_host()  
  autoproc_set_host_port()  
  main()  

m_is_remote_connection
static int m_is_remote_connection

Used in: autoproc_open_connection()  
  autoproc_print_prompt()  
  autoproc_set_host()  
  main()  

m_is_interactive
static int m_is_interactive

Used in: autoproc_print_prompt()  
  main()  

m_current_stream
static FILE* m_current_stream

Used in: autoproc_close_connection()  
  autoproc_open_connection()  
  main()  

Global Function main()

int main ( int argc, char** argv )
Calls: autoproc_close_connection() autoproc.c
  autoproc_open_connection() autoproc.c
  autoproc_print_prompt() autoproc.c
  autoproc_send_command() autoproc.c
  autoproc_set_host() autoproc.c
  autoproc_set_host_port() autoproc.c
  log_add_handler() log.c
  log_fatal() log.c
  log_initialize() log.c
  exit(), feof(), fflush(), fgets(), fprintf(), getopt(), getpass(), printf(), select(), strcat(), strcmp(), strcpy(), strlen(), strncat(), strncmp(), strstr()
References Functions: log_console_handler() log.c
References Variables: m_current_socket autoproc.c
  m_current_stream autoproc.c
  m_hostname autoproc.c
  m_is_interactive autoproc.c
  m_is_remote_connection autoproc.c
  m_port autoproc.c

Local Function autoproc_close_connection()

static void autoproc_close_connection ( void )
Prototyped in: autoproc.c
Calls: close(), fclose()
Called by: main() autoproc.c
References Variables: m_current_socket autoproc.c
  m_current_stream autoproc.c

Local Function autoproc_open_connection()

static void autoproc_open_connection ( void )
Prototyped in: autoproc.c
Calls: log_perror() log.c
  sockets_inet_connect() sockets.c
  sockets_unix_connect() sockets.c
  fdopen(), strcpy()
Called by: main() autoproc.c
References Variables: m_current_socket autoproc.c
  m_current_stream autoproc.c
  m_hostname autoproc.c
  m_is_remote_connection autoproc.c
  m_port autoproc.c

Local Function autoproc_print_prompt()

static void autoproc_print_prompt ( void )
Prototyped in: autoproc.c
Calls: fflush(), printf()
Called by: main() autoproc.c
References Variables: m_hostname autoproc.c
  m_is_interactive autoproc.c
  m_is_remote_connection autoproc.c

Local Function autoproc_send_command()

static void autoproc_send_command ( char* cmd, FILE* stream )
Prototyped in: autoproc.c
Calls: log_error() log.c
  log_perror() log.c
  fflush(), fgets(), fputs(), printf()
Called by: main() autoproc.c

Local Function autoproc_set_host()

static void autoproc_set_host ( const char* command )
Prototyped in: autoproc.c
Calls: autoproc_set_host_port() autoproc.c
  __ctype_b_loc(), strcmp()
Called by: main() autoproc.c
References Variables: m_hostname autoproc.c
  m_is_remote_connection autoproc.c
  m_port autoproc.c

Local Function autoproc_set_host_port()

static void autoproc_set_host_port ( const char* optval )
Prototyped in: autoproc.c
Calls: string_util_strncpy() string_util.c
  string_util_trim() string_util.c
  __ctype_b_loc(), atoi(), strchr()
Called by: autoproc_set_host() autoproc.c
  main() autoproc.c
References Variables: m_hostname autoproc.c
  m_port autoproc.c