|
SatCat5
|
Ethernet switch plugin API.
Switch plugins are attached to an eth::SwitchCore object, and receive a query callback for every incoming packet that crosses through the switch. (In contrast with the eth::SwitchPortPlugin API for packets traversing a specific port.) The callback may adjust the contents and/or handling of the packet.
Definition at line 166 of file eth_plugin.h.
#include <eth_plugin.h>
Public Member Functions | |
| virtual void | query (PluginPacket &pkt)=0 |
| Packet-received callback. More... | |
Protected Member Functions | |
| PluginCore (satcat5::eth::SwitchCore *sw) | |
| Associate this plugin object with the designated switch. More... | |
Protected Attributes | |
| satcat5::eth::SwitchCore *const | m_switch |
| Pointer to the associated SwitchCore object. | |
Private Attributes | |
| satcat5::eth::PluginCore * | m_next |
|
explicitprotected |
Associate this plugin object with the designated switch.
Automatically calls plugin_add() and plugin_remove().
Definition at line 50 of file eth_plugin.cc.
|
pure virtual |
Packet-received callback.
The query method is called for each incoming packet, passing a PluginPacket object that plugins can read or modify in-place. Plugins that alter header fields MUST set FLAG_HEADER_CHANGE and MUST NOT make any change that affects header length. The child class MUST override this method.
Implemented in satcat5::igmp::Server, satcat5::eth::SwitchCacheInner, satcat5::port::RecoveryIngress, and satcat5::eth::SwitchVlanInner.