socket: add functions for unspecified platforms

This commit is contained in:
Radek Zajic
2025-07-20 09:43:09 +02:00
committed by Alessandro Boch
parent 81eeb7146f
commit 212ea54671
3 changed files with 52 additions and 8 deletions

View File

@@ -284,11 +284,3 @@ func NeighList(linkIndex, family int) ([]Neigh, error) {
func NeighDeserialize(m []byte) (*Neigh, error) {
return nil, ErrNotImplemented
}
func SocketGet(local, remote net.Addr) (*Socket, error) {
return nil, ErrNotImplemented
}
func SocketDestroy(local, remote net.Addr) (*Socket, error) {
return nil, ErrNotImplemented
}

40
socket_unspecified.go Normal file
View File

@@ -0,0 +1,40 @@
//go:build !linux
// +build !linux
package netlink
import (
"net"
)
func SocketGet(local, remote net.Addr) (*Socket, error) {
return nil, ErrNotImplemented
}
func SocketDestroy(local, remote net.Addr) error {
return ErrNotImplemented
}
func SocketDiagTCPInfo(family uint8) ([]*InetDiagTCPInfoResp, error) {
return nil, ErrNotImplemented
}
func SocketDiagTCP(family uint8) ([]*Socket, error) {
return nil, ErrNotImplemented
}
func SocketDiagUDPInfo(family uint8) ([]*InetDiagUDPInfoResp, error) {
return nil, ErrNotImplemented
}
func SocketDiagUDP(family uint8) ([]*Socket, error) {
return nil, ErrNotImplemented
}
func UnixSocketDiagInfo() ([]*UnixDiagInfoResp, error) {
return nil, ErrNotImplemented
}
func UnixSocketDiag() ([]*UnixSocket, error) {
return nil, ErrNotImplemented
}

12
socket_xdp_unspecified.go Normal file
View File

@@ -0,0 +1,12 @@
//go:build !linux
// +build !linux
package netlink
func SocketXDPGetInfo(ino uint32, cookie uint64) (*XDPDiagInfoResp, error) {
return nil, ErrNotImplemented
}
func SocketDiagXDP() ([]*XDPDiagInfoResp, error) {
return nil, ErrNotImplemented
}