L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
Virtio_net_switch::Monitor Class Reference

Statistics client interface. More...

#include <stats.h>

Collaboration diagram for Virtio_net_switch::Monitor:

Public Member Functions

Port_statistics * get_port_stats (char const *name) const
 Retrieve pointer to Port_statistics structure.
bool get_port_mac (char const *name, unsigned char *mac) const
 Retrieve the MAC address of a port.
void sync () const
 Instruct the network switch to update the statistics information.

Detailed Description

Statistics client interface.

A client can retrieve per port statistics information, such as the number of sent and received packets. The information is shared with a L4Re::Dataspace. The information contained in the L4Re::Dataspace is updated by the switch only on Monitor::sync().

Definition at line 91 of file stats.h.

Member Function Documentation

◆ get_port_mac()

bool Virtio_net_switch::Monitor::get_port_mac ( char const * name,
unsigned char * mac ) const
inline

Retrieve the MAC address of a port.

Parameters
nameThe name of the port.
[out]macA 6 byte buffer allocated by the caller. To be filled with the MAC address of the port.

Definition at line 139 of file stats.h.

◆ get_port_stats()

Port_statistics * Virtio_net_switch::Monitor::get_port_stats ( char const * name) const
inline

Retrieve pointer to Port_statistics structure.

Parameters
nameThe name of the port.
Returns
Pointer to the Port_statistics structure or nullptr if no port of that name was found.

Definition at line 120 of file stats.h.


The documentation for this class was generated from the following file:
  • pkg/virtio-net-switch/lib/include/stats.h