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

# File modules/ud/ud_core.c

      $Revision: 1.18 $

      Core functions for update lower layer

      Status: NOT REVUED, NOT TESTED

     Author(s):       Chris Ottrey, Andrei Robachevsky

## Included Files

- `#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"`

## Preprocessor definitions

`#define OBJECT_ID 0`

`#define insert_reverse_domain( tr, pr )`

`#define update_reverse_domain( tr, pr )`

## Global Function convert_as_range()

`int convert_as_range ( const char* as_range, int* begin, int* end )`

Prototyped in: | modules/ud/ud_int.h
Calls: | convert_as() | modules/ud/ud_core.c
| s_split() | modules/ud/ud_core.c
| strcpy()
Called by: | each_attribute_process() | modules/ud/ud_core.c
| each_primary_key_select() | modules/ud/ud_core.c

## Global Function convert_if()

`er_ret_t convert_if ( char* avalue, unsigned int* pif_address )`

Calls: | IP_addr_a2v4() | modules/ip/ip.c
| index()
Called by: | each_attribute_process() | modules/ud/ud_core.c
| update_attr() | modules/ud/ud_core.c

## Global Function convert_rf()

`char* convert_rf ( char* avalue, int* type, int* port )`

Prototyped in: | modules/ud/ud_int.h
Calls: | atoi(), g_strchug(), g_strdup(), index(), strcmp(), strcpy()
Called by: | each_attribute_process() | modules/ud/ud_core.c
| update_attr() | modules/ud/ud_core.c

## Global Function convert_time()

`time_t convert_time ( char* asc_time )`

Prototyped in: | modules/ud/ud_int.h
Calls: | atoi(), bzero(), mktime(), strncpy()
Called by: | each_attribute_process() | modules/ud/ud_core.c
| update_attr() | modules/ud/ud_core.c

## Global Function get_field_str()

`char* get_field_str ( MYSQL* sql_connection, char* field, char* ref_tbl_name, char* ref_name, char* attr_value, char* condition )`

Prototyped in: | modules/ud/ud_int.h
Calls: | get_qresult_str() | modules/ud/ud_core.c
| sprintf(), strcat()
Called by: | atlast() | modules/pm/pm_serials.c
| delete() | modules/ud/ud_comrol.c
| get_ref_id() | modules/ud/ud_core.c
| get_sequence_id() | modules/ud/ud_core.c
| getop() | modules/pm/pm_serials.c
| isdummy() | modules/ud/ud_core.c

## Global Function get_object_id()

`long get_object_id ( Transaction_t* tr )`

Prototyped in: | modules/ud/ud_int.h
Calls: | DF_get_class_sql_table() | modules/df/defs.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_row_next() | modules/sq/mysql_driver.c
| atol(), fprintf(), free(), g_slist_foreach(), g_string_free(), g_string_sized_new(), g_string_sprintf(), g_string_truncate()
References Functions: | each_primary_key_select() | modules/ud/ud_core.c

## Global Function get_qresult_str()

`char* get_qresult_str ( MYSQL* sql_connection, char* query )`

Prototyped in: | modules/ud/ud_int.h
Calls: | 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_row_next() | modules/sq/mysql_driver.c
| fprintf(), free()
Called by: | auth_member_of() | modules/ud/ud_core.c
| delete() | modules/ud/ud_comrol.c
| get_field_str() | modules/ud/ud_core.c

## Global Function get_sequence_id()

`long get_sequence_id ( Transaction_t* tr )`

Prototyped in: | modules/ud/ud_int.h
Calls: | get_field_str() | modules/ud/ud_core.c
| atol(), free(), sprintf()
Called by: | delete() | modules/ud/ud_comrol.c
| perform_update() | modules/ud/ud_core.c

## Global Function isdummy()

`int isdummy ( Transaction_t* tr )`

Prototyped in: | modules/ud/ud_int.h
Calls: | get_field_str() | modules/ud/ud_core.c
| atoi(), free(), sprintf()

## Global Function object_process()

`int object_process ( Transaction_t* tr )`

Prototyped in: | modules/ud/ud_int.h
Calls: | NH_convert() | modules/nh/nh.c
| NH_free() | modules/nh/nh.c
| NH_register() | modules/nh/nh.c
| commit() | modules/ud/ud_comrol.c
| delete() | modules/ud/ud_comrol.c
| perform_create() | modules/ud/ud_core.c
| perform_update() | modules/ud/ud_core.c
| rollback() | modules/ud/ud_comrol.c
| fprintf(), g_string_sprintfa()

## Local Function auth_member_of()

`static int auth_member_of ( Attribute_t* attr, Transaction_t* tr )`

Prototyped in: | modules/ud/ud_core.c
Calls: | get_qresult_str() | modules/ud/ud_core.c
| get_set_name() | modules/ud/ud_core.c
| fprintf(), free(), g_string_free(), g_string_sized_new(), g_string_sprintf(), strcmp()
Called by: | each_attribute_process() | modules/ud/ud_core.c
| update_attr() | modules/ud/ud_core.c

## Local Function convert_as()

`static int convert_as ( char* as )`

Calls: | atoi()
Called by: | convert_as_range() | modules/ud/ud_core.c

## Local Function create_dummy()

`static int create_dummy ( Attribute_t* attr, Transaction_t* tr )`

Prototyped in: | modules/ud/ud_core.c
Calls: | DF_get_dummy_query() | modules/df/defs.c
| DF_get_dummy_query_type() | modules/df/defs.c
| DF_get_insert_query() | modules/df/defs.c
| SQ_errno() | modules/sq/mysql_driver.c
| SQ_error() | modules/sq/mysql_driver.c
| SQ_execute_query() | modules/sq/mysql_driver.c
| get_set_name() | modules/ud/ud_core.c
| isnichandle() | modules/ud/ud_core.c
| s_split() | modules/ud/ud_core.c
| fprintf(), free(), g_strdup(), sprintf(), strcmp(), time()
Called by: | each_attribute_process() | modules/ud/ud_core.c

## Local Function each_attribute_process()

`static void each_attribute_process ( void* element_data, void* tr_ptr )`

Prototyped in: | modules/ud/ud_core.c
Calls: | DF_get_insert_query() | modules/df/defs.c
| DF_get_insert_query_type() | modules/df/defs.c
| IP_revd_t2b() | modules/ip/ip.c
| NH_check() | modules/nh/nh.c
| RP_pack_set_orig() | modules/rp/rp_convert.c
| RP_pack_set_pref4() | modules/rp/rp_convert.c
| RP_pack_set_pref6() | modules/rp/rp_convert.c
| RP_pack_set_rang() | modules/rp/rp_convert.c
| RP_pack_set_revd() | modules/rp/rp_convert.c
| SQ_errno() | modules/sq/mysql_driver.c
| SQ_error() | modules/sq/mysql_driver.c
| SQ_execute_query() | modules/sq/mysql_driver.c
| SQ_get_info() | modules/sq/mysql_driver.c
| auth_member_of() | modules/ud/ud_core.c
| convert_as_range() | modules/ud/ud_core.c
| convert_if() | modules/ud/ud_core.c
| convert_rf() | modules/ud/ud_core.c
| convert_time() | modules/ud/ud_core.c
| create_dummy() | modules/ud/ud_core.c
| get_ref_id() | modules/ud/ud_core.c
| get_set_name() | modules/ud/ud_core.c
| process_reverse_domain() | modules/ud/ud_core.c
| s_splitn() | modules/ud/ud_core.c
| update_attr() | modules/ud/ud_core.c
| fprintf(), free(), g_strdup(), g_string_sprintfa(), sprintf(), strcat(), strcmp(), strlen(), strncmp()
Used in: | perform_create() | modules/ud/ud_core.c
| perform_update() | modules/ud/ud_core.c

## Local Function each_primary_key_select()

`static void each_primary_key_select ( void* element_data, void* result_ptr )`

Prototyped in: | modules/ud/ud_core.c
Calls: | DF_get_select_query() | modules/df/defs.c
| DF_get_select_query_type() | modules/df/defs.c
| IP_pref_a2v4() | modules/ip/ip.c
| IP_pref_a2v6() | modules/ip/ip.c
| IP_rang_a2v4() | modules/ip/ip.c
| convert_as_range() | modules/ud/ud_core.c
| fprintf(), g_string_sprintfa(), strcmp()
Used in: | get_object_id() | modules/ud/ud_core.c

## Local Function get_ref_id()

`static long get_ref_id ( Transaction_t* tr, char* ref_tbl_name, char* ref_name, char* attr_value, char* condition )`

Calls: | get_field_str() | modules/ud/ud_core.c
| atol(), free()
Called by: | each_attribute_process() | modules/ud/ud_core.c
| update_attr() | modules/ud/ud_core.c

## Local Function get_set_name()

`static char* get_set_name ( C_Type_t class_type )`

Called by: | auth_member_of() | modules/ud/ud_core.c
| create_dummy() | modules/ud/ud_core.c
| each_attribute_process() | modules/ud/ud_core.c
| update_attr() | modules/ud/ud_core.c

## Local Function isnichandle()

`static int isnichandle ( char* name )`

Calls: | MA_isset() | modules/ma/bitmask.c
| WK_new()
Called by: | create_dummy() | modules/ud/ud_core.c

## Local Function perform_create()

`static int perform_create ( Transaction_t* tr )`

Prototyped in: | modules/ud/ud_core.c
Calls: | SQ_error() | modules/sq/mysql_driver.c
| SQ_execute_query() | modules/sq/mysql_driver.c
| fprintf(), g_slist_foreach(), g_string_sprintfa(), sprintf(), time()
Called by: | object_process() | modules/ud/ud_core.c
References Functions: | each_attribute_process() | modules/ud/ud_core.c

## Local Function perform_update()

`static int perform_update ( Transaction_t* tr )`

Prototyped in: | modules/ud/ud_core.c
Calls: | SQ_error() | modules/sq/mysql_driver.c
| SQ_execute_query() | modules/sq/mysql_driver.c
| get_sequence_id() | modules/ud/ud_core.c
| fprintf(), g_slist_foreach(), g_string_sprintfa(), sprintf(), time()
Called by: | object_process() | modules/ud/ud_core.c
References Functions: | each_attribute_process() | modules/ud/ud_core.c

## Local Function process_reverse_domain()

`static int process_reverse_domain ( Transaction_t* tr, ip_prefix_t* prefptr, int op )`

Calls: | IP_pref_b2_space() | modules/ip/ip.c
| IP_pref_b2v4() | modules/ip/ip.c
| IP_pref_b2v6() | modules/ip/ip.c
| SQ_error() | modules/sq/mysql_driver.c
| SQ_execute_query() | modules/sq/mysql_driver.c
| fprintf(), sprintf()
Called by: | each_attribute_process() | modules/ud/ud_core.c
| update_attr() | modules/ud/ud_core.c

## Local Function s_split()

`static char* s_split ( char* line )`

Called by: | convert_as_range() | modules/ud/ud_core.c
| create_dummy() | modules/ud/ud_core.c

## Local Function s_splitn()

`static char* s_splitn ( char* line, int nwords )`

Called by: | each_attribute_process() | modules/ud/ud_core.c

## Local Function update_attr()

`static void update_attr ( Attribute_t* attr, Transaction_t* tr )`

Prototyped in: | modules/ud/ud_core.c
Calls: | DF_get_class_sql_table() | modules/df/defs.c
| DF_get_update_query() | modules/df/defs.c
| DF_get_update_query_type() | modules/df/defs.c
| IP_revd_t2b() | modules/ip/ip.c
| SQ_error() | modules/sq/mysql_driver.c
| SQ_execute_query() | modules/sq/mysql_driver.c
| SQ_get_info() | modules/sq/mysql_driver.c
| auth_member_of() | modules/ud/ud_core.c
| convert_if() | modules/ud/ud_core.c
| convert_rf() | modules/ud/ud_core.c
| convert_time() | modules/ud/ud_core.c
| get_ref_id() | modules/ud/ud_core.c
| get_set_name() | modules/ud/ud_core.c
| process_reverse_domain() | modules/ud/ud_core.c
| fprintf(), free(), g_strdup(), g_string_sprintfa(), sprintf(), strcmp(), strlen()
Called by: | each_attribute_process() | modules/ud/ud_core.c