Commit Graph

30 Commits

Author SHA1 Message Date
Pat Whittingslow fa5ba918bb Error rewrites (#43)
* 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
2026-02-28 16:18:27 -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 f9748da94f Reduce heap allocations (#42)
* 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
2026-02-27 12:38:33 -03:00
Pat Whittingslow 199d978c99 no dhcp request on zeroed address (#33) 2026-02-05 18:18:27 -03:00
ddirect fba97c990a Checksum simplification proposal (#29)
* 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
2026-02-05 17:35:42 -03:00
soypat c518b7e7fe add ethernet tx FCS to StackAsyncConfig 2026-01-29 19:14:40 +01:00
Pat Whittingslow 85f018a02c ethernet: MTU semantic meaning corrections, add FCS logic (#28) 2026-01-26 16:45:35 -03:00
Patricio Whittingslow f51cdf74b6 fix couple bugs in ARP and add benchmarks 2026-01-13 10:15:18 -03:00
Patricio Whittingslow c4ab7cd012 reproduce dns bug in test 2026-01-12 08:53:29 -03:00
soypat 2e8b3e2ddd bugfix: fix doublelock in xnet.StackAsync 2026-01-07 19:41:43 -03:00
Patricio Whittingslow 88d5f111da add dns empty response error 2026-01-05 11:42:01 -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 8307403c5c add subnet to StackAsync and add test for local arp resolving 2025-12-30 18:00:50 -03:00
Pat Whittingslow db8c7c1322 Merge pull request #11 from ddirect/local-arp-tcp-fixes
local-arp-tcp branch fixes
2025-12-30 16:30:20 -03:00
Patricio Whittingslow 890fd33b22 do not increment ARP connectionID on IP addr update 2025-12-28 15:43:12 -03:00
Patricio Whittingslow a2886423a2 fix StackAsync losing ARP handler on reset during DHCP result assimilation 2025-12-28 15:33:10 -03:00
ddirect b9fbe0d25d Minor fixes 2025-12-28 18:30:47 +02:00
Patricio Whittingslow f6bc73ee6c apply some of @ddirect suggestions 2025-12-22 18:41:14 -03:00
Patricio Whittingslow 5e631a1b3d StackPorts: set MAC destination when node has MAC 2025-12-19 01:04:18 -03:00
Patricio Whittingslow 1554b89a08 StackNode refactor: add offsetToIP argument to Encapsulate 2025-12-19 00:38:28 -03:00
Patricio Whittingslow 7042a653a6 add lock to tcp.Conn; claude Fix ARP handler not responding after DHCP
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-09 14:16:23 -03:00
Patricio Whittingslow 92a245957b keep working on xnet TCP 2025-10-23 21:18:25 -03:00
Patricio Whittingslow 7ac4d556c2 reset xnet statistics 2025-10-22 23:55:09 -03:00
Patricio Whittingslow bb4053647d do not crash if no tcp connections are desired 2025-10-22 19:19:32 -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
soypat d254f3ae80 dhcp subnet prefix fix 2025-08-20 19:25:08 -03:00
soypat 7470324b49 add statistics and MTU method to stack 2025-08-16 22:55:27 -03:00
soypat 9cf4e35d2e changes to TCP stack to enable xnet functionality 2025-08-16 15:17:46 -03:00
soypat c2995383da add x/xnet experimental package 2025-08-03 11:30:51 -03:00