Skip to content
CAI
Software that uses CAICheck a score

smoltcp-rs/smoltcp

69.5

Adequate · 14 November 2026

48.8k

lines of production code

Rust

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add 6LoWPAN fragment and IP header compression support

The \src/wire/sixlowpan\ module now implements parsing and representation for 6LoWPAN Fragment headers (RFC 4944) and IP Header Compression (RFC 6282). Users can now process fragmented 6LoWPAN packets and decompress compressed IPv6 headers, including handling of address modes, hop limits, and next-header compression via the new \frag\, \iphc\, and \nhc\ submodules.

src/wire/sixlowpan · high confidence

Add TCP Reno and CUBIC congestion control algorithms

The TCP socket layer now includes configurable congestion control algorithms, specifically Reno and CUBIC, alongside a no-control option. This allows the network stack to manage bandwidth and react to packet loss according to standard TCP behaviors (RFC 5681 for Reno, RFC 9438 for CUBIC), improving throughput and fairness in varying network conditions.

src/socket/tcp/congestion · high confidence

Add packet2pcap utility for converting raw packets to PCAP format

A new command-line utility, packet2pcap, has been added to the utils directory. This tool allows users to convert raw packet files into standard PCAP format by specifying an input file, an output file, and a link type (either 'ethernet' or 'ip') via command-line arguments. It leverages the smoltcp library's PcapSink to handle the PCAP header and packet writing, providing a simple way to analyze captured network data with standard tools.

utils · high confidence

Add raw socket and TUN/TAP interface support for Unix platforms

This change introduces the underlying system interfaces for network packet capture and virtual network devices on Unix-like systems. For Linux and Android, it adds \RawSocketDesc\ (using \AF\_PACKET\ sockets) and \TunTapInterfaceDesc\ (using \/dev/net/tun\), allowing the library to send and receive raw Ethernet or IP packets and interact with virtual TUN/TAP devices. For other Unix platforms (macOS, iOS, FreeBSD, NetBSD, OpenBSD), it adds \BpfDevice\ support via Berkeley Packet Filter (BPF) interfaces to provide equivalent raw socket functionality. These components are gated behind new feature flags (\phy-raw\_socket\ and \phy-tuntap\_interface\) and are not automatically enabled by the \phy-tuntap\_interface\ feature, requiring explicit opt-in.

src/phy/sys · high confidence

Initial implementation of RPL routing protocol components

This change introduces the foundational building blocks for the RPL (Routing Protocol for Low-Power and Lossy Networks) implementation in \src/iface/rpl\. It adds core data structures and algorithms required for DODAG formation and maintenance, including a lollipop sequence counter for version tracking, a rank calculation system for parent selection, an objective function (OF0) for path cost evaluation, a parent set manager for storing neighbor information, and a relations table for tracking next-hop mappings. Additionally, it implements the Trickle algorithm for efficient DIO message dissemination and defines protocol constants such as sequence window size and default intervals.

src/iface/rpl · high confidence

New and updated network examples

The examples directory now includes a comprehensive set of demonstration applications: a TCP client and server, an HTTP client, a DNS resolver, a DHCPv4 client, ICMP ping (supporting both IPv4 and IPv6), and benchmarks for both standard and 6LoWPAN loopback interfaces. Additional examples demonstrate multicast communication over IPv4 and IPv6, and a dedicated 6LoWPAN example for IEEE 802.15.4 networks. These examples showcase the library's socket APIs, interface configuration, and support for various network mediums.

examples · high confidence

New phy module with device abstractions and middleware

The \src/phy\ module introduces a \Device\ trait for network hardware abstraction, along with several concrete implementations and middleware components. Users can now utilize a \Loopback\ device for zero-dependency testing, a \RawSocket\ adapter for direct frame access on Unix systems, and a \TunTapInterface\ for virtual TUN/TAP networking. For debugging and testing, the module provides a \Tracer\ to pretty-print packets, a \PcapWriter\ to capture traffic in libpcap format, a \FaultInjector\ to simulate packet loss and corruption, and a \FuzzInjector\ to mutate packets for fuzzing internal state machines.

src/phy · high confidence

New storage module with RingBuffer, PacketBuffer, and TCP Assembler

The \src/storage\ module introduces specialized containers for network data handling. It adds a zero-copy \RingBuffer\ supporting both discrete (single-element) and continuous (slice-based) operations, a \PacketBuffer\ that manages separate metadata and payload rings for UDP/ICMP/Raw sockets, and a new \Assembler\ for reassembling out-of-order TCP segments while tracking data gaps. These components provide the underlying memory management and reassembly logic for the network stack's socket implementations.

src/storage · high confidence

New wire-layer packet parsers for ARP, DHCPv4, DNS, Ethernet, ICMP, IEEE 802.15.4, IGMP, IP, and IPsec AH

The \src/wire\ module now includes representation and packet types for several foundational network protocols. This adds the ability to parse and emit Ethernet II frames, ARP requests and replies, DHCPv4 client/server messages (including option writing and DNS server limits), DNS queries and responses, ICMPv4 and ICMPv6 messages (with support for IPv6 extension headers and multicast listener protocols), IEEE 802.15.4 link-layer frames, IGMPv1/v2 group management, generic IP version detection, and IPsec Authentication Header validation. These changes enable the library to handle lower-layer protocol interactions and address resolution without requiring external dependencies.

src/wire · high confidence

Architecture

Network interface logic split into dedicated protocol and medium modules

The interface implementation has been reorganized by splitting the monolithic code into separate modules for Ethernet (\ethernet.rs\), IEEE 802.15.4 (\ieee802154.rs\), IPv4 (\ipv4.rs\), IPv6 (\ipv6.rs\), 6LoWPAN (\sixlowpan.rs\), TCP (\tcp.rs\), UDP (\udp.rs\), and multicast (\multicast.rs\). This change isolates the processing and dispatching logic for each network layer and medium type, making the interface easier to maintain and allowing features to be enabled or disabled independently via Cargo features.

src/iface/interface · high confidence

Behavioural changes

2 commits (0 fixes) modifying fuzz/corpus

A change to existing behaviour in fuzz/corpus — 2 commits, 10 files: “Add packet parser fuzzer”; “Add some ICMPv4 and ICMPv6 packets to fuzz corpus”.

fuzz/corpus · medium confidence · unverified

Introduce explicit, user-managed socket API with async waker support

The networking stack now uses a new socket module where applications explicitly allocate and manage transmit and receive buffers for TCP, UDP, ICMP, raw IP, DHCPv4, and DNS sockets, rather than relying on implicit OS buffering. This change introduces a unified \Socket\ enum and \AnySocket\ trait for type-safe downcasting, and adds async \async\ support via \WakerRegistration\ on all socket types, allowing applications to be notified of state changes (such as data availability or buffer space) without polling.

src/socket · high confidence

Library restructured with new internal modules and refined time handling

The library's internal structure has been reorganized: the \enum\_with\_unknown\ macro and Ethernet frame logic have been moved from \lib.rs\ and \ethernet.rs\ into dedicated \macros.rs\ and \parsers.rs\ modules, while a new \rand.rs\ module provides a simple PRNG for socket port selection. Additionally, the \time.rs\ module now uses microsecond precision for \Instant\ and \Duration\, fixing previous conversion bugs with \std::time\ and improving display formatting.

src · high confidence

New network interface subsystem with packet reassembly and neighbor caching

The \src/iface\ module introduces a new network interface implementation that includes a packet assembler for reassembling fragmented IPv4/IPv6 and 6LoWPAN packets, a neighbor cache backed by a heapless LinearMap with rate-limiting and expiration, a route table supporting default gateways for IPv4 and IPv6, and socket metadata tracking for neighbor discovery state. This change replaces the previous interface logic with a modular architecture featuring fragmentation handling, neighbor cache eviction, and SLAAC integration for IPv6 address configuration.

src/iface · high confidence

Project license changed from Apache-2.0 to 0-Clause BSD

The project license has been switched from the Apache License 2.0 to the 0-Clause BSD License. The Apache and MIT license files have been removed and replaced with a new LICENSE-0BSD.txt file, and the CONTRIBUTING.txt file has been updated to reflect the new license terms.

(repo-wide) · high confidence

TCP congestion control API redesign with configurable controllers

The TCP socket layer now supports pluggable congestion control algorithms, allowing users to select between Cubic, Reno, or no control based on compile-time features or runtime configuration. The new \Controller\ trait defines the interface for these algorithms, and the \AnyController\ enum manages the active instance, prioritizing Cubic for throughput or Reno for conservative, low-power scenarios. This change provides a more flexible foundation for loss-based congestion algorithms in TCP connections.

src/socket/tcp · high confidence

Test coverage

Add network simulation test snapshots; Added benchmark tests for network packet emission; Added fuzzing targets for network protocol parsers and interface logic; Added network simulation tests for TCP throughput and multi-flow fairness; Expanded network interface test coverage for IPv4, IPv6, and 6LoWPAN.

Dependencies

smoltcp v0.14.0 release with Rust 2024 edition and dependency upgrades

The smoltcp library has been updated to version 0.14.0, adopting the Rust 2024 edition and raising the Minimum Supported Rust Version (MSRV) to 1.91. This release upgrades several core dependencies, including \managed\ to 0.8, \byteorder\ to 1.0, and \heapless\ to 0.9, while also adding \libc\ as an optional dependency for raw socket support. A new fuzzing crate (\smoltcp-fuzz\) has been introduced to test packet parsers and interface logic using \libfuzzer-sys\. The feature set has been expanded with new compile-time configuration options for interface address counts, multicast group limits, neighbor cache sizes, and route counts, alongside features for TCP congestion control algorithms (Cubic, Reno) and segmentation offload.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 67 → 69 (+2.8)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 91 → 84 (-6.7)
  • Architecture 88 → 100 (+12.2)
  • Maturity 51 → 55 (+3.2)
  • Readiness 73 → 79 (+5.6)
  • Security 90 → 90 (+0.0)
  • Event Sourcing 100 → 100 (+0.0)
  • Performance 80 → 80 (+0.0)

Resolved (8)

  • Duplicated block (15 lines × 2) (src/phy/raw_socket.rs)
  • Duplicated block (8 lines × 2) (src/socket/raw.rs)
  • Duplicated block (8 lines × 2) (src/wire/dns.rs)
  • Duplicated block (8 lines × 2) (src/wire/icmpv4.rs)
  • Duplicated block (8 lines × 2) (src/wire/icmpv4.rs)
  • Off-boarding risk: anonymized user #1
  • Orphaned file (src/wire/igmp.rs)
  • Projects may be oversized for their cohesion

New (71)

  • Duplicated block (10 lines × 2) (src/socket/raw.rs)
  • Duplicated block (15 lines × 2) (src/phy/raw_socket.rs)
  • Duplicated block (6 lines × 3) (src/iface/interface/mod.rs)
  • Duplicated block (8 lines × 2) (src/socket/raw.rs)
  • Duplicated block (8 lines × 2) (src/wire/dns.rs)
  • Duplicated block (8 lines × 2) (src/wire/dns.rs)
  • Duplicated block (8 lines × 2) (src/wire/icmpv4.rs)
  • Duplicated block (8 lines × 2) (src/wire/icmpv4.rs)
  • Edited copies of one member (3 members, 11+ corresponding lines) (src/wire/icmpv6.rs)
  • Edited copies of one member (3 members, 12+ corresponding lines) (src/socket/icmp.rs)
  • Edited copies of one member (3 members, 4+ corresponding lines) (src/wire/arp.rs)
  • Edited copies of one member (3 members, 4+ corresponding lines) (src/wire/ipv4.rs)
  • Edited copies of one member (3 members, 4+ corresponding lines) (src/wire/mld.rs)
  • Edited copies of one member (3 members, 6+ corresponding lines) (src/wire/ipv4.rs)
  • Edited copies of one member (4 members, 10+ corresponding lines) (src/wire/mod.rs)
  • Edited copies of one member (4 members, 13+ corresponding lines) (src/phy/sys/raw_socket.rs)
  • Edited copies of one member (4 members, 7+ corresponding lines) (src/wire/ieee802154.rs)
  • Edited copies of one member (6 members, 6+ corresponding lines) (src/wire/igmp.rs)
  • Edited copy of a member (10 corresponding lines) (src/parsers.rs)
  • Edited copy of a member (10 corresponding lines) (src/socket/icmp.rs)
  • …and 51 more

Changes since last survey

  • 8 commits — 6 feature/other, 2 fixes

By area

  • (repo) — 4 commits
  • src/iface — 2 commits
  • .github/PULL_REQUEST_TEMPLATE.md — 1 commit
  • src/socket — 1 commit

Notable commits

  • fix: Merge pull request #1238 from astro/fix-slaac
  • fix: Merge pull request #1242 from liutianmei666/fix/cancel-keepalive-timer
  • change: Add a PR template
  • change: Merge pull request #1240 from astro/reset-slaac
  • change: Merge pull request #1247 from ld-cd/main
  • change: interface: add a reset_slaac() method
  • change: slaac: don't let poll_at() return Instants in the past
  • change: tcp: clear keep-alive timer when disabled

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

smoltcp-rs/smoltcp was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit c68ace42306fa6a31b7d3c893043829587a9c7a8 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.