embedded-nal-async-xtra
Hosts a bunch of traits which hopefully will be upstreamed into embedded-nal-async soon - in one shape or another.
Justification
These traits are necessary to unlock the full functionality of some crates in edge-net
. Namely:
- edge-mdns - needs UDP multicast capabilities
- edge-dhcp - needs raw ethernet socket capabilities or at least sending/receiving UDP packets to/from peers identified by their MAC addresses rather than by their IP addresses
- edge-http - (full server only) needs a way to bind to a server-side TCP socket
TCP traits
- TcpListen
- Server-side TCP socket similar in spirit to STD's
std::net::TcpListener::bind
bind method
- TcpAccept
- Server-side TCP socket similar in spirit to STD's
std::net::TcpListener
struct
UDP traits
- Multicast
- Extra trait for UDP sockets allowing subscription to multicast groups
- UnconnectedUdpWithMac
- Extra trait for unconnected UDP sockets allowing broadcasting packets to specific Ethernet MACs
- Additionally - when receiving packets - this trait provides the sender's MAC in addition to its socket address
Traits for sending/receiving raw ethernet payloads (a.k.a. raw sockets)
- RawStack
- Similar in spirit to
UdpStack
, yet allowing sending/receiving complete IPv4 and IPv6 frames, rather than just UDP packets
- RawSocket
- The socket type for
RawStack
. Similar in spirit to UnconnectedUdp