mcproxy/mcproxy/include/hamcast_logging.h File Reference
Go to the source code of this file.
Defines | |
#define | HC_DO_LOG(message, loglvl) hc_log( loglvl , HC_FUN , message) |
#define | HC_FUN __FUNCTION__ |
#define | HC_LOG_DEBUG(message) HC_DO_LOG(message, HC_LOG_DEBUG_LVL) |
#define | HC_LOG_DEBUG_LVL 0x0200 |
#define | HC_LOG_ERROR(message) HC_DO_LOG(message, HC_LOG_ERROR_LVL) |
#define | HC_LOG_ERROR_LVL 0x0500 |
#define | HC_LOG_FATAL(message) HC_DO_LOG(message, HC_LOG_FATAL_LVL) |
#define | HC_LOG_FATAL_LVL 0x0600 |
#define | HC_LOG_INFO(message) HC_DO_LOG(message, HC_LOG_INFO_LVL) |
#define | HC_LOG_INFO_LVL 0x0300 |
#define | HC_LOG_TRACE(message) HC_DO_LOG(message, HC_LOG_TRACE_LVL) |
#define | HC_LOG_TRACE_LVL 0x0100 |
#define | HC_LOG_WARN(message) HC_DO_LOG(message, HC_LOG_WARN_LVL) |
#define | HC_LOG_WARN_LVL 0x0400 |
Typedefs | |
typedef void(* | hc_log_fun_t )(int, const char *, const char *) |
Functions | |
hc_log_fun_t | hc_get_log_fun () |
void | hc_log (int log_lvl, const char *function_name, const char *log_msg) |
void | hc_set_default_log_fun (int log_lvl) |
void | hc_set_log_fun (hc_log_fun_t function_ptr) |
Define Documentation
#define HC_DO_LOG | ( | message, | |||
loglvl | ) | hc_log( loglvl , HC_FUN , message) |
#define HC_FUN __FUNCTION__ |
#define HC_LOG_DEBUG | ( | message | ) | HC_DO_LOG(message, HC_LOG_DEBUG_LVL) |
Referenced by worker::add_msg(), mc_socket::bind_udp_socket(), mroute_socket::create_raw_ipv4_socket(), mroute_socket::create_raw_ipv6_socket(), mc_socket::create_udp_ipv4_socket(), mc_socket::create_udp_ipv6_socket(), debug_msg::debug_msg(), proxy::end(), mc_socket::join_group(), mc_socket::leave_group(), and test_log().
#define HC_LOG_DEBUG_LVL 0x0200 |
Referenced by hc_set_default_log_fun().
#define HC_LOG_ERROR | ( | message | ) | HC_DO_LOG(message, HC_LOG_ERROR_LVL) |
Referenced by mroute_socket::add_extension_header(), mroute_socket::add_mroute(), mroute_socket::add_vif(), mc_socket::bind_udp_socket(), check_if::check(), mc_socket::choose_if(), mroute_socket::create_raw_ipv4_socket(), mroute_socket::create_raw_ipv6_socket(), mc_socket::create_udp_ipv4_socket(), mc_socket::create_udp_ipv6_socket(), mroute_socket::del_mroute(), mroute_socket::del_vif(), if_prop::get_if_props(), if_prop::get_ip4_if(), if_prop::get_ip6_if(), proxy::get_state_table(), sender::init(), proxy_instance::init(), proxy::init(), check_source::is_src_unused(), mc_socket::join_group(), mc_socket::leave_group(), addr_storage::mask(), operator<(), operator<<(), addr_storage::operator=(), if_prop::print_if_info(), mc_tables::print_igmp_table_dev(), mc_tables::print_snmp6_infos(), mc_socket::receive_msg(), mc_socket::receive_packet(), mc_tables::refresh_igmp_table(), mc_tables::refresh_joined_groups(), if_prop::refresh_network_interfaces(), mc_tables::refresh_routes(), mc_tables::refresh_snmp6(), mc_tables::refresh_vifs(), mc_socket::send_packet(), mroute_socket::set_default_icmp6_checksum_calc(), mc_socket::set_loop_back(), mroute_socket::set_mrt_flag(), mroute_socket::set_no_ip_hdr(), mc_socket::set_own_socket(), mc_socket::set_receive_timeout(), mroute_socket::set_recv_hop_by_hop_msg(), mroute_socket::set_recv_icmpv6_msg(), mroute_socket::set_recv_pkt_info(), proxy::start(), test_log(), and addr_storage::to_string().
#define HC_LOG_ERROR_LVL 0x0500 |
Referenced by hc_set_default_log_fun(), and test_mcproxy().
#define HC_LOG_FATAL | ( | message | ) | HC_DO_LOG(message, HC_LOG_FATAL_LVL) |
Referenced by test_log().
#define HC_LOG_FATAL_LVL 0x0600 |
Referenced by hc_set_default_log_fun().
#define HC_LOG_INFO | ( | message | ) | HC_DO_LOG(message, HC_LOG_INFO_LVL) |
Referenced by test_log().
#define HC_LOG_INFO_LVL 0x0300 |
Referenced by hc_set_default_log_fun().
#define HC_LOG_TRACE | ( | message | ) | HC_DO_LOG(message, HC_LOG_TRACE_LVL) |
Referenced by debug_msg::add_debug_msg(), mroute_socket::add_extension_header(), mroute_socket::add_mroute(), worker::add_msg(), timing::add_time(), mroute_socket::add_vif(), addr_storage::addr_storage(), debug_msg::all_done(), mc_socket::bind_udp_socket(), mroute_socket::calc_checksum(), check_source::check(), check_if::check(), check_if::check_if(), mc_socket::choose_if(), clock_msg::clock_msg(), config_msg::config_msg(), mroute_socket::create_raw_ipv4_socket(), mroute_socket::create_raw_ipv6_socket(), mc_socket::create_udp_ipv4_socket(), mc_socket::create_udp_ipv6_socket(), debug_msg::debug_msg(), receiver::del_interface(), mroute_socket::del_mroute(), mroute_socket::del_vif(), proxy::end(), addr_storage::get_addr_family(), debug_msg::get_debug_msg(), receiver::get_if_index(), if_prop::get_if_props(), mc_tables::get_igmp_table_all(), mc_tables::get_igmp_table_all_interfaces(), mc_tables::get_igmp_table_dev(), if_prop::get_ip4_if(), if_prop::get_ip6_if(), mc_tables::get_joined_group(), mc_tables::get_joined_groups_count(), receiver::get_proxy_instance(), mc_tables::get_route(), mc_tables::get_routes_count(), mc_tables::get_snmp6(), mc_tables::get_snmp6_all_interfaces(), mc_tables::get_snmp6_empty_struct(), addr_storage::get_sockaddr_storage(), proxy::get_state_table(), mc_tables::get_vif(), mc_tables::get_vifs_count(), timing::getInstance(), routing::getInstance(), if_prop::if_prop(), igmp_receiver::igmp_receiver(), igmp_sender::igmp_sender(), sender::init(), routing::init(), receiver::init(), proxy_instance::init(), proxy::init(), mld_sender::init(), igmp_sender::init(), check_source::init(), sender::init_if_prop(), worker::is_running(), check_source::is_src_unused(), worker::join(), timing::join(), receiver::join(), mc_socket::join_group(), mc_socket::leave_group(), addr_storage::mask(), mc_socket::mc_socket(), mld_receiver::mld_receiver(), mld_sender::mld_sender(), mroute_socket::mroute_socket(), proxy_msg::msg_type_to_string(), addr_storage::operator!=(), operator<(), operator<<(), operator<<=(), addr_storage::operator=(), addr_storage::operator==(), mc_tables::print_all_igmp_table(), mc_tables::print_all_joined_groups(), mc_tables::print_all_route_infos(), mc_tables::print_all_snmp6_infos(), mc_tables::print_all_vif_infos(), if_prop::print_if_info(), mc_tables::print_igmp_table_dev(), mc_tables::print_route_info(), mc_tables::print_snmp6_infos(), mroute_socket::print_struct_mf6cctl(), proxy::proxy(), proxy_instance::proxy_instance(), mc_socket::receive_msg(), mc_socket::receive_packet(), receiver::receiver(), receiver_msg::receiver_msg(), mc_tables::refresh_igmp_table(), mc_tables::refresh_joined_groups(), if_prop::refresh_network_interfaces(), mc_tables::refresh_routes(), mc_tables::refresh_snmp6(), mc_tables::refresh_vifs(), receiver::registrate_interface(), routing_msg::routing_msg(), mld_sender::send_general_query(), igmp_sender::send_general_query(), mld_sender::send_group_specific_query(), igmp_sender::send_group_specific_query(), mld_sender::send_leave(), igmp_sender::send_leave(), mc_socket::send_packet(), mld_sender::send_report(), igmp_sender::send_report(), sender::sender(), mroute_socket::set_default_icmp6_checksum_calc(), mc_socket::set_loop_back(), mroute_socket::set_mrt_flag(), mroute_socket::set_no_ip_hdr(), mc_socket::set_own_socket(), mc_socket::set_receive_timeout(), mroute_socket::set_recv_hop_by_hop_msg(), mroute_socket::set_recv_icmpv6_msg(), worker::start(), timing::start(), receiver::start(), proxy::start(), src_state::state_type_to_string(), timing::stop(), receiver::stop(), timing::stop_all_time(), check_if::swap_to_down(), check_if::swap_to_up(), test_msg::test(), mroute_socket::test_add_route(), mroute_socket::test_add_vifs(), addr_storage::test_addr_storage(), check_if::test_check_if(), mroute_socket::test_del_route(), mroute_socket::test_del_vifs(), if_prop::test_if_prop(), mc_tables::test_igmp_table(), mc_socket::test_join_leave_send(), mc_tables::test_joined_groups(), test_log(), mroute_socket::test_mcrouter_mrt_flag(), mroute_socket::test_mcrouter_vifs_routes(), mc_tables::test_mr_cache(), test_msg::test_msg(), mc_tables::test_snmp6(), timing::test_timing(), mc_tables::test_vifs(), addr_storage::to_string(), worker::worker(), clock_msg::~clock_msg(), config_msg::~config_msg(), debug_msg::~debug_msg(), if_prop::~if_prop(), mc_socket::~mc_socket(), mroute_socket::~mroute_socket(), proxy::~proxy(), proxy_instance::~proxy_instance(), receiver::~receiver(), receiver_msg::~receiver_msg(), routing_msg::~routing_msg(), and test_msg::~test_msg().
#define HC_LOG_TRACE_LVL 0x0100 |
Referenced by main(), and test_log().
#define HC_LOG_WARN | ( | message | ) | HC_DO_LOG(message, HC_LOG_WARN_LVL) |
Referenced by test_log().
#define HC_LOG_WARN_LVL 0x0400 |
Referenced by hc_set_default_log_fun().
Typedef Documentation
typedef void(* hc_log_fun_t)(int, const char *, const char *) |
Function Documentation
hc_log_fun_t hc_get_log_fun | ( | ) |
Get a pointer to the current active log function.
void hc_log | ( | int | log_lvl, | |
const char * | function_name, | |||
const char * | log_msg | |||
) |
Invokes the function pointer returned by hc_get_log_fun() if not NULL.
void hc_set_default_log_fun | ( | int | log_lvl | ) |
Get a default logging implementation (one logfile per thread).
- Parameters:
-
log_lvl The desired logging level.
References HC_LOG_DEBUG_LVL, HC_LOG_ERROR_LVL, HC_LOG_FATAL_LVL, HC_LOG_INFO_LVL, HC_LOG_WARN_LVL, and hc_set_log_fun().
Referenced by main(), test_log(), and test_mcproxy().
void hc_set_log_fun | ( | hc_log_fun_t | function_ptr | ) |
Set the log function to function_ptr
.
Referenced by hc_set_default_log_fun().