8 releases (4 breaking)

0.5.1 Jun 22, 2024
0.5.0 Apr 22, 2024
0.4.1 Aug 22, 2023
0.4.0 Jul 21, 2023
0.1.0 Feb 17, 2021

#1435 in Network programming

Download history 101/week @ 2024-07-20 186/week @ 2024-07-27 174/week @ 2024-08-03 154/week @ 2024-08-10 157/week @ 2024-08-17 265/week @ 2024-08-24 143/week @ 2024-08-31 177/week @ 2024-09-07 189/week @ 2024-09-14 164/week @ 2024-09-21 239/week @ 2024-09-28 204/week @ 2024-10-05 183/week @ 2024-10-12 199/week @ 2024-10-19 132/week @ 2024-10-26 139/week @ 2024-11-02

673 downloads per month
Used in 3 crates

MIT license

36KB
651 lines

smoltcp Network Abstraction Layer (NAL)

QUARTIQ Matrix Chat Continuous Integration

An embedded-nal implementation for smoltcp.

This repository provides an implementation of a TCP- and UDP-capable network stack that can be used for any library that leverages the embedded-nal.

This crate also supports DHCP management internally if DHCP via smoltcp is used.


lib.rs:

A [embedded_nal]-compatible network stack for [smoltcp]

Usage

To use this library, first instantiate the smoltcp::iface::Interface and add sockets to it. Once sockets have been added, pass the interface to [NetworkStack::new()].

Sharing the Stack

If you have multiple users of the network stack, you can use the shared::NetworkManager by enabling the shared-stack feature. Note that this implementation does not employ any mutually exclusive access mechanism. For information on how to use this manager, refer to shared_bus::AtomicCheckMutex's documentation.

When sharing the stack, it is the users responsibility to ensure that access to the network stack is mutually exclusive. For example, this can be done when using RTIC by storing all of the resources that use the network stack in a single resource.

Dependencies

~3.5MB
~72K SLoC