* feature: ipv4 broadcast support
* stackip4 method receiver varname
* Incorporate strict test timing for TestStackGoTCPDialRetriesPendingControl (#135)
* rewrite tinygo failing test to be more real-time
* use channels to scheduler stack
* fix flakiness by increasing timeout and move implementation to top of file
* fix(dhcp): use chaddr as lookup key and patch Ethernet dst on Offer/Ack
- Client lookup in Demux() now keys on chaddr when no OptClientIdentifier
is present. It previously used ciaddr which is 0.0.0.0 during initial lease
acquisition, causing MsgRequest to fail to match any client (RFC 2131 §4.3.1)
- In Encapsulate(), overwrite Ethernet dst with client.hwaddr when packet is
embedded in an IP frame (offsetToIP >= 14), per RFC 2131 §4.1. It previously
sent to gwmac which clients without an ARP entry could not receive
Signed-off-by: deadprogram <ron@hybridgroup.com>
* fix: accept 255.255.255.255 aka bradcast dst in demux4
This fixes a problem with accept 255.255.255.255 dst in demux4 which previously dropped when stack had a static IP.
Signed-off-by: deadprogram <ron@hybridgroup.com>
---------
Signed-off-by: deadprogram <ron@hybridgroup.com>
Co-authored-by: Patricio Whittingslow <graded.sp@gmail.com>
* rewrite tinygo failing test to be more real-time
* use channels to scheduler stack
* fix flakiness by increasing timeout and move implementation to top of file
* feat: add xcurl port and debug flag
Update the docs and add new flags to xcurl to aid debugging under an OS
like Linux.
Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
* drop debugtcp flag from xcurl again
Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
---------
Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
* fix for #50
* fix remaining test
* revert changes and instead approach problem on full-duplex case
* fix merge messup
* fix @MDr164 note and upgrade documentation while at it
* gate full buffer exit on rx shutdown since no risk of full buffer error
* add log line to note issue is hit
* document CloseRead relationship with Close
* persist issue 57 fix in test
* have go fix output error on CI
* apply go fix required fix
* test no || for go fix command
* test no || for go fix command complete, it is needed
* forgot to fix
* good code today
* add netdev.Runner
* round off APIs more
* better interface method documentation
* improve DHCP netstack API
* add pico w netdev example
* remove temp file
* keep thinking about this. this is hard :/
* fix ci
* small fixer
* working dhcp
* fix rebase API mismatches
* begin adding espradio example
* keep working on espradio, icmp not working
* fix icmp by fixing dhcp
Implement NTS (RFC 8915) with KERecord zero-copy frame, PerformKE
(TLS 1.3 + ExportKeyingMaterial), DeriveKeys, and Client state
machine implementing lneto.StackNode. Client handles cookie pool
management, auth body codec with nonce/ciphertext, and two-exchange
NTP flow with UniqueID verification and AEAD authentication.
Add NTS Server wrapping ntp.Server with AEAD verification/sealing,
and HandleKE for server-side NTS Key Exchange over TLS 1.3.
Use internal.LogAttrs for non-allocating structured logging
throughout the NTS client, matching existing conventions.
Generated with LLM assistance.
Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
- http/httpraw: cap header slice growth to pre-allocated capacity, fix
benchmark to reuse Header across iterations (0 allocs/op)
- internal/ring: replace TODO panic comments with invariant explanations
- tcp/conn: document truncated-frame offset check
- tcp/handler: replace TODO with net.ErrClosed on RST-closed connection
- internet/stack-udpport: filter incoming packets by remote IP address
when configured via SetStackNode; skip filter for IPv4 multicast
destinations (class D) so mDNS and similar protocols work correctly
Generated with LLM assistance.
Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
* update README table and begin planning udp.PacketConn
* first attempt at packetconn implementation
* add udp.PacketConn to StackAsync and implement SocketNetip iface
* add tests for PacketConn
* add ipv6 to xnet.StackAsync
* dns improvements
* improve DNS workings of StackAsync
* add tentative ICMPv6
* work on prefixes and fix some small bugs, plan UDP/TCP6
* fix bugs in StackAsync and ipv4.Prefix.Contains
* update arpsubtable
* completely remove legacy internet.StackIP for StackIPv4/v6
* ipv4/ipv6 tcp/udp
* add TCP6/UDP6 dialing APIs
* add xnet.Stack6 interface
* more ipv6 integration into StackAsync; various tweaks to lneto and documentation+TODOs
* add stack6 tests
* replace netip.Prefix with ipv4.Prefix where it makes sense
* apply StackIP changes and internet package test passing
* fix tests and examples
* remove old Reset method on StackIP
* use encapsulate for ipv6
* add TCP over IPv6 tests
Implement full two-exchange NTP client state machine (RFC 5905 §8).
First exchange stores offset/RTT, second averages both for improved
accuracy. Client places T1 in TransmitTime per RFC 5905 §8; server
echoes it as OriginTime in the response.
Add NTP extension field codec (RFC 7822) with NextExtField iterator
and AppendExtField builder. Add NTS extension type constants from
RFC 8915.
Add NTP Server (StackNode) that receives client requests via Demux
and builds server responses via Encapsulate with configurable
stratum, precision, reference ID, and pending request queue.
Add Frame accessor methods: RawData(), ExtensionFields(),
ValidateSize(), and Timestamp.Uint64().
Add ntp-client and ntp-server example programs with
CalculateSystemPrecision, retry limits, and backoff.
Use internal.LogAttrs pattern for non-allocating structured logging
in the client, matching the tcp/debug.go convention.
Generated with Claude assistance.
Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
* begin working on arp cache
* fix little things
* rework arp cache priority
* fix test
* keep working on ARP
* push changes before thinking about ip prefix issue
* add passive peer MAC setting
* patch egress mac with correct ethernet CRCs
* consolidate subnet learning in subnetTable type
* add tests and fix subnet table bug
* begin adding dns pcap functionality
* improve question formatting
* work on capturing answers as well
* finalize DNS printing
* increase subfield limits
* add FlagContainer type
* prettier DNS printing
I noticed some warning around Node v20 usage from the old version
so I bumped to the currently latest one (v7 moved to Node v24).
Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
* start working on tracking down tcp buffer bug
* mtu refactor
* modularize test
* more precise testing
* tests fail, but is it the failure we are looking for?
* fix typo in espradio link (#76)
* implement a new backoff abstraction (#75)
* rewrite backoff api
* rewrite tcp.Conn.Write
* keep fixing small things
* much better Conn.Read implementation
* fix critical overflow bug in internal.ConnRWBackoff
---------
Co-authored-by: Joel Wetzell <jwetzell@yahoo.com>