Commit Graph

35 Commits

Author SHA1 Message Date
Pat Whittingslow 6ba06acdcb lneto rework: Require explicit BackoffStrategy in all APIs (#116)
* make backoff explicit API

* fix tests to use explicit backoff

* fix examples with explicit tcp
2026-06-09 10:20:40 -03:00
Pat Whittingslow a2970b923d add ipv6 to xnet.StackAsync (#107)
* 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
2026-05-13 15:31:18 -03:00
Pat Whittingslow bdbd38ab44 ipv6: StackIP and StackAsync.Addr refactor (#105)
* 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
2026-05-09 16:11:31 -03:00
Marvin Drees f87761f777 chore: bump minimum Go version to 1.24 (#85)
Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
2026-04-16 17:21:23 -03:00
Pat Whittingslow 75a812a8d7 Tcp buffer bug fix (#79)
* 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>
2026-04-14 19:11:29 -03:00
Pat Whittingslow 68461b4416 arp fixes for #70 (#71) 2026-04-11 11:08:06 -03:00
Patricio Whittingslow 68907ef898 up hardcoded number of IP protocols to 3 (ICMP,TCP,UDP) 2026-04-10 19:43:08 -03:00
Patricio Whittingslow 568ef2854f refactor max tcp port config values to uint16 to better represent their valid space 2026-04-09 20:13:45 -03:00
Pat Whittingslow 8813ccef82 ICMP tests and various fixes (#68)
* various icmp fixes

* improve existing tests
2026-04-09 12:31:31 -03:00
Pat Whittingslow ec44889896 Add ICMPv4 and lneto.StackNode and deprecate internet.StackNode (#65)
* 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
2026-04-09 09:07:16 -03:00
Pat Whittingslow d5c4fa53c6 tcp: bugfix for seq not in snd/rcv.wnd error (#49)
* tcp: bugfix for seq not in snd/rcv.wnd error

* accept dupe ACKs for window updates and prevent decrement of UNA

* add fixes for incorrect tcp functioning

* remove Conn.Available* methods in favor of Conn.Free* methods due to ambiguous name
2026-03-04 12:59:30 -03:00
Pat Whittingslow 989bb6a0b9 Reduce heap allocs 2 (#46)
* reduce heap allocations in tcp logging; omit use of AppendFloat which allocates a metric sh*tton

* debugheaplog: better heap statistic logging

* heap: use string for pcap.Frame.Protocol

* add potential to eliminate Flags.String heap alloc, remove incorrect HEAP comments

* add StackAsync.DebugErr and httpraw.SetBytes

* many heap alloc reductions and replacement of bytes.Equal with internal.BytesEqual
2026-02-28 15:20:46 -03:00
Pat Whittingslow 7d323aae19 Tcp rst handling (#40)
* claude suggests a way forward

* add timing to capture printer

* add pcap.Flags

* fix ICMP CRC calculation and add test

* bugfix: still send data on half-close state(close-wait)

* fix pcap test
2026-02-23 09:50:13 -03:00
Pat Whittingslow 08423d0dba add proactive window update (#39)
* add proactive window update

* fix xnet tests due to runt padding bug
2026-02-22 12:02:53 -03:00
Patricio Whittingslow fae4552ddb add IP/TCP/HTTP fuzzing and fixes to panics found 2026-02-12 16:25:48 -03:00
Pat Whittingslow 85f018a02c ethernet: MTU semantic meaning corrections, add FCS logic (#28) 2026-01-26 16:45:35 -03:00
ddirect 91fea9ae58 Maximum segment size fixes (#25)
* Fixed MSS sent in SYN and SYN-ACK

* Fixed tests
2026-01-25 02:37:17 -03:00
Patricio Whittingslow 1a427323f2 fix bug being unable to read from closed tcp.Conn 2026-01-12 11:05:10 -03:00
Pat Whittingslow 7698b9fb81 do not rely on unspecified Go behaviour; fix TCP ring buffer bug (#16)
* do not rely on unspecified Go behaviour; fix TCP ring buffer bug

* even more stricter error handling on tcp connections

* stricter lock copying in tcp.Conn, even though likely not a problem

* add listener and tcp pool logging

* forgot reqAddr unused

* add logging to TCPConn and friends
2026-01-05 10:03:24 -03:00
Pat Whittingslow 018f9258ac Add tcp.Listener (#15)
* begin reviewing TCP listener

* begin adding listener tests

* adding TestExchange implementation

* split out legacy and Step tests

* move listener to tcp package

* fix up tcp tests taking very long

* add xnet.TCPPool and work on TCPPool semantics

* xnet: TCPPool only accepts established connections

* xnet: getting to bottom of panic in xnet.Listener

* xnet: improve listener tests

* fix several data races in testing fixtures

* fix more synchronization things in listener test

* finalize tcplistener test
2026-01-03 12:41:57 -03:00
Patricio Whittingslow 5731a378dd skip infinite loop in http parsing 2026-01-01 12:21:58 -03:00
soypat 3cbef6fa92 add FieldClassOperation to pcap and associated formatting changes 2025-12-31 18:54:21 -03:00
Patricio Whittingslow 8307403c5c add subnet to StackAsync and add test for local arp resolving 2025-12-30 18:00:50 -03:00
Patricio Whittingslow 1554b89a08 StackNode refactor: add offsetToIP argument to Encapsulate 2025-12-19 00:38:28 -03:00
Patricio Whittingslow 5e5f21a2b8 rethinking ring buffer semantics and breaking everything in the process 2025-11-05 02:35:53 -03:00
Patricio Whittingslow 46137bbbec begin adding TxQueue failing multipacket test 2025-10-27 23:21:41 -03:00
Patricio Whittingslow 6b3a2c429c found failing case for multipacket 2025-10-27 00:23:57 -03:00
Patricio Whittingslow ed81d7446d fix client reset state; add multi send tests 2025-10-26 20:45:23 -03:00
Patricio Whittingslow 1dea7fd398 refactor tests with more reusable code 2025-10-25 09:25:36 -03:00
soypat 3fa2f32737 fix timewait not counting as closed state in listen open; add second part to test 2025-10-24 18:26:59 -03:00
Patricio Whittingslow 92a245957b keep working on xnet TCP 2025-10-23 21:18:25 -03:00
soypat 407f4a08f1 enhance xnet StackAsync test and add non-linux stubs for Tap and Bridge 2025-10-21 21:46:44 -03:00
Patricio Whittingslow 5c219ebbd5 xnet: keep working on TCPExchange test 2025-10-19 14:33:45 -03:00
Patricio Whittingslow d731106c51 add xnet stack tcp handshake test 2025-10-18 19:51:57 -03:00
Patricio Whittingslow 86fc8fdaf5 refactor stack TCP stuff; begin adding TCP test 2025-10-17 23:36:48 -03:00