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 Members


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).

See also: Thread#start

~NetworkMonitor ()

Destructor.

bool ready ()
[const]

ready() Implementation of NetworkMonitorInterface.

See also: NetworkMonitorInterface#ready

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.

See also: NetworkMonitorInterface#lock

Reimplemented from NetworkMonitorInterface

void unlock ()

unlock() implementation of NetworkMonitorInterface.

See also: NetworkMonitorInterface#unlock

Reimplemented from NetworkMonitorInterface

void resetReport ()

resetReport() Implementation of NetworkMonitorInterface.

See also: NetworkMonitorInterface#resetReport

Reimplemented from NetworkMonitorInterface

void getReport (NetworkMonitorReport* report)

getReport() Implementation of NetworkMonitorInterface.

See also: NetworkMonitorInterface#getReport

Reimplemented from NetworkMonitorInterface

void moveReport (NetworkMonitorReport* report)

moveReport() Implementation of NetworkMonitorInterface.

See also: NetworkMonitorInterface#moveReport

Reimplemented from NetworkMonitorInterface