33 #include <satcat5/ip_stack.h>
34 #include <satcat5/router2_deferfwd.h>
35 #include <satcat5/router2_dispatch.h>
36 #include <satcat5/router2_offload.h>
37 #include <satcat5/router2_table.h>
61 {
return m_ip.ipaddr(); }
63 {
return m_eth.macaddr(); }
65 {
return &m_dispatch; }
67 {
return m_ip.table(); }
71 {
return m_dispatch.set_ipaddr(addr); }
79 u8* buff,
unsigned nbytes)
80 : m_dispatch(buff, nbytes)
82 , m_eth(local_mac, m_dispatch.get_local_wr(), m_dispatch.get_local_rd())
83 , m_ip(local_ip, &m_eth, table)
112 template <
unsigned BSIZE = 8192>
121 :
StackCommon(local_mac, local_ip, &m_table, m_buff, BSIZE)
122 , m_offload(cfg, devaddr, &m_dispatch, hw_ports)
123 , m_table(cfg, devaddr)
130 {
return &m_offload; }
147 template <
unsigned BSIZE = 16384>
153 :
StackCommon(local_mac, local_ip, &m_table, m_buff, BSIZE)
154 , m_igmp(&m_dispatch, &m_ip)
Memory-mapped local ConfigBus.
Implemention of "net::Dispatch" for Ethernet frames.
Router/Server for the Internet Group Management Protocol (IGMP).
Protocol handler and dispatch unit for Internet Protocol v4 (IPv4).
Implement DeferFwd with static memory allocation.
Packet-processing pipeline for the IPv4 router.
void port_enable(const SATCAT5_PMASK_TYPE &mask)
Enable or disable specific port(s).
void set_local_iface(satcat5::ip::Dispatch *iface)
Link this dispatch unit to other parts of the IP/UDP stack.
void set_offload(satcat5::router2::Offload *iface)
Link this dispatch unit to other parts of the IP/UDP stack.
void set_defer_fwd(satcat5::router2::DeferFwd *fwd)
Link this dispatch unit to other parts of the IP/UDP stack.
void port_disable(const SATCAT5_PMASK_TYPE &mask)
Enable or disable specific port(s).
Offload port for gateware-accelerated IPv4 routers.
Common parent for StackGateware and StackSoftware.
StackCommon(const satcat5::eth::MacAddr &local_mac, const satcat5::ip::Addr &local_ip, satcat5::ip::Table *table, u8 *buff, unsigned nbytes)
Constructor should only be called by the child class.
~StackCommon()
Destructor should only be called by the child class.
Router implementation where some or all ports are gateware.
Router implementation where all ports are software-defined.
IPv4 forwarding table with hardware mirroring.
Dispatcher sorts incoming UDP messages by port index.
#define SATCAT5_PMASK_TYPE
Set the integer type used to identify source and destination ports.
Router-side implementation of the Internet Group Management Protocol (IGMP)
An Ethernet MAC address (with serializable interface).
IPv4 address is a 32-bit unsigned integer.