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

# File modules/pm/pm_serials.c

    * PM_get_minmax_serial()                                    *
    *                                                           *
    * Returns the min or max serial number.                     *
    *                                                           *
    * Returns:                                                  *
    *  min (max=0) or max (max=1) serial number                 *
    *  -1 in case of an error                                   *
    *                                                           *
    * Note:                                                     *
    *  min serial= MIN(serial_id)+1                             *
    *  MIN(serial_id) represents legacy RIPE.CURRENSERIAL       *
    *  of the snapshot                                          *
    *                                                           *

## Included Files

- `#include <stdio.h>`

- `#include "include/ud_int.h"`
  - `#include <stdio.h>`
  - `#include <strings.h>`
  - `#include <glib.h>`
  - `#include <stdlib.h>`
  - `#include <ctype.h>`
  - `#include <unistd.h>`
  - `#include "include/defs.h"`
    - `#include <glib.h>`
    - `#include "include/bitmask.h"`
    - `#include "include/DF_class_enum.def"`
    - `#include "include/DF_class_mask.def"`
    - `#include "include/DF_attribute_enum.def"`
    - `#include "include/DF_attribute_inv_attr_mask.def"`
    - `#include "include/which_keytypes.h"`
      - `#include "include/bitmask.h"`
    - `#include "include/iproutines.h"`
      - `#include <glib.h>`
      - `#include <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 <pthread.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/iproutines.h"`
  - `#include "include/rp.h"`
    - `#include <stddef.h>`
    - `#include <glib.h>`
    - `#include <defs.h>`
    - `#include <iproutines.h>`
    - `#include <erroutines.h>`
    - `#include <rxroutines.h>`
    - `#include <mysql_driver.h>`
    - `#include "include/ca_defs.h"`
      - `#include <pthread.h>`
      - `#include <glib.h>`
  - `#include "include/nh.h"`
    - `#include <mysql_driver.h>`
  - `#include "include/ca_configFns.h"`
    - `#include "include/ca_defs.h"`
  - `#include "include/ca_dictSyms.h"`
  - `#include "include/ca_macros.h"`
  - `#include "include/ca_srcAttribs.h"`
  - `#include "include/globaldefs.h"`
  - `#include "include/bitmask.h"`
  - `#include "include/which_keytypes.h"`

- `#include "modules/pm/protocol_mirror.h"`
  - `#include <glib.h>`
  - `#include "include/mysql_driver.h"`
  - `#include "include/iproutines.h"`

## Global Variable Lock

`pthread_mutex_t Lock`

Included from | include/ca_defs.h
Visible in: |  | modules/ca/ca_configFns.c
|  | modules/ca/ca_values.c
|  | modules/pm/pm_serials.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

## Global Variable newPort

`char newPort[16]`

Included from | include/ca_defs.h
Visible in: |  | modules/ca/ca_configFns.c
|  | modules/ca/ca_values.c
|  | modules/pm/pm_serials.c

## Global Function PM_get_minmax_serial()

`long PM_get_minmax_serial ( MYSQL* sql_connection, int max )`

Prototyped in: | modules/pm/protocol_mirror.h
Calls: | SQ_error(), SQ_execute_query(), SQ_free_result(), SQ_get_column_string(), SQ_row_next(), atol(), fprintf(), free(), sprintf()
Called by: | pm_get_source_info() | modules/pm/pm_serials.c

## Global Function PM_get_nrtm_sources()

`GString* PM_get_nrtm_sources ( ip_addr_t* client_address, char* source )`

Prototyped in: | modules/pm/protocol_mirror.h
Calls: | ca_get_SourceHandleByName() | modules/ca/ca_configFns.c
| ca_get_SourceHandleByPosition() | modules/ca/ca_configFns.c
| ca_srchandle2Strelement() | modules/ca/ca_configFns.c
| pm_get_source_info() | modules/pm/pm_serials.c
| free(), g_string_sized_new(), g_string_sprintfa()

## Global Function PM_get_serial_object()

`char* PM_get_serial_object ( MYSQL* sql_connection, long serial_number, int* operation )`

Prototyped in: | modules/pm/protocol_mirror.h
Calls: | atlast() | modules/pm/pm_serials.c
| getop() | modules/pm/pm_serials.c
| SQ_error(), SQ_execute_query(), SQ_free_result(), SQ_get_column_string(), SQ_row_next(), fprintf(), free(), sprintf()

## Global Function pm_get_source_info()

`void pm_get_source_info ( GString* gbuff, ip_addr_t* client_address, char* source, ca_dbSource_t* source_hdl )`

Prototyped in: | modules/pm/pm_serials.c
Calls: | AA_can_mirror() | modules/aa/aa.c
| PM_get_minmax_serial() | modules/pm/pm_serials.c
| ca_srchandle2Intelement() | modules/ca/ca_configFns.c
| ca_srchandle2Strelement() | modules/ca/ca_configFns.c
| SQ_close_connection(), SQ_get_connection(), free(), g_string_sprintfa()
Called by: | PM_get_nrtm_sources() | modules/pm/pm_serials.c

## Local Function atlast()

`static int atlast ( MYSQL* sql_connection, long serial_number )`

Calls: | atoi(), free(), get_field_str(), sprintf()
Called by: | PM_get_serial_object() | modules/pm/pm_serials.c

## Local Function getop()

`static int getop ( MYSQL* sql_connection, long serial_number )`

Calls: | atoi(), free(), get_field_str(), sprintf()
Called by: | PM_get_serial_object() | modules/pm/pm_serials.c