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

# File modules/pc/pc_commands.c

## Included Files

- `#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/erroutines.h"`
    - `#include <stdio.h>`
    - `#include <unistd.h>`
    - `#include <stdlib.h>`
    - `#include <assert.h>`
    - `#include <time.h>`
    - `#include <stdarg.h>`
    - `#include <strings.h>`
    - `#include <glib.h>`
    - `#include <pthread.h>`
    - `#include <include/bitmask.h>`
    - `#include <include/stubs.h>`
    - `#include "include/thread.h"`
      - `#include <pthread.h>`
    - `#include "include/er_facilities.h"`
      - `#include <include/erroutines.h>`
      - `#include "include/er_RX_errors.h"`
      - `#include "include/er_ER_errors.h"`
      - `#include "include/er_IP_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/er_PM_errors.h"`
      - `#include "include/er_MM_errors.h"`
      - `#include "include/er_SV_errors.h"`
      - `#include "include/er_AC_errors.h"`
      - `#include "include/er_UD_errors.h"`
      - `#include "include/er_PA_errors.h"`
      - `#include "include/er_PC_errors.h"`
    - `#include "include/er_aspects.h"`
      - `#include "include/erroutines.h"`
    - `#include "include/er_formats.h"`

- `#include "include/access_control.h"`
  - `#include "include/erroutines.h"`
  - `#include "include/iproutines.h"`
    - `#include <sys/types.h>`
    - `#include <glib.h>`
    - `#include <include/inet6def.h>`
    - `#include <erroutines.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/sk.h"`
      - `#include "include/stubs.h"`
      - `#include <sys/types.h>`
      - `#include <sys/socket.h>`
      - `#include <netinet/in.h>`
      - `#include <netdb.h>`
      - `#include <pthread.h>`
      - `#include <stdlib.h>`
      - `#include <errno.h>`
      - `#include <fcntl.h>`
      - `#include <signal.h>`
      - `#include <stdio.h>`
      - `#include "include/iproutines.h"`
    - `#include "include/thread.h"`
  - `#include "include/mysql_driver.h"`

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

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

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

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

- `#include "include/protocol_whois.h"`
  - `#include "include/query_command.h"`
    - `#include <glib.h>`
    - `#include "include/bitmask.h"`
    - `#include "include/sk.h"`

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

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

- `#include "include/ca_defs.h"`
  - `#include <pthread.h>`
  - `#include <glib.h>`

- `#include "include/ca_configFns.h"`
  - `#include "include/ca_defs.h"`
  - `#include <memwrap.h>`
  - `#include <erroutines.h>`

- `#include "include/rp.h"`
  - `#include <stddef.h>`
  - `#include <glib.h>`
  - `#include <pthread.h>`
  - `#include <include/defs.h>`
  - `#include <iproutines.h>`
  - `#include <erroutines.h>`
  - `#include <rxroutines.h>`
  - `#include <mysql_driver.h>`
  - `#include "include/ca_defs.h"`
  - `#include <thread.h>`

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

- `#include "include/er_macro.h"`
  - `#include "include/sk.h"`

## Global Variable Lock

`pthread_mutex_t Lock`

Included from | include/ca_defs.h
Visible in: |  | modules/ac/access_control.c
|  | modules/ca/ca_configFns.c
|  | modules/ca/ca_initFn.c
|  | modules/ca/ca_sanityCheck.c
|  | modules/ca/ca_sourceLoader.c
|  | modules/ca/ca_values.c
|  | modules/er/er_macro.c
|  | modules/pc/pc_commands.c
Used in: | ca_get_adminIntElement() | modules/ca/ca_configFns.c
| ca_get_adminStrElement() | modules/ca/ca_configFns.c
| ca_get_boolean() | modules/ca/ca_configFns.c
| ca_get_dirlist() | modules/ca/ca_configFns.c
| ca_get_int() | modules/ca/ca_configFns.c
| ca_get_string() | modules/ca/ca_configFns.c
| ca_set_boolean() | modules/ca/ca_configFns.c
| ca_set_string() | modules/ca/ca_configFns.c
| ca_srchandle2Intelement() | modules/ca/ca_configFns.c
| ca_srchandle2Strelement() | modules/ca/ca_configFns.c

## External Variables

SV_starttime
Display the statistics about the server.

`extern time_t SV_starttime`

## Global Function command_help()

      Display available commands.

`int command_help ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | show_commands()
References Variables: | command

## Global Function command_purify()

      Display the memory allocation records of purify(tm).
      The #define must be changed to activate this.
      The program will link only with purify.

`int command_purify ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | g_string_append()

## Global Function command_quit()

      Quit the config session.

`int command_quit ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h

## Global Function command_set()

`int command_set ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | command_execute()
References Variables: | set

## Global Function command_show()

      Relay functions for composed commands (eg. "set counter").

      They run the second word as a command from a specific array
      (show/set/stop/whatever). The hardcoded text is used only for help
      messages, printed in case the command is wrong as

     "<hardcoded> commands are: <list of possible commands>".

`int command_show ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | command_execute()
References Variables: | show

## Global Function command_stop()

`int command_stop ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | command_execute()
References Variables: | stop

## Global Function set_acl()

      Modify the whois access control list in the AC module.

      Arguments: IP[/prefixlength] column=value,column=value...

      Column names as in acl display. Unset columns are inherited.

`int set_acl ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | AC_asc_acl_command_set() | modules/ac/access_control.c
| NOERR() | modules/er/er.c
| g_string_append()

## Global Function set_counter()

      Reset the "session time" and "# of tasks"
      of a specific thread registered with the TA module.

`int set_counter ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | TA_reset_counters(), sscanf()

## Global Function set_err()

      Execute a command in the ER path processor of the ER module.
      (first subject to macro expansion of the first word).

      Argument is passed entirely to ER_macro_spec().

`int set_err ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | ER_macro_spec() | modules/er/er_macro.c
| free(), g_string_append()

## Global Function set_initrx()

      Reset the source.

      Reloads the radix tree.

      Argument: the source name.

`int set_initrx ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | ca_get_SourceHandleByName() | modules/ca/ca_configFns.c
| RP_init_trees(), RP_sql_load_reg(), g_string_append()

## Global Function set_macro()

      (re)define a macro for the ER path processor.

      Arguments: The first word is treated as a macro name.
      The rest of the line is treated as a macro definition.

`int set_macro ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | ER_make_macro() | modules/er/er_macro.c
| strlen(), strtok_r()

## Global Function set_nodeny()

      Reset the deny counter in the access tree to 0 (after reenabling)
      (AC module).

      Argument: IP address.

`int set_nodeny ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | AC_asc_set_nodeny() | modules/ac/access_control.c
| NOERR() | modules/er/er.c
| g_string_append()

## Global Function set_queries()

      Pause/resume queries.

      Argument: the word "pause" or "resume".

`int set_queries ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | PW_startqueries(), PW_stopqueries(), g_string_append(), sscanf(), strcmp()

## Global Function set_updates()

      Pause/resume update capability of the UD module.

      Argument: the word "pause" or "resume".

`int set_updates ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | CO_set_const() | modules/co/constants.c
| g_string_append(), sscanf(), strcmp()

## Global Function show_access()

      Display the whois access statistics from the AC module.

`int show_access ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | AC_print_access() | modules/ac/access_control.c
| g_string_sprintfa()

## Global Function show_acl()

      Display the whois access control list from the AC module.

`int show_acl ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | AC_print_acl() | modules/ac/access_control.c
| g_string_sprintfa()

## Global Function show_const()

      Display a specific constant of the CO module.

      Argument: name of the constant.

`int show_const ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | CO_const_to_string() | modules/co/constants.c
| g_string_append(), strlen(), strtok_r(), wr_real_free()

## Global Function show_consts()

      Display all the constants of the CO module.

`int show_consts ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | CO_to_string() | modules/co/constants.c
| free(), g_string_append()

## Global Function show_err()

      Show the current setup of the ER path system of the ER module.

`int show_err ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | er_print_paths() | modules/er/er_print.c
| free(), g_string_append()

## Global Function show_macros()

      Show the currently defined macros for the ER path system of the ER module.

`int show_macros ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | ER_macro_list() | modules/er/er_macro.c

## Global Function show_props()

      Display all the properties of the PR module.

`int show_props ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | PR_to_string(), free(), g_string_append()

## Global Function show_threads()

      Display all running threads registered with the TA module.

`int show_threads ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | TA_tostring(), free(), g_string_append()

## Global Function show_uptime()

      Display the statistics about the server.

`int show_uptime ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | SK_cd_printf(), ctime_r(), time()
References Variables: | SV_starttime

## Global Function show_whois()

      Switch the session to a whois session.

`int show_whois ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | PW_interact()

## Global Function stop_query()

      Trigger running of the socket watchdog actions for a specific thread
      (typically resulting in shutting down of a query thread).

      Arguments are "<socket_id> <thread_id>" as in the output of "show threads".

      Assumes the command is like "stop query 11 17".
      This is to limit ambiguities (a new thread on the same socket, for example).
    .

`int stop_query ( char* input, GString* output, sk_conn_st* condat )`

Prototyped in: | modules/pc/pc_commands.h
Calls: | TA_trigger(), g_string_append(), sscanf()