chore(pmtud): remove calls to syscall in favor of unix and windows

- syscall is deprecated and is not kept up-to-date
- each OS is inherently different hence the syscall being deprecated
This commit is contained in:
Quentin McGaw
2026-02-17 16:19:45 +00:00
parent d43eb1658f
commit 5f903d1fbf
21 changed files with 246 additions and 110 deletions
+16
View File
@@ -0,0 +1,16 @@
//go:build linux || darwin
package constants
import "golang.org/x/sys/unix"
//nolint:revive
const (
SOCK_RAW = unix.SOCK_RAW
SOCK_STREAM = unix.SOCK_STREAM
AF_INET = unix.AF_INET
AF_INET6 = unix.AF_INET6
IPPROTO_TCP = unix.IPPROTO_TCP
EAGAIN = unix.EAGAIN
EWOULDBLOCK = unix.EWOULDBLOCK
)
@@ -0,0 +1,13 @@
package constants
import "golang.org/x/sys/windows"
const (
SOCK_RAW = windows.SOCK_RAW
SOCK_STREAM = windows.SOCK_STREAM
AF_INET = windows.AF_INET
AF_INET6 = windows.AF_INET6
IPPROTO_TCP = windows.IPPROTO_TCP
EAGAIN = windows.WSAEWOULDBLOCK
EWOULDBLOCK = windows.WSAEWOULDBLOCK
)