Netdev revamp (#145)

* begin working on netdev solution

* need to roll back some assumptions in next commit

* dual poll/async mode for netdev.Runner

* add wake on rx semantics

* remove TODO

* more reworking of Runner

* work on applying @MDr164 suggestions and a couple extra revamps

* add newline to end of test file
This commit is contained in:
Pat Whittingslow
2026-07-09 14:04:10 -03:00
committed by GitHub
parent 4fc53a84cd
commit 99e9d90a60
9 changed files with 1288 additions and 117 deletions
+5 -1
View File
@@ -550,8 +550,12 @@ func (s *StackAsync) RegisterUDP4(node lneto.StackNode, remoteAddr [4]byte, remo
if idx >= cap(s.userUDPs) {
return lneto.ErrExhausted
}
raddr := remoteAddr[:]
if remoteAddr == [4]byte{} {
raddr = nil
}
s.userUDPs = s.userUDPs[:idx+1]
s.userUDPs[idx].SetStackNode(node, remoteAddr[:], remotePort)
s.userUDPs[idx].SetStackNode(node, raddr, remotePort)
return s.udps.RegisterMACFiltered(&s.userUDPs[idx], nil)
}