- 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>
* 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
* 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
* 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>
* 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
* 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
* pcap: reuse Frame memory
* slog: reduce heap allocations of addresses; also prevent heap alloc of dhcp options in pcap
* dns: heapless improvement; add StackAsync buffer for more heapless operation; start thinking of errors
* errors: begin standardise errors in lneto
* errors: finish standardization of errors
* fix merge issues
* add more lneto errors to rest of package
* format errors.go
* 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
* pcap: reuse Frame memory
* slog: reduce heap allocations of addresses; also prevent heap alloc of dhcp options in pcap
* dns: heapless improvement; add StackAsync buffer for more heapless operation; start thinking of errors
* reuse function for reclaiming frames among all protocols for lower memory usage
* remove extraneous code
* tcp: mss honoring; accept syn with ECE/CWR flags; add RSTQueue type
* tcp: move option logic to own file
* remove prints in pcap
* add MSS send threshold inspired by linux/freebsd/lwip thresh
* 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
* improvements to dhcpv4 server
* begin adding examples/httpserver
* add better VLAN tagging methods
* pcap: add error printing; fix bug in CRC
* ipv4: ToS and Flags construction and flag manipulation improvements
* add dhcp interception to httptap and improve httpserver example
* Simplified checksum calculation and verification
* Fixed tests
* UDP: using NewBoundedFrame to create a Frame instance limited to the actual frame size.
* Minor: renamed some functions
* Commented and made more readable consecutive SetCRC calls.
* Fixed icmp checksum calculation after rebase
* Replaced NewBoundedFrame with explicit validation
* Checksum 0x0000 is returned as 0xFFFF (mandatory for UDP, common for TCP)
* Both checksum zero values (0x0000 and 0xFFFF) are accepted when receiving
* Rename parameter in VerifySum16 to expectedSum16
---------
Co-authored-by: Pat Whittingslow <graded.sp@gmail.com>
* 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
* add prints to investigate slowness
* add loop sleep for blocking Stack
* add connection close http attribute and detect end of HTML page
* add timeout to bridge read
* examples/xnet: add ntp timestamp to prints and show output in readme
* add polling to http tap interface
* more digits in ntp format
* prevent crashes on non-8 timestamp