Macros | |
#define | GNUNET_EXTRA_LOGGING 1 |
define GNUNET_EXTRA_LOGGING if using this header outside the GNUnet source tree where gnunet_config.h is unavailable More... | |
#define | GNUNET_assert(cond) |
Use this for fatal errors that cannot be handled. More... | |
#define | GNUNET_assert_at(cond, f, l) |
Use this for fatal errors that cannot be handled. More... | |
#define | GNUNET_assert_from(cond, comp) |
Use this for fatal errors that cannot be handled. More... | |
#define | GNUNET_break(cond) |
Use this for internal assertion violations that are not fatal (can be handled) but should not occur. More... | |
#define | GNUNET_break_op(cond) |
Use this for assertion violations caused by other peers (i.e. More... | |
#define | GNUNET_log_strerror(level, cmd) |
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the message given by strerror(errno). More... | |
#define | GNUNET_log_from_strerror(level, component, cmd) |
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the message given by strerror(errno). More... | |
#define | GNUNET_log_strerror_file(level, cmd, filename) |
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the message given by strerror(errno). More... | |
#define | GNUNET_log_from_strerror_file(level, component, cmd, filename) |
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the message given by strerror(errno). More... | |
Typedefs | |
typedef void(* | GNUNET_Logger) (void *cls, enum GNUNET_ErrorType kind, const char *component, const char *date, const char *message) |
User-defined handler for log messages. More... | |
Enumerations | |
enum | GNUNET_ErrorType { GNUNET_ERROR_TYPE_UNSPECIFIED = -1 , GNUNET_ERROR_TYPE_NONE = 0 , GNUNET_ERROR_TYPE_ERROR = 1 , GNUNET_ERROR_TYPE_WARNING = 2 , GNUNET_ERROR_TYPE_MESSAGE = 4 , GNUNET_ERROR_TYPE_INFO = 8 , GNUNET_ERROR_TYPE_DEBUG = 16 , GNUNET_ERROR_TYPE_INVALID = 32 , GNUNET_ERROR_TYPE_BULK = 64 } |
Types of errors. More... | |
Functions | |
int | GNUNET_get_log_skip (void) |
Get the number of log calls that are going to be skipped. More... | |
void | GNUNET_log_nocheck (enum GNUNET_ErrorType kind, const char *message,...) __attribute__((format(printf |
Main log function. More... | |
void | GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, const char *comp, const char *message,...) __attribute__((format(printf |
Log function that specifies an alternative component. More... | |
void | GNUNET_log_config_missing (enum GNUNET_ErrorType kind, const char *section, const char *option) |
Log error message about missing configuration option. More... | |
void | GNUNET_log_config_invalid (enum GNUNET_ErrorType kind, const char *section, const char *option, const char *required) |
Log error message about invalid configuration option value. More... | |
void | GNUNET_abort_ (void) __attribute__((noreturn)) |
Abort the process, generate a core dump if possible. More... | |
void | GNUNET_log_skip (int n, int check_reset) |
Ignore the next n calls to the log function. More... | |
enum GNUNET_GenericReturnValue | GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile) |
Setup logging. More... | |
void | GNUNET_logger_add (GNUNET_Logger logger, void *logger_cls) |
Add a custom logger. More... | |
void | GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls) |
Remove a custom logger. More... | |
const char * | GNUNET_sh2s (const struct GNUNET_ShortHashCode *shc) |
Convert a short hash value to a string (for printing debug messages). More... | |
const char * | GNUNET_uuid2s (const struct GNUNET_Uuid *uuid) |
Convert a UUID to a string (for printing debug messages). More... | |
const char * | GNUNET_h2s (const struct GNUNET_HashCode *hc) |
Convert a hash value to a string (for printing debug messages). More... | |
const char * | GNUNET_h2s2 (const struct GNUNET_HashCode *hc) |
Convert a hash value to a string (for printing debug messages). More... | |
const char * | GNUNET_h2s_full (const struct GNUNET_HashCode *hc) |
Convert a hash value to a string (for printing debug messages). More... | |
const char * | GNUNET_p2s (const struct GNUNET_CRYPTO_EddsaPublicKey *p) |
Convert a public key value to a string (for printing debug messages). More... | |
const char * | GNUNET_p2s2 (const struct GNUNET_CRYPTO_EddsaPublicKey *p) |
Convert a public key value to a string (for printing debug messages). More... | |
const char * | GNUNET_e2s (const struct GNUNET_CRYPTO_EcdhePublicKey *p) |
Convert a public key value to a string (for printing debug messages). More... | |
const char * | GNUNET_e2s2 (const struct GNUNET_CRYPTO_EcdhePublicKey *p) |
Convert a public key value to a string (for printing debug messages). More... | |
const char * | GNUNET_i2s (const struct GNUNET_PeerIdentity *pid) |
Convert a peer identity to a string (for printing debug messages). More... | |
const char * | GNUNET_i2s2 (const struct GNUNET_PeerIdentity *pid) |
Convert a peer identity to a string (for printing debug messages). More... | |
const char * | GNUNET_i2s_full (const struct GNUNET_PeerIdentity *pid) |
Convert a peer identity to a string (for printing debug messages). More... | |
const char * | GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen) |
Convert a "struct sockaddr*" (IPv4 or IPv6 address) to a string (for printing debug messages). More... | |
size_t | GNUNET_hex2b (const char *src, void *dst, size_t dstlen, int invert) |
Parse an ascii-encoded hexadecimal string into the buffer. More... | |
void | GNUNET_print_bytes (const void *buf, size_t buf_len, int fold, int in_be) |
Print a byte string in hexadecimal ascii notation. More... | |
const char * | GNUNET_error_type_to_string (enum GNUNET_ErrorType kind) |
Convert error type to string. More... | |
#define GNUNET_EXTRA_LOGGING 1 |
define GNUNET_EXTRA_LOGGING if using this header outside the GNUnet source tree where gnunet_config.h is unavailable
Definition at line 156 of file gnunet_common.h.
#define GNUNET_assert | ( | cond | ) |
Use this for fatal errors that cannot be handled.
Definition at line 956 of file gnunet_common.h.
#define GNUNET_assert_at | ( | cond, | |
f, | |||
l | |||
) |
Use this for fatal errors that cannot be handled.
Definition at line 975 of file gnunet_common.h.
#define GNUNET_assert_from | ( | cond, | |
comp | |||
) |
Use this for fatal errors that cannot be handled.
cond | Condition to evaluate |
comp | Component string to use for logging |
Definition at line 997 of file gnunet_common.h.
#define GNUNET_break | ( | cond | ) |
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
Definition at line 1041 of file gnunet_common.h.
#define GNUNET_break_op | ( | cond | ) |
Use this for assertion violations caused by other peers (i.e.
protocol violations). We do not want to confuse end-users (say, some other peer runs an older, broken or incompatible GNUnet version), but we still want to see these problems during development and testing. "OP == other peer".
Definition at line 1063 of file gnunet_common.h.
#define GNUNET_log_strerror | ( | level, | |
cmd | |||
) |
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the message given by strerror(errno).
Definition at line 1083 of file gnunet_common.h.
#define GNUNET_log_from_strerror | ( | level, | |
component, | |||
cmd | |||
) |
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the message given by strerror(errno).
Definition at line 1102 of file gnunet_common.h.
#define GNUNET_log_strerror_file | ( | level, | |
cmd, | |||
filename | |||
) |
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the message given by strerror(errno).
Definition at line 1122 of file gnunet_common.h.
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the message given by strerror(errno).
Definition at line 1142 of file gnunet_common.h.
typedef void(* GNUNET_Logger) (void *cls, enum GNUNET_ErrorType kind, const char *component, const char *date, const char *message) |
User-defined handler for log messages.
cls | closure |
kind | severeity |
component | what component is issuing the message? |
date | when was the message logged? |
message | what is the message |
Definition at line 437 of file gnunet_common.h.
enum GNUNET_ErrorType |
Types of errors.
Definition at line 410 of file gnunet_common.h.
int GNUNET_get_log_skip | ( | void | ) |
Get the number of log calls that are going to be skipped.
Definition at line 989 of file common_logging.c.
References skip_log.
void GNUNET_log_nocheck | ( | enum GNUNET_ErrorType | kind, |
const char * | message, | ||
... | |||
) |
Main log function.
kind | how serious is the error? |
message | what is the message (format string) |
... | arguments for format string |
void GNUNET_log_from_nocheck | ( | enum GNUNET_ErrorType | kind, |
const char * | comp, | ||
const char * | message, | ||
... | |||
) |
Log function that specifies an alternative component.
This function should be used by plugins.
kind | how serious is the error? |
comp | component responsible for generating the message |
message | what is the message (format string) |
... | arguments for format string |
Referenced by main(), and run().
void GNUNET_log_config_missing | ( | enum GNUNET_ErrorType | kind, |
const char * | section, | ||
const char * | option | ||
) |
Log error message about missing configuration option.
kind | log level |
section | section with missing option |
option | name of missing option |
Definition at line 1451 of file common_logging.c.
References _, and GNUNET_log.
Referenced by database_connect(), database_setup(), DHTU_ip_init(), get_bootstrap_server(), get_update_information_directory(), GNUNET_CLIENT_test(), GNUNET_CONFIGURATION_config_tool_run(), GNUNET_CONVERSATION_phone_create(), GNUNET_DATACACHE_create(), GNUNET_PQ_connect_with_cfg2(), GNUNET_RPS_connect(), GSF_pending_request_init_(), load(), load_hostlist_file(), mq_init(), new_sub(), purge_cfg_dir(), read_index_list(), run(), save(), save_hostlist_file(), setup_exit_helper_args(), sock_read(), start_arm_service(), and write_index_list().
void GNUNET_log_config_invalid | ( | enum GNUNET_ErrorType | kind, |
const char * | section, | ||
const char * | option, | ||
const char * | required | ||
) |
Log error message about invalid configuration option value.
kind | log level |
section | section with invalid option |
option | name of invalid option |
required | what is required that is invalid about the option |
Definition at line 1465 of file common_logging.c.
References _, and GNUNET_log.
Referenced by advertise_dns_exit(), DHTU_ip_init(), GCD_init(), GNUNET_CLIENT_test(), GNUNET_CONFIGURATION_get_value_time(), GNUNET_GNS_lookup_with_tld(), GSF_push_init_(), read_service_conf(), run(), setup_exit_helper_args(), setup_service(), and test_service_configuration().
void GNUNET_abort_ | ( | void | ) |
Abort the process, generate a core dump if possible.
Most code should use GNUNET_assert (0)
instead to first log the location of the failure.
Definition at line 278 of file common_logging.c.
void GNUNET_log_skip | ( | int | n, |
int | check_reset | ||
) |
Ignore the next n calls to the log function.
n | number of log calls to ignore (could be negative) |
check_reset | GNUNET_YES to assert that the log skip counter is currently zero |
Definition at line 965 of file common_logging.c.
References GNUNET_break, and skip_log.
enum GNUNET_GenericReturnValue GNUNET_log_setup | ( | const char * | comp, |
const char * | loglevel, | ||
const char * | logfile | ||
) |
Setup logging.
comp | default component to use |
loglevel | what types of messages should be logged |
logfile | change logging to logfile (use NULL to keep stderr) |
comp | default component to use |
loglevel | what types of messages should be logged |
logfile | which file to write log messages to (can be NULL) |
Definition at line 729 of file common_logging.c.
References component, component_nopid, get_type(), getenv(), GNUNET_asprintf(), GNUNET_assert, GNUNET_free, GNUNET_OK, GNUNET_strdup, GNUNET_STRINGS_filename_expand(), GNUNET_SYSERR, log_file_name, min_level, parse_all_definitions(), setup_log_file(), and t.
Referenced by get_app(), GNUNET_PROGRAM_conf_and_options(), GNUNET_PROGRAM_run2(), GNUNET_SERVICE_run_(), GNUNET_TRANSPORT_TESTING_main_(), main(), and run().
void GNUNET_logger_add | ( | GNUNET_Logger | logger, |
void * | logger_cls | ||
) |
Add a custom logger.
Note that installing any custom logger will disable the standard logger. When multiple custom loggers are installed, all will be called. The standard logger will only be used if no custom loggers are present.
logger | log function |
logger_cls | closure for logger |
Definition at line 774 of file common_logging.c.
References GNUNET_new, typescriptdomain::logger, CustomLogger::logger, CustomLogger::logger_cls, loggers, and CustomLogger::next.
void GNUNET_logger_remove | ( | GNUNET_Logger | logger, |
void * | logger_cls | ||
) |
Remove a custom logger.
logger | log function |
logger_cls | closure for logger |
Definition at line 788 of file common_logging.c.
References GNUNET_assert, GNUNET_free, typescriptdomain::logger, CustomLogger::logger, CustomLogger::logger_cls, loggers, and CustomLogger::next.
const char * GNUNET_sh2s | ( | const struct GNUNET_ShortHashCode * | shc | ) |
Convert a short hash value to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant!
shc | the hash code |
Definition at line 1259 of file common_logging.c.
References GNUNET_STRINGS_data_to_string(), GNUNET_THREAD_LOCAL, and shc.
Referenced by add_member_subscription(), add_store_member(), change_srv_handle_member_id(), check_member_session_completion(), consider_ss_ack(), create_handle_member_id(), create_rekey(), decrypt_box(), delete_srv_room_message(), destroy_route(), discard_all_from_rung_tail(), dv_setup_key_state_from_km(), find_member_session_in_room(), GCC_2s(), GCC_handle_kx(), GCC_handle_kx_auth(), get_store_peer_of(), handle_ack(), handle_connection_broken(), handle_connection_create(), handle_connection_create_ack(), handle_connection_destroy(), handle_dv_learn(), handle_get_message(), handle_message_join(), handle_message_leave(), handle_room_entry(), handle_room_open(), handle_send_message(), handle_tunnel_kx(), handle_validation_challenge(), handle_validation_response(), iterate_load_next_member_sessions(), iterate_next_member_ids(), iterate_notify_about_members(), iterate_save_members(), iterate_save_peers(), join_room(), kce_generate_cb(), mq_send_d(), mqm_execute(), notify_about_members(), notify_srv_handle_member_id(), on_message(), pack_message(), pack_srv_room_message(), remove_member_subscription(), remove_room_member_session(), request_room_message_step(), route_message(), secret_destroy(), send_broken(), send_kx(), send_kx_auth(), send_message_join(), send_srv_handle_message(), setup_initial_shared_secret_dec(), setup_initial_shared_secret_ephemeral(), sock_read(), start_address_validation(), start_dv_learn(), switch_member_session(), try_handle_plaintext(), update_member_session_history(), update_store_peer(), validation_start_cb(), and validation_transmit_on_queue().
const char * GNUNET_uuid2s | ( | const struct GNUNET_Uuid * | uuid | ) |
Convert a UUID to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant!
uuid | the UUID |
Definition at line 1279 of file common_logging.c.
References GNUNET_STRINGS_data_to_string(), and GNUNET_THREAD_LOCAL.
Referenced by cummulative_ack(), free_pending_acknowledgement(), handle_reliability_ack(), handle_reliability_box(), and prepare_pending_acknowledgement().
const char * GNUNET_h2s | ( | const struct GNUNET_HashCode * | hc | ) |
Convert a hash value to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant!
hc | the hash code |
Convert a hash value to a string (for printing debug messages).
hc | the hash code |
Definition at line 1166 of file common_logging.c.
References GNUNET_CRYPTO_hash_to_enc(), GNUNET_THREAD_LOCAL, and ret.
Referenced by add_get_request_to_pending(), add_member_session(), advertise_dns_exit(), automaton_save_graph_step(), block_proc(), callback_found_message(), callback_operation(), callback_room_connect(), callback_room_handle_message(), callback_tunnel_disconnect(), cancel_store_operation(), cb_channel_destruction(), cb_intersection_element_removed(), change_srv_handle_member_id(), check_edge(), check_send_message(), clean_request(), clear_member_store(), clear_operation_store(), client_release_ports(), client_request_complete_alice(), client_response_handler(), create_channel_to_destination(), create_handle_member_id(), create_rekey(), datacache_get_iterator(), delayed_get(), delayed_put(), delete_srv_room_message(), derive_aes_key(), derive_auth_key(), derive_iv(), derive_pong_iv(), dht_get_string_accept_handler(), dht_get_string_handler(), do_rekey(), env_delete_notify(), execute_add(), expired_processor(), filter_all(), filtered_map_initialization(), forward_reply(), forward_tunnel_message(), free_validation_state(), GCCH_2s(), GCCH_bind(), GCCH_channel_incoming_new(), GCCH_channel_local_new(), GCCH_hash_port(), GDS_CLIENTS_handle_reply(), GDS_DATACACHE_get_closest(), GDS_DATACACHE_handle_get(), GDS_DATACACHE_handle_put(), GDS_NEIGHBOURS_handle_get(), GDS_NEIGHBOURS_handle_put(), GDS_NEIGHBOURS_handle_reply(), get_any(), get_cb(), get_handle_member_session(), get_room_data_subdir(), get_store_message(), get_target_peers(), get_typed(), GNUNET_CADET_channel_create(), GNUNET_CADET_open_port(), GNUNET_DATACACHE_get(), GNUNET_DATACACHE_get_closest(), GNUNET_DATACACHE_put(), GNUNET_DATASTORE_get_key(), GNUNET_DATASTORE_put(), GNUNET_DATASTORE_remove(), GNUNET_DHT_get_start(), GNUNET_DHT_get_stop(), GNUNET_DHT_put(), GNUNET_FS_add_to_index(), GNUNET_FS_handle_on_demand_block(), GNUNET_FS_tree_encoder_next(), GNUNET_MESSENGER_get_message(), GNUNET_NAMECACHE_lookup_block(), GNUNET_SET_listen(), GNUNET_SET_listen_cancel(), GNUNET_SETI_listen(), GNUNET_SETI_listen_cancel(), GNUNET_SETU_listen(), GNUNET_SETU_listen_cancel(), GSC_bind(), GSC_KX_encrypt_and_transmit(), GSC_KX_init(), GSF_cadet_query(), GSF_cadet_query_cancel(), GSF_pending_request_create_(), GSF_pending_request_get_message_(), GSF_plan_add_(), handle_ack(), handle_bob_client_message(), handle_channel_create(), handle_channel_created(), handle_client_evaluate(), handle_client_join(), handle_client_listen(), handle_client_redirect_to_service(), handle_client_register_message(), handle_client_reject(), handle_client_set_add(), handle_client_start_search(), handle_client_unindex(), handle_data(), handle_datastore_reply(), handle_dht_local_get(), handle_dht_local_get_stop(), handle_dht_local_put(), handle_dht_p2p_get(), handle_dht_p2p_put(), handle_dht_reply(), handle_encrypted(), handle_ephemeral_key(), handle_get_key(), handle_get_message(), handle_icmp_service(), handle_incoming_msg(), handle_local_result(), handle_member_id(), handle_message_join(), handle_message_leave(), handle_miss_message(), handle_name_message(), handle_namecache_block_response(), handle_p2p_get(), handle_p2p_put(), handle_p2p_reply(), handle_plaintext_channel_open(), handle_port_close(), handle_port_open(), handle_put(), handle_query_message(), handle_recv_message(), handle_remove(), handle_reply(), handle_request(), handle_room_close(), handle_room_entry(), handle_room_messages(), handle_room_open(), handle_room_sync(), handle_send_message(), handle_service_message(), handle_tcp_service(), handle_udp_service(), handle_union_p2p_demand(), handle_union_p2p_elements(), handle_union_p2p_full_element(), handle_union_p2p_offer(), handle_validation_response(), hash_for_index_cb(), hash_for_index_val(), heap_plugin_put(), initialize_map_unfiltered(), initiate_put_from_pipe_trigger(), iterate_initial_edge(), iterate_load_next_session(), iterate_next_member_ids(), iterate_save_messages(), iterate_save_operations(), iterate_save_session(), iterator_bf_create(), iterator_bf_reduce(), join_room(), load_state(), lookup_task(), merge_srv_room_last_messages(), namecache_sqlite_cache_block(), notify_srv_handle_member_id(), notify_srv_handle_message(), on_message(), open_srv_room(), plan(), prepare_client_end_notification(), prepare_ibf_iterator(), print_channel_destination(), print_edge(), print_indexed(), process(), process_client_result(), process_dht_put_content(), process_local_reply(), process_migration_content(), process_reply(), process_result_with_request(), put_cb(), put_continuation(), quota_processor(), recv_message_request(), regex_find_path(), REGEX_INTERNAL_iterate_all_edges(), REGEX_INTERNAL_search(), regex_iterator(), regex_next_edge(), remove_by_unique_id(), remove_continuation(), remove_member_session(), remove_room_member_session(), remove_store_contact(), request_room_message_step(), requester_callback(), responder_callback(), revalidate_map_it(), route_packet(), run(), schedule_block_download(), select_peer(), send_close_room(), send_enter_room(), send_full_element_iterator(), send_key(), send_message_to_room(), send_message_to_room_with_key(), send_offers_iterator(), send_open_room(), send_remaining_elements(), send_srv_handle_message(), send_srv_room_message(), send_sync_room(), send_tunnel_message(), set_room_sender_id(), sign_message(), sign_message_by_peer(), sqlite_plugin_get_closest(), sqlite_plugin_put(), start_intersection(), start_local_query(), start_p2p_processing(), store_service(), timeout_closed_cb(), transmit_client_response(), transmit_item(), transmit_pending(), transmit_request(), try_handle_plaintext(), update_member_session_history(), update_room_message(), update_store_contact(), validation_transmit_on_queue(), verify_member_session_as_sender(), and write_item().
const char * GNUNET_h2s2 | ( | const struct GNUNET_HashCode * | hc | ) |
Convert a hash value to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant! Identical to GNUNET_h2s(), except that another buffer is used so both GNUNET_h2s() and GNUNET_h2s2() can be used within the same log statement.
hc | the hash code |
Convert a hash value to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant! Identical to GNUNET_h2s(), except that another buffer is used so both GNUNET_h2s() and GNUNET_h2s2() can be used within the same log statement.
hc | the hash code |
Definition at line 1187 of file common_logging.c.
References GNUNET_CRYPTO_hash_to_enc(), GNUNET_THREAD_LOCAL, and ret.
Referenced by GSC_KX_encrypt_and_transmit(), and handle_encrypted().
const char * GNUNET_h2s_full | ( | const struct GNUNET_HashCode * | hc | ) |
Convert a hash value to a string (for printing debug messages).
This prints all 104 characters of a hashcode! This is one of the very few calls in the entire API that is NOT reentrant!
hc | the hash code |
Convert a hash value to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant!
hc | the hash code |
Definition at line 1298 of file common_logging.c.
References GNUNET_CRYPTO_hash_to_enc(), GNUNET_THREAD_LOCAL, and ret.
Referenced by forward_reply(), get_callback(), get_resp_callback(), handle_dht_local_get(), handle_dht_local_put(), handle_recv_message(), namecache_cache_block(), namecache_lookup_block(), namecache_sqlite_cache_block(), namecache_sqlite_lookup_block(), new_sub(), on_message(), put_callback(), run(), and sign_hello().
const char * GNUNET_p2s | ( | const struct GNUNET_CRYPTO_EddsaPublicKey * | p | ) |
Convert a public key value to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant!
hc | the hash code |
Definition at line 1198 of file common_logging.c.
References GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_hash_to_enc(), GNUNET_THREAD_LOCAL, p, and ret.
Referenced by do_rekey(), and inject_rekey().
const char * GNUNET_p2s2 | ( | const struct GNUNET_CRYPTO_EddsaPublicKey * | p | ) |
Convert a public key value to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant!
hc | the hash code |
Definition at line 1211 of file common_logging.c.
References GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_hash_to_enc(), GNUNET_THREAD_LOCAL, p, and ret.
const char * GNUNET_e2s | ( | const struct GNUNET_CRYPTO_EcdhePublicKey * | p | ) |
Convert a public key value to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant!
hc | the hash code |
Definition at line 1224 of file common_logging.c.
References GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_hash_to_enc(), GNUNET_THREAD_LOCAL, p, and ret.
Referenced by do_rekey(), GCC_handle_kx(), GCC_handle_kx_auth(), GCT_handle_kx(), GCT_handle_kx_auth(), handle_tunnel_kx(), inject_rekey(), mqm_execute(), send_kx(), and send_kx_auth().
const char * GNUNET_e2s2 | ( | const struct GNUNET_CRYPTO_EcdhePublicKey * | p | ) |
Convert a public key value to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant!
hc | the hash code |
Definition at line 1237 of file common_logging.c.
References GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_hash_to_enc(), GNUNET_THREAD_LOCAL, p, and ret.
const char * GNUNET_i2s | ( | const struct GNUNET_PeerIdentity * | pid | ) |
Convert a peer identity to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant!
pid | the peer identity |
pid | the peer identity |
Definition at line 1316 of file common_logging.c.
References GNUNET_CRYPTO_eddsa_public_key_to_string(), GNUNET_free, GNUNET_strlcpy(), GNUNET_THREAD_LOCAL, pid, GNUNET_PeerIdentity::public_key, and ret.
Referenced by activate_core_visible_dv_path(), add_known_to_bloom(), add_revocation(), add_search_string(), attempt_connect(), backtalker_monotime_cb(), cadet_mq_send_now(), cadet_timeout(), callback_room_connect(), callback_tunnel_disconnect(), cb_channel_destruction(), cb_channel_incoming(), cb_intersection_request_alice(), check_and_remove_pending_reversal(), check_for_burst_address(), check_peer_online(), check_peer_pull_reply(), check_validation_request_pending(), check_vl_transmission(), clean_peer(), client_disconnect_cb(), client_send_response(), clients_notify_stream_peer(), connect_cb(), connect_handler(), connect_notify(), connect_peers_run(), consider_for_advertising(), consider_sending_fc(), core_connect_cb(), core_disconnect_cb(), core_init(), core_mq_send_impl(), cores_send_connect_info(), cores_send_disconnect_info(), create_channel_to_destination(), cummulative_ack(), decrypt_new_element(), deliver_message(), derive_aes_key(), derive_iv(), derive_pong_iv(), destroy_peer(), destroy_route(), disconnect_notify(), do_connect(), do_decrypt(), do_encrypt(), do_flood(), do_restart_typemap_message(), do_round(), do_send(), dv_neighbour_transmission(), encapsulate_for_dv(), extract_box_cb(), finish_handling_raw_message(), forward_dv_box(), forward_dv_learn(), fragment_message(), free_backtalker(), free_queue_entry(), GCCH_2s(), GCD_search(), GCPP_2s(), GCT_2s(), GCT_handle_kx(), GDS_NEIGHBOURS_handle_get(), GDS_NEIGHBOURS_handle_put(), GDS_NEIGHBOURS_handle_reply(), GDS_try_connect(), GDS_u_connect(), GDS_u_disconnect(), GDS_u_receive(), get_cadet(), get_channel(), get_result_iterator(), GNUNET_CADET_channel_create(), GNUNET_CRYPTO_ecc_dlog(), GNUNET_CRYPTO_ecc_dlog_prepare(), GNUNET_DHT_pp2s(), GNUNET_DHT_verify_path(), GNUNET_PEERSTORE_hello_add(), GNUNET_PEERSTORE_store(), GNUNET_RPS_seed_ids(), GNUNET_TRANSPORT_application_suggest(), GNUNET_TRANSPORT_application_suggest_cancel(), GNUNET_TRANSPORT_application_validate(), GNUNET_TRANSPORT_communicator_receive(), GNUNET_TRANSPORT_TESTING_log_connect(), GNUNET_TRANSPORT_TESTING_log_disconnect(), GNUNET_TRANSPORT_TESTING_restart_peer(), GNUNET_TRANSPORT_TESTING_send(), GNUNET_TRANSPORT_TESTING_stop_peer(), got_hello(), GSC_CLIENTS_deliver_message(), GSC_CLIENTS_notify_client_about_neighbour(), GSC_CLIENTS_solicit_request(), GSC_KX_encrypt_and_transmit(), GSC_SESSIONS_confirm_typemap(), GSC_SESSIONS_create(), GSC_SESSIONS_end(), GSC_SESSIONS_set_typemap(), GSC_SESSIONS_solicit(), GSF_cadet_query(), GSF_cadet_query_cancel(), GSF_cadet_release_clients(), GSF_peer_connect_handler(), GSF_plan_add_(), GSF_push_start_(), handle_add_queue_message(), handle_backchannel_encapsulation(), handle_channel_create(), handle_client_redirect_to_service(), handle_client_seed(), handle_client_send(), handle_client_send_request(), handle_client_start(), handle_communicator_available(), handle_communicator_backchannel(), handle_connect(), handle_connect_notify(), handle_connection_create(), handle_core_connect(), handle_core_disconnect(), handle_del_queue_message(), handle_dht_p2p_get(), handle_dht_p2p_put(), handle_dht_p2p_result(), handle_disconnect(), handle_disconnect_notify(), handle_dv_box(), handle_dv_learn(), handle_encrypted(), handle_ephemeral_key(), handle_flow_control(), handle_fragment_box(), handle_hello(), handle_icmp_remote(), handle_icmp_service(), handle_inbound_channel(), handle_incoming_ack(), handle_incoming_msg(), handle_init_reply(), handle_iterate_start(), handle_local_ack(), handle_local_data(), handle_monitor_start(), handle_notify_inbound(), handle_p2p_estimate(), handle_p2p_get(), handle_p2p_migration_stop(), handle_p2p_put(), handle_peer_check(), handle_peer_pull_reply(), handle_peer_pull_request(), handle_peer_push(), handle_ping(), handle_pong(), handle_raw_message(), handle_recv(), handle_regex_result(), handle_reliability_ack(), handle_reliability_box(), handle_reply(), handle_revocation_union_request(), handle_room_entry(), handle_search_response(), handle_send_message_ack(), handle_send_ok(), handle_send_ready(), handle_store(), handle_suggest(), handle_tcp_data(), handle_tcp_remote(), handle_tcp_service(), handle_transport_notify_connect(), handle_transport_notify_disconnect(), handle_udp_remote(), handle_udp_service(), handle_validation_response(), handshake_ack_monotime_cb(), handshake_monotime_cb(), hello_add_iter(), hello_iter(), hello_iter_cb(), host_processor(), hosts_directory_scan_callback(), ifc_broadcast(), init_peer_cb(), insert_in_sampler(), keygen_round1_new_element(), keygen_round2_new_element(), learn_dv_path(), main_init(), monitor_cb(), monitor_notify_connect(), monitor_notify_disconnect(), mq_error(), mq_init(), mq_online_check_successful(), mq_send_impl(), neighbour_delete(), new_channel(), new_service_channel(), notify_client_connect_info(), notify_connect(), notify_disconnect(), operation_timeout(), pass_plaintext_to_core(), path_callback(), peer_destroy(), print_channel_destination(), print_info(), print_peer_list(), print_plugin_event_info(), process_migration_content(), process_notify(), process_peer_iteration_cb(), process_peer_string(), process_peerinfo_peers(), proto_read_kx(), queue_destroy(), queue_send_msg(), receiver_destroy(), rekey_monotime_cb(), reliability_box_message(), rem_from_list(), requester_callback(), reschedule_hellos(), reset_cadet(), result_processor(), route_control_message_without_fc(), route_message(), route_packet(), route_via_neighbour(), RPS_sampler_elem_next(), run(), schedule_next_hello(), schedule_transmit_on_queue(), select_peer(), select_write_cb(), send_broken(), send_enter_room(), send_keep_alive(), send_key(), send_message(), send_msg_from_cache(), send_pull_reply(), send_pull_request(), send_push(), set_peer_online(), sock_read(), start_address_validation(), start_cb(), stop_peer_run(), suggest_to_connect(), tokenized_cb(), transmit_cummulative_ack_cb(), transmit_on_queue(), transmit_pending(), transmit_task_cb(), transmit_typemap_task(), try_transmission(), valid_peers_iterator(), and validation_transmit_on_queue().
const char * GNUNET_i2s2 | ( | const struct GNUNET_PeerIdentity * | pid | ) |
Convert a peer identity to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant! Identical to GNUNET_i2s(), except that another buffer is used so both GNUNET_i2s() and GNUNET_i2s2() can be used within the same log statement.
pid | the peer identity |
Identical to GNUNET_i2s(), except that another buffer is used so both GNUNET_i2s() and GNUNET_i2s2() can be used within the same log statement.
pid | the peer identity |
Definition at line 1341 of file common_logging.c.
References GNUNET_CRYPTO_eddsa_public_key_to_string(), GNUNET_free, GNUNET_strlcpy(), GNUNET_THREAD_LOCAL, pid, GNUNET_PeerIdentity::public_key, and ret.
Referenced by derive_aes_key(), destroy_route(), forward_dv_learn(), handle_dv_box(), handle_ping(), send_broken(), and send_msg_from_cache().
const char * GNUNET_i2s_full | ( | const struct GNUNET_PeerIdentity * | pid | ) |
Convert a peer identity to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant!
pid | the peer identity |
pid | the peer identity |
Definition at line 1363 of file common_logging.c.
References GNUNET_CRYPTO_eddsa_public_key_to_string(), GNUNET_free, GNUNET_THREAD_LOCAL, pid, GNUNET_PeerIdentity::public_key, and ret.
Referenced by channel_incoming(), consider_ss_ack(), create_receiver(), do_round(), enc_notify_cb(), gns_value_to_string(), GNUNET_TRANSPORT_TESTING_start_peer(), handle_ephemeral_key(), hist_update(), on_message(), operation_timeout(), peers_callback(), reply_handle(), restore_valid_peers(), run(), start_peer_run(), store_peer_presistently_iterator(), stream_input_handle(), tunnels_callback(), and view_update_handle().
const char * GNUNET_a2s | ( | const struct sockaddr * | addr, |
socklen_t | addrlen | ||
) |
Convert a "struct sockaddr*" (IPv4 or IPv6 address) to a string (for printing debug messages).
This is one of the very few calls in the entire API that is NOT reentrant!
addr | the address |
addrlen | the length of the addr |
This is one of the very few calls in the entire API that is NOT reentrant!
addr | the address |
addrlen | the length of the address in addr |
Definition at line 1386 of file common_logging.c.
References _, GNUNET_snprintf(), GNUNET_THREAD_LOCAL, and LEN.
Referenced by accept_client(), add_addr(), addr_cb(), address_cb(), check_and_remove_pending_reversal(), create_listen_socket(), create_proto_queue(), create_udp_socket(), free_lal(), get_server_addresses(), GNUNET_get_udp_socket(), GNUNET_NAT_AUTO_test_start(), GNUNET_NAT_test_start(), GNUNET_NETWORK_socket_accept(), GNUNET_NT_scanner_get_type(), handle_request(), handle_response(), iface_proc(), ifc_broadcast(), init_socket(), interface_proc(), mq_init(), mq_send_d(), nat_address_cb(), nat_register(), notify_client(), notify_client_external_ipv4_change(), open_listen_socket(), pending_reversal_timeout(), print_sockaddr(), process_external_ip(), proto_read_kx(), queue_read_kx(), read_send(), reversal_cb(), run(), run_scan(), send_msg_with_kx(), sock_read(), sockaddr_to_udpaddr_string(), submit_get_request(), submit_post_request(), transmit_query(), try_connect_using_address(), try_handle_plaintext(), try_send_tcp(), try_send_udp(), and upnp_addr_change_cb().
size_t GNUNET_hex2b | ( | const char * | src, |
void * | dst, | ||
size_t | dstlen, | ||
int | invert | ||
) |
Parse an ascii-encoded hexadecimal string into the buffer.
The buffer must be (strlen (src) / 2) bytes in length.
src | the string |
dst | the destination buffer |
dst_len | the length of the dst buffer |
invert | read from src in inverted direction. |
Definition at line 1535 of file common_logging.c.
Referenced by run().
void GNUNET_print_bytes | ( | const void * | buf, |
size_t | buf_len, | ||
int | fold, | ||
int | in_be | ||
) |
Print a byte string in hexadecimal ascii notation.
buf | the byte string |
buf_len | the length of the buf buffer |
fold | insert newline after this number of bytes (0 for no folding) |
in_be | Output byte string in NBO |
Definition at line 1558 of file common_logging.c.
Referenced by main(), and run().
const char * GNUNET_error_type_to_string | ( | enum GNUNET_ErrorType | kind | ) |
Convert error type to string.
kind | type to convert |
Definition at line 1141 of file common_logging.c.
References _, GNUNET_ERROR_TYPE_BULK, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_INFO, GNUNET_ERROR_TYPE_MESSAGE, and GNUNET_ERROR_TYPE_WARNING.
Referenced by output_message(), and run().