Cross reference for modules/pc/protocol_config.c of index.

# File modules/pc/protocol_config.c

      $Revision: 1.24 $

      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_purify() | 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

- `#include <stdio.h>`

- `#include <stdlib.h>`

- `#include <time.h>`

- `#include <sys/ioctl.h>`

- `#include <termio.h>`

- `#include "include/mysql_driver.h"`
  - `#include "/opt/package/mysql/include/mysql/mysql.h"`
    - `#include <sys/types.h>`
    - `#include "/opt/package/mysql/include/mysql/mysql_com.h"`
    - `#include "/opt/package/mysql/include/mysql/mysql_version.h"`
  - `#include "/opt/package/mysql/include/mysql/mysqld_error.h"`

- `#include "include/constants.h"`
  - `#include <glib.h>`

- `#include "include/properties.h"`

- `#include "include/thread.h"`
  - `#include <pthread.h>`

- `#include "modules/pc/protocol_config.h"`

- `#include "include/access_control.h"`
  - `#include "include/erroutines.h"`
    - `#include <stdio.h>`
    - `#include <unistd.h>`
    - `#include <stdlib.h>`
    - `#include <assert.h>`
    - `#include <time.h>`
    - `#include <stdarg.h>`
    - `#include <strings.h>`
    - `#include <include/bitmask.h>`
    - `#include <include/er_aspects.h>`
    - `#include <include/stubs.h>`
    - `#include "include/er_facilities.h"`
      - `#include <include/erroutines.h>`
      - `#include "include/er_ER_errors.h"`
      - `#include "include/er_IP_errors.h"`
      - `#include "include/er_RX_errors.h"`
      - `#include "include/er_UP_errors.h"`
      - `#include "include/er_UT_errors.h"`
      - `#include "include/er_WH_errors.h"`
      - `#include "include/er_RP_errors.h"`
      - `#include "include/er_QI_errors.h"`
      - `#include "include/er_QC_errors.h"`
      - `#include "include/er_PW_errors.h"`
      - `#include "include/er_SK_errors.h"`
      - `#include "include/er_TH_errors.h"`
      - `#include "include/er_SQ_errors.h"`
      - `#include "include/erroutines.h"`
  - `#include "include/iproutines.h"`
    - `#include <glib.h>`
    - `#include <erroutines.h>`
    - `#include <sys/types.h>`
  - `#include "include/rxroutines.h"`
    - `#include <glib.h>`
    - `#include <pthread.h>`
    - `#include <stubs.h>`
    - `#include <include/memwrap.h>`
    - `#include <stdio.h>`
    - `#include <iproutines.h>`
    - `#include <erroutines.h>`
    - `#include "include/socket.h"`
      - `#include <sys/types.h>`
      - `#include <sys/socket.h>`
      - `#include <netinet/in.h>`
      - `#include <stdlib.h>`
      - `#include <errno.h>`
      - `#include <netdb.h>`
      - `#include <signal.h>`
      - `#include <stdio.h>`
      - `#include <iproutines.h>`
    - `#include "include/thread.h"`
  - `#include "include/mysql_driver.h"`

- `#include "include/socket.h"`

- `#include "include/ta.h"`
  - `#include <glib.h>`
  - `#include <pthread.h>`
  - `#include <stubs.h>`
  - `#include <memwrap.h>`
  - `#include <stdio.h>`
  - `#include <include/socket.h>`
  - `#include <include/timediff.h>`

## 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
`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: | command | modules/pc/protocol_config.c

## Local Function command_purify()

`static char* command_purify ( char* input, sk_conn_st* condat )`

Prototyped in: | modules/pc/protocol_config.c
Calls: | fprintf(), strcpy(), wr_real_malloc()
Used in: |  | modules/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: | set | modules/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: | show | modules/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: | command | modules/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_runtime | modules/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_acl | modules/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