File rp/rp_update.c

  $Revision: 1.13 $

Radix tree (rx). rx_payload.c - functions to operate on user data (creation/deletion).
Status: NOT REVUED, UNTESTED, INCOMPLETE
Design and implementation by: Marek Bukowy

Included Files


Global Variable Lock

pthread_mutex_t Lock
Included from /home/shane/code/RIP/include/ca_defs.h
Visible in:  aa/aa.c
   ac/access_control.c
   ca/ca_configFns.c
   ca/ca_initFn.c
   ca/ca_sanityCheck.c
   ca/ca_sourceLoader.c
   ca/ca_values.c
   co/constants.c
   df/defs.c
   er/er.c
   er/er_arrays.c
   er/er_macro.c
   er/er_paths.c
   er/er_print.c
   ip/ip.c
   ma/bitmask.c
   mm/mm.c
   nh/nh.c
   pa/gpg.c
   pa/spawn.c
   pc/pc_commands.c
   pc/protocol_config.c
   pm/pm_serials.c
   pm/protocol_mirror.c
   pr/properties.c
   pw/protocol_whois.c
   qc/mg_getopt.c
   qc/query_command.c
   qi/query_instructions.c
   rp/rp_convert.c
   rp/rp_load.c
   rp/rp_search.c
   rp/rp_tree.c
   rp/rp_update.c
Used in: ca_get_adminIntElement()ca/ca_configFns.c
  ca_get_adminStrElement()ca/ca_configFns.c
  ca_get_boolean()ca/ca_configFns.c
  ca_get_dirlist()ca/ca_configFns.c
  ca_get_int()ca/ca_configFns.c
  ca_get_string()ca/ca_configFns.c
  ca_set_boolean()ca/ca_configFns.c
  ca_srchandle2Intelement()ca/ca_configFns.c
  ca_srchandle2Strelement()ca/ca_configFns.c

Global Function RP_asc_node()

 *********************************************************************
  Ascii frontend - translates key according to attr and calls rx_uni_node.
  FOR TESTING PURPOSES ONLY
  *********************************************************************
er_ret_t RP_asc_node ( rx_oper_mt mode, char* rangstr, rp_attr_t attr, rp_regid_t reg_id, void* data, unsigned datalen, sql_key_t key )
rx_oper_mt mode
MODE={cre|mod|del}
char* rangstr
string prefix/range/IP/inaddr
rp_attr_t attr
additional tree attribute
rp_regid_t reg_id
id of the registry
void* data
pointer to the payload
unsigned datalen
length of the payload
sql_key_t key
the key to the SQL full-text
Prototyped in: /home/shane/code/RIP/include/rp.h
Calls: ER_dbg_va()er/er.c
  RP_asc2uni()rp/rp_convert.c
  RP_uni_node()rp/rp_update.c
Called by: RP_asc_load()rp/rp_load.c

Global Function RP_pack_node()

er_ret_t RP_pack_node ( rx_oper_mt mode, rp_upd_pack_t* pack, rp_regid_t reg_id )
rx_oper_mt mode
&nbs;
rp_upd_pack_t* pack
&nbs;
rp_regid_t reg_id
id of the registry
Prototyped in: /home/shane/code/RIP/include/rp.h
Calls: RP_uni_node()rp/rp_update.c
  rp_make_short()rp/rp_convert.c

Global Function RP_pack_node_l()

er_ret_t RP_pack_node_l ( rx_oper_mt mode, rp_upd_pack_t* pack, rx_tree_t* mytree )
Prototyped in: /home/shane/code/RIP/include/rp.h
Calls: RP_uni_node_l()rp/rp_update.c
  rp_make_short()rp/rp_convert.c
  strlen()
Called by: RP_sql_load_attr_space()rp/rp_load.c

Global Function RP_uni_node()

 ***************************************************************

MAIN FRONTEND FUNCTION

finds tree, locks it.
builds a dataleaf and puts into the node(s), calling rx_bin_node for every prefix.
MT-note: locks/unlocks the tree.
er_ret_t RP_uni_node ( rx_oper_mt mode, rp_uni_t* uni, rp_attr_t attr, rp_regid_t reg_id, void* data, unsigned datalen, sql_key_t key )
rx_oper_mt mode
MODE={cre|mod|del}
rp_uni_t* uni
unified argument structure
rp_attr_t attr
additional tree attribute
rp_regid_t reg_id
id of the registry
void* data
pointer to the payload
unsigned datalen
length of the payload
sql_key_t key
the key to the SQL full-text
Prototyped in: /home/shane/code/RIP/include/rp.h
Calls: RP_tree_get()rp/rp_tree.c
  RP_uni_node_l()rp/rp_update.c
  TH_acquire_write_lockw(), TH_release_write_lockw(), fprintf()
Called by: RP_asc_node()rp/rp_update.c
  RP_pack_node()rp/rp_update.c

Global Function RP_uni_node_l()

 ***************************************************************
  assumes locked tree
er_ret_t RP_uni_node_l ( rx_oper_mt mode, rp_uni_t* uni, rx_tree_t* mytree, void* data, unsigned datalen, sql_key_t key )
rx_oper_mt mode
MODE={cre|mod|del}
rp_uni_t* uni
&nbs;
rx_tree_t* mytree
&nbs;
void* data
pointer to the payload
unsigned datalen
length of the payload
sql_key_t key
the key to the SQL full-text
Calls: RX_in_node(), RX_rt_node(), UT_calloc_real(), UT_free_real(), UT_malloc_real(), fprintf(), memcpy()
Called by: RP_pack_node_l()rp/rp_update.c
  RP_uni_node()rp/rp_update.c

Local Function asctime_r()

static char* asctime_r ( const struct tm* __tm, char* __buf )
Included from: /usr/include/time.h
Calls: __posix_asctime_r()

Local Function ctime_r()

static char* ctime_r ( const time_t* __time, char* __buf )
Included from: /usr/include/time.h
Calls: __posix_ctime_r()

Local Function getlogin_r()

static int getlogin_r ( char* __name, int __len )
Included from: /usr/include/unistd.h
Calls: __posix_getlogin_r()

Local Function readdir_r()

static int readdir_r ( DIR* __dp, struct dirent* __ent, struct dirent** __res )
Included from: /usr/include/dirent.h
Calls: __posix_readdir_r()

Local Function sigwait()

static int sigwait ( const sigset_t* __setp, int* __signo )
Included from: /usr/include/signal.h
Calls: __posix_sigwait()

Local Function ttyname_r()

static int ttyname_r ( int __fildes, char* __buf, size_t __size )
Included from: /usr/include/unistd.h
Calls: __posix_ttyname_r()