7 releases (4 breaking)

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

#1202 in Network programming

Download history 74/week @ 2024-01-03 168/week @ 2024-01-10 105/week @ 2024-01-17 94/week @ 2024-01-24 98/week @ 2024-01-31 167/week @ 2024-02-07 147/week @ 2024-02-14 158/week @ 2024-02-21 210/week @ 2024-02-28 205/week @ 2024-03-06 177/week @ 2024-03-13 144/week @ 2024-03-20 229/week @ 2024-03-27 171/week @ 2024-04-03 32/week @ 2024-04-10 134/week @ 2024-04-17

590 downloads per month
Used in 3 crates

MIT license

36KB
648 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