File ac/ac_persistence.c

  $Revision: 1.7 $

Access control (AC). ac_persistence.c - functions to make the access control tree persistent.
Status: NOT REVIEWED, NOT TESTED, COMPLETE
Implementation by: Tiago Antao

Included Files


Typedef acc_ip

typedef struct {...} acc_ip
struct 
   { 
     acc_st acc; 
     ip_prefix_internal_t ip; 
   } 

Global Variable ac_auto_save

int ac_auto_save
Visible in:  aa/aa.c
   ac/ac_persistence.c
Used in: AC_persistence_daemon()ac/ac_persistence.c
  AC_persistence_init()ac/ac_persistence.c

Global Variable Lock

pthread_mutex_t Lock
Included from /home/shane/release/RIP/include/ca_defs.h
Visible in:  aa/aa.c
   ac/ac_persistence.c

External Variables

oldest_timestamp
extern ut_timer_t oldest_timestamp

Local Variables

save_lock
static rw_lock_t save_lock
Used in: AC_persistence_init()
  AC_persistence_save()

on_save
static char on_save
Used in: AC_persistence_save()


Global Function AC_acc_copy_l()

void AC_acc_copy_l ( acc_st* dest, acc_st* src )
Calls: memcpy()
Called by: AC_persistence_get_leaves_hook_l()ac/ac_persistence.c

Global Function AC_delete_timestamp_l()

void AC_delete_timestamp_l ( MYSQL* conn )
Calls: SQ_execute_query(), UT_time_getvalue(), ceil(), sprintf()
Called by: AC_persistence_load()ac/ac_persistence.c
  AC_persistence_walk_l()ac/ac_persistence.c
References Variables: oldest_timestamp

Global Function AC_persistence_daemon()

er_ret_t AC_persistence_daemon ( void )
Prototyped in: /home/shane/release/RIP/include/access_control.h
Calls: AC_persistence_save()ac/ac_persistence.c
  CO_get_do_server(), SV_sleep(), TA_add(), TA_delete(), ca_get_int()
References Variables: ac_auto_saveac/ac_persistence.c

Global Function AC_persistence_get_leaves_hook_l()

er_ret_t AC_persistence_get_leaves_hook_l ( rx_node_t* node, int level, int node_counter, void* con )
Calls: AC_acc_copy_l()ac/ac_persistence.c
  UT_malloc_real(), g_list_prepend()
Used in: ac_persistence_get_leaves()ac/ac_persistence.c

Global Function AC_persistence_init()

er_ret_t AC_persistence_init ( void )
Prototyped in: /home/shane/release/RIP/include/access_control.h
Calls: AC_persistence_load()ac/ac_persistence.c
  TH_init_read_write_lock(), UT_timeget(), ca_get_boolean()
References Variables: ac_auto_saveac/ac_persistence.c
  save_lockac/ac_persistence.c
  oldest_timestamp

Global Function AC_persistence_load()

void AC_persistence_load ( void )
Calls: AC_delete_timestamp_l()ac/ac_persistence.c
  AC_dbopen_admin(), AC_decay_leaf_l(), AC_prunable(), ER_perror(), IP_pref_f2b_v4(), SQ_close_connection(), SQ_execute_query(), SQ_free_result(), SQ_get_column_int(), SQ_get_column_string_nocopy(), SQ_row_next(), TH_acquire_write_lock(), TH_release_write_lock(), UT_free_real(), UT_malloc_real(), UT_time_set(), UT_timediff(), atof(), rx_bin_node()
Called by: AC_persistence_init()ac/ac_persistence.c
References Variables: act_runtime, oldest_timestamp

Global Function AC_persistence_save()

er_ret_t AC_persistence_save ( void )
Prototyped in: /home/shane/release/RIP/include/access_control.h
Calls: AC_persistence_save_l()ac/ac_persistence.c
  TH_acquire_write_lock(), TH_release_write_lock()
Called by: AC_persistence_daemon()ac/ac_persistence.c
References Variables: on_saveac/ac_persistence.c
  save_lockac/ac_persistence.c

Global Function ac_persistence_get_leaves()

GList* ac_persistence_get_leaves ( void )
Calls: TH_acquire_write_lock(), TH_release_write_lock(), rx_walk_tree()
Called by: AC_persistence_save_l()ac/ac_persistence.c
References Functions: AC_persistence_get_leaves_hook_l()ac/ac_persistence.c
References Variables: act_runtime

Local Function AC_persistence_save_l()

static void AC_persistence_save_l ( void )
Calls: AC_persistence_walk_l()ac/ac_persistence.c
  ac_persistence_get_leaves()ac/ac_persistence.c
  UT_free_real(), g_list_free(), g_list_length(), g_list_nth_data()
Called by: AC_persistence_save()ac/ac_persistence.c

Local Function AC_persistence_walk_l()

static void AC_persistence_walk_l ( GList* list )
Calls: AC_delete_timestamp_l()ac/ac_persistence.c
  AC_dbopen_admin(), ER_perror(), IP_pref_b2_len(), IP_pref_b2v4_addr(), SQ_close_connection(), SQ_execute_query(), UT_time_getvalue(), ceil(), sprintf()
Called by: AC_persistence_save_l()ac/ac_persistence.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()