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

#1416 in Network programming

Download history 169/week @ 2024-08-05 155/week @ 2024-08-12 159/week @ 2024-08-19 273/week @ 2024-08-26 136/week @ 2024-09-02 178/week @ 2024-09-09 188/week @ 2024-09-16 164/week @ 2024-09-23 245/week @ 2024-09-30 204/week @ 2024-10-07 175/week @ 2024-10-14 201/week @ 2024-10-21 127/week @ 2024-10-28 144/week @ 2024-11-04 1176/week @ 2024-11-11 1646/week @ 2024-11-18

3,110 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