Documentation ¶
Index ¶
Constants ¶
View Source
const (
SOCK_DESTROY = 21
)
Variables ¶
This section is empty.
Functions ¶
func Destroy ¶
func Destroy(filter SocketFilter) error
Destroy destroys sockets matching the passed filter parameters using the sock_diag netlink framework.
Supported families in the filter: syscall.AF_INET, syscall.AF_INET6 Supported protocols in the filter: unix.IPPROTO_UDP
Types ¶
type DestroySocketCB ¶
type SocketDestroyer ¶
type SocketDestroyer interface {
Destroy(filter SocketFilter) error
}
type SocketFilter ¶
type SocketFilter struct { DestIp net.IP DestPort uint16 Family uint8 Protocol uint8 // Optional callback function to determine whether a filtered socket needs to be destroyed DestroyCB DestroySocketCB }
func (*SocketFilter) MatchSocket ¶
func (f *SocketFilter) MatchSocket(socket netlink.SocketID) bool
Click to show internal directories.
Click to hide internal directories.