* 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>
* remove old fuzz corpus and stick to using PCG for seeding fuzz test
* polish up drain logic and reduce action search space
* improve fuzzing debug prints
* more fuzz fixes also formatter capture printer fixes
* refactor StackSeeded test
* fix challenge ack infinite packet bug
* more expressive challenge satisfy
* remove printing
* begin adding better fuzz test
* finish adding working fuzzer
* implement mutateipv4
* fuzzer finds a panic in ICMP client on receive empty payload
* rename fuzz tests to reflect fuzz methodology
* begin adding icmp client
* rely on anon structs
* add tests
* tests passing
* icmp fleshed out
* rework icmp to include ip addr
* rename StackAsync.Demux/Encapsulate to RecvEthernet and SendEthernet
* remove legacy unreachable TCP tests
* remove uses of deprecated internet.StackNode in preference of lneto.StackNode
* documentation
* rename methods to signal no I/O happening
* fix: StackBerkeley Bind/Listen/Connect and StackGo dial support
- Bind now stores the bound address; Listen and Connect forward it to
the gostack so the local port reaches SocketNetip.
- Fix StackGo.Socket parsing laddr/raddr instead of zero-value locals.
- Fix inverted isvalid() checks in StackBerkeley.Close causing nil deref.
- Auto-assign ephemeral port for outbound dial connections in SocketNetip.
- Configure tcp.Conn with TX/RX buffers before DialTCP; add DialConfig
fields to StackGoConfig.
Signed-off-by: deadprogram <ron@hybridgroup.com>
* use already existing poolconfig for new tcp config
---------
Signed-off-by: deadprogram <ron@hybridgroup.com>
Co-authored-by: Patricio Whittingslow <graded.sp@gmail.com>
* switcheroo: StackBerkeley now StackGo and added proper berkeley interface as StackBerkeley
* minor nits
* remove host name resolution
* further improve API and documentation
* xnet/stack: fix a few small errors in logic
Signed-off-by: deadprogram <ron@hybridgroup.com>
* add mutex and small fix
* fix: correct checking for integer max
Signed-off-by: deadprogram <ron@hybridgroup.com>
---------
Signed-off-by: deadprogram <ron@hybridgroup.com>
Co-authored-by: deadprogram <ron@hybridgroup.com>
* tcp: remove retransmit logic entirely; add duplicate ack counting to ControlBlock
* retransmit implemented in nice simple straightforward way
* narrow down retransmission cases
* remove old timing tests
* add ControlBlock retransmit test
* add failing handler test
* reworking payload length semantic meaning in code
* fix establish conn logic
* clean up tests and add TCB dupack generation and test it
* catch pending retransmit satisfy in test
* add fuzz test for control block
* bugfix: be more strict in what is considered dupack
* add IncomingIsDupACK docs
* limit queue of retransmits
* protect retransmit overflow from incorrectly updating nxt
* fix for #58
* add fixes for both retransmit and fuzz failure found
* fix infinite challenge ack due to RST+SYN+FIN corrupt packet in SYNRCV state
* fuzz: previous recovery ack path led to infinite transmit
* fuzz: calculate CRCs when fuzzing to reduce search space to non-CRC error cases
* add local fuzz corpus to tests
* add more cases to fuzz corpus
* add mdns
* define mdns.Client
* fix some mdns stuff
* refine dns package for use with mdns
* remove Querier and Responder and replace with Client
* add record setting methods on dns.record to reuse record buffer
* protect against unbounded client answer growth
* round off sharp mdns edges; reduce allocs
* add mutlicast to stacks; add xnet tests for mdns
* fix documentation on acceptmulticast field
* mdns working
* work on tracking more heap allocations down
* write own heapless IP AppendFormatAddr functions
* remove potential Error method allocations
* more logging