File modules/ud/ud_core.c

  $Revision: 1.38 $

Core functions for update lower layer
Status: NOT REVUED, NOT TESTED
Author(s): Chris Ottrey, Andrei Robachevsky

Included Files


Preprocessor definitions

#define ATTR_DELIMITERS " ,"

#define OBJECT_ID 0

#define insert_reverse_domain( tr, pr )

#define update_reverse_domain( tr, pr )


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
   modules/pw/protocol_whois.c
   modules/qc/query_command.c
   modules/qi/query_instructions.c
   modules/rp/rp_convert.c
   modules/rp/rp_load.c
   modules/rp/rp_search.c
   modules/rp/rp_tree.c
   modules/rp/rp_update.c
   modules/sv/server.c
   modules/ud/ud_comrol.c
   modules/ud/ud_core.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 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
  free(), g_strdup(), strtok_r()
Called by: each_attribute_process()modules/ud/ud_core.c
  ud_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_strcasecmp(), g_strchug(), g_strdup(), index(), 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: UD_check_ref()modules/ud/ud_comrol.c
  atlast()modules/pm/pm_serials.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_minmax_id()

long get_minmax_id ( MYSQL* sql_connection, char* id_name, char* tbl_name, int max )
Calls: ER_dbg_va()modules/er/er.c
  ER_perror()modules/er/er.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(), sprintf()
Called by: create_dummy()modules/ud/ud_core.c
  perform_create()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
  ER_dbg_va()modules/er/er.c
  ER_perror()modules/er/er.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: ud_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: ER_dbg_va()modules/er/er.c
  ER_perror()modules/er/er.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
  fprintf(), free()
Called by: UD_check_ref()modules/ud/ud_comrol.c
  auth_member_of()modules/ud/ud_core.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: object_process()modules/ud/ud_core.c
  perform_update()modules/ud/ud_core.c

Global Function isdummy()

int isdummy ( Transaction_t* tr )
Prototyped in: modules/ud/ud_int.h
Calls: ER_perror()modules/er/er.c
  get_field_str()modules/ud/ud_core.c
  atoi(), fprintf(), free(), sprintf()

Global Function object_process()

int object_process ( Transaction_t* tr )
Prototyped in: modules/ud/ud_int.h
Calls: ER_dbg_va()modules/er/er.c
  ER_inf_va()modules/er/er.c
  ER_perror()modules/er/er.c
  NH_comrol()modules/nh/nh.c
  NH_convert()modules/nh/nh.c
  NH_free()modules/nh/nh.c
  NH_register()modules/nh/nh.c
  UD_check_ref()modules/ud/ud_comrol.c
  UD_commit()modules/ud/ud_comrol.c
  UD_delete()modules/ud/ud_comrol.c
  UD_rollback()modules/ud/ud_comrol.c
  UD_update_rx()modules/ud/ud_comrol.c
  get_sequence_id()modules/ud/ud_core.c
  perform_create()modules/ud/ud_core.c
  perform_update()modules/ud/ud_core.c
  TR_create_record(), TR_update_record(), UD_ack(), UT_free_real(), fprintf(), g_string_sprintfa()

Global Function ud_each_primary_key_select()

void ud_each_primary_key_select ( void* element_data, void* result_ptr )
Prototyped in: modules/ud/ud_int.h
Calls: DF_get_select_query()modules/df/defs.c
  DF_get_select_query_type()modules/df/defs.c
  ER_perror()modules/er/er.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 auth_member_of()

static int auth_member_of ( Attribute_t* attr, Transaction_t* tr )
Prototyped in: modules/ud/ud_core.c
Calls: ER_dbg_va()modules/er/er.c
  ER_perror()modules/er/er.c
  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
  ER_dbg_va()modules/er/er.c
  ER_perror()modules/er/er.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_insert_id()modules/sq/mysql_driver.c
  get_minmax_id()modules/ud/ud_core.c
  get_set_name()modules/ud/ud_core.c
  isnichandle()modules/ud/ud_core.c
  TR_update_record(), fprintf(), free(), g_strdup(), sprintf(), strcmp(), strtok_r(), 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
  ER_dbg_va()modules/er/er.c
  ER_inf_va()modules/er/er.c
  ER_perror()modules/er/er.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_affected_rows()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
  update_attr()modules/ud/ud_core.c
  fprintf(), free(), g_strcasecmp(), g_strdup(), g_string_sprintfa(), sprintf(), strcat(), strcmp(), strlen(), strncmp(), strtok_r()
Used in: perform_create()modules/ud/ud_core.c
  perform_update()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: index()
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: ER_dbg_va()modules/er/er.c
  ER_perror()modules/er/er.c
  SQ_error()modules/sq/mysql_driver.c
  SQ_execute_query()modules/sq/mysql_driver.c
  SQ_get_insert_id()modules/sq/mysql_driver.c
  get_minmax_id()modules/ud/ud_core.c
  TR_update_record(), fprintf(), g_slist_foreach(), g_string_free(), g_string_sized_new(), g_string_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: ER_dbg_va()modules/er/er.c
  ER_perror()modules/er/er.c
  SQ_error()modules/sq/mysql_driver.c
  SQ_execute_query()modules/sq/mysql_driver.c
  SQ_get_affected_rows()modules/sq/mysql_driver.c
  get_sequence_id()modules/ud/ud_core.c
  TR_update_record(), fprintf(), g_slist_foreach(), g_string_free(), g_string_sized_new(), g_string_sprintf(), g_string_sprintfa(), 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: ER_dbg_va()modules/er/er.c
  ER_perror()modules/er/er.c
  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
  SQ_get_affected_rows()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 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
  ER_dbg_va()modules/er/er.c
  ER_inf_va()modules/er/er.c
  ER_perror()modules/er/er.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_affected_rows()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
  TR_update_record(), fprintf(), free(), g_strcasecmp(), g_strdup(), g_string_sprintfa(), sprintf(), strcmp(), strlen(), strtok_r()
Called by: each_attribute_process()modules/ud/ud_core.c