Documentation ¶
Index ¶
Constants ¶
View Source
const ( RTA_OIF = RtAttrType(4) RTA_GATEWAY = RtAttrType(5) )
https://elixir.bootlin.com/linux/v5.10.46/source/include/uapi/linux/rtnetlink.h#L336
View Source
const ( AF_INET = RtmFamily(2) /* Internet IP Protocol */ AF_INET6 = RtmFamily(10) /* IP version 6 */ )
RtMsg.Family https://elixir.bootlin.com/linux/v5.10.46/source/include/linux/socket.h#L179
View Source
const (
RT_TABLE_MAIN = RtmTable(254)
)
RtMsg.Table https://elixir.bootlin.com/linux/v5.10.46/source/include/uapi/linux/rtnetlink.h#L325
Variables ¶
View Source
var ErrDefaultRouteNotFound = errors.New("default route not found")
View Source
var RtAttrSizeof = nlmsgAlign(int64(unsafe.Sizeof(RtAttr{})))
Functions ¶
This section is empty.
Types ¶
type Info ¶
func GetDefaultRoute ¶
type RtAttr ¶
type RtAttr struct { Len uint16 Type RtAttrType }
type RtAttrType ¶
type RtAttrType = uint16
type RtMsg ¶
type RtMsg struct { Family RtmFamily DstLen uint8 SrcLen uint8 Tos uint8 Table RtmTable Protocol RtmProtocol Scope RtmScope Type RtmType Flags RtmFlag }
RtMsg see: https://elixir.bootlin.com/linux/v5.10.46/source/include/uapi/linux/rtnetlink.h#L221
type RtmProtocol ¶
type RtmProtocol = uint8
Click to show internal directories.
Click to hide internal directories.