Cross reference for modules/sv/server.c of index.

# File modules/sv/server.c

      $Revision: 1.18 $

      Example code: A server for a client to connect to.

      Status: NOT REVUED, NOT TESTED

     Authors:       Chris Ottrey, Joao Damas

    Online References:

      Based on DBServer.java

## Included Files

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

- `#include <netinet/in.h>`

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

- `#include <ctype.h>`

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

- `#include "include/rxroutines.h"`
  - `#include </space/dbdev/marek/include/glib.h>`
    - `#include </space/dbdev/marek/lib/glib/include/glibconfig.h>`
      - `#include <limits.h>`
      - `#include <float.h>`
    - `#include <stdarg.h>`
  - `#include <pthread.h>`
  - `#include <include/stubs.h>`
    - `#include <stdlib.h>`
  - `#include <include/memwrap.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 <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_UT_errors.h"`
        - `#include "include/er_WH_errors.h"`
        - `#include "include/erroutines.h"`
  - `#include <stdio.h>`
  - `#include <include/iproutines.h>`
    - `#include <glib.h>`
    - `#include <include/erroutines.h>`
  - `#include <include/rx_globals.h>`
    - `#include <stddef.h>`
    - `#include <glib.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/socket.h"`

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

- `#include "include/mysql_driver.h"`
  - `#include "/usr/local/mysql/include/mysql.h"`
    - `#include <sys/types.h>`
    - `#include "/usr/local/mysql/include/mysql_com.h"`
    - `#include "/usr/local/mysql/include/mysql_version.h"`

- `#include "include/access_control.h"`
  - `#include "include/erroutines.h"`
  - `#include "include/iproutines.h"`
  - `#include "include/rxroutines.h"`

## Preprocessor definitions

`#define RIPE_REG 17`

`#define PAYLOAD_INETNUM_LENGTH`

`#define PAYLOAD_ROUTE_LENGTH`

## Global Function SV_start()

      Start the server.

      More:

      Authors:
            ottrey
            joao

    Starts up the server.

       Create sockets on the necessary ports (whois, config and mirror)
       Start new threads for each service.

    .properties

`void SV_start ( void )`

Calls: | AC_acc_load() | modules/ac/access_control.c
| AC_build() | modules/ac/access_control.c
| CO_get_config_port() | modules/co/constants.c
| CO_get_whois_port() | modules/co/constants.c
| SK_atoport() | modules/sk/socket.c
| SK_getsock() | modules/sk/socket.c
| radix_init() | modules/sv/server.c
| TH_run(), exit(), printf(), pthread_exit()
References Functions: | TH_do_config(), TH_do_whois()

## Local Function put_inet_sql()

`static void put_inet_sql ( rx_tree_t* mytree )`

Calls: | CO_get_database() | modules/co/constants.c
| CO_get_database_port() | modules/co/constants.c
| CO_get_host() | modules/co/constants.c
| CO_get_in_query() | modules/co/constants.c
| CO_get_password() | modules/co/constants.c
| CO_get_user() | modules/co/constants.c
| IP_rang_b2a() | modules/ip/ip.c
| RX_inum_node() | modules/rx/rx_node.c
| SQ_close_connection() | modules/sq/mysql_driver.c
| SQ_errno() | modules/sq/mysql_driver.c
| SQ_error() | modules/sq/mysql_driver.c
| SQ_execute_query() | modules/sq/mysql_driver.c
| SQ_free_result() | modules/sq/mysql_driver.c
| SQ_get_column_string() | modules/sq/mysql_driver.c
| SQ_get_connection() | modules/sq/mysql_driver.c
| SQ_row_next() | modules/sq/mysql_driver.c
| fprintf(), free(), memset(), printf(), snprintf(), sscanf(), strlen(), wr_calloc()
Called by: | radix_init() | modules/sv/server.c

## Local Function put_route_sql()

`static void put_route_sql ( rx_tree_t* mytree )`

Calls: | CO_get_database() | modules/co/constants.c
| CO_get_database_port() | modules/co/constants.c
| CO_get_host() | modules/co/constants.c
| CO_get_password() | modules/co/constants.c
| CO_get_rt_query() | modules/co/constants.c
| CO_get_user() | modules/co/constants.c
| IP_pref_b2a() | modules/ip/ip.c
| RX_bin_node() | modules/rx/rx_node.c
| SQ_close_connection() | modules/sq/mysql_driver.c
| SQ_errno() | modules/sq/mysql_driver.c
| SQ_error() | modules/sq/mysql_driver.c
| SQ_execute_query() | modules/sq/mysql_driver.c
| SQ_free_result() | modules/sq/mysql_driver.c
| SQ_get_column_string() | modules/sq/mysql_driver.c
| SQ_get_connection() | modules/sq/mysql_driver.c
| SQ_row_next() | modules/sq/mysql_driver.c
| fprintf(), free(), memset(), snprintf(), sscanf(), strlen(), wr_calloc()
Called by: | radix_init() | modules/sv/server.c

## Local Function radix_init()

`static void radix_init ( void )`

Calls: | ER_setpath() | modules/er/er.c
| RX_attach2forest() | modules/rx/rx_tree.c
| RX_tree_cre() | modules/rx/rx_tree.c
| put_inet_sql() | modules/sv/server.c
| put_route_sql() | modules/sv/server.c
| puts()
Called by: | SV_start() | modules/sv/server.c