SatCat5
eth_plugin.h File Reference

Detailed Description

Plugins for the software-defined Ethernet switch and IPv4 router.

This file defines the extensible plugin APIs for the software-defined Ethernet switch (eth::SwitchCore) and IPv4 router (router2::Dispatch). The same API is also used for both, and many plugins are intercompatible.

There are two plugin types. The first type, eth::PluginCore, is attached to the eth::SwitchCore and affects all packets traversing the switch or router. This API uses a single query callback.

The second type, eth::PluginPort, is attached to an eth::SwitchPort and affects only packets entering or leaving that specific port. This API uses separate ingress and egress callbacks.

Plugins that modify packet headers should update those fields directly in the PluginPacket struct, then setting the FLAG_HEADER_CHANGE bit in the flags field. Additional restrictions may apply in some cases. In particular, only PluginPort::egress callbacks are allowed to make changes that affect the total length of packet headers.

Both plugin APIs use the eth::PluginPacket data-structure, which contains pointers to the packet contents (i.e., for direct modification) and pre-parsed packet headers for several commonly-used protocols.

Definition in file eth_plugin.h.

#include <satcat5/eth_arp.h>
#include <satcat5/eth_header.h>
#include <satcat5/eth_switch.h>
#include <satcat5/ip_core.h>
#include <satcat5/list.h>
#include <satcat5/tcp_core.h>
#include <satcat5/types.h>
#include <satcat5/udp_core.h>
Include dependency graph for eth_plugin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  satcat5::eth::PluginPacket
 Ephemeral data structure provided to plugin callbacks. More...
 
class  satcat5::eth::PluginCore
 Ethernet switch plugin API. More...
 
class  satcat5::eth::PluginPort
 Ethernet port plugin API. More...