Cross reference for modules/pm/protocol_mirror.c of index.

# File modules/pm/protocol_mirror.c

      Protocol mirror module (pw).

      Status: NOT REVUED, NOT TESTED

## Included Files

- `#include <stdio.h>`

- `#include <glib.h>`

- `#include "modules/pm/protocol_mirror.h"`
  - `#include <glib.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/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/iproutines.h"`
    - `#include <sys/types.h>`
    - `#include <glib.h>`
    - `#include <include/inet6def.h>`
    - `#include <erroutines.h>`
  - `#include "include/aa.h"`
    - `#include "include/iproutines.h"`

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

- `#include "include/constants.h"`
  - `#include <glib.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/stubs.h"`

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

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

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

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

- `#include "include/ca_macros.h"`
  - `#include "include/ca_adminAttribs.h"`

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

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

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

## Preprocessor definitions

`#define MIN_ARG_LENGTH 6`

`#define NRTM_DELIM "-:"`

`#define MAX_OPT_ARG_C 3`

`#define Q_QUERY 0x01`

`#define G_QUERY 0x02`

`#define K_QUERY 0x04`

`#define IS_Q_QUERY( a )`

`#define IS_G_QUERY( a )`

`#define IS_PERSISTENT( a )`

## 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
|  | modules/pm/pm_serials.c
|  | modules/pm/protocol_mirror.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

## Global Function PM_interact()

      Interact with the client.

      More:

      Authors:
            ottrey
            andrei

    Online References:

`void PM_interact ( int sock )`

`int sock`
  Socket that client is connected to.

Prototyped in: | modules/pm/protocol_mirror.h
Calls: | AA_can_mirror() | modules/aa/aa.c
| CO_get_do_server() | modules/co/constants.c
| ER_dbg_va() | modules/er/er.c
| ER_inf_va() | modules/er/er.c
| ER_perror() | modules/er/er.c
| PM_get_minmax_serial() | modules/pm/pm_serials.c
| PM_get_nrtm_sources() | modules/pm/pm_serials.c
| PM_get_serial_object() | modules/pm/pm_serials.c
| ca_get_SourceHandleByName() | modules/ca/ca_configFns.c
| ca_get_string() | modules/ca/ca_configFns.c
| ca_srchandle2Intelement() | modules/ca/ca_configFns.c
| ca_srchandle2Strelement() | modules/ca/ca_configFns.c
| parse_request() | modules/pm/protocol_mirror.c
| SK_cd_close(), SK_cd_gets(), SK_cd_puts(), SK_getpeerip(), SK_getpeername(), SQ_close_connection(), SQ_errno(), SQ_error(), SQ_get_connection(), TA_add(), TA_delete(), TA_setactivity(), free(), g_string_free(), memcpy(), memset(), sleep(), sprintf()

## Local Function parse_request()

`static int parse_request ( char* input, nrtm_q_t* nrtm_q )`

Calls: | atoi(), atol(), fprintf(), free(), g_strchug(), g_strdelimit(), g_strdup(), g_strfreev(), g_strndup(), g_strsplit(), g_strup(), index(), mg_getopt(), mg_new(), strncasecmp(), strncmp()
Called by: | PM_interact() | modules/pm/protocol_mirror.c