File nt/notification.c

  $Revision: 1.14 $

NT (Notifications) module
Status: REVIEWED, NOT TESTED
Author(s): Engin Gunduz

Included Files


Typedef irt_details_t

typedef struct irt_details irt_details_t
struct irt_details 
   { 
     gchar* irt_name; 
     rpsl_attr_t* irts; 
     gint matched; 
   } 

External Variables

reading_from_mail
extern int reading_from_mail

supress_ack_notif
extern int supress_ack_notif

defmail
extern char* defmail

webupdate
extern int webupdate

forwlog
extern char* forwlog

netupdclientIP
extern char* netupdclientIP


Global Function NT_add_to_cross()

void NT_add_to_cross ( const char* e_mail, GHashTable* hash, char* fmt, ... )
Calls: __builtin_next_arg(), __builtin_saveregs(), fclose(), find_email_address(), fopen(), fprintf(), g_hash_table_lookup(), printf(), vfprintf()
Called by: NT_write_all_ntfs()nt/notification.c
References Variables: tracing

Global Function NT_add_to_cross_hash()

void NT_add_to_cross_hash ( GHashTable* cross_hash, const char* e_mail, int mode )
Calls: NT_cross_filename_generate()nt/notification.c
  g_hash_table_insert(), g_hash_table_lookup(), strdup()
Called by: NT_add_to_cross_hash_list()nt/notification.c
  NT_write_all_ntfs()nt/notification.c
References Variables: tmpdir

Global Function NT_add_to_cross_hash_list()

void NT_add_to_cross_hash_list ( GHashTable* cross_hash, GList* e_mail_list, int mode )
Calls: NT_add_to_cross_hash()nt/notification.c

Global Function NT_add_to_frwd_hash()

void NT_add_to_frwd_hash ( GHashTable* frwd_hash, char* e_mail )
Calls: NT_forwd_filename_generate()nt/notification.c
  g_hash_table_insert(), g_hash_table_lookup(), strdup()
Called by: NT_add_to_frwd_hash_list()nt/notification.c
References Variables: tmpdir

Global Function NT_add_to_frwd_hash_list()

void NT_add_to_frwd_hash_list ( GHashTable* frwd_hash, GList* e_mail_list )
Calls: NT_add_to_frwd_hash()nt/notification.c
Called by: NT_write_all_frwds()nt/notification.c

Global Function NT_add_to_ntfy()

void NT_add_to_ntfy ( char* filename, char* fmt, ... )
Prototyped in: nt/notification.h
Calls: __builtin_next_arg(), __builtin_saveregs(), fclose(), fopen(), fprintf(), printf(), vfprintf()
Called by: NT_add_to_ntfy_list()nt/notification.c
References Variables: tracing

Global Function NT_add_to_ntfy_hash()

void NT_add_to_ntfy_hash ( GHashTable* ntfy_hash, char* e_mail )
Calls: NT_ntfy_filename_generate()nt/notification.c
  g_hash_table_insert(), g_hash_table_lookup(), strdup()
Called by: NT_add_to_ntfy_hash_list()nt/notification.c
References Variables: tmpdir

Global Function NT_add_to_ntfy_hash_list()

void NT_add_to_ntfy_hash_list ( GHashTable* ntfy_hash, GList* e_mail_list )
Calls: NT_add_to_ntfy_hash()nt/notification.c
Called by: NT_write_all_ntfs()nt/notification.c

Global Function NT_add_to_ntfy_list()

void NT_add_to_ntfy_list ( GList* list, GHashTable* hash, char* arg )
Calls: NT_add_to_ntfy()nt/notification.c
  g_hash_table_lookup()
Called by: NT_write_all_frwds()nt/notification.c
  NT_write_all_ntfs()nt/notification.c

Global Function NT_check_irtnfy()

GList* NT_check_irtnfy ( rpsl_object_t* old_obj, rpsl_object_t* new_obj )
Calls: NT_compare_lists()nt/notification.c
  get_irtnfy_vector(), get_irts()
Called by: NT_gather_ntfy_addresses()nt/notification.c

Global Function NT_compare_lists()

GList* NT_compare_lists ( GList* old_irts, GList* new_irts, int option )
Prototyped in: nt/notification.h
Calls: free(), g_list_append(), g_list_free(), malloc(), printf(), rpsl_attr_get_clean_value(), strcmp()
Called by: NT_check_irtnfy()nt/notification.c
References Variables: tracing

Global Function NT_cross_filename_generate()

char* NT_cross_filename_generate ( const char* tmpdir, const char* e_mail, int mode )
Calls: fclose(), fopen(), fprintf(), getpid(), malloc(), sprintf(), strlen()
Called by: NT_add_to_cross_hash()nt/notification.c
References Variables: cno_subject_add, cno_subject_del, humailbox

Global Function NT_crossntfy_filename_generate()

char* NT_crossntfy_filename_generate ( const char* tmpdir, const char* e_mail )
Prototyped in: nt/notification.h
Calls: fclose(), fopen(), fprintf(), getpid(), malloc(), sprintf(), strlen()

Global Function NT_delete_ntfy()

void NT_delete_ntfy ( const char* filename )
Prototyped in: nt/notification.h
Calls: unlink()
Called by: nt_gfunc_delete()nt/notification.c

Global Function NT_delete_ntfy_list()

void NT_delete_ntfy_list ( GHashTable* filehash )
Prototyped in: nt/notification.h
Calls: g_hash_table_destroy(), g_hash_table_foreach()
References Functions: nt_gfunc_delete()nt/notification.c

Global Function NT_forw_create_req()

void NT_forw_create_req ( const char* object_str )
Prototyped in: nt/notification.h
Calls: NT_log_ntfy()nt/notification.c
  NT_send_forw_creation()nt/notification.c
  UP_replace_globals(), fclose(), fopen(), fprintf(), free(), getpid(), malloc(), sprintf(), strlen(), unlink()
References Variables: forwlog, humailbox, mailcmd, mtfwheader, mtfwtxt, reading_from_mail, tmpdir

Global Function NT_forwd_filename_generate()

char* NT_forwd_filename_generate ( const char* tmpdir, const char* e_mail )
Prototyped in: nt/notification.h
Calls: UP_replace_globals(), fclose(), fopen(), fprintf(), free(), getpid(), malloc(), sprintf(), strlen()
Called by: NT_add_to_frwd_hash()nt/notification.c
References Variables: fwhdr, fwmailtxt, fwtxt, networkupdate, notinetworktxt, reading_from_mail, webupdate

Global Function NT_gather_frwd_addresses()

GList* NT_gather_frwd_addresses ( char* object_str )
Calls: g_list_append(), get_mntners(), get_updto_vector(), printf(), rpsl_attr_get_clean_value(), rpsl_object_errors(), rpsl_object_init()
Called by: NT_write_all_frwds()nt/notification.c
References Variables: tracing

Global Function NT_gather_ntfy_addresses()

GList* NT_gather_ntfy_addresses ( const char* old_object_str, const char* new_object_str )
Prototyped in: nt/notification.h
Calls: NT_check_irtnfy()nt/notification.c
  NT_unify_list()nt/notification.c
  g_list_concat(), get_attr_list(), get_mntners(), get_mntnfy_vector(), printf(), rpsl_attr_delete_list(), rpsl_object_delete(), rpsl_object_errors(), rpsl_object_has_error(), rpsl_object_init()
Called by: NT_write_all_ntfs()nt/notification.c
References Variables: tracing

Global Function NT_log_ntfy()

void NT_log_ntfy ( const char* filename, const char* logfilename )
Prototyped in: nt/notification.h
Calls: UP_get_current_date(), ctime(), fclose(), fgets(), fopen(), fprintf(), free(), malloc(), printf(), snprintf(), strdup(), strlen(), time()
Called by: NT_forw_create_req()nt/notification.c
  nt_gfunc_log()nt/notification.c
References Variables: netupdclientIP, networkupdate, tracing, webupdate

Global Function NT_log_ntfy_list()

void NT_log_ntfy_list ( GHashTable* filehash, char* log_file )
Prototyped in: nt/notification.h
Calls: g_hash_table_foreach()
References Functions: nt_gfunc_log()nt/notification.c

Global Function NT_ntfy_filename_generate()

char* NT_ntfy_filename_generate ( const char* tmpdir, const char* e_mail )
Prototyped in: nt/notification.h
Calls: UP_replace_globals(), fclose(), fopen(), fprintf(), free(), getpid(), malloc(), sprintf(), strlen()
Called by: NT_add_to_ntfy_hash()nt/notification.c
References Variables: networkupdate, notihdr, notimailtxt, notinetworktxt, notitxt, reading_from_mail, webupdate

Global Function NT_send_forw_creation()

void NT_send_forw_creation ( const char* filename, const char* to_address, const char* mailercommand )
Calls: fclose(), fgets(), fopen(), fprintf(), free(), malloc(), sprintf(), strlen(), system(), unlink()
Called by: NT_forw_create_req()nt/notification.c
References Variables: defmail, humailbox, supress_ack_notif

Global Function NT_send_ntfy()

void NT_send_ntfy ( const char* filename, const char* to_address, const char* mailercommand )
Prototyped in: nt/notification.h
Calls: fclose(), fgets(), fopen(), fprintf(), free(), malloc(), sprintf(), strlen(), system(), unlink()
Called by: nt_gfunc_send()nt/notification.c
References Variables: defmail, humailbox, supress_ack_notif

Global Function NT_send_ntfy_list()

void NT_send_ntfy_list ( GHashTable* filehash, char* mailercommand )
Prototyped in: nt/notification.h
Calls: g_hash_table_foreach()
References Functions: nt_gfunc_send()nt/notification.c

Global Function NT_unify_list()

GList* NT_unify_list ( GList* in_list, void )
Calls: free(), g_hash_table_destroy(), g_hash_table_foreach(), g_hash_table_insert(), g_hash_table_lookup(), g_hash_table_new(), g_list_insert_sorted(), g_strdown(), malloc(), rpsl_attr_get_clean_value(), strdup()
Called by: NT_gather_ntfy_addresses()nt/notification.c
References Functions: nt_free_list()nt/notification.c
  g_str_equal(), g_str_hash(), strcmp()

Global Function NT_write_all_frwds()

void NT_write_all_frwds ( char* old_object_str, char* new_object_str, const char* tempdir, GHashTable* ntfy_hash, GHashTable* forwd_hash, GHashTable* cross_hash, const char* from_address )
Prototyped in: nt/notification.h
Calls: NT_add_to_frwd_hash_list()nt/notification.c
  NT_add_to_ntfy_list()nt/notification.c
  NT_gather_frwd_addresses()nt/notification.c
  UP_remove_override_attr(), malloc(), printf(), rpsl_object_errors(), rpsl_object_get_text(), rpsl_object_init(), strcpy()
References Variables: tracing

Global Function NT_write_all_ntfs()

void NT_write_all_ntfs ( char* old_object, char* new_object, char* formatted_object, const char* tempdir, GHashTable* ntfy_hash, GHashTable* forwd_hash, GHashTable* cross_hash, char* from_address )
Prototyped in: nt/notification.h
Calls: NT_add_to_cross()nt/notification.c
  NT_add_to_cross_hash()nt/notification.c
  NT_add_to_ntfy_hash_list()nt/notification.c
  NT_add_to_ntfy_list()nt/notification.c
  NT_gather_ntfy_addresses()nt/notification.c
  get_overlapping_routes_list()nt/notification.c
  UP_remove_override_attr(), delete_delete_attrib(), find_email_address(), free(), malloc(), printf(), rpsl_object_delete(), rpsl_object_errors(), rpsl_object_get_class(), rpsl_object_get_text(), rpsl_object_init(), strcmp(), strcpy()
References Variables: cno_explain_add, cno_explain_del, cno_overlap_add, cno_overlap_del, reading_from_mail, tracing

Global Function get_overlapping_routes_list()

overlap_routes get_overlapping_routes_list ( rpsl_object_t* object )
Calls: UP_filter_out_same_origins(), free(), malloc(), rpsl_attr_get_clean_value(), rpsl_object_get_attr(), send_and_get(), sprintf(), strlen(), take_objects()
Called by: NT_write_all_ntfs()nt/notification.c
References Variables: query_host, query_port

Global Function nt_free_list()

void nt_free_list ( char* key, char* value, void* nothing )
Calls: free()
Used in: NT_unify_list()nt/notification.c

Global Function nt_gfunc_delete()

void nt_gfunc_delete ( gpointer key, gpointer value, gpointer user_data )
Calls: NT_delete_ntfy()nt/notification.c
Used in: NT_delete_ntfy_list()nt/notification.c

Global Function nt_gfunc_log()

void nt_gfunc_log ( gpointer key, gpointer value, gpointer user_data )
Calls: NT_log_ntfy()nt/notification.c
Used in: NT_log_ntfy_list()nt/notification.c

Global Function nt_gfunc_send()

void nt_gfunc_send ( gpointer key, gpointer value, gpointer user_data )
Calls: NT_send_ntfy()nt/notification.c
Used in: NT_send_ntfy_list()nt/notification.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 ttyname_r()

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