File modules/ud/ud_core.c

  $Revision: 1.5 $

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

Included Files


Global Variable Insert

UD_query Insert[]
Included from include/UD_queries.def
Visible in:  modules/ud/ud_core.c
Used in: create_dummy()modules/ud/ud_core.c
  each_attribute_process()modules/ud/ud_core.c

Global Variable Update

UD_query Update[]
Included from include/UD_queries.def
Visible in:  modules/ud/ud_core.c
Used in: update_attr()modules/ud/ud_core.c

Global Variable Dummy

UD_query Dummy[]
Included from include/UD_queries.def
Visible in:  modules/ud/ud_core.c
Used in: create_dummy()modules/ud/ud_core.c

Global Variable Select

UD_query Select[]
Included from include/UD_queries.def
Visible in:  modules/ud/ud_core.c
Used in: each_primary_key_select()modules/ud/ud_core.c

Global Variable Type2main

char* const Type2main[]
Visible in:  modules/ud/ud_core.c
Used in: get_object_id()modules/ud/ud_core.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
  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* address )
Prototyped in: modules/ud/ud_int.h
Calls: IP_addr_t2b()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_in()

er_ret_t convert_in ( char* rangstr, unsigned int* begin_in, unsigned int* end_in )
Prototyped in: modules/ud/ud_int.h
Calls: IP_addr_t2b()modules/ip/ip.c
  IP_rang_classful()modules/ip/ip.c
  IP_rang_t2b()modules/ip/ip.c
Called by: each_attribute_process()modules/ud/ud_core.c
  each_primary_key_select()modules/ud/ud_core.c
  get_rx_data()modules/ud/ud_comrol.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 expand_rt()

er_ret_t expand_rt ( char* avalue, unsigned int* prefix, unsigned int* prefix_length )
Prototyped in: modules/ud/ud_int.h
Calls: IP_pref_t2b()modules/ip/ip.c
Called by: each_attribute_process()modules/ud/ud_core.c
  each_primary_key_select()modules/ud/ud_core.c
  get_rx_data()modules/ud/ud_comrol.c

Global Function get_field_str()

char* get_field_str ( Transaction_t* tr, char* field, char* ref_tbl_name, char* ref_name, char* attr_value, char* condition )
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(), sprintf(), strcat()
Called by: delete()modules/ud/ud_comrol.c
  get_ref_id()modules/ud/ud_core.c
  get_sequence_id()modules/ud/ud_core.c
  perform_update()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: 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
References Variables: Type2mainmodules/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

Global Function object_process()

int object_process ( Transaction_t* tr )
Prototyped in: modules/ud/ud_int.h
Calls: 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(), printf()

Local Function auth_member_of()

static int auth_member_of ( Attribute_t* attr, 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
  SQ_free_result()modules/sq/mysql_driver.c
  SQ_row_next()modules/sq/mysql_driver.c
  get_set_name()modules/ud/ud_core.c
  fprintf(), g_string_free(), g_string_sized_new(), g_string_sprintf()
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: SQ_execute_query()modules/sq/mysql_driver.c
  SQ_free_result()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(), g_strndup(), sprintf(), strcmp(), strlen(), time()
Called by: each_attribute_process()modules/ud/ud_core.c
References Variables: Dummymodules/ud/ud_core.c
  Insertmodules/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: SQ_execute_query()modules/sq/mysql_driver.c
  SQ_free_result()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_in()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
  expand_rt()modules/ud/ud_core.c
  get_ref_id()modules/ud/ud_core.c
  get_set_name()modules/ud/ud_core.c
  s_splitn()modules/ud/ud_core.c
  sql_info()modules/ud/ud_core.c
  update_attr()modules/ud/ud_core.c
  fprintf(), free(), g_strdup(), g_string_sprintfa(), g_strndup(), save_rx_orig(), save_rx_pref(), save_rx_rang(), sprintf(), strcat(), strcmp(), strlen(), strncmp()
Used in: perform_create()modules/ud/ud_core.c
  perform_update()modules/ud/ud_core.c
References Variables: Insertmodules/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: convert_as_range()modules/ud/ud_core.c
  convert_in()modules/ud/ud_core.c
  expand_rt()modules/ud/ud_core.c
  fprintf(), g_string_sprintfa(), strcmp()
Used in: get_object_id()modules/ud/ud_core.c
References Variables: Selectmodules/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_execute_query()modules/sq/mysql_driver.c
  SQ_free_result()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_execute_query()modules/sq/mysql_driver.c
  SQ_free_result()modules/sq/mysql_driver.c
  get_field_str()modules/ud/ud_core.c
  atol(), fprintf(), free(), 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 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 sql_info()

static int sql_info ( MYSQL* sql_connection, int info[3] )
Calls: atoi()
Called by: each_attribute_process()modules/ud/ud_core.c
  update_attr()modules/ud/ud_core.c

Local Function update_attr()

static int update_attr ( Attribute_t* attr, Transaction_t* tr )
Prototyped in: modules/ud/ud_core.c
Calls: SQ_execute_query()modules/sq/mysql_driver.c
  SQ_free_result()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
  sql_info()modules/ud/ud_core.c
  fprintf(), free(), g_string_sprintfa(), g_strndup(), sprintf(), strcmp(), strlen()
Called by: each_attribute_process()modules/ud/ud_core.c
References Variables: Updatemodules/ud/ud_core.c