File modules/pc/protocol_config.c

  $Revision: 1.10 $

Protocol config module (pc). This is the protocol that the admin uses to talk to the server.
Status: NOT REVUED, NOT TESTED
References Functions: command_help()modules/pc/protocol_config.c
  command_quit()modules/pc/protocol_config.c
  command_repeat()modules/pc/protocol_config.c
  command_set()modules/pc/protocol_config.c
  command_show()modules/pc/protocol_config.c
  command_sql()modules/pc/protocol_config.c
  set_const()modules/pc/protocol_config.c
  set_consts()modules/pc/protocol_config.c
  set_props()modules/pc/protocol_config.c
  show_access()modules/pc/protocol_config.c
  show_acl()modules/pc/protocol_config.c
  show_const()modules/pc/protocol_config.c
  show_consts()modules/pc/protocol_config.c
  show_props()modules/pc/protocol_config.c
  show_thread()modules/pc/protocol_config.c
  show_whois()modules/pc/protocol_config.c

Included Files


Typedef Command

Each command has a

typedef struct _command Command
struct _command 
   { 
     const char* name; Name to be invoked.
     char* (*function)(char*,sk_conn_st*); Function to be invoked.
     const char* help; Command help.
   } 


Local Variables

command
* Contains the command definitions

static struct _command command[]
Used in: command_help()
  process_input()

show
* Contains the show commands

static struct _command show[]
Used in: command_show()

set
* Contains the set commands

static struct _command set[]
Used in: command_set()


Global Function PC_interact()

void PC_interact ( int sock )
Prototyped in: modules/pc/protocol_config.h
Calls: CO_get_authenticate()modules/co/constants.c
  CO_get_prompt()modules/co/constants.c
  CO_get_welcome()modules/co/constants.c
  authenticate_user()modules/pc/protocol_config.c
  log_config()modules/pc/protocol_config.c
  process_input()modules/pc/protocol_config.c
  SK_cd_gets(), SK_cd_puts(), SK_close(), SK_getpeerip(), SK_getpeername(), memset()

Local Function authenticate_user()

static char* authenticate_user ( sk_conn_st* condat )
Calls: log_config()modules/pc/protocol_config.c
  PR_get_property(), SK_cd_gets(), SK_cd_puts(), calloc(), crypt(), strcmp(), strcpy(), strlen(), strncpy()
Called by: PC_interact()modules/pc/protocol_config.c

Local Function command_execute()

static char* command_execute ( char* input, char* comm_name, Command* comm, sk_conn_st* condat )
Calls: find_command()modules/pc/protocol_config.c
  show_commands()modules/pc/protocol_config.c
  calloc(), free(), sprintf(), strcpy(), strlen(), strtok()
Called by: command_set()modules/pc/protocol_config.c
  command_show()modules/pc/protocol_config.c

Local Function command_help()

static char* command_help ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: find_command()modules/pc/protocol_config.c
  show_commands()modules/pc/protocol_config.c
  calloc(), free(), strcat(), strcpy(), strlen(), strtok()
Called by: process_input()modules/pc/protocol_config.c
Used in:  modules/pc/protocol_config.c
References Variables: commandmodules/pc/protocol_config.c

Local Function command_quit()

static char* command_quit ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Used in:  modules/pc/protocol_config.c

Local Function command_repeat()

static char* command_repeat ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Called by: process_input()modules/pc/protocol_config.c
Used in:  modules/pc/protocol_config.c

Local Function command_set()

static char* command_set ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: command_execute()modules/pc/protocol_config.c
Used in:  modules/pc/protocol_config.c
References Variables: setmodules/pc/protocol_config.c

Local Function command_show()

static char* command_show ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: command_execute()modules/pc/protocol_config.c
Used in:  modules/pc/protocol_config.c
References Variables: showmodules/pc/protocol_config.c

Local Function command_sql()

static char* command_sql ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: CO_get_database()modules/co/constants.c
  CO_get_database_port()modules/co/constants.c
  CO_get_host()modules/co/constants.c
  CO_get_password()modules/co/constants.c
  CO_get_query()modules/co/constants.c
  CO_get_user()modules/co/constants.c
  SQ_close_connection(), SQ_execute_query(), SQ_free_result(), SQ_get_connection(), SQ_info_to_string(), SQ_result_to_string(), calloc(), free(), printf(), sprintf(), strcat(), strcmp(), strcpy(), strlen()
Used in:  modules/pc/protocol_config.c

Local Function echo_off()

static void echo_off ( int sock )
Calls: ioctl()

Local Function echo_on()

static void echo_on ( int sock )
Calls: ioctl()

Local Function find_command()

static int find_command ( char* comm_name, Command* comm )
Calls: strcmp(), strcpy(), strtok()
Called by: command_execute()modules/pc/protocol_config.c
  command_help()modules/pc/protocol_config.c
  process_input()modules/pc/protocol_config.c

Local Function log_config()

static void log_config ( const char* user, const char* status )
Calls: CO_get_config_logfile()modules/co/constants.c
  CO_get_config_logging()modules/co/constants.c
  TH_get_id(), ctime(), fclose(), fopen(), fprintf(), printf(), strcmp(), time()
Called by: PC_interact()modules/pc/protocol_config.c
  authenticate_user()modules/pc/protocol_config.c

Local Function process_input()

  Process the input.

More:
  Author:
        ottrey
static int process_input ( char* input, sk_conn_st* condat )
char* input
 
sk_conn_st* condat
connection data
Calls: CO_get_clear_screen()modules/co/constants.c
  CO_get_prompt()modules/co/constants.c
  CO_get_sleep_time()modules/co/constants.c
  command_help()modules/pc/protocol_config.c
  command_repeat()modules/pc/protocol_config.c
  find_command()modules/pc/protocol_config.c
  SK_cd_puts(), atoi(), free(), sleep(), strncmp()
Called by: PC_interact()modules/pc/protocol_config.c
References Variables: commandmodules/pc/protocol_config.c

Local Function set_const()

static char* set_const ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: CO_const_to_string()modules/co/constants.c
  CO_set_const()modules/co/constants.c
  calloc(), free(), printf(), sprintf(), strcpy(), strlen(), strtok()
Used in:  modules/pc/protocol_config.c

Local Function set_consts()

static char* set_consts ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: CO_set()modules/co/constants.c
Used in:  modules/pc/protocol_config.c

Local Function set_props()

static char* set_props ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: PR_set()
Used in:  modules/pc/protocol_config.c

Local Function show_access()

static char* show_access ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: SK_cd_puts(), rx_walk_tree(), sprintf()
Used in:  modules/pc/protocol_config.c
References Functions: AC_rxwalkhook_print()modules/ac/access_control.c
References Variables: act_runtimemodules/ac/access_control.c

Local Function show_acl()

static char* show_acl ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: SK_cd_puts(), rx_walk_tree(), sprintf()
Used in:  modules/pc/protocol_config.c
References Functions: AC_rxwalkhook_print_acl()modules/ac/access_control.c
References Variables: act_aclmodules/ac/access_control.c

Local Function show_commands()

static char* show_commands ( Command* comm )
Calls: calloc(), sprintf(), strcat(), strcpy(), strlen()
Called by: command_execute()modules/pc/protocol_config.c
  command_help()modules/pc/protocol_config.c

Local Function show_const()

static char* show_const ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: CO_const_to_string()modules/co/constants.c
  calloc(), free(), strcpy(), strlen(), strtok()
Used in:  modules/pc/protocol_config.c

Local Function show_consts()

static char* show_consts ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: CO_to_string()modules/co/constants.c
Used in:  modules/pc/protocol_config.c

Local Function show_props()

static char* show_props ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: PR_to_string()
Used in:  modules/pc/protocol_config.c

Local Function show_thread()

static char* show_thread ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: TH_to_string()
Used in:  modules/pc/protocol_config.c

Local Function show_whois()

static char* show_whois ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Used in:  modules/pc/protocol_config.c