edge-net

repository·master·Indexed 42 days ago

https://github.com/sysgrok/edge-net

A collection of async, no_std, and no-allocation network protocol implementations for embedded systems and microcontrollers. Version 0.16.0 includes implementations for HTTP (client and server), DHCP (client and server), mDNS responders, and Captive Portal DNS servers.

Tokens
41.9K
Snippets
135
Records
184
Agent score
51%

What's inside edge-net

  1. Overview of edge-raw

    master

    The edge-raw crate provides an asynchronous, no_std, and no-alloc implementation for creating and parsing IP and UDP packets. It is specifically designed for low-level networking tasks where standard IP stacks might not be available or sufficient.

    Key use cases include protocols like DHCP, which require the ability to send and receive UDP packets to/from peers that do not yet have an assigned IP address.

  2. Overview of edge-ws

    master
    edge-ws is an asynchronous, no_std, and no-alloc implementation of the WebSocket protocol. It is designed for resource-constrained environments where heap allocation is not available. It works in conjunction with edge-http for the initial HTTP upgrade handshake.
  3. Overview of edge-mdns

    master
    edge-mdns is an asynchronous, no_std, and no-allocation implementation of an mDNS (Multicast DNS) responder. It is built upon the domain library and is designed for resource-constrained environments. It allows devices to be discoverable on a local network using the .local hostname convention.
  4. Overview of edge-net protocols and capabilities

    master

    The edge-net crate provides asynchronous, no_std, and no-allocation implementations of various network protocols designed for microcontrollers and embedded systems. It is organized into several specialized crates depending on the required functionality:

    • HTTP: Client and server implementations (edge-http).
    • Websockets: Send and receive functionality (edge-ws).
    • DNS Captive Portal: For managing captive portals (edge-captive).
    • mDNS: mDNS responder (edge-mdns).
    • DHCP: Client and server implementations (edge-dhcp).
    • Raw IP & UDP: Packet send/receive (edge-raw), often used alongside DHCP.
    • Sockets: TCP, UDP, and raw sockets via the Network Abstraction Layer (edge-nal).
  5. Overview of edge-nal networking traits

    master
    edge-nal provides a set of networking traits for UDP, TCP, and raw ethernet (raw sockets) designed for edge and embedded environments. It extends the capabilities of embedded-nal-async to support more complex networking patterns required by crates like edge-mdns, edge-dhcp, edge-http, and edge-ws.
  6. Overview of edge-captive

    master
    edge-captive is an async, no_std, and no-alloc implementation of a Captive Portal DNS server. It functions by resolving every requested domain name to a single, fixed IP address, which is a common technique used to redirect users to a login or landing page in captive portal environments. The implementation is built upon the domain library.
  7. Use edge-nal-openthread to run UDP over Thread

    master

    The edge-nal-openthread crate provides an implementation of edge-nal UDP factory and socket traits for the OpenThread (Thread) network. It works by wrapping the openthread crate to allow any edge-nal-based UDP protocol to operate over a Thread network.

    Key Constraints:

    • IPv6 Only: Only IPv6 addresses are supported because Thread is an IPv6-only protocol.
    • Multicast: Multicast join/leave operations are currently no-ops.
  8. Use edge-nal-embassy for bare-metal networking with Embassy

    master
    The edge-nal-embassy crate provides a bare-metal implementation of the edge-nal traits, specifically designed for the Embassy ecosystem. It leverages the embassy-net networking stack to provide network abstraction layers (NAL) for embedded systems running on Embassy.
  9. Use edge-nal-std for Standard Library network abstraction

    master
    The edge-nal-std crate provides a concrete implementation of the edge-nal traits using the Rust Standard Library. It is designed to allow network-agnostic code to run on platforms that support the standard library by providing asynchronous networking primitives.
  10. Use edge_raw::io for low-level packet handling

    master

    The edge_raw::io module provides implementations of several core traits from the edge_nal crate. These allow you to perform raw packet operations:

    • edge_nal::RawBind: For binding to a network interface.
    • edge_nal::RawReceive: For receiving raw packets.
    • edge_nal::RawSend: For sending raw packets.

    These traits are essential when you need to bypass the standard IP stack to communicate with unconfigured devices.