Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SocketClose ¶
func SocketClose(fd uintptr)
SocketClose is a convenience method to clean up a socket file descriptor after use. It's implied that this call cannot fail, and if the OS disagrees, we panic.
Types ¶
type NetIf ¶
NetIf represents a network interface.
func (NetIf) GetHWAddress ¶
func (n NetIf) GetHWAddress() (hwa net.HardwareAddr, err error)
GetHWAddress returns the MAC of the interface.
func (NetIf) SetHWAddress ¶
func (n NetIf) SetHWAddress(hwa net.HardwareAddr) (err error)
SetHWAddress changes the MAC of the interface.
type NetIf_Flags ¶
NetIf_Flags is a decomposed type, representing one identity of `struct ifreq` (which is a C union type - cannot be represented in Go). See `man 7 netdevice`
type NetIf_Index ¶
NetIf_Index is a decomposed type, representing one identity of `struct ifreq` (which is a C union type - cannot be represented in Go). See `man 7 netdevice`
func GetByIndex ¶
func GetByIndex(i int32) (r *NetIf_Index, err error)
GetByIndex returns a completed NetIf_Index struct for the interface at the specified index.
func GetByName ¶
func GetByName(n string) (r *NetIf_Index, err error)
GetByName returns a completed NetIf_Index struct for the interface with the specified name.
type NetIf_Sockaddr ¶
type NetIf_Sockaddr struct { Name [unix.IFNAMSIZ]byte SockAddr unix.RawSockaddr }
NetIf_Sockaddr is a decomposed type, representing one identity of struct ireq (which is a C union type - cannot be represented in Go). See man 7 netdevice