7 releases

new 0.1.6 Jan 23, 2025
0.1.5 Jan 9, 2025
0.1.4 Dec 30, 2024

#1808 in Network programming

Download history 199/week @ 2024-12-17 296/week @ 2024-12-24 42/week @ 2024-12-31 143/week @ 2025-01-07 4/week @ 2025-01-14 114/week @ 2025-01-21

379 downloads per month

Apache-2.0

135KB
3K SLoC

tcp_ip

User-space TCP/IP stack

Features

IPv4

  • IPv4 fragmentation and reassembly is supported.
  • IPv4 options are not supported and are silently ignored.

IPv6

  • In development, currently does not support any extended protocols.

UDP

Use UdpSocket. Supported over IPv4 and IPv6.

ICMPv4 & ICMPv6

Use IcmpSocket or IcmpV6Socket. The user needs to handle the ICMP header themselves and calculate the checksum.

TCP

Use TcpListener and TcpStream. Supported over IPv4 and IPv6.

  • MSS is negotiated
  • Window scaling is negotiated.
  • Reassembly of out-of-order segments is supported
  • The timeout waiting time is fixed and can be configured
  • Selective acknowledgements permitted. (Proactively ACK the need for improvement)

Other

Using IpSocket to send and receive packets of other protocols.(Handles all IP upper-layer protocols without requiring the user to consider IP fragmentation.)

example

iperf test

LAN Speed Test

image

Example:Proxy-Windows

image

Example: Proxy-Linux

image

Dependencies

~7–15MB
~169K SLoC