Commit Graph

75 Commits

Author SHA1 Message Date
Pat Whittingslow 16c2c3de36 Stack backoff rework (#83)
* huge Stack backoff rework

* lneto bump: huge Stack backoff rework
2026-04-14 21:05:02 -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 80e4c59ae7 include tinygo into CI (#67)
* try to include tinygo into CI

* fix tinygo issues
2026-04-09 10:00:10 -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 22f29fdfb1 Add proper berkeley interface as StackBerkeley (#63)
* 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>
2026-03-31 14:03:30 -03:00
Patricio Whittingslow abb114fc31 add berkeley minimal working example of lneto 2026-03-25 19:27:04 -03:00
Pat Whittingslow e08aab7c0a Berkeley rework (#62)
* begin reworking berkeley stack and add example

* thread mock client logic

* fix mock stack in example not encapsulating when data available
2026-03-25 18:43:10 -03:00
Pat Whittingslow bd645b5e1e Add mdns package and Client implementation (#55)
* 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
2026-03-16 15:48:17 -03:00
Patricio Whittingslow 02b4e71c2a gofmt: ran gofmt because noticed weird diffs in last commit, seemed OK though 2026-02-28 17:47:11 -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
soypat be194ad7ea remove old examples and update readme 2026-01-08 12:52:51 -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 c6e88b1c3b tcp.Conn:add Flush method and more lock protection 2026-01-01 10:32:13 -03:00
Pat Whittingslow f8166aea05 Fix slow exchanges on linux by adding polling and other improvements (#14)
* 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
2026-01-01 09:35:35 -03:00
soypat 3cbef6fa92 add FieldClassOperation to pcap and associated formatting changes 2025-12-31 18:54:21 -03:00
soypat dc374169dc use lneto.ErrDropPacket where appropiate; clean up examples/xnet output 2025-12-31 18:15:34 -03:00
soypat 243d1a720d fix httptap incorrectly capturing GRO frames 2025-12-31 17:08:53 -03:00
soypat 7369ec0b7e add pcap printing to examples/xnet 2025-12-31 13:21:46 -03:00
Patricio Whittingslow 5f0edf62a9 add pcap formatting 2025-12-31 02:17:44 -03: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 d731106c51 add xnet stack tcp handshake test 2025-10-18 19:51:57 -03:00
soypat d28203e75f upload changes done on plane 2025-08-31 12:42:46 -03:00
soypat 0f20090d78 bugfix: use ISS on active TCP connection 2025-08-16 18:26:50 -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
soypat 6b3062481e refine DHCP value acquisition 2025-07-19 20:40:23 -03:00
soypat 61c66a2e58 remove NodeARP in favor of arp.Handler; fix bug in IP stack node handling; use registerNode where applicable 2025-07-14 19:48:29 -03:00
soypat 1549e563e9 continue reworking node API 2025-07-13 01:07:08 -03:00
soypat 2bd056a04c NTP up and running 2025-07-12 16:45:20 -03:00
soypat 698610242e DNS resolution working butter smooth 2025-07-12 12:54:34 -03:00
soypat 68c4d1ea71 DNS working! 2025-07-12 12:34:20 -03:00
soypat a257becf15 major ARP Handler refactor; DNS improvements; bridge example rework 2025-07-09 22:49:13 -03:00
soypat 489e9951fa dhcp working! 2025-07-09 16:54:48 -03:00
soypat 5cea9727f0 standardise rng for dhcp example 2025-07-01 00:29:11 -03:00
soypat 26b3adc777 work on httpraw normalization and dns/dhcp bridge example 2025-06-28 12:39:38 -03:00
soypat 23212d8dc6 CopyFrom pattern for DNS and use it for Cookie 2025-06-25 09:32:35 -03:00
soypat 1fcde05284 begin touching up a DNS Client implementation; internal.GetIP/SetIP refactor 2025-06-21 01:29:38 -03:00
soypat 2133966a16 add dhcp failing test 2025-06-17 02:07:11 -03:00
soypat dcc7a95e62 huge tap/bridge overhaul; udp node; dhcp node; DHCP example 2025-06-15 18:01:04 -03:00
soypat 1fcdd9a7b3 TCP listener seems to be working really well :) 2025-06-11 19:38:19 -03:00
soypat 6b511999d1 begin testing tcp listener (not working) 2025-06-09 20:38:40 -03:00
soypat 9a60642283 mega refactor internet.TCPConn->tcp.Conn 2025-06-07 20:43:20 -03:00
soypat dab7951cbd slight file reordering 2025-06-07 13:44:28 -03:00
soypat 6cf5896543 continue reworking StackNode implementations 2025-06-07 11:59:56 -03:00
soypat c635bde512 all in on StackNode refactor: Encapsulate/Demux on all stacks+ConnID+more abstraction 2025-06-06 01:23:44 -03:00
soypat 6ba727a0ef more effort into understanding why TAP interface is so slow on my linux machine to no avail 2025-06-05 00:47:07 -03:00
soypat bc14ed395d tap program output much more readable 2025-06-04 01:13:26 -03:00