From 5246f5e8f7f2784ef05666ba515ffc52acbc91c9 Mon Sep 17 00:00:00 2001 From: cavivie Date: Wed, 10 Apr 2024 19:41:22 +0800 Subject: [PATCH] docs: add feature description in readme document --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 5825d46..9510f50 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,21 @@ A netstack for the special purpose of turning packets from/to a TUN interface in [actions-badge]: https://github.com/automesh-network/netstack-smoltcp/workflows/CI/badge.svg [actions-url]: https://github.com/automesh-network/netstack-smoltcp/actions?query=workflow%3ACI+branch%3Amain +## Features + +- Supports Future Send and non-Send, mostly pepole use send. +- Supports ICMP protocol drive by TCP runner to use ICMP ping. +- Supports filtering packets by source and destination IP addresses. +- Can read IP packets from netstack and write IP packets to netstack. +- Can receive TcpStream from TcpListener exposed from netstack. +- Can receive UDP datagram from UdpSocket exposed from netstack. +- Implements popular future streaming tratis and asynchronous IO traits: + * TcpListener implements futures Stream/Sink trait + * TcpStream implements tokio AsyncRead/AsyncWrite trait + * UdpSocket(ReadHalf/WriteHalf) implements futures Stream/Sink trait. + ## Example + ```rust // let device = tun2::create_as_async(&cfg)?; // let framed = device.into_framed();