embedded-nal-async-xtra

Crates.ioembedded-nal-async-xtra
lib.rsembedded-nal-async-xtra
version0.2.0
sourcesrc
created_at2024-01-27 14:51:33.184485
updated_at2024-02-01 14:46:23.369611
descriptionHosts a bunch of traits which are not yet available in the embedded-nal-async crate
homepage
repositoryhttps://github.com/ivmarkov/edge-net
max_upload_size
id1116752
size8,580
(ivmarkov)

documentation

README

embedded-nal-async-xtra

CI crates.io Documentation

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
Commit count: 360

cargo fmt