diff --git a/Makefile b/Makefile index 75cc46d0..365ecf35 100644 --- a/Makefile +++ b/Makefile @@ -150,4 +150,4 @@ lint: golangci-lint run ./... clean: - rm $(BINDIR)/* \ No newline at end of file + rm $(BINDIR)/* diff --git a/component/process/process_darwin.go b/component/process/process_darwin.go index 2368f239..77d93e64 100644 --- a/component/process/process_darwin.go +++ b/component/process/process_darwin.go @@ -17,6 +17,10 @@ const ( proccallnumpidinfo = 0x2 ) +func resolveSocketByNetlink(network string, ip netip.Addr, srcPort int) (int32, int32, error) { + return 0, 0, ErrPlatformNotSupport +} + func findProcessName(network string, ip netip.Addr, port int) (string, error) { var spath string switch network { diff --git a/component/process/process_freebsd_amd64.go b/component/process/process_freebsd_amd64.go index 466cd249..28b36084 100644 --- a/component/process/process_freebsd_amd64.go +++ b/component/process/process_freebsd_amd64.go @@ -21,6 +21,10 @@ var ( once sync.Once ) +func resolveSocketByNetlink(network string, ip netip.Addr, srcPort int) (int32, int32, error) { + return 0, 0, ErrPlatformNotSupport +} + func findProcessName(network string, ip netip.Addr, srcPort int) (string, error) { once.Do(func() { if err := initSearcher(); err != nil { diff --git a/component/process/process_other.go b/component/process/process_other.go index 5f78fca0..9c5cb47c 100644 --- a/component/process/process_other.go +++ b/component/process/process_other.go @@ -7,3 +7,7 @@ import "net/netip" func findProcessName(network string, ip netip.Addr, srcPort int) (string, error) { return "", ErrPlatformNotSupport } + +func resolveSocketByNetlink(network string, ip netip.Addr, srcPort int) (int32, int32, error) { + return 0, 0, ErrPlatformNotSupport +} diff --git a/component/process/process_windows.go b/component/process/process_windows.go index 33782d7e..1915adee 100644 --- a/component/process/process_windows.go +++ b/component/process/process_windows.go @@ -29,6 +29,10 @@ var ( once sync.Once ) +func resolveSocketByNetlink(network string, ip netip.Addr, srcPort int) (int32, int32, error) { + return 0, 0, ErrPlatformNotSupport +} + func initWin32API() error { h, err := windows.LoadLibrary("iphlpapi.dll") if err != nil {