Cross reference for modules/ud/ud_main.c of index.

# File modules/ud/ud_main.c

      $Revision: 1.12 $

      Wrapper for NRTM client

      Status: NOT REVUED, NOT TESTED

     Author(s):       Andrei Robachevsky

## Included Files

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

- `#include <fcntl.h>`

- `#include <signal.h>`

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

- `#include "modules/ud/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/nh.h"`
    - `#include <mysql_driver.h>`
  - `#include "include/globaldefs.h"`
  - `#include "include/bitmask.h"`
  - `#include "include/which_keytypes.h"`

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

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

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

## Preprocessor definitions

`#define TIMEOUT 60`

## Global Function UD_do_nrtm()

     main cycle

`void UD_do_nrtm ( void )`

Prototyped in: | modules/ud/ud.h
Calls: | CO_get_database() | modules/co/constants.c
| CO_get_do_server() | modules/co/constants.c
| CO_get_do_update() | modules/co/constants.c
| CO_get_host() | modules/co/constants.c
| CO_get_nrtm_delay() | modules/co/constants.c
| CO_get_nrtm_host() | modules/co/constants.c
| CO_get_nrtm_logfile() | modules/co/constants.c
| CO_get_nrtm_port() | modules/co/constants.c
| CO_get_nrtm_version() | modules/co/constants.c
| CO_get_update_mode() | modules/co/constants.c
| PM_get_minmax_serial() | modules/pm/pm_serials.c
| SK_atoport() | modules/sk/socket.c
| SQ_close_connection() | modules/sq/mysql_driver.c
| SQ_get_connection2() | modules/sq/mysql_driver.c
| SV_sleep() | modules/sv/server.c
| get_current_serial() | modules/ud/ud_main.c
| set_current_serial() | modules/ud/ud_main.c
| UD_process_stream(), calloc(), fclose(), fopen(), fprintf(), free(), get_NRTM_stream(), printf(), sleep()
Used in: | SV_start() | modules/sv/server.c

## Global Function UD_do_updates()

     main cycle

`void UD_do_updates ( void* arg )`

Prototyped in: | modules/ud/ud.h
Calls: | CO_get_database() | modules/co/constants.c
| CO_get_do_server() | modules/co/constants.c
| CO_get_do_update() | modules/co/constants.c
| CO_get_host() | modules/co/constants.c
| CO_get_nrtm_logfile() | modules/co/constants.c
| CO_get_update_mode() | modules/co/constants.c
| SK_accept_connection() | modules/sk/socket.c
| SQ_close_connection() | modules/sq/mysql_driver.c
| SQ_get_connection2() | modules/sq/mysql_driver.c
| UD_process_stream(), fclose(), fdopen(), fopen(), fprintf(), free()
Used in: | SV_start() | modules/sv/server.c

## Global Function get_current_serial()

`int get_current_serial ( void )`

Calls: | CO_get_nrtm_cserialfile() | modules/co/constants.c
| atoi(), close(), fprintf(), open(), read()
Called by: | UD_do_nrtm() | modules/ud/ud_main.c

## Global Function set_current_serial()

`int set_current_serial ( int current_serial )`

Calls: | CO_get_nrtm_cserialfile() | modules/co/constants.c
| fclose(), fflush(), fopen(), fprintf()
Called by: | UD_do_nrtm() | modules/ud/ud_main.c