Commit Graph

228 Commits

Author SHA1 Message Date
Patricio Whittingslow 76f896af40 use common internal logger among all implementations(debugheaplog build tag) 2026-02-26 17:06:47 -03:00
Pat Whittingslow be949d960c tcp: mss honoring; accept syn with ECE/CWR flags; add RSTQueue type (#41)
* 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
2026-02-25 12:58:55 -03:00
Patricio Whittingslow 58a9bf57e5 tcp: listener produces RST response when conns exhausted 2026-02-23 15:07:33 -03:00
Patricio Whittingslow 5221dc8248 improve HTTP body pcap formatting 2026-02-23 14:02:23 -03:00
Patricio Whittingslow 87a22441e7 rewrite tests to capture more finwait2 receive segment expected functionality 2026-02-23 13:39:12 -03:00
Patricio Whittingslow f061cbd744 bugfix: bare-ack acceptance in finwait2 2026-02-23 13:28:47 -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 996ba03612 add xnet.CapturePrinter type 2026-02-22 10:47:58 -03:00
Patricio Whittingslow c384641b7c arp: fix runt frames by extending at ethernet level; discard blocking ARP queries after success/failure 2026-02-21 23:52:27 -03:00
Patricio Whittingslow 1a07928ca8 ethernet: refactor VLAN API 2026-02-18 16:58:52 -03:00
Pat Whittingslow bf2d07d9f0 HTTP server example and DHCP Server rewrite (#38)
* 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
2026-02-18 16:48:30 -03:00
Patricio Whittingslow fae4552ddb add IP/TCP/HTTP fuzzing and fixes to panics found 2026-02-12 16:25:48 -03:00
ddirect 1694e71e0c Use backoff to wait until there is enough room in the TCP write buffer (#34) 2026-02-09 01:27:18 +01:00
ddirect 085c7033cd TCP: advertising the currently available window size (#35) 2026-02-09 01:24:24 +01: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 cd51bd6c3f fix #31 by maintaining conns on listener encapsulate no-op 2026-02-02 22:38:41 +01:00
soypat 0a19c6bfd8 add more icmpv4 packet capturing 2026-02-02 14:16:51 +01:00
soypat ad239309a4 fix benchmarks 2026-02-02 10:33:47 +01:00
soypat c518b7e7fe add ethernet tx FCS to StackAsyncConfig 2026-01-29 19:14:40 +01:00
ddirect 360628f1b8 Simplified implementation (#27)
Introduced minimum backoff time
Max TCP backoff increased to 5ms
2026-01-26 18:49:33 -03:00
ddirect 5e61b4600d Checksum fixes (#24)
* 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>
2026-01-26 17:22:54 -03:00
Pat Whittingslow 85f018a02c ethernet: MTU semantic meaning corrections, add FCS logic (#28) 2026-01-26 16:45:35 -03:00
Patricio Whittingslow 6a6097a9ac improve formatter example 2026-01-26 12:12:13 -03:00
Patricio Whittingslow e8afc09a73 pcap: add subfield formatting 2026-01-26 12:09:25 -03:00
Patricio Whittingslow 4cffe26c30 fix pcap.Formatter fallthrough logic in formatField 2026-01-25 23:43:02 -03:00
Patricio Whittingslow 2e5cbd6f76 improvements to phy package 2026-01-25 22:30:26 -03:00
Patricio Whittingslow 470960f924 documentation improvements to rmii.md 2026-01-25 18:50:05 -03:00
Patricio Whittingslow e83665f147 relocate phy.MDIOBitBang tinygo example to Configure method 2026-01-25 09:11:08 -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 7edaea1093 add MDIOBitBang 2026-01-24 18:17:22 -03:00
Patricio Whittingslow 8ed7edc976 more complete RMII info 2026-01-22 14:30:23 -03:00
Patricio Whittingslow 0f10576521 forgot int64 wrap 2026-01-21 19:32:13 -03:00
Patricio Whittingslow 3396fd5265 phy: improvements and additions; document RMII 2026-01-21 18:54:45 -03:00
Pat Whittingslow e13bb45854 attempt to fix #22 (#23) 2026-01-19 23:22:54 -03:00
Patricio Whittingslow 9d83707557 add berkeley socket interface 2026-01-19 11:48:01 -03:00
Patricio Whittingslow 985e087842 refactor phy package 2026-01-19 10:29:15 -03:00
ddirect 3c6882b4b3 Repeating select call on Bridge when interrupted (#20)
* Repeating select if it is interrupted

* Restrict retries for syscall.EINTR to 10

Limit the number of retries on syscall.EINTR to 10.

---------

Co-authored-by: Pat Whittingslow <graded.sp@gmail.com>
2026-01-18 14:05:43 -03:00
ddirect 1a6ce6b056 Ignoring packet padding for IPv4 capture (#21) 2026-01-18 14:04:28 -03:00
soypat 80b740827f begin adding phy package 2026-01-15 18:31:17 -03:00
Egon Elbre 3d5999a9d8 dhcpv4: fixes (#19)
* dhcpv4: fix several issues

* condition flipped in Encapsulate
* check for correct bounds in ForEachOption
* getMessageType didn't check for opt

* dhcpv4: preserve backing buffer in reset
2026-01-13 17:38:00 -03:00
Patricio Whittingslow e49e3d96c1 slight changes to tinygo cbnode 2026-01-13 11:46:07 -03:00
Patricio Whittingslow 93ba512671 fix tinygo benchmark to optimize for performance 2026-01-13 11:31:13 -03:00
Patricio Whittingslow df1242ef0e add benchmarks to readme 2026-01-13 11:21:36 -03:00
Patricio Whittingslow 2e6e66e691 split out node callback between tinygo and go to avoid heap allocs 2026-01-13 10:38:21 -03:00
Patricio Whittingslow f51cdf74b6 fix couple bugs in ARP and add benchmarks 2026-01-13 10:15:18 -03:00
Patricio Whittingslow a5af5b58ce fix #5 2026-01-12 18:44:33 -03:00
Egon Elbre be2d380753 arp: fixes to implementation (#18)
* typo in error text
* compactQueries was keeping invalid queries
* compactQueries accidentally ended up creating shared slices
2026-01-12 17:27:26 -03:00
Patricio Whittingslow 1a427323f2 fix bug being unable to read from closed tcp.Conn 2026-01-12 11:05:10 -03:00