SatCat5
satcat5::eth::PluginCore Class Referenceabstract

Detailed Description

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.

See also
eth_plugin.h, eth::SwitchCacheInner, eth::SwitchVlanInner.

Definition at line 166 of file eth_plugin.h.

#include <eth_plugin.h>

Inheritance diagram for satcat5::eth::PluginCore:
[legend]
Collaboration diagram for satcat5::eth::PluginCore:
[legend]

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::PluginCorem_next
 

Constructor & Destructor Documentation

◆ PluginCore()

PluginCore::PluginCore ( satcat5::eth::SwitchCore sw)
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.

Member Function Documentation

◆ query()

virtual void satcat5::eth::PluginCore::query ( PluginPacket pkt)
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.


The documentation for this class was generated from the following files: