class NetworkMonitor

Network Monitor. More...

Full nameCoral::NetworkMonitor
Definition#include <networkmonitor.h>
InheritsCoral::NetworkMonitorInterface [virtual public], Coral::Thread
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

This class implements a network monitor, which sums bytes and packets transmitted over a given network interface (eth0, lo, ...). The interface will be set to promiscuous mode. Note: root permissions are required for monitoring a network interface!

 NetworkMonitor (StreamMonitorReport* smr = NULL, char* device = NULL)

Constructor for new NetworkMonitor. The new monitors's thread has to be started by calling start()!

Parameters:
deviceDevice name (eth0, lo, ...). Default: NULL (try automatic detection).

NetworkMonitor ()

Destructor.

bool  ready ()

[const]

ready() Implementation of NetworkMonitorInterface.

Reimplemented from NetworkMonitorInterface.

inline const char*  getDevice ()

[const]

Get device name, NetworkMonitor is using. This can be used to get the name of the automatically chosen device name (name = NULL in contructor).

Returns: Device name.

void  lock ()

lock() implementation of NetworkMonitorInterface.

Reimplemented from NetworkMonitorInterface.

void  unlock ()

unlock() implementation of NetworkMonitorInterface.

Reimplemented from NetworkMonitorInterface.

void  resetReport ()

resetReport() Implementation of NetworkMonitorInterface.

Reimplemented from NetworkMonitorInterface.

void  getReport (NetworkMonitorReport* report)

getReport() Implementation of NetworkMonitorInterface.

Reimplemented from NetworkMonitorInterface.

void  moveReport (NetworkMonitorReport* report)

moveReport() Implementation of NetworkMonitorInterface.

Reimplemented from NetworkMonitorInterface.