MCProxy

if_prop Class Reference

Prepare and organized the interface properties to a map data structure.

#include "if_prop.hpp"

List of all members.

Public Member Functions

if_prop_mapget_if_props ()
struct ifaddrs * get_ip4_if (const string &if_name)
list< struct ifaddrs * > * get_ip6_if (const string &if_name)
 if_prop ()
bool is_getaddrs_valid ()
void print_if_addr (const struct ifaddrs *if_p)
void print_if_info ()
bool refresh_network_interfaces ()
 ~if_prop ()

Static Public Member Functions

static void test_if_prop ()

Constructor & Destructor Documentation

if_prop::if_prop (  ) 

Create the class if_prop.

References HC_LOG_TRACE.

if_prop::~if_prop (  ) 

Release all allocated resources.

References HC_LOG_TRACE, and is_getaddrs_valid().


Member Function Documentation

if_prop_map * if_prop::get_if_props (  ) 

Return the whole data structure.

References HC_LOG_ERROR, HC_LOG_TRACE, and is_getaddrs_valid().

Referenced by print_if_info(), and check_if::test_check_if().

struct ifaddrs * if_prop::get_ip4_if ( const string &  if_name  )  [read]

Get the ipv4 interface properties for a specific interface name.

References HC_LOG_ERROR, HC_LOG_TRACE, and is_getaddrs_valid().

Referenced by check_if::check(), print_if_info(), igmp_sender::send_leave(), and igmp_sender::send_report().

list< struct ifaddrs * > * if_prop::get_ip6_if ( const string &  if_name  ) 

Get the ipv6 interface properties for a specific interface name.

References HC_LOG_ERROR, HC_LOG_TRACE, and is_getaddrs_valid().

Referenced by print_if_info().

bool if_prop::is_getaddrs_valid (  )  [inline]

Check for a valid data structure.

Referenced by get_if_props(), get_ip4_if(), get_ip6_if(), print_if_info(), refresh_network_interfaces(), and ~if_prop().

void if_prop::print_if_addr ( const struct ifaddrs *  if_p  ) 

Print interface information for a specific interface.

Parameters:
if_p interface properties for a specific inerface.

Referenced by print_if_info().

void if_prop::print_if_info (  ) 

Print all available network interface information.

References get_if_props(), get_ip4_if(), get_ip6_if(), HC_LOG_ERROR, HC_LOG_TRACE, is_getaddrs_valid(), and print_if_addr().

Referenced by test_if_prop().

bool if_prop::refresh_network_interfaces (  ) 

Refresh all information of all interfaces.

Returns:
Return true on success.

References HC_LOG_ERROR, HC_LOG_TRACE, and is_getaddrs_valid().

Referenced by check_if::check(), sender::init_if_prop(), check_if::test_check_if(), and test_if_prop().

void if_prop::test_if_prop (  )  [static]