|
SatCat5
|
Ethernet port plugin API.
Port plugins are attached to an eth::SwitchPort object, and receive separate ingress and egress queries for each packet passing through a particular port. (In contrast with the eth::PluginCore API for affecting packets on all ports.) The child class must override ingress, egress, or both.
Definition at line 198 of file eth_plugin.h.
#include <eth_plugin.h>
Public Member Functions | |
| virtual void | ingress (PluginPacket &pkt) |
| Packet-received callback. More... | |
| virtual void | egress (PluginPacket &pkt) |
| Packet-transmit callback. More... | |
Protected Member Functions | |
| PluginPort (satcat5::eth::SwitchPort *port) | |
| Associate this plugin object with the designated port. More... | |
Protected Attributes | |
| satcat5::eth::SwitchPort *const | m_port |
| Pointer to the associated SwitchPort object. | |
Private Attributes | |
| satcat5::eth::PluginPort * | m_next |
|
explicitprotected |
Associate this plugin object with the designated port.
Automatically calls plugin_add() and plugin_remove().
Definition at line 62 of file eth_plugin.cc.
|
inlinevirtual |
Packet-transmit callback.
The egress method is called as each packet is queued for transmission by the eth::SwitchPort. Plugins that alter header fields MUST set FLAG_HEADER_CHANGE. Unlike other contexts, the egress callback may change header length. Override the default implementation to process this event.
Reimplemented in satcat5::router2::BasicNat, and satcat5::eth::SwitchVlanEgress.
Definition at line 215 of file eth_plugin.h.
|
inlinevirtual |
Packet-received callback.
The ingress method is called as each packet enters the associated eth::SwitchPort, immediately before processing by eth::SwitchCore and calls to eth::PluginCore::query. Plugins that alter header fields MUST set FLAG_HEADER_CHANGE and MUST NOT make any change that affects header length. Override the default implementation to process this event.
Reimplemented in satcat5::router2::BasicNat.
Definition at line 207 of file eth_plugin.h.