MCProxy

check_if Class Reference
[Proxy]

Monitored running state the network interfaces.

#include "check_if.hpp"

List of all members.

Public Member Functions

bool check ()
 check_if ()
std::vector< int > init (std::vector< int > &check_lst, int addr_family)
std::vector< int > swap_to_down ()
std::vector< int > swap_to_up ()

Static Public Member Functions

static void test_check_if ()

Constructor & Destructor Documentation

check_if::check_if (  ) 

Create a check_if instance.

References HC_LOG_TRACE.


Member Function Documentation

bool check_if::check (  ) 

Trigger the monitoring.

Returns:
Return true on success.

References if_prop::get_ip4_if(), HC_LOG_ERROR, HC_LOG_TRACE, and if_prop::refresh_network_interfaces().

Referenced by proxy::start(), and test_check_if().

std::vector<int> check_if::init ( std::vector< int > &  check_lst,
int  addr_family 
)

Initialize check_if for a specific IP version.

Parameters:
check_lst a list of monitored interface indexes
addr_family used IP version (AF_INET or AF_INET6)
Returns:
Return all dont running interfaces to have an consistent start state.

Referenced by proxy::start(), and test_check_if().

std::vector< int > check_if::swap_to_down (  ) 

Return the interface indexes who swap their running state to down after the last monitoring trigger.

References HC_LOG_TRACE.

Referenced by proxy::start(), and test_check_if().

std::vector< int > check_if::swap_to_up (  ) 

Return the interface indexes who swap their running state to up after the last monitoring trigger.

References HC_LOG_TRACE.

Referenced by proxy::start(), and test_check_if().

void check_if::test_check_if (  )  [static]