File modules/pc/protocol_config.c

  $Revision: 1.23 $

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_acl()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_threads()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.
   } 


External Variables

SV_starttime
extern time_t SV_starttime

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_printf(), SK_cd_puts(), SK_close(), SK_getpeerip(), SK_getpeername(), TA_increment(), TA_setactivity(), ctime_r(), fprintf(), free(), memset(), strdup(), strlen(), time(), wr_real_free()
References Variables: SV_starttime

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(), crypt(), fprintf(), strcmp(), strcpy(), strlen(), strncpy(), wr_real_malloc()
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
  fprintf(), sprintf(), strcpy(), strlen(), strtok(), wr_real_free(), wr_real_malloc()
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
  fprintf(), strcat(), strcpy(), strlen(), strtok(), wr_real_free(), wr_real_malloc()
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: SQ_close_connection(), SQ_execute_query(), SQ_free_result(), SQ_get_connection(), SQ_info_to_string(), SQ_result_to_string(), fprintf(), printf(), sprintf(), strcat(), strcmp(), strcpy(), strlen(), wr_real_free(), wr_real_malloc()
Used in:  modules/pc/protocol_config.c

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: TH_get_id(), ctime_r(), printf(), 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
&nbs;
sk_conn_st* condat
connection data
Calls: CO_get_clear_screen()modules/co/constants.c
  CO_get_prompt()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(), strncmp(), wr_real_free()
Called by: PC_interact()modules/pc/protocol_config.c
References Variables: commandmodules/pc/protocol_config.c

Local Function set_acl()

static char* set_acl ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: AC_asc_acl_command_set()modules/ac/access_control.c
  NOERR()modules/er/er.c
  wr_string()
Used in:  modules/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
  fprintf(), printf(), sprintf(), strcpy(), strlen(), strtok(), wr_real_free(), wr_real_malloc()
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: AC_to_string_header()modules/ac/access_control.c
  SK_cd_puts(), rx_walk_tree(), sprintf(), wr_real_free(), wr_string()
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: AC_acl_to_string_header()modules/ac/access_control.c
  SK_cd_puts(), rx_walk_tree(), sprintf(), wr_real_free(), wr_string()
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: fprintf(), sprintf(), strcat(), strcpy(), strlen(), wr_real_malloc()
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
  fprintf(), strcpy(), strlen(), strtok(), wr_real_free(), wr_real_malloc()
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_threads()

static char* show_threads ( char* input, sk_conn_st* condat )
Prototyped in: modules/pc/protocol_config.c
Calls: TA_tostring()
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
Calls: wr_string()
Used in:  modules/pc/protocol_config.c