mirror of
https://github.com/vishvananda/netlink
synced 2024-12-27 00:52:11 +00:00
38 lines
629 B
Go
38 lines
629 B
Go
package netlink
|
|
|
|
import "net"
|
|
|
|
// SocketID identifies a single socket.
|
|
type SocketID struct {
|
|
SourcePort uint16
|
|
DestinationPort uint16
|
|
Source net.IP
|
|
Destination net.IP
|
|
Interface uint32
|
|
Cookie [2]uint32
|
|
}
|
|
|
|
// Socket represents a netlink socket.
|
|
type Socket struct {
|
|
Family uint8
|
|
State uint8
|
|
Timer uint8
|
|
Retrans uint8
|
|
ID SocketID
|
|
Expires uint32
|
|
RQueue uint32
|
|
WQueue uint32
|
|
UID uint32
|
|
INode uint32
|
|
}
|
|
|
|
// UnixSocket represents a netlink unix socket.
|
|
type UnixSocket struct {
|
|
Type uint8
|
|
Family uint8
|
|
State uint8
|
|
pad uint8
|
|
INode uint32
|
|
Cookie [2]uint32
|
|
}
|