internal/netlink: export generic connection
All checks were successful
Test / Create distribution (push) Successful in 1m14s
Test / Sandbox (push) Successful in 3m2s
Test / Hakurei (push) Successful in 4m18s
Test / ShareFS (push) Successful in 4m17s
Test / Sandbox (race detector) (push) Successful in 5m50s
Test / Hakurei (race detector) (push) Successful in 6m38s
Test / Flake checks (push) Successful in 1m25s

This enables abstractions around some families to be implemented in a separate package.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-27 18:10:17 +09:00
parent 6a87a96838
commit c61188649b
4 changed files with 52 additions and 46 deletions

View File

@@ -7,7 +7,7 @@ import (
type payloadTestCase struct {
name string
f func(c *conn)
f func(c *Conn)
want []byte
}
@@ -21,7 +21,7 @@ func checkPayload(t *testing.T, testCases []payloadTestCase) {
t.Parallel()
t.Helper()
c := conn{port: 1, pos: syscall.NLMSG_HDRLEN}
c := Conn{port: 1, pos: syscall.NLMSG_HDRLEN}
tc.f(&c)
if got := c.pending(); string(got) != string(tc.want) {
t.Errorf("pending: %#v, want %#v", got, tc.want)