bmv2
Designing your own switch target with bmv2
|
Public Types | |
using | port_t = PortMonitorIface::port_t |
Representation of a port number. More... | |
using | PortStatus = PortMonitorIface::PortStatus |
Represents the status of a port. More... | |
using | PortStatusCb = PortMonitorIface::PortStatusCb |
Signature of the cb function to call when a port status changes. More... | |
Public Member Functions | |
void | transmit_fn (port_t port_num, const char *buffer, int len) |
Transmits a data packet out of port port_num . More... | |
ReturnCode | register_status_cb (const PortStatus &type, const PortStatusCb &port_cb) |
Base class for SwitchWContexts (and by extension Switch). It provides facilities to send and receive packets, as well as manage ports.
Representation of a port number.
Represents the status of a port.
Signature of the cb function to call when a port status changes.
ReturnCode bm::DevMgr::register_status_cb | ( | const PortStatus & | type, |
const PortStatusCb & | port_cb | ||
) |
Register a callback function to be called every time the status of a port changes.
void bm::DevMgr::transmit_fn | ( | port_t | port_num, |
const char * | buffer, | ||
int | len | ||
) |
Transmits a data packet out of port port_num
.