Skip to content

Releases: kasader/flakenet

Release list

v0.1.1

Choose a tag to compare

@kasader kasader released this 03 Aug 05:13

NOTE: This project has been renamed from netem to flakenet.

Breaking changes

Renamed module and package. The import path is now github.com/kasader/flakenet and the package is flakenet.

import "github.com/kasader/flakenet"  // was github.com/kasader/netem

To migrate:

go mod edit -droprequire github.com/kasader/netem
go get github.com/kasader/flakenet@v0.1.1

...then update your imports and any netem. qualifiers to flakenet..

IPMaximumMTU is now 65535 (was 65536). 65535 is the largest value the 16-bit IP total-length field can express; the old value described a Linux loopback default rather than an IP limit.

Fixed

  • L4 header overhead is now included in transmission time. getHeaderSize previously counted only the IPv4/IPv6 header, so bandwidth-limited connections transmitted slightly faster than an equivalent real link. TCP and UDP addresses now add their transport header:

    • *net.TCPAddr → +20 bytes
    • *net.UDPAddr → +8 bytes
    • *net.IPAddr → unchanged (raw IP sockets carry the transport header in the payload)
    • Custom net.Addr implementations → resolved from Network(), with unrecognized networks contributing no L4 overhead

    Expect marginally longer transfer times under a Bandwidth policy — most visible with small packets, where headers dominate.

Added

  • TCPHeaderSize (20) and UDPHeaderSize (8) constants.
  • Table-driven tests for header-size calculation, covering TCP/UDP over v4 and v6, raw IP, custom net.Addr implementations, and unparseable addresses.

Documentation

  • Rewrote the README for readability.
  • Removed the Go Report Card badge.

Full changelog: v0.1.0...v0.1.1

v0.1.0

Choose a tag to compare

@kasader kasader released this 06 Feb 15:48

netem v0.1.0

netem provides network emulation for Go net.Conn and net.PacketConn interfaces, enabling thread-safe, dynamic configuration of network conditions.

Added policies for:

  • Bandwidth
  • Jitter
  • Loss
  • Latency
  • Fault

Added connection types for:

  • Conn
  • PacketConn