#include <source/ariba/communication/networkinfo/NetworkChangeDetection.h>
Public Member Functions | |
NetworkChangeDetection () | |
virtual | ~NetworkChangeDetection () |
void | registerNotification (NetworkChangeInterface *callback) |
void | unregisterNotification (NetworkChangeInterface *callback) |
Protected Member Functions | |
void | handleSystemEvent (const SystemEvent &event) |
Private Types | |
typedef vector < NetworkChangeInterface * > | RegistrationList |
Private Member Functions | |
use_logging_h (NetworkChangeDetection) | |
void | startMonitoring () |
void | stopMonitoring () |
NetworkChangeInterface::NetworkChangeInfo | extractInterfaceEvent (struct nlmsghdr *header) |
NetworkChangeInterface::NetworkChangeInfo | extractAddressEvent (struct nlmsghdr *header) |
Static Private Member Functions | |
static void | monitoringThreadFunc (NetworkChangeDetection *obj) |
Private Attributes | |
RegistrationList | registrations |
boost::thread * | monitoringThread |
volatile bool | running |
int | routingSocket |
NetworkInformation | networkInformation |
Definition at line 76 of file NetworkChangeDetection.h.
typedef vector<NetworkChangeInterface*> ariba::communication::NetworkChangeDetection::RegistrationList [private] |
Definition at line 89 of file NetworkChangeDetection.h.
ariba::communication::NetworkChangeDetection::NetworkChangeDetection | ( | ) |
ariba::communication::NetworkChangeDetection::~NetworkChangeDetection | ( | ) | [virtual] |
ariba::communication::NetworkChangeDetection::use_logging_h | ( | NetworkChangeDetection | ) | [private] |
void ariba::communication::NetworkChangeDetection::registerNotification | ( | NetworkChangeInterface * | callback | ) |
Definition at line 56 of file NetworkChangeDetection.cpp.
References registrations.
Referenced by ariba::communication::BaseCommunication::start().
void ariba::communication::NetworkChangeDetection::unregisterNotification | ( | NetworkChangeInterface * | callback | ) |
void ariba::communication::NetworkChangeDetection::handleSystemEvent | ( | const SystemEvent & | event | ) | [protected, virtual] |
Implements ariba::utility::SystemEventListener.
void ariba::communication::NetworkChangeDetection::startMonitoring | ( | ) | [private] |
Definition at line 74 of file NetworkChangeDetection.cpp.
References logging_debug, monitoringThread, monitoringThreadFunc(), and running.
Referenced by NetworkChangeDetection().
void ariba::communication::NetworkChangeDetection::stopMonitoring | ( | ) | [private] |
Definition at line 83 of file NetworkChangeDetection.cpp.
References logging_debug, monitoringThread, routingSocket, and running.
Referenced by ~NetworkChangeDetection().
void ariba::communication::NetworkChangeDetection::monitoringThreadFunc | ( | NetworkChangeDetection * | obj | ) | [static, private] |
Definition at line 100 of file NetworkChangeDetection.cpp.
References extractAddressEvent(), extractInterfaceEvent(), logging_debug, logging_error, logging_info, ariba::communication::NetworkChangeDetectionEventType(), routingSocket, and running.
Referenced by startMonitoring().
NetworkChangeInterface::NetworkChangeInfo ariba::communication::NetworkChangeDetection::extractInterfaceEvent | ( | struct nlmsghdr * | header | ) | [private] |
Definition at line 259 of file NetworkChangeDetection.cpp.
References ariba::communication::NetworkChangeInterface::EventTypeInterfaceDown, ariba::communication::NetworkChangeInterface::EventTypeInterfaceUp, ariba::communication::NetworkInformation::getInterface(), ariba::communication::NetworkChangeInterface::_NetworkChangeInfo::interface, ariba::communication::NetworkInterface::isRunning, ariba::communication::NetworkInterface::isUp, logging_debug, logging_error, networkInformation, and ariba::communication::NetworkChangeInterface::_NetworkChangeInfo::type.
Referenced by monitoringThreadFunc().
NetworkChangeInterface::NetworkChangeInfo ariba::communication::NetworkChangeDetection::extractAddressEvent | ( | struct nlmsghdr * | header | ) | [private] |
Definition at line 300 of file NetworkChangeDetection.cpp.
References ariba::communication::NetworkChangeInterface::EventTypeAddressDelete, ariba::communication::NetworkChangeInterface::EventTypeAddressNew, ariba::communication::NetworkInformation::getInterface(), ariba::communication::NetworkChangeInterface::_NetworkChangeInfo::interface, logging_debug, networkInformation, and ariba::communication::NetworkChangeInterface::_NetworkChangeInfo::type.
Referenced by monitoringThreadFunc().
Definition at line 90 of file NetworkChangeDetection.h.
Referenced by registerNotification(), and unregisterNotification().
boost::thread* ariba::communication::NetworkChangeDetection::monitoringThread [private] |
Definition at line 95 of file NetworkChangeDetection.h.
Referenced by startMonitoring(), and stopMonitoring().
volatile bool ariba::communication::NetworkChangeDetection::running [private] |
Definition at line 96 of file NetworkChangeDetection.h.
Referenced by monitoringThreadFunc(), startMonitoring(), and stopMonitoring().
Definition at line 99 of file NetworkChangeDetection.h.
Referenced by monitoringThreadFunc(), and stopMonitoring().
Definition at line 100 of file NetworkChangeDetection.h.
Referenced by extractAddressEvent(), and extractInterfaceEvent().