SatCat5
satcat5::eth::ProtoArp Class Reference

Detailed Description

Protocol handler for Ethernet-to-IPv4 ARP queries and replies.

See also
eth_arp.h, eth::ArpListener.

Definition at line 68 of file eth_arp.h.

#include <eth_arp.h>

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

Public Member Functions

 ProtoArp (satcat5::eth::Dispatch *dispatcher, const satcat5::ip::Addr &ipaddr=satcat5::ip::ADDR_NONE)
 Attach this ARP handler to an eth::Dispatch interface.
 
void add (satcat5::eth::ArpListener *evt)
 Register an event-listener.
 
void remove (satcat5::eth::ArpListener *evt)
 Unregister an event-listener.
 
void set_ipaddr (const satcat5::ip::Addr &ipaddr)
 Set the local IP address.
 
void set_proxy (const satcat5::ip::Table *table)
 Set IP routing table to enable proxy-ARP.
 
bool send_announce (const satcat5::eth::VlanTag &vtag=satcat5::eth::VTAG_NONE) const
 Send an unsolicited ARP announcement.
 
bool send_probe (const satcat5::ip::Addr &target, const satcat5::eth::VlanTag &vtag=satcat5::eth::VTAG_NONE)
 Send a probe to test if a given address is occupied.
 
bool send_query (const satcat5::ip::Addr &target, const satcat5::eth::VlanTag &vtag=satcat5::eth::VTAG_NONE)
 Send a query for a given IP address.
 
void gateway_change (const satcat5::ip::Addr &dstaddr, const satcat5::ip::Addr &gateway)
 Notify all listeners of a change in gateway configuration.
 
void frame_rcvd (satcat5::io::LimitedRead &src) override
 New-frame notifications from the parent interface. More...
 

Protected Member Functions

satcat5::eth::MacAddr match (const satcat5::eth::ArpHeader &hdr) const
 
bool send_internal (u16 opcode, const satcat5::eth::VlanTag &vtag, const satcat5::eth::MacAddr &dst, const satcat5::eth::MacAddr &sha, const satcat5::ip::Addr &spa, const satcat5::eth::MacAddr &tha, const satcat5::ip::Addr &tpa) const
 

Protected Attributes

satcat5::ip::Addr m_ipaddr
 
const satcat5::ip::Tablem_table
 
satcat5::util::List< satcat5::eth::ArpListenerm_listeners
 
satcat5::eth::Dispatch *const m_iface
 Parent interface (e.g., for address and I/O)
 
const satcat5::eth::MacType m_etype
 
satcat5::net::Type m_filter
 Incoming packet filter.
 

Private Attributes

satcat5::net::Protocolm_next
 Linked list of Protocols.
 

Member Function Documentation

◆ frame_rcvd()

void ProtoArp::frame_rcvd ( satcat5::io::LimitedRead src)
overridevirtual

New-frame notifications from the parent interface.

(This may be called directly or through eth::Dispatch.)

Implements satcat5::net::Protocol.

Definition at line 132 of file eth_arp.cc.


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