rtnl

package
v1.13.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2020 License: GPL-2.0, GPL-2.0-or-later Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AF_UNSPEC = iota
	AF_UNIX
	AF_INET
	AF_AX25
	AF_IPX
	AF_APPLETALK
	AF_NETROM
	AF_BRIDGE
	AF_ATMPVC
	AF_X25
	AF_INET6
	AF_ROSE
	AF_DECnet
	AF_NETBEUI
	AF_SECURITY
	AF_KEY
	AF_NETLINK
	AF_PACKET
	AF_ASH
	AF_ECONET
	AF_ATMSVC
	AF_RDS
	AF_SNA
	AF_IRDA
	AF_PPPOX
	AF_WANPIPE
	AF_LLC
	AF_IB
	AF_MPLS
	AF_CAN
	AF_TIPC
	AF_BLUETOOTH
	AF_IUCV
	AF_RXRPC
	AF_ISDN
	AF_PHONET
	AF_IEEE802154
	AF_CAIF
	AF_ALG
	AF_NFC
	AF_VSOCK
)
View Source
const (
	ETH_P_LOOP      uint16 = 0x0060 // Ethernet Loopback packet
	ETH_P_PUP       uint16 = 0x0200 // Xerox PUP packet
	ETH_P_PUPAT     uint16 = 0x0201 // Xerox PUP Addr Trans packet
	ETH_P_TSN       uint16 = 0x22F0 // TSN (IEEE 1722) packet
	ETH_P_IP        uint16 = 0x0800 // Internet Protocol packet
	ETH_P_X25       uint16 = 0x0805 // CCITT X.25
	ETH_P_ARP       uint16 = 0x0806 // Address Resolution packet
	ETH_P_BPQ       uint16 = 0x08FF // G8BPQ AX.25 Ethernet Packet	[ NOT AN OFFICIALLY REGISTERED ID ]
	ETH_P_IEEEPUP   uint16 = 0x0a00 // Xerox IEEE802.3 PUP packet
	ETH_P_IEEEPUPAT uint16 = 0x0a01 // Xerox IEEE802.3 PUP Addr Trans packet
	ETH_P_BATMAN    uint16 = 0x4305 // B.A.T.M.A.N.-Advanced packet [ NOT AN OFFICIALLY REGISTERED ID ]
	ETH_P_DEC       uint16 = 0x6000 // DEC Assigned proto
	ETH_P_DNA_DL    uint16 = 0x6001 // DEC DNA Dump/Load
	ETH_P_DNA_RC    uint16 = 0x6002 // DEC DNA Remote Console
	ETH_P_DNA_RT    uint16 = 0x6003 // DEC DNA Routing
	ETH_P_LAT       uint16 = 0x6004 // DEC LAT
	ETH_P_DIAG      uint16 = 0x6005 // DEC Diagnostics
	ETH_P_CUST      uint16 = 0x6006 // DEC Customer use
	ETH_P_SCA       uint16 = 0x6007 // DEC Systems Comms Arch
	ETH_P_TEB       uint16 = 0x6558 // Trans Ether Bridging
	ETH_P_RARP      uint16 = 0x8035 // Reverse Addr Res packet
	ETH_P_ATALK     uint16 = 0x809B // Appletalk DDP
	ETH_P_AARP      uint16 = 0x80F3 // Appletalk AARP
	ETH_P_8021Q     uint16 = 0x8100 // 802.1Q VLAN Extended Header
	ETH_P_IPX       uint16 = 0x8137 // IPX over DIX
	ETH_P_IPV6      uint16 = 0x86DD // IPv6 over bluebook
	ETH_P_PAUSE     uint16 = 0x8808 // IEEE Pause frames. See 802.3 31B
	ETH_P_SLOW      uint16 = 0x8809 // Slow Protocol. See 802.3ad 43B
	ETH_P_WCCP      uint16 = 0x883E // Web-cache coordination
	ETH_P_MPLS_UC   uint16 = 0x8847 // MPLS Unicast traffic
	ETH_P_MPLS_MC   uint16 = 0x8848 // MPLS Multicast traffic
	ETH_P_ATMMPOA   uint16 = 0x884c // MultiProtocol Over ATM
	ETH_P_PPP_DISC  uint16 = 0x8863 // PPPoE discovery messages
	ETH_P_PPP_SES   uint16 = 0x8864 // PPPoE session messages
	ETH_P_LINK_CTL  uint16 = 0x886c // HPNA, wlan link local tunnel
	ETH_P_ATMFATE   uint16 = 0x8884 // Frame-based ATM Transport
	// over Ethernet
	ETH_P_PAE     uint16 = 0x888E // Port Access Entity (IEEE 802.1X)
	ETH_P_AOE     uint16 = 0x88A2 // ATA over Ethernet
	ETH_P_8021AD  uint16 = 0x88A8 // 802.1ad Service VLAN
	ETH_P_802_EX1 uint16 = 0x88B5 // 802.1 Local Experimental 1.
	ETH_P_TIPC    uint16 = 0x88CA // TIPC
	ETH_P_MACSEC  uint16 = 0x88E5 // 802.1ae MACsec
	ETH_P_8021AH  uint16 = 0x88E7 // 802.1ah Backbone Service Tag
	ETH_P_MVRP    uint16 = 0x88F5 // 802.1Q MVRP
	ETH_P_1588    uint16 = 0x88F7 // IEEE 1588 Timesync
	ETH_P_NCSI    uint16 = 0x88F8 // NCSI protocol
	ETH_P_PRP     uint16 = 0x88FB // IEC 62439-3 PRP/HSRv0
	ETH_P_FCOE    uint16 = 0x8906 // Fibre Channel over Ethernet
	ETH_P_IBOE    uint16 = 0x8915 // Infiniband over Ethernet
	ETH_P_TDLS    uint16 = 0x890D // TDLS
	ETH_P_FIP     uint16 = 0x8914 // FCoE Initialization Protocol
	ETH_P_80221   uint16 = 0x8917 // IEEE 802.21
	// Media Independent Handover Protocol
	ETH_P_HSR      uint16 = 0x892F // IEC 62439-3 HSRv1
	ETH_P_LOOPBACK uint16 = 0x9000 // IEEE 802.3 Ethernet loopback

	// unofficial ids...
	ETH_P_QINQ1   uint16 = 0x9100 // deprecated QinQ VLAN
	ETH_P_QINQ2   uint16 = 0x9200 // deprecated QinQ VLAN
	ETH_P_QINQ3   uint16 = 0x9300 // deprecated QinQ VLAN
	ETH_P_EDSA    uint16 = 0xDADA // Ethertype DSA
	ETH_P_AF_IUCV uint16 = 0xFBFB // IBM af_iucv

	// If the value in the ethernet type is less than this value
	// then the frame is Ethernet II. Else it is 802.3
	ETH_P_802_3_MIN uint16 = 0x0600

	// Non DIX types. Won't clash for 1500 types.
	ETH_P_802_3      uint16 = 0x0001 // Dummy type for 802.3 frames
	ETH_P_AX25       uint16 = 0x0002 // Dummy protocol id for AX.25
	ETH_P_ALL        uint16 = 0x0003 // Every packet (be careful!!!)
	ETH_P_802_2      uint16 = 0x0004 // 802.2 frames
	ETH_P_SNAP       uint16 = 0x0005 // Internal only
	ETH_P_DDCMP      uint16 = 0x0006 // DEC DDCMP: Internal only
	ETH_P_WAN_PPP    uint16 = 0x0007 // Dummy type for WAN PPP frames*/
	ETH_P_PPP_MP     uint16 = 0x0008 // Dummy type for PPP MP frames
	ETH_P_LOCALTALK  uint16 = 0x0009 // Localtalk pseudo type
	ETH_P_CAN        uint16 = 0x000C // CAN: Controller Area Network
	ETH_P_CANFD      uint16 = 0x000D // CANFD: CAN flexible data rate*/
	ETH_P_PPPTALK    uint16 = 0x0010 // Dummy type for Atalk over PPP*/
	ETH_P_TR_802_2   uint16 = 0x0011 // 802.2 frames
	ETH_P_MOBITEX    uint16 = 0x0015 // Mobitex (kaz@cafe.net)
	ETH_P_CONTROL    uint16 = 0x0016 // Card specific control frames
	ETH_P_IRDA       uint16 = 0x0017 // Linux-IrDA
	ETH_P_ECONET     uint16 = 0x0018 // Acorn Econet
	ETH_P_HDLC       uint16 = 0x0019 // HDLC frames
	ETH_P_ARCNET     uint16 = 0x001A // 1A for ArcNet :-)
	ETH_P_DSA        uint16 = 0x001B // Distributed Switch Arch.
	ETH_P_TRAILER    uint16 = 0x001C // Trailer switch tagging
	ETH_P_PHONET     uint16 = 0x00F5 // Nokia Phonet frames
	ETH_P_IEEE802154 uint16 = 0x00F6 // IEEE802.15.4 frame
	ETH_P_CAIF       uint16 = 0x00F7 // ST-Ericsson CAIF protocol
	ETH_P_XDSA       uint16 = 0x00F8 // Multiplexed DSA protocol
)
View Source
const (
	FIB_RULE_PERMANENT uint32 = 1 << iota
	FIB_RULE_INVERT
	FIB_RULE_UNRESOLVED
	FIB_RULE_IIF_DETACHED
	FIB_RULE_OIF_DETACHED
)
View Source
const (
	FRA_UNSPEC uint16 = iota
	FRA_DST
	FRA_SRC
	FRA_IIFNAME
	FRA_GOTO
	FRA_UNUSED2
	FRA_PRIORITY
	FRA_UNUSED3
	FRA_UNUSED4
	FRA_UNUSED5
	FRA_FWMARK
	FRA_FLOW
	FRA_TUN_ID
	FRA_SUPPRESS_IFGROUP
	FRA_SUPPRESS_PREFIXLEN
	FRA_TABLE
	FRA_FWMASK
	FRA_OIFNAME
	FRA_PAD
	FRA_L3MDEV
	FRA_UID_RANGE
	N_FRA
)
View Source
const (
	FR_ACT_UNSPEC uint8 = iota
	FR_ACT_TO_TBL
	FR_ACT_GOTO
	FR_ACT_NOP
	FR_ACT_RES3
	FR_ACT_RES4
	FR_ACT_BLACKHOLE
	FR_ACT_UNREACHABLE
	FR_ACT_PROHIBIT
	N_FR_ACT
)
View Source
const (
	ICMPV6_ROUTER_PREF_LOW     uint8 = 3
	ICMPV6_ROUTER_PREF_MEDIUM  uint8 = 0
	ICMPV6_ROUTER_PREF_HIGH    uint8 = 1
	ICMPV6_ROUTER_PREF_INVALID uint8 = 2
)
View Source
const (
	IFAL_ADDRESS uint16 = 1 + iota
	IFAL_LABEL
	N_IFAL
)
View Source
const (
	IFA_UNSPEC uint16 = iota
	IFA_ADDRESS
	IFA_LOCAL
	IFA_LABEL
	IFA_BROADCAST
	IFA_ANYCAST
	IFA_CACHEINFO
	IFA_MULTICAST
	IFA_FLAGS
	N_IFA
)
View Source
const (
	IFA_F_SECONDARY uint8 = 1 << iota
	IFA_F_NODAD
	IFA_F_OPTIMISTIC
	IFA_F_DADFAILED
	IFA_F_HOMEADDRESS
	IFA_F_DEPRECATED
	IFA_F_TENTATIVE
	IFA_F_PERMANENT
)
View Source
const (
	IFA_F_MANAGETEMPADDR uint32 = 1 << (iota + 8)
	IFA_F_NOPREFIXROUTE
	IFA_F_MCAUTOJOIN
	IFA_F_STABLE_PRIVACY
)
View Source
const (
	IFF_UP uint32 = 1 << iota
	IFF_BROADCAST
	IFF_DEBUG
	IFF_LOOPBACK
	IFF_POINTOPOINT
	IFF_NOTRAILERS
	IFF_RUNNING
	IFF_NOARP
	IFF_PROMISC
	IFF_ALLMULTI
	IFF_MASTER
	IFF_SLAVE
	IFF_MULTICAST
	IFF_PORTSEL
	IFF_AUTOMEDIA
	IFF_DYNAMIC
	IFF_LOWER_UP
	IFF_DORMANT
	IFF_ECHO
)
View Source
const (
	IFLA_UNSPEC uint16 = iota
	IFLA_ADDRESS
	IFLA_BROADCAST
	IFLA_IFNAME
	IFLA_MTU
	IFLA_LINK
	IFLA_QDISC
	IFLA_STATS
	IFLA_COST
	IFLA_PRIORITY
	IFLA_MASTER
	IFLA_WIRELESS
	IFLA_PROTINFO
	IFLA_TXQLEN
	IFLA_MAP
	IFLA_WEIGHT
	IFLA_OPERSTATE
	IFLA_LINKMODE
	IFLA_LINKINFO
	IFLA_NET_NS_PID
	IFLA_IFALIAS
	IFLA_NUM_VF
	IFLA_VFINFO_LIST
	IFLA_STATS64
	IFLA_VF_PORTS
	IFLA_PORT_SELF
	IFLA_AF_SPEC
	IFLA_GROUP
	IFLA_NET_NS_FD
	IFLA_EXT_MASK
	IFLA_PROMISCUITY
	IFLA_NUM_TX_QUEUES
	IFLA_NUM_RX_QUEUES
	IFLA_CARRIER
	IFLA_PHYS_PORT_ID
	IFLA_CARRIER_CHANGES
	IFLA_PHYS_SWITCH_ID
	IFLA_LINK_NETNSID
	IFLA_PHYS_PORT_NAME
	IFLA_PROTO_DOWN
	IFLA_GSO_MAX_SEGS
	IFLA_GSO_MAX_SIZE
	IFLA_PAD
	IFLA_XDP
	IFLA_EVENT
	N_IFLA
)
View Source
const (
	IFLA_INFO_UNSPEC uint16 = iota
	IFLA_INFO_KIND
	IFLA_INFO_DATA
	IFLA_INFO_XSTATS
	IFLA_INFO_SLAVE_KIND
	IFLA_INFO_SLAVE_DATA
	N_IFLA_INFO
)
View Source
const (
	IF_LINK_MODE_DEFAULT uint8 = iota
	IF_LINK_MODE_DORMANT
)
View Source
const (
	IF_OPER_UNKNOWN uint8 = iota
	IF_OPER_NOTPRESENT
	IF_OPER_DOWN
	IF_OPER_LOWERLAYERDOWN
	IF_OPER_TESTING
	IF_OPER_DORMANT
	IF_OPER_UP
)
View Source
const (
	Rx_packets = iota
	Tx_packets /* total packets transmitted	*/
	Rx_bytes   /* total bytes received 	*/
	Tx_bytes   /* total bytes transmitted	*/
	Rx_errors  /* bad packets received		*/
	Tx_errors  /* packet transmit problems	*/
	Rx_dropped /* no space in linux buffers	*/
	Tx_dropped /* no space available in linux	*/
	Multicast  /* multicast packets received	*/
	Collisions
	Rx_length_errors
	Rx_over_errors   /* receiver ring buff overflow	*/
	Rx_crc_errors    /* recved pkt with crc error	*/
	Rx_frame_errors  /* recv'd frame alignment error */
	Rx_fifo_errors   /* recv'r fifo overrun		*/
	Rx_missed_errors /* receiver missed packet	*/
	Tx_aborted_errors
	Tx_carrier_errors
	Tx_fifo_errors
	Tx_heartbeat_errors
	Tx_window_errors
	Rx_compressed
	Tx_compressed
	N_link_stat
)
View Source
const (
	IFLA_INET6_UNSPEC uint16 = iota
	IFLA_INET6_FLAGS
	IFLA_INET6_CONF
	IFLA_INET6_STATS
	IFLA_INET6_MCAST
	IFLA_INET6_CACHEINFO
	IFLA_INET6_ICMP6STATS
	IFLA_INET6_TOKEN
	IFLA_INET6_ADDR_GEN_MODE
	N_IFLA_INET6
)
View Source
const (
	IN6_ADDR_GEN_MODE_EUI64 uint8 = iota
	IN6_ADDR_GEN_MODE_NONE
	IN6_ADDR_GEN_MODE_STABLE_PRIVACY
	IN6_ADDR_GEN_MODE_RANDOM
)
View Source
const (
	IFLA_VLAN_UNSPEC uint16 = iota
	IFLA_VLAN_ID
	IFLA_VLAN_FLAGS
	IFLA_VLAN_EGRESS_QOS
	IFLA_VLAN_INGRESS_QOS
	IFLA_VLAN_PROTOCOL
	N_IFLA_VLAN
)
View Source
const (
	VLAN_FLAG_REORDER_HDR uint32 = 1 << iota
	VLAN_FLAG_GVRP
	VLAN_FLAG_LOOSE_BINDING
	VLAN_FLAG_MVRP
)
View Source
const (
	IFLA_VLAN_QOS_UNSPEC uint16 = iota
	IFLA_VLAN_QOS_MAPPING
	N_IFLA_VLAN_QOS
)
View Source
const (
	IFLA_GRE_UNSPEC uint16 = iota
	IFLA_GRE_LINK
	IFLA_GRE_IFLAGS
	IFLA_GRE_OFLAGS
	IFLA_GRE_IKEY
	IFLA_GRE_OKEY
	IFLA_GRE_LOCAL
	IFLA_GRE_REMOTE
	IFLA_GRE_TTL
	IFLA_GRE_TOS
	IFLA_GRE_PMTUDISC
	IFLA_GRE_ENCAP_LIMIT
	IFLA_GRE_FLOWINFO
	IFLA_GRE_FLAGS
	IFLA_GRE_ENCAP_TYPE
	IFLA_GRE_ENCAP_FLAGS
	IFLA_GRE_ENCAP_SPORT
	IFLA_GRE_ENCAP_DPORT
	IFLA_GRE_COLLECT_METADATA
	IFLA_GRE_IGNORE_DF
	IFLA_GRE_FWMARK
	N_IFLA_GRE
)
View Source
const (
	// big-endian
	GRE_CSUM    uint16 = 0x8000
	GRE_ROUTING uint16 = 0x4000
	GRE_KEY     uint16 = 0x2000
	GRE_SEQ     uint16 = 0x1000
	GRE_STRICT  uint16 = 0x0800
	GRE_REC     uint16 = 0x0700
	GRE_ACK     uint16 = 0x0080
	GRE_FLAGS   uint16 = 0x0078
	GRE_VERSION uint16 = 0x0007
)
View Source
const (
	IFLA_IPTUN_UNSPEC uint16 = iota
	IFLA_IPTUN_LINK
	IFLA_IPTUN_LOCAL
	IFLA_IPTUN_REMOTE
	IFLA_IPTUN_TTL
	IFLA_IPTUN_TOS
	IFLA_IPTUN_ENCAP_LIMIT
	IFLA_IPTUN_FLOWINFO
	IFLA_IPTUN_FLAGS
	IFLA_IPTUN_PROTO
	IFLA_IPTUN_PMTUDISC
	IFLA_IPTUN_6RD_PREFIX
	IFLA_IPTUN_6RD_RELAY_PREFIX
	IFLA_IPTUN_6RD_PREFIXLEN
	IFLA_IPTUN_6RD_RELAY_PREFIXLEN
	IFLA_IPTUN_ENCAP_TYPE
	IFLA_IPTUN_ENCAP_FLAGS
	IFLA_IPTUN_ENCAP_SPORT
	IFLA_IPTUN_ENCAP_DPORT
	IFLA_IPTUN_COLLECT_METADATA
	N_IFLA_IPTUN
)
View Source
const (
	TUNNEL_ENCAP_NONE uint16 = iota
	TUNNEL_ENCAP_FOU
	TUNNEL_ENCAP_GUE
)
View Source
const (
	TUNNEL_ENCAP_FLAG_CSUM uint16 = 1 << iota
	TUNNEL_ENCAP_FLAG_CSUM6
	TUNNEL_ENCAP_FLAG_REMCSUM
)
View Source
const (
	IP6_TNL_F_IGN_ENCAP_LIMIT uint32 = 1 << iota
	IP6_TNL_F_USE_ORIG_TCLASS
	IP6_TNL_F_USE_ORIG_FLOWLABEL
	IP6_TNL_F_MIP6_DEV
	IP6_TNL_F_RCV_DSCP_COPY
	IP6_TNL_F_USE_ORIG_FWMARK
)
View Source
const (
	IFLA_IPOIB_UNSPEC uint16 = iota
	IFLA_IPOIB_PKEY
	IFLA_IPOIB_MODE
	IFLA_IPOIB_UMCAST
	N_IFLA_IPOIB
)
View Source
const (
	IPOIB_MODE_DATAGRAM uint16 = iota
	IPOIB_MODE_CONNECTED
)
View Source
const (
	IFLA_VRF_UNSPEC uint16 = iota
	IFLA_VRF_TABLE
	N_IFLA_VRF_MAX
)
View Source
const (
	IFLA_VRF_PORT_UNSPEC uint16 = iota
	IFLA_VRF_PORT_TABLE
	N_IFLA_VRF_PORT_MAX
)
View Source
const (
	IFLA_VXLAN_UNSPEC uint16 = iota
	IFLA_VXLAN_ID
	IFLA_VXLAN_GROUP
	IFLA_VXLAN_LINK
	IFLA_VXLAN_LOCAL
	IFLA_VXLAN_TTL
	IFLA_VXLAN_TOS
	IFLA_VXLAN_LEARNING
	IFLA_VXLAN_AGEING
	IFLA_VXLAN_LIMIT
	IFLA_VXLAN_PORT_RANGE
	IFLA_VXLAN_PROXY
	IFLA_VXLAN_RSC
	IFLA_VXLAN_L2MISS
	IFLA_VXLAN_L3MISS
	IFLA_VXLAN_PORT
	IFLA_VXLAN_GROUP6
	IFLA_VXLAN_LOCAL6
	IFLA_VXLAN_UDP_CSUM
	IFLA_VXLAN_UDP_ZERO_CSUM6_TX
	IFLA_VXLAN_UDP_ZERO_CSUM6_RX
	IFLA_VXLAN_REMCSUM_TX
	IFLA_VXLAN_REMCSUM_RX
	IFLA_VXLAN_GBP
	IFLA_VXLAN_REMCSUM_NOPARTIAL
	IFLA_VXLAN_COLLECT_METADATA
	IFLA_VXLAN_LABEL
	IFLA_VXLAN_GPE
	N_IFLA_VXLAN
)
View Source
const (
	IFLA_GENEVE_UNSPEC uint16 = iota
	IFLA_GENEVE_ID
	IFLA_GENEVE_REMOTE
	IFLA_GENEVE_TTL
	IFLA_GENEVE_TOS
	IFLA_GENEVE_PORT
	IFLA_GENEVE_COLLECT_METADATA
	IFLA_GENEVE_REMOTE6
	IFLA_GENEVE_UDP_CSUM
	IFLA_GENEVE_UDP_ZERO_CSUM6_TX
	IFLA_GENEVE_UDP_ZERO_CSUM6_RX
	IFLA_GENEVE_LABEL
	N_IFLA_GENEVE
)
View Source
const (
	IFLA_MACVLAN_UNSPEC uint16 = iota
	IFLA_MACVLAN_MODE
	IFLA_MACVLAN_FLAGS
	IFLA_MACVLAN_MACADDR_MODE
	IFLA_MACVLAN_MACADDR
	IFLA_MACVLAN_MACADDR_DATA
	IFLA_MACVLAN_MACADDR_COUNT
	N_IFLA_MACVLAN
)
View Source
const (
	MACVLAN_MODE_PRIVATE uint32 = 1 << iota
	MACVLAN_MODE_VEPA
	MACVLAN_MODE_BRIDGE
	MACVLAN_MODE_PASSTHRU
	MACVLAN_MODE_SOURCE
)
View Source
const (
	MACVLAN_MACADDR_ADD = iota
	MACVLAN_MACADDR_DEL
	MACVLAN_MACADDR_FLUSH
	MACVLAN_MACADDR_SET
)
View Source
const (
	IFLA_HSR_UNSPEC uint16 = iota
	IFLA_HSR_SLAVE1
	IFLA_HSR_SLAVE2
	IFLA_HSR_MULTICAST_SPEC
	IFLA_HSR_SUPERVISION_ADDR
	IFLA_HSR_SEQ_NR
	IFLA_HSR_VERSION
	N_IFLA_HSR
)
View Source
const (
	IFLA_BR_UNSPEC uint16 = iota
	IFLA_BR_FORWARD_DELAY
	IFLA_BR_HELLO_TIME
	IFLA_BR_MAX_AGE
	IFLA_BR_AGEING_TIME
	IFLA_BR_STP_STATE
	IFLA_BR_PRIORITY
	IFLA_BR_VLAN_FILTERING
	IFLA_BR_VLAN_PROTOCOL
	IFLA_BR_GROUP_FWD_MASK
	IFLA_BR_ROOT_ID
	IFLA_BR_BRIDGE_ID
	IFLA_BR_ROOT_PORT
	IFLA_BR_ROOT_PATH_COST
	IFLA_BR_TOPOLOGY_CHANGE
	IFLA_BR_TOPOLOGY_CHANGE_DETECTED
	IFLA_BR_HELLO_TIMER
	IFLA_BR_TCN_TIMER
	IFLA_BR_TOPOLOGY_CHANGE_TIMER
	IFLA_BR_GC_TIMER
	IFLA_BR_GROUP_ADDR
	IFLA_BR_FDB_FLUSH
	IFLA_BR_MCAST_ROUTER
	IFLA_BR_MCAST_SNOOPING
	IFLA_BR_MCAST_QUERY_USE_IFADDR
	IFLA_BR_MCAST_QUERIER
	IFLA_BR_MCAST_HASH_ELASTICITY
	IFLA_BR_MCAST_HASH_MAX
	IFLA_BR_MCAST_LAST_MEMBER_CNT
	IFLA_BR_MCAST_STARTUP_QUERY_CNT
	IFLA_BR_MCAST_LAST_MEMBER_INTVL
	IFLA_BR_MCAST_MEMBERSHIP_INTVL
	IFLA_BR_MCAST_QUERIER_INTVL
	IFLA_BR_MCAST_QUERY_INTVL
	IFLA_BR_MCAST_QUERY_RESPONSE_INTVL
	IFLA_BR_MCAST_STARTUP_QUERY_INTVL
	IFLA_BR_NF_CALL_IPTABLES
	IFLA_BR_NF_CALL_IP6TABLES
	IFLA_BR_NF_CALL_ARPTABLES
	IFLA_BR_VLAN_DEFAULT_PVID
	IFLA_BR_PAD
	IFLA_BR_VLAN_STATS_ENABLED
	IFLA_BR_MCAST_STATS_ENABLED
	IFLA_BR_MCAST_IGMP_VERSION
	IFLA_BR_MCAST_MLD_VERSION
	N_IFLA_BR
)
View Source
const (
	BRIDGE_MODE_UNSPEC = iota
	BRIDGE_MODE_HAIRPIN
)
View Source
const (
	IFLA_BRPORT_UNSPEC uint16 = iota
	IFLA_BRPORT_STATE
	IFLA_BRPORT_PRIORITY
	IFLA_BRPORT_COST
	IFLA_BRPORT_MODE
	IFLA_BRPORT_GUARD
	IFLA_BRPORT_PROTECT
	IFLA_BRPORT_FAST_LEAVE
	IFLA_BRPORT_LEARNING
	IFLA_BRPORT_UNICAST_FLOOD
	IFLA_BRPORT_PROXYARP
	IFLA_BRPORT_LEARNING_SYNC
	IFLA_BRPORT_PROXYARP_WIFI
	IFLA_BRPORT_ROOT_ID
	IFLA_BRPORT_BRIDGE_ID
	IFLA_BRPORT_DESIGNATED_PORT
	IFLA_BRPORT_DESIGNATED_COST
	IFLA_BRPORT_ID
	IFLA_BRPORT_NO
	IFLA_BRPORT_TOPOLOGY_CHANGE_ACK
	IFLA_BRPORT_CONFIG_PENDING
	IFLA_BRPORT_MESSAGE_AGE_TIMER
	IFLA_BRPORT_FORWARD_DELAY_TIMER
	IFLA_BRPORT_HOLD_TIMER
	IFLA_BRPORT_FLUSH
	IFLA_BRPORT_MULTICAST_ROUTER
	IFLA_BRPORT_PAD
	IFLA_BRPORT_MCAST_FLOOD
	IFLA_BRPORT_MCAST_TO_UCAST
	IFLA_BRPORT_VLAN_TUNNEL
	N_IFLA_BRPORT
)
View Source
const (
	IFLA_MACSEC_UNSPEC uint16 = iota
	IFLA_MACSEC_SCI
	IFLA_MACSEC_PORT
	IFLA_MACSEC_ICV_LEN
	IFLA_MACSEC_CIPHER_SUITE
	IFLA_MACSEC_WINDOW
	IFLA_MACSEC_ENCODING_SA
	IFLA_MACSEC_ENCRYPT
	IFLA_MACSEC_PROTECT
	IFLA_MACSEC_INC_SCI
	IFLA_MACSEC_ES
	IFLA_MACSEC_SCB
	IFLA_MACSEC_REPLAY_PROTECT
	IFLA_MACSEC_VALIDATION
	IFLA_MACSEC_PAD
	N_IFLA_MACSEC
)
View Source
const (
	MACSEC_VALIDATE_DISABLED uint8 = iota
	MACSEC_VALIDATE_CHECK
	MACSEC_VALIDATE_STRICT
	N_MACSEC_VALIDATE
)
View Source
const (
	ILA_ATTR_UNSPEC        uint16 = iota
	ILA_ATTR_LOCATOR              // u64
	ILA_ATTR_IDENTIFIER           // u64
	ILA_ATTR_LOCATOR_MATCH        // u64
	ILA_ATTR_IFINDEX              // s32
	ILA_ATTR_DIR                  // u32
	ILA_ATTR_PAD                  // ?
	ILA_ATTR_CSUM_MODE            // u8
	N_ILA_ATTR
)
View Source
const (
	ILA_CMD_UNSPEC uint16 = iota
	ILA_CMD_ADD
	ILA_CMD_DEL
	ILA_CMD_GET

	N_ILA_CMD
)
View Source
const (
	ILA_DIR_IN uint8 = 1 << iota
	ILA_DIR_OUT
)
View Source
const (
	ILA_CSUM_ADJUST_TRANSPORT uint8 = iota
	ILA_CSUM_NEUTRAL_MAP
	ILA_CSUM_NO_ACTION
)
View Source
const (
	IPPROTO_IP      uint8 = 0   // Dummy protocol for TCP
	IPPROTO_ICMP    uint8 = 1   // Internet Control Message Protocol
	IPPROTO_IGMP    uint8 = 2   // Internet Group Management Protocol
	IPPROTO_IPIP    uint8 = 4   // IPIP tunnels (older KA9Q tunnels use 94)
	IPPROTO_TCP     uint8 = 6   // Transmission Control Protocol
	IPPROTO_EGP     uint8 = 8   // Exterior Gateway Protocol
	IPPROTO_PUP     uint8 = 12  // PUP protocol
	IPPROTO_UDP     uint8 = 17  // User Datagram Protocol
	IPPROTO_IDP     uint8 = 22  // XNS IDP protocol
	IPPROTO_TP      uint8 = 29  // SO Transport Protocol Class 4
	IPPROTO_DCCP    uint8 = 33  // Datagram Congestion Control Protocol
	IPPROTO_IPV6    uint8 = 41  // IPv6-in-IPv4 tunnelling
	IPPROTO_RSVP    uint8 = 46  // RSVP Protocol
	IPPROTO_GRE     uint8 = 47  // Cisco GRE tunnels (rfc 1701,1702)
	IPPROTO_ESP     uint8 = 50  // Encapsulation Security Payload protocol
	IPPROTO_AH      uint8 = 51  // Authentication Header protocol
	IPPROTO_MTP     uint8 = 92  // Multicast Transport Protocol
	IPPROTO_BEETPH  uint8 = 94  // IP option pseudo header for BEET
	IPPROTO_ENCAP   uint8 = 98  // Encapsulation Header
	IPPROTO_PIM     uint8 = 103 // Protocol Independent Multicast
	IPPROTO_COMP    uint8 = 108 // Compression Header Protocol
	IPPROTO_SCTP    uint8 = 132 // Stream Control Transport Protocol
	IPPROTO_UDPLITE uint8 = 136 // UDP-Lite (RFC 3828)
	IPPROTO_MPLS    uint8 = 137 // MPLS in IP (RFC 4023)
	IPPROTO_RAW     uint8 = 255 // Raw IP packets

	IPPROTO_MAX = IPPROTO_RAW
)
View Source
const (
	LWTUNNEL_ENCAP_NONE uint16 = iota
	LWTUNNEL_ENCAP_MPLS
	LWTUNNEL_ENCAP_IP
	LWTUNNEL_ENCAP_ILA
	LWTUNNEL_ENCAP_IP6
	LWTUNNEL_ENCAP_SEG6
	LWTUNNEL_ENCAP_BPF
	N_LWTUNNEL_ENCAP
)
View Source
const (
	LWTUNNEL_IP_UNSPEC uint16 = iota
	LWTUNNEL_IP_ID
	LWTUNNEL_IP_DST
	LWTUNNEL_IP_SRC
	LWTUNNEL_IP_TTL
	LWTUNNEL_IP_TOS
	LWTUNNEL_IP_FLAGS
	LWTUNNEL_IP_PAD
	N_LWTUNNEL_IP
)
View Source
const (
	LWTUNNEL_IP6_UNSPEC uint16 = iota
	LWTUNNEL_IP6_ID
	LWTUNNEL_IP6_DST
	LWTUNNEL_IP6_SRC
	LWTUNNEL_IP6_HOPLIMIT
	LWTUNNEL_IP6_TC
	LWTUNNEL_IP6_FLAGS
	LWTUNNEL_IP6_PAD
	N_LWTUNNEL_IP6
)
View Source
const (
	LWT_BPF_PROG_UNSPEC uint16 = iota
	LWT_BPF_PROG_FD
	LWT_BPF_PROG_NAME
	N_LWT_BPF_PROG
)
View Source
const (
	LWT_BPF_UNSPEC uint16 = iota
	LWT_BPF_IN
	LWT_BPF_OUT
	LWT_BPF_XMIT
	LWT_BPF_XMIT_HEADROOM
	N_LWT_BPF
)
View Source
const (
	MPLS_LS_LABEL_MASK uint32 = 0xFFFFF000
	MPLS_LS_TC_MASK    uint32 = 0x00000E00
	MPLS_LS_S_MASK     uint32 = 0x00000100
	MPLS_LS_TTL_MASK   uint32 = 0x000000FF

	MPLS_LS_LABEL_SHIFT = 12
	MPLS_LS_TC_SHIFT    = 9
	MPLS_LS_S_SHIFT     = 8
	MPLS_LS_TTL_SHIFT   = 0
)
View Source
const (
	MPLS_LABEL_IPV4NULL  uint32 = 0  // RFC3032
	MPLS_LABEL_RTALERT   uint32 = 1  // RFC3032
	MPLS_LABEL_IPV6NULL  uint32 = 2  // RFC3032
	MPLS_LABEL_IMPLNULL  uint32 = 3  // RFC3032
	MPLS_LABEL_ENTROPY   uint32 = 7  // RFC6790
	MPLS_LABEL_GAL       uint32 = 13 // RFC5586
	MPLS_LABEL_OAMALERT  uint32 = 14 // RFC3429
	MPLS_LABEL_EXTENSION uint32 = 15 // RFC7274

	MPLS_LABEL_FIRST_UNRESERVED uint32 = 16 // RFC3032
)

Reserved labels

View Source
const (
	MPLS_IPTUNNEL_UNSPEC uint16 = iota
	MPLS_IPTUNNEL_DST
	MPLS_IPTUNNEL_TTL
	N_MPLS_IPTUNNEL
)
View Source
const (
	NDA_UNSPEC uint16 = iota
	NDA_DST
	NDA_LLADDR
	NDA_CACHEINFO
	NDA_PROBES
	NDA_VLAN
	NDA_PORT
	NDA_VNI
	NDA_IFINDEX
	NDA_MASTER
	NDA_LINK_NETNSID
	N_NDA
)
View Source
const (
	NETCONFA_UNSPEC uint16 = iota
	NETCONFA_IFINDEX
	NETCONFA_FORWARDING
	NETCONFA_RP_FILTER
	NETCONFA_MC_FORWARDING
	NETCONFA_PROXY_NEIGH
	NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN
	NETCONFA_INPUT
	N_NETCONFA
)
View Source
const (
	NETCONFA_IFINDEX_ALL     int32 = -1
	NETCONFA_IFINDEX_DEFAULT int32 = -2
)
View Source
const (
	NETNSA_NONE uint16 = iota
	NETNSA_NSID
	NETNSA_PID
	NETNSA_FD
	N_NETNSA
)
View Source
const (
	NTF_USE uint8 = iota
	NTF_SELF
	NTF_MASTER
	NTF_PROXY
	NTF_EXT_LEARNED
	NTF_ROUTER
)
View Source
const (
	NUD_INCOMPLETE uint16 = 1 << iota
	NUD_REACHABLE
	NUD_STALE
	NUD_DELAY
	NUD_PROBE
	NUD_FAILED
	NUD_NOARP
	NUD_PERMANENT
	N_NUD
)
View Source
const (
	PREFIX_UNSPEC uint16 = iota
	PREFIX_ADDRESS
	PREFIX_CACHEINFO
	N_PREFIX
)
View Source
const (
	IF_PREFIX_ONLINK   uint8 = 0x01
	IF_PREFIX_AUTOCONF uint8 = 0x02
)

Prefix Flags

View Source
const (
	RTEXT_FILTER_VF nl.Uint32Attr = 1 << iota
	RTEXT_FILTER_BRVLAN
	RTEXT_FILTER_BRVLAN_COMPRESSED
	RTEXT_FILTER_SKIP_STATS
)

Extended info filters for IFLA_EXT_MASK

View Source
const (
	RTM_NEWLINK uint16 = syscall.RTM_NEWLINK
	RTM_DELLINK uint16 = syscall.RTM_DELLINK
	RTM_GETLINK uint16 = syscall.RTM_GETLINK
	RTM_SETLINK uint16 = syscall.RTM_SETLINK

	RTM_NEWADDR uint16 = syscall.RTM_NEWADDR
	RTM_DELADDR uint16 = syscall.RTM_DELADDR
	RTM_GETADDR uint16 = syscall.RTM_GETADDR

	RTM_NEWROUTE uint16 = syscall.RTM_NEWROUTE
	RTM_DELROUTE uint16 = syscall.RTM_DELROUTE
	RTM_GETROUTE uint16 = syscall.RTM_GETROUTE

	RTM_NEWNEIGH uint16 = syscall.RTM_NEWNEIGH
	RTM_DELNEIGH uint16 = syscall.RTM_DELNEIGH
	RTM_GETNEIGH uint16 = syscall.RTM_GETNEIGH

	RTM_NEWRULE uint16 = syscall.RTM_NEWRULE
	RTM_DELRULE uint16 = syscall.RTM_DELRULE
	RTM_GETRULE uint16 = syscall.RTM_GETRULE

	RTM_NEWQDISC uint16 = syscall.RTM_NEWQDISC
	RTM_DELQDISC uint16 = syscall.RTM_DELQDISC
	RTM_GETQDISC uint16 = syscall.RTM_GETQDISC

	RTM_NEWTCLASS uint16 = syscall.RTM_NEWTCLASS
	RTM_DELTCLASS uint16 = syscall.RTM_DELTCLASS
	RTM_GETTCLASS uint16 = syscall.RTM_GETTCLASS

	RTM_NEWTFILTER uint16 = syscall.RTM_NEWTFILTER
	RTM_DELTFILTER uint16 = syscall.RTM_DELTFILTER
	RTM_GETTFILTER uint16 = syscall.RTM_GETTFILTER

	RTM_NEWACTION uint16 = syscall.RTM_NEWACTION
	RTM_DELACTION uint16 = syscall.RTM_DELACTION
	RTM_GETACTION uint16 = syscall.RTM_GETACTION

	RTM_NEWPREFIX uint16 = syscall.RTM_NEWPREFIX

	RTM_GETMULTICAST uint16 = syscall.RTM_GETMULTICAST

	RTM_GETANYCAST uint16 = syscall.RTM_GETANYCAST

	RTM_NEWNEIGHTBL uint16 = syscall.RTM_NEWNEIGHTBL
	RTM_GETNEIGHTBL uint16 = syscall.RTM_GETNEIGHTBL
	RTM_SETNEIGHTBL uint16 = syscall.RTM_SETNEIGHTBL

	RTM_NEWNDUSEROPT uint16 = syscall.RTM_NEWNDUSEROPT

	RTM_NEWADDRLABEL uint16 = syscall.RTM_NEWADDRLABEL
	RTM_DELADDRLABEL uint16 = syscall.RTM_DELADDRLABEL
	RTM_GETADDRLABEL uint16 = syscall.RTM_GETADDRLABEL

	RTM_GETDCB uint16 = syscall.RTM_GETDCB
	RTM_SETDCB uint16 = syscall.RTM_SETDCB

	RTM_NEWNETCONF uint16 = 80
	RTM_GETNETCONF uint16 = 82

	RTM_NEWMDB uint16 = 84
	RTM_DELMDB uint16 = 85
	RTM_GETMDB uint16 = 86

	RTM_NEWNSID uint16 = 88
	RTM_DELNSID uint16 = 89
	RTM_GETNSID uint16 = 90
)
View Source
const (
	RTA_UNSPEC uint16 = iota
	RTA_DST
	RTA_SRC
	RTA_IIF
	RTA_OIF
	RTA_GATEWAY
	RTA_PRIORITY
	RTA_PREFSRC
	RTA_METRICS
	RTA_MULTIPATH
	RTA_PROTOINFO
	RTA_FLOW
	RTA_CACHEINFO
	RTA_SESSION
	RTA_MP_ALGO
	RTA_TABLE
	RTA_MARK
	RTA_MFC_STATS
	RTA_VIA
	RTA_NEWDST
	RTA_PREF
	RTA_ENCAP_TYPE
	RTA_ENCAP
	RTA_EXPIRES
	RTA_PAD
	RTA_UID
	RTA_TTL_PROPAGATE
	N_RTA
)
View Source
const (
	RTAX_UNSPEC uint16 = iota
	RTAX_LOCK
	RTAX_MTU
	RTAX_WINDOW
	RTAX_RTT
	RTAX_RTTVAR
	RTAX_SSTHRESH
	RTAX_CWND
	RTAX_ADVMSS
	RTAX_REORDERING
	RTAX_HOPLIMIT
	RTAX_INITCWND
	RTAX_FEATURES
	RTAX_RTO_MIN
	RTAX_INITRWND
	RTAX_QUICKACK
	RTAX_CC_ALGO
	N_RTAX
)
View Source
const (
	RTAX_FEATURE_ECN uint32 = 1 << iota
	RTAX_FEATURE_SACK
	RTAX_FEATURE_TIMESTAMP
	RTAX_FEATURE_ALLFRAG
)
View Source
const (
	RTN_UNSPEC uint8 = iota
	RTN_UNICAST
	RTN_LOCAL
	RTN_BROADCAST
	RTN_ANYCAST
	RTN_MULTICAST
	RTN_BLACKHOLE
	RTN_UNREACHABLE
	RTN_PROHIBIT
	RTN_THROW
	RTN_NAT
	RTN_XRESOLVE
)
View Source
const (
	RTNH_F_DEAD uint8 = 1 << iota // Nexthop is dead (used by multipath)

	RTNH_F_PERVASIVE  // Do recursive gateway lookup
	RTNH_F_ONLINK     // Gateway is forced on link
	RTNH_F_OFFLOAD    // offloaded route
	RTNH_F_LINKDOWN   // carrier-down on nexthop
	RTNH_F_UNRESOLVED // The entry is unresolved (ipmr)
)
View Source
const (
	RTNLGRP_NONE rtnlgrp = iota
	RTNLGRP_LINK
	RTNLGRP_NOTIFY
	RTNLGRP_NEIGH
	RTNLGRP_TC
	RTNLGRP_IPV4_IFADDR
	RTNLGRP_IPV4_MROUTE
	RTNLGRP_IPV4_ROUTE
	RTNLGRP_IPV4_RULE
	RTNLGRP_IPV6_IFADDR
	RTNLGRP_IPV6_MROUTE
	RTNLGRP_IPV6_ROUTE
	RTNLGRP_IPV6_IFINFO
	RTNLGRP_DECnet_IFADDR
	RTNLGRP_NOP2
	RTNLGRP_DECnet_ROUTE
	RTNLGRP_DECnet_RULE
	RTNLGRP_NOP4
	RTNLGRP_IPV6_PREFIX
	RTNLGRP_IPV6_RULE
	RTNLGRP_ND_USEROPT
	RTNLGRP_PHONET_IFADDR
	RTNLGRP_PHONET_ROUTE
	RTNLGRP_DCB
	RTNLGRP_IPV4_NETCONF
	RTNLGRP_IPV6_NETCONF
	RTNLGRP_MDB
	RTNLGRP_MPLS_ROUTE
	RTNLGRP_NSID
	RTNLGRP_MPLS_NETCONF
	N_RTNLGRP
)
View Source
const (
	RTPROT_UNSPEC   uint8 = syscall.RTPROT_UNSPEC
	RTPROT_REDIRECT uint8 = syscall.RTPROT_REDIRECT
	RTPROT_KERNEL   uint8 = syscall.RTPROT_KERNEL
	RTPROT_BOOT     uint8 = syscall.RTPROT_BOOT
	RTPROT_STATIC   uint8 = syscall.RTPROT_STATIC
	RTPROT_GATED    uint8 = syscall.RTPROT_GATED
	RTPROT_RA       uint8 = syscall.RTPROT_RA
	RTPROT_MRT      uint8 = syscall.RTPROT_MRT
	RTPROT_ZEBRA    uint8 = syscall.RTPROT_ZEBRA
	RTPROT_BIRD     uint8 = syscall.RTPROT_BIRD
	RTPROT_DNROUTED uint8 = syscall.RTPROT_DNROUTED
	RTPROT_XORP     uint8 = syscall.RTPROT_XORP
	RTPROT_NTK      uint8 = syscall.RTPROT_NTK
	RTPROT_DHCP     uint8 = syscall.RTPROT_DHCP
	RTPROT_MROUTED  uint8 = 17
	RTPROT_BABEL    uint8 = 42
)
View Source
const (
	RT_SCOPE_UNIVERSE uint8 = syscall.RT_SCOPE_UNIVERSE
	RT_SCOPE_SITE     uint8 = syscall.RT_SCOPE_SITE
	RT_SCOPE_LINK     uint8 = syscall.RT_SCOPE_LINK
	RT_SCOPE_HOST     uint8 = syscall.RT_SCOPE_HOST
	RT_SCOPE_NOWHERE  uint8 = syscall.RT_SCOPE_NOWHERE
)
View Source
const (
	RT_TABLE_UNSPEC  uint32 = syscall.RT_TABLE_UNSPEC
	RT_TABLE_COMPAT  uint32 = syscall.RT_TABLE_COMPAT
	RT_TABLE_DEFAULT uint32 = syscall.RT_TABLE_DEFAULT
	RT_TABLE_MAIN    uint32 = syscall.RT_TABLE_MAIN
	RT_TABLE_LOCAL   uint32 = syscall.RT_TABLE_LOCAL
	RT_TABLE_MAX     uint32 = syscall.RT_TABLE_MAX
)
View Source
const (
	SEG6_IPTUNNEL_UNSPEC uint16 = iota
	SEG6_IPTUNNEL_SRH
	N_SEG6_IPTUNNEL
)
View Source
const (
	SR6_FLAG1_PROTECTED uint8 = 1 << 6
	SR6_FLAG1_OAM       uint8 = 1 << 5
	SR6_FLAG1_ALERT     uint8 = 1 << 4
	SR6_FLAG1_HMAC      uint8 = 1 << 3
)
View Source
const (
	SR6_TLV_INGRESS uint8 = 1 + iota
	SR6_TLV_EGRESS
	SR6_TLV_OPAQUE
	SR6_TLV_PADDING
	SR6_TLV_HMAC
)
View Source
const (
	SEG6_IPTUN_MODE_INLINE int = iota
	SEG6_IPTUN_MODE_ENCAP
)
View Source
const (
	SEG6_HMAC_ALGO_SHA1   = 1
	SEG6_HMAC_ALGO_SHA256 = 2
)
View Source
const (
	IFLA_VF_INFO_UNSPEC uint16 = iota
	IFLA_VF_INFO
	N_IFLA_VF_INFO
)
View Source
const (
	IFLA_VF_UNSPEC uint16 = iota
	IFLA_VF_MAC
	IFLA_VF_VLAN
	IFLA_VF_TX_RATE
	IFLA_VF_SPOOFCHK
	IFLA_VF_LINK_STATE
	IFLA_VF_RATE
	IFLA_VF_RSS_QUERY_EN
	IFLA_VF_STATS
	IFLA_VF_TRUST
	IFLA_VF_IB_NODE_GUID
	IFLA_VF_IB_PORT_GUID
	IFLA_VF_VLAN_LIST
	N_IFLA_VF
)
View Source
const (
	IFLA_VF_VLAN_INFO_UNSPEC = iota
	IFLA_VF_VLAN_INFO
	N_IFLA_VF_VLAN
)
View Source
const (
	IFLA_VF_LINK_STATE_AUTO uint32 = iota
	IFLA_VF_LINK_STATE_ENABLE
	IFLA_VF_LINK_STATE_DISABLE
	N_IFLA_VF_LINK_STATE
)
View Source
const (
	IFLA_VF_STATS_RX_PACKETS = iota
	IFLA_VF_STATS_TX_PACKETS
	IFLA_VF_STATS_RX_BYTES
	IFLA_VF_STATS_TX_BYTES
	IFLA_VF_STATS_BROADCAST
	IFLA_VF_STATS_MULTICAST
	IFLA_VF_STATS_PAD
	N_IFLA_VF_STATS
)
View Source
const FIB_RULE_DEV_DETACHED = FIB_RULE_IIF_DETACHED
View Source
const FIB_RULE_FIND_SADDR uint32 = 0x00010000
View Source
const FRA_IFNAME = FRA_IIFNAME
View Source
const FRA_MAX = N_FRA - 1
View Source
const FR_ACT_MAX = N_FR_ACT - 1
View Source
const IFAL_MAX = N_IFAL - 1
View Source
const IFA_F_TEMPORARY = IFA_F_SECONDARY
View Source
const IFA_MAX = N_IFA - 1
View Source
const IFLA_BRPORT_MAX = N_IFLA_BRPORT - 1
View Source
const IFLA_BR_MAX = N_IFLA_BR - 1
View Source
const IFLA_GENEVE_MAX = N_IFLA_GENEVE - 1
View Source
const IFLA_GRE_MAX = N_IFLA_GRE - 1
View Source
const IFLA_HSR_MAX = N_IFLA_HSR - 1
View Source
const IFLA_INET6_MAX = N_IFLA_INET6 - 1
View Source
const IFLA_INFO_MAX = N_IFLA_INFO - 1
View Source
const IFLA_IPOIB_MAX = N_IFLA_IPOIB - 1
View Source
const IFLA_IPTUN_MAX = N_IFLA_IPTUN - 1
View Source
const IFLA_MACSEC_MAX = N_IFLA_MACSEC - 1
View Source
const IFLA_MACVLAN_MAX = N_IFLA_MACVLAN - 1
View Source
const IFLA_MAX = N_IFLA - 1
View Source
const IFLA_VF_INFO_MAX = N_IFLA_VF_INFO - 1
View Source
const IFLA_VF_LINK_STATE_MAX = N_IFLA_VF_LINK_STATE - 1
View Source
const IFLA_VF_MAX = N_IFLA_VF - 1
View Source
const IFLA_VF_STATS_MAX = N_IFLA_VF_STATS - 1
View Source
const IFLA_VF_VLAN_INFO_MAX = N_IFLA_VF_VLAN - 1
View Source
const IFLA_VLAN_MAX = N_IFLA_VLAN - 1
View Source
const IFLA_VLAN_QOS_MAX = N_IFLA_VLAN_QOS - 1
View Source
const IFLA_VRF_MAX = N_IFLA_VRF_MAX - 1
View Source
const IFLA_VRF_PORT_MAX = N_IFLA_VRF_PORT_MAX - 1
View Source
const IFLA_VXLAN_MAX = N_IFLA_VXLAN - 1
View Source
const ILA_ATTR_MAX = N_ILA_ATTR - 1
View Source
const ILA_CMD_MAX = N_ILA_CMD - 1
View Source
const ILA_GENL_NAME = "ila"
View Source
const ILA_GENL_VERSION uint8 = 0x1
View Source
const LWTUNNEL_ENCAP_MAX = N_LWTUNNEL_ENCAP - 1
View Source
const LWTUNNEL_IP6_MAX = N_LWTUNNEL_IP6 - 1
View Source
const LWTUNNEL_IP_MAX = N_LWTUNNEL_IP - 1
View Source
const LWT_BPF_MAX = N_LWT_BPF - 1
View Source
const LWT_BPF_MAX_HEADROOM = 256
View Source
const LWT_BPF_PROG_MAX = N_LWT_BPF_PROG - 1
View Source
const MACSEC_DEFAULT_CIPHER_ALT uint64 = 0x0080C20001000001
View Source
const MACSEC_DEFAULT_CIPHER_ID uint64 = 0x0080020001000001
View Source
const MACSEC_VALIDATE_MAX = N_MACSEC_VALIDATE - 1
View Source
const MACVLAN_FLAG_NOPROMISC uint16 = 1
View Source
const MPLS_IPTUNNEL_MAX = N_MPLS_IPTUNNEL - 1
View Source
const NDA_MAX = N_NDA - 1
View Source
const NETCONFA_MAX = N_NETCONFA - 1
View Source
const NETNSA_MAX = N_NETNSA - 1
View Source
const NETNSA_UNASSIGNED_NSID int = -1
View Source
const NUD_ALL = N_NUD - 1
View Source
const NUD_NONE uint16 = 0
View Source
const PREFIX_MAX = N_PREFIX - 1
View Source
const RTA = nl.NLATTR
View Source
const RTAX_MAX = N_RTAX - 1
View Source
const RTA_MAX = N_RTA - 1
View Source
const RTNH_COMPARE_MASK = RTNH_F_DEAD | RTNH_F_LINKDOWN | RTNH_F_OFFLOAD
View Source
const RTNLGRP_MAX = N_RTNLGRP - 1
View Source
const SEG6_HMAC_FIELD_LEN = 32
View Source
const SEG6_HMAC_SECRET_LEN = 64
View Source
const SEG6_IPTUNNEL_MAX = N_SEG6_IPTUNNEL - 1
View Source
const SEG6_IPTUN_MODE_UNSPEC int = -1
View Source
const SizeofFibRuleMsg = 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 4
View Source
const SizeofFibRuleUidRange = 4 + 4
View Source
const SizeofIfAddrLblMsg = (4 * sizeof.Byte) + (4 * sizeof.Long)
View Source
const SizeofIfAddrMsg = syscall.SizeofIfAddrmsg
View Source
const SizeofIfInfoMsg = syscall.SizeofIfInfomsg
View Source
const SizeofIfStats = N_link_stat * 4
View Source
const SizeofIfStats64 = N_link_stat * 8
View Source
const SizeofIfaCacheInfo = 4 * sizeof.Long
View Source
const SizeofIflaVfFlag = 4 + 4
View Source
const SizeofIflaVfGuid = 4 + 8
View Source
const SizeofIflaVfLinkState = 4 + 4
View Source
const SizeofIflaVfMac = 4 + 32
View Source
const SizeofIflaVfRate = 4 + 4 + 4
View Source
const SizeofIflaVfTxRate = 4 + 4
View Source
const SizeofIflaVfVlan = 4 + 4 + 4
View Source
const SizeofIflaVlanFlags = 4 + 4
View Source
const SizeofIflaVlanQosMapping = 4 + 4
View Source
const SizeofIflaVxlanPortRange = 2 + 2
View Source
const SizeofNdMsg = (2 * sizeof.Byte) + sizeof.Short + sizeof.Long +
	sizeof.Short + (2 * sizeof.Byte)
View Source
const SizeofNdaCacheInfo = 4 * sizeof.Long
View Source
const SizeofNetconfMsg = 1
View Source
const SizeofNetnsMsg = 1 + 3
View Source
const SizeofPrefixCacheInfo = 2 * sizeof.Long
View Source
const SizeofPrefixMsg = (4 * sizeof.Byte) + sizeof.Int + (4 * sizeof.Byte)
View Source
const SizeofRtGenMsg = syscall.SizeofRtGenmsg
View Source
const SizeofRtMsg = syscall.SizeofRtMsg
View Source
const SizeofRtnh = sizeof.Short + sizeof.Byte + sizeof.Byte + sizeof.Int
View Source
const SizeofSeg6IpTunnelEncap = sizeof.Int + nl.SizeofHdr
View Source
const SizeofSrHdr = (6 + sizeof.Byte) + sizeof.Short
View Source
const VarRunNetns = "/var/run/netns"

Variables

View Source
var AfBits = map[uint8]uint8{
	AF_INET:  32,
	AF_INET6: 128,
	AF_MPLS:  20,
}
View Source
var AfByName = map[string]uint8{
	"unspec":     AF_UNSPEC,
	"unix":       AF_UNIX,
	"inet":       AF_INET,
	"ax25":       AF_AX25,
	"ipx":        AF_IPX,
	"appletalk":  AF_APPLETALK,
	"netrom":     AF_NETROM,
	"bridge":     AF_BRIDGE,
	"atmpvc":     AF_ATMPVC,
	"x25":        AF_X25,
	"inet6":      AF_INET6,
	"rose":       AF_ROSE,
	"decnet":     AF_DECnet,
	"netbeui":    AF_NETBEUI,
	"security":   AF_SECURITY,
	"key":        AF_KEY,
	"netlink":    AF_NETLINK,
	"packet":     AF_PACKET,
	"ash":        AF_ASH,
	"econet":     AF_ECONET,
	"atmsvc":     AF_ATMSVC,
	"rds":        AF_RDS,
	"sna":        AF_SNA,
	"irda":       AF_IRDA,
	"pppox":      AF_PPPOX,
	"wanpipe":    AF_WANPIPE,
	"llc":        AF_LLC,
	"ib":         AF_IB,
	"mpls":       AF_MPLS,
	"can":        AF_CAN,
	"tipc":       AF_TIPC,
	"bluetooth":  AF_BLUETOOTH,
	"iucv":       AF_IUCV,
	"rxrpc":      AF_RXRPC,
	"isdn":       AF_ISDN,
	"phonet":     AF_PHONET,
	"ieee802154": AF_IEEE802154,
	"caif":       AF_CAIF,
	"alg":        AF_ALG,
	"nfc":        AF_NFC,
	"vsock":      AF_VSOCK,
}
View Source
var ArphrdByName = map[string]uint16{
	"netrom":             syscall.ARPHRD_NETROM,
	"ether":              syscall.ARPHRD_ETHER,
	"eether":             syscall.ARPHRD_EETHER,
	"ax25":               syscall.ARPHRD_AX25,
	"pronet":             syscall.ARPHRD_PRONET,
	"chaos":              syscall.ARPHRD_CHAOS,
	"ieee802":            syscall.ARPHRD_IEEE802,
	"arcnet":             syscall.ARPHRD_ARCNET,
	"appletlk":           syscall.ARPHRD_APPLETLK,
	"dlci":               syscall.ARPHRD_DLCI,
	"atm":                syscall.ARPHRD_ATM,
	"metricom":           syscall.ARPHRD_METRICOM,
	"ieee1394":           syscall.ARPHRD_IEEE1394,
	"eui64":              syscall.ARPHRD_EUI64,
	"infiniband":         syscall.ARPHRD_INFINIBAND,
	"slip":               syscall.ARPHRD_SLIP,
	"cslip":              syscall.ARPHRD_CSLIP,
	"slip6":              syscall.ARPHRD_SLIP6,
	"cslip6":             syscall.ARPHRD_CSLIP6,
	"rsrvd":              syscall.ARPHRD_RSRVD,
	"adapt":              syscall.ARPHRD_ADAPT,
	"rose":               syscall.ARPHRD_ROSE,
	"x25":                syscall.ARPHRD_X25,
	"hwx25":              syscall.ARPHRD_HWX25,
	"ppp":                syscall.ARPHRD_PPP,
	"hdlc":               syscall.ARPHRD_HDLC,
	"lapb":               syscall.ARPHRD_LAPB,
	"ddcmp":              syscall.ARPHRD_DDCMP,
	"rawhdlc":            syscall.ARPHRD_RAWHDLC,
	"tunnel":             syscall.ARPHRD_TUNNEL,
	"tunnel6":            syscall.ARPHRD_TUNNEL6,
	"frad":               syscall.ARPHRD_FRAD,
	"skip":               syscall.ARPHRD_SKIP,
	"loopback":           syscall.ARPHRD_LOOPBACK,
	"localtlk":           syscall.ARPHRD_LOCALTLK,
	"fddi":               syscall.ARPHRD_FDDI,
	"bif":                syscall.ARPHRD_BIF,
	"sit":                syscall.ARPHRD_SIT,
	"ipddp":              syscall.ARPHRD_IPDDP,
	"ipgre":              syscall.ARPHRD_IPGRE,
	"pimreg":             syscall.ARPHRD_PIMREG,
	"hippi":              syscall.ARPHRD_HIPPI,
	"ash":                syscall.ARPHRD_ASH,
	"econet":             syscall.ARPHRD_ECONET,
	"irda":               syscall.ARPHRD_IRDA,
	"fcpp":               syscall.ARPHRD_FCPP,
	"fcal":               syscall.ARPHRD_FCAL,
	"fcpl":               syscall.ARPHRD_FCPL,
	"fcfabric":           syscall.ARPHRD_FCFABRIC,
	"ieee802-tr":         syscall.ARPHRD_IEEE802_TR,
	"ieee80211":          syscall.ARPHRD_IEEE80211,
	"ieee80211-prism":    syscall.ARPHRD_IEEE80211_PRISM,
	"ieee80211-radiotap": syscall.ARPHRD_IEEE80211_RADIOTAP,
	"ieee802154":         syscall.ARPHRD_IEEE802154,
	"ieee802154-phy":     syscall.ARPHRD_IEEE802154_PHY,
}
View Source
var ArphrdName = map[uint16]string{
	syscall.ARPHRD_NETROM:             "netrom",
	syscall.ARPHRD_ETHER:              "ether",
	syscall.ARPHRD_EETHER:             "eether",
	syscall.ARPHRD_AX25:               "ax25",
	syscall.ARPHRD_PRONET:             "pronet",
	syscall.ARPHRD_CHAOS:              "chaos",
	syscall.ARPHRD_IEEE802:            "ieee802",
	syscall.ARPHRD_ARCNET:             "arcnet",
	syscall.ARPHRD_APPLETLK:           "appletlk",
	syscall.ARPHRD_DLCI:               "dlci",
	syscall.ARPHRD_ATM:                "atm",
	syscall.ARPHRD_METRICOM:           "metricom",
	syscall.ARPHRD_IEEE1394:           "ieee1394",
	syscall.ARPHRD_EUI64:              "eui64",
	syscall.ARPHRD_INFINIBAND:         "infiniband",
	syscall.ARPHRD_SLIP:               "slip",
	syscall.ARPHRD_CSLIP:              "cslip",
	syscall.ARPHRD_SLIP6:              "slip6",
	syscall.ARPHRD_CSLIP6:             "cslip6",
	syscall.ARPHRD_RSRVD:              "rsrvd",
	syscall.ARPHRD_ADAPT:              "adapt",
	syscall.ARPHRD_ROSE:               "rose",
	syscall.ARPHRD_X25:                "x25",
	syscall.ARPHRD_HWX25:              "hwx25",
	syscall.ARPHRD_PPP:                "ppp",
	syscall.ARPHRD_HDLC:               "hdlc",
	syscall.ARPHRD_LAPB:               "lapb",
	syscall.ARPHRD_DDCMP:              "ddcmp",
	syscall.ARPHRD_RAWHDLC:            "rawhdlc",
	syscall.ARPHRD_TUNNEL:             "tunnel",
	syscall.ARPHRD_TUNNEL6:            "tunnel6",
	syscall.ARPHRD_FRAD:               "frad",
	syscall.ARPHRD_SKIP:               "skip",
	syscall.ARPHRD_LOOPBACK:           "loopback",
	syscall.ARPHRD_LOCALTLK:           "localtlk",
	syscall.ARPHRD_FDDI:               "fddi",
	syscall.ARPHRD_BIF:                "bif",
	syscall.ARPHRD_SIT:                "sit",
	syscall.ARPHRD_IPDDP:              "ipddp",
	syscall.ARPHRD_IPGRE:              "ipgre",
	syscall.ARPHRD_PIMREG:             "pimreg",
	syscall.ARPHRD_HIPPI:              "hippi",
	syscall.ARPHRD_ASH:                "ash",
	syscall.ARPHRD_ECONET:             "econet",
	syscall.ARPHRD_IRDA:               "irda",
	syscall.ARPHRD_FCPP:               "fcpp",
	syscall.ARPHRD_FCAL:               "fcal",
	syscall.ARPHRD_FCPL:               "fcpl",
	syscall.ARPHRD_FCFABRIC:           "fcfabric",
	syscall.ARPHRD_IEEE802_TR:         "ieee802-tr",
	syscall.ARPHRD_IEEE80211:          "ieee80211",
	syscall.ARPHRD_IEEE80211_PRISM:    "ieee80211-prism",
	syscall.ARPHRD_IEEE80211_RADIOTAP: "ieee80211-radiotap",
	syscall.ARPHRD_IEEE802154:         "ieee802154",
	syscall.ARPHRD_IEEE802154_PHY:     "ieee802154-phy",
}
View Source
var If struct {
	NameByIndex  map[int32]string
	IndexByName  map[string]int32
	IndicesByGid map[uint32][]int32
	Master       map[int32]int32
}
View Source
var IfLinkModeByName = map[string]uint8{
	"default": IF_LINK_MODE_DEFAULT,
	"dormant": IF_LINK_MODE_DORMANT,
}
View Source
var IfLinkModeName = map[uint8]string{
	IF_LINK_MODE_DEFAULT: "default",
	IF_LINK_MODE_DORMANT: "dormant",
}
View Source
var IfOperByName = map[string]uint8{
	"unknown":     IF_OPER_UNKNOWN,
	"not-present": IF_OPER_NOTPRESENT,
	"down":        IF_OPER_DOWN,
	"lower-down":  IF_OPER_LOWERLAYERDOWN,
	"testing":     IF_OPER_TESTING,
	"dormant":     IF_OPER_DORMANT,
	"up":          IF_OPER_UP,
}
View Source
var IfOperName = map[uint8]string{
	IF_OPER_UNKNOWN:        "unknown",
	IF_OPER_NOTPRESENT:     "not-present",
	IF_OPER_DOWN:           "down",
	IF_OPER_LOWERLAYERDOWN: "lower-down",
	IF_OPER_TESTING:        "testing",
	IF_OPER_DORMANT:        "dormant",
	IF_OPER_UP:             "up",
}
View Source
var IfStatNames = []string{
	"rx-packets",
	"tx-packets",
	"rx-bytes",
	"tx-bytes",
	"rx-errors",
	"tx-errors",
	"rx-dropped",
	"tx-dropped",
	"multicast",
	"collisions",
	"rx-length-errors",
	"rx-over-errors",
	"rx-crc-errors",
	"rx-frame-errors",
	"rx-fifo-errors",
	"rx-missed-errors",
	"tx-aborted-errors",
	"tx-carrier-errors",
	"tx-fifo-errors",
	"tx-heartbeat-errors",
	"tx-window-errors",
	"rx-compressed",
	"tx-compressed",
}
View Source
var IflaVfLinkStateByName = map[string]uint32{
	"auto":    IFLA_VF_LINK_STATE_AUTO,
	"enable":  IFLA_VF_LINK_STATE_ENABLE,
	"disable": IFLA_VF_LINK_STATE_DISABLE,
}
View Source
var IflaVfLinkStateName = map[uint32]string{
	IFLA_VF_LINK_STATE_AUTO:    "auto",
	IFLA_VF_LINK_STATE_ENABLE:  "enable",
	IFLA_VF_LINK_STATE_DISABLE: "disable",
}
View Source
var IlaCsumModeByName = map[string]uint8{
	"adj-transport":    ILA_CSUM_ADJUST_TRANSPORT,
	"adjust-transport": ILA_CSUM_ADJUST_TRANSPORT,
	"neutral-map":      ILA_CSUM_NEUTRAL_MAP,
	"no-action":        ILA_CSUM_NO_ACTION,
}
View Source
var In6AddrGenModeByName = map[string]uint8{
	"eui64":  IN6_ADDR_GEN_MODE_EUI64,
	"none":   IN6_ADDR_GEN_MODE_NONE,
	"stable": IN6_ADDR_GEN_MODE_STABLE_PRIVACY,
	"random": IN6_ADDR_GEN_MODE_RANDOM,
}
View Source
var MplsReservedLabelByName = map[string]uint32{
	"ipv4null":  MPLS_LABEL_IPV4NULL,
	"rtalert":   MPLS_LABEL_RTALERT,
	"ipv6null":  MPLS_LABEL_IPV6NULL,
	"implnull":  MPLS_LABEL_IMPLNULL,
	"entropy":   MPLS_LABEL_ENTROPY,
	"gal":       MPLS_LABEL_GAL,
	"oamalert":  MPLS_LABEL_OAMALERT,
	"extension": MPLS_LABEL_EXTENSION,

	"first-unreserved": MPLS_LABEL_FIRST_UNRESERVED,
}
View Source
var NtfName = map[uint8]string{
	NTF_USE:         "use",
	NTF_SELF:        "self",
	NTF_MASTER:      "master",
	NTF_PROXY:       "proxy",
	NTF_EXT_LEARNED: "learned",
	NTF_ROUTER:      "router",
}
View Source
var NudByName = map[string]uint16{
	"incomplete": NUD_INCOMPLETE,
	"reachable":  NUD_REACHABLE,
	"stale":      NUD_STALE,
	"delay":      NUD_DELAY,
	"probe":      NUD_PROBE,
	"failed":     NUD_FAILED,
	"noarp":      NUD_NOARP,
	"permanent":  NUD_PERMANENT,
}
View Source
var RtProtByName = map[string]uint8{
	"unspec":   RTPROT_UNSPEC,
	"redirect": RTPROT_REDIRECT,
	"kernel":   RTPROT_KERNEL,
	"boot":     RTPROT_BOOT,
	"static":   RTPROT_STATIC,
	"gated":    RTPROT_GATED,
	"ra":       RTPROT_RA,
	"mrt":      RTPROT_MRT,
	"zebra":    RTPROT_ZEBRA,
	"bird":     RTPROT_BIRD,
	"dnrouted": RTPROT_DNROUTED,
	"xorp":     RTPROT_XORP,
	"ntk":      RTPROT_NTK,
	"dhcp":     RTPROT_DHCP,
	"mrouted":  RTPROT_MROUTED,
	"babel":    RTPROT_BABEL,
}
View Source
var RtProtName = map[uint8]string{
	RTPROT_UNSPEC:   "unspec",
	RTPROT_REDIRECT: "redirect",
	RTPROT_KERNEL:   "kernel",
	RTPROT_BOOT:     "boot",
	RTPROT_STATIC:   "static",
	RTPROT_GATED:    "gated",
	RTPROT_RA:       "ra",
	RTPROT_MRT:      "mrt",
	RTPROT_ZEBRA:    "zebra",
	RTPROT_BIRD:     "bird",
	RTPROT_DNROUTED: "dnrouted",
	RTPROT_XORP:     "xorp",
	RTPROT_NTK:      "ntk",
	RTPROT_DHCP:     "dhcp",
	RTPROT_MROUTED:  "mrouted",
	RTPROT_BABEL:    "babel",
}
View Source
var RtScopeByName = map[string]uint8{
	"global":   RT_SCOPE_UNIVERSE,
	"universe": RT_SCOPE_UNIVERSE,
	"site":     RT_SCOPE_SITE,
	"link":     RT_SCOPE_LINK,
	"host":     RT_SCOPE_HOST,
	"nowhere":  RT_SCOPE_NOWHERE,
}
View Source
var RtScopeName = map[uint8]string{
	RT_SCOPE_UNIVERSE: "global",
	RT_SCOPE_SITE:     "site",
	RT_SCOPE_LINK:     "link",
	RT_SCOPE_HOST:     "host",
	RT_SCOPE_NOWHERE:  "nowhere",
}
View Source
var RtTableByName = map[string]uint32{
	"unspec":  RT_TABLE_UNSPEC,
	"compat":  RT_TABLE_COMPAT,
	"default": RT_TABLE_DEFAULT,
	"main":    RT_TABLE_MAIN,
	"local":   RT_TABLE_LOCAL,
	"max":     RT_TABLE_MAX,
}
View Source
var RtnByName = map[string]uint8{
	"unspec":      RTN_UNSPEC,
	"unicast":     RTN_UNICAST,
	"local":       RTN_LOCAL,
	"broadcast":   RTN_BROADCAST,
	"brd":         RTN_BROADCAST,
	"anycast":     RTN_ANYCAST,
	"multicast":   RTN_MULTICAST,
	"blackhole":   RTN_BLACKHOLE,
	"unreachable": RTN_UNREACHABLE,
	"prohibit":    RTN_PROHIBIT,
	"throw":       RTN_THROW,
	"nat":         RTN_NAT,
	"xresolve":    RTN_XRESOLVE,
}

Functions

func AfName

func AfName(af uint8) string

func CompleteArphrd

func CompleteArphrd(s string) (list []string)

func CompleteIn6AddrGenMode

func CompleteIn6AddrGenMode(s string) (list []string)

func CompleteNud

func CompleteNud(s string) (list []string)

func CompleteRtProt

func CompleteRtProt(s string) (list []string)

func CompleteRtScope

func CompleteRtScope(s string) (list []string)

func CompleteRtn

func CompleteRtn(s string) (list []string)

func CompleteType

func CompleteType(s string) (list []string)

func ForEachVfInfo

func ForEachVfInfo(b []byte, do func([]byte))

func MakeIfMaps

func MakeIfMaps(sr *nl.SockReceiver) error

func Nsid

func Nsid(sr *nl.SockReceiver, name string) (int32, error)

Send a RTM_GETNSID request to netlink and return the response attribute.

func RtTableName

func RtTableName(t uint32) string

Types

type Addresser

type Addresser interface {
	Bytes() []byte
	ByteLen() int
	Family() uint8
	io.Reader
	IsLoopback() bool
}

func Address

func Address(s string, family uint8) (Addresser, error)

Parse a string as address of the given family, or, if family is AF_UNSPEC, derive family from syntax.

type Be16

type Be16 [2]byte

func (*Be16) Load

func (be *Be16) Load() uint16

func (*Be16) Store

func (be *Be16) Store(v uint16)

type Be32

type Be32 [4]byte

func (*Be32) Load

func (be *Be32) Load() uint32

func (*Be32) Store

func (be *Be32) Store(v uint32)

type Be64

type Be64 [8]byte

func (*Be64) Load

func (be *Be64) Load() uint64

func (*Be64) Store

func (be *Be64) Store(v uint64)

type FibRuleMsg

type FibRuleMsg struct {
	Family  uint8
	Dst_len uint8
	Src_len uint8
	Tos     uint8
	Table   uint8

	Action uint8
	Flags  uint32
	// contains filtered or unexported fields
}

func FibRuleMsgPtr

func FibRuleMsgPtr(b []byte) *FibRuleMsg

func (FibRuleMsg) Read

func (msg FibRuleMsg) Read(b []byte) (int, error)

type FibRuleUidRange

type FibRuleUidRange struct {
	Start uint32
	End   uint32
}

func FibRuleUidRangePtr

func FibRuleUidRangePtr(b []byte) *FibRuleUidRange

type Fra

type Fra [N_FRA][]byte

func (*Fra) Write

func (fra *Fra) Write(b []byte) (int, error)

type IfAddrLblMsg

type IfAddrLblMsg struct {
	Family uint8

	PrefixLen uint8

	IfIndex uint32
	Seq     uint32
	// contains filtered or unexported fields
}

func IfAddrLblMsgPtr

func IfAddrLblMsgPtr(b []byte) *IfAddrLblMsg

func (IfAddrLblMsg) Read

func (msg IfAddrLblMsg) Read(b []byte) (int, error)

type IfAddrMsg

type IfAddrMsg syscall.IfAddrmsg

func IfAddrMsgPtr

func IfAddrMsgPtr(b []byte) *IfAddrMsg

func (IfAddrMsg) Read

func (msg IfAddrMsg) Read(b []byte) (int, error)

type IfInfoMsg

type IfInfoMsg syscall.IfInfomsg

func IfInfoMsgPtr

func IfInfoMsgPtr(b []byte) *IfInfoMsg

func (IfInfoMsg) Read

func (msg IfInfoMsg) Read(b []byte) (int, error)

type IfStats

type IfStats [N_link_stat]uint32

func IfStatsAttr

func IfStatsAttr(b []byte) *IfStats

type IfStats64

type IfStats64 [N_link_stat]uint64

func IfStats64Attr

func IfStats64Attr(b []byte) *IfStats64

type Ifa

type Ifa [N_IFA][]byte

func (*Ifa) Write

func (ifa *Ifa) Write(b []byte) (int, error)

type IfaCacheInfo

type IfaCacheInfo struct {
	Prefered uint32
	Valid    uint32
	// timestamps are hundredths of seconds
	CreatedTimestamp uint32
	UpdatedTimestamp uint32
}

func IfaCacheInfoPtr

func IfaCacheInfoPtr(b []byte) *IfaCacheInfo

type Ifal

type Ifal [N_IFAL][]byte

func (*Ifal) Write

func (ifal *Ifal) Write(b []byte) (int, error)

type Ifla

type Ifla [N_IFLA][]byte

func (*Ifla) Write

func (ifla *Ifla) Write(b []byte) (int, error)

type IflaBridgeId

type IflaBridgeId struct {
	Prio [2]uint8
	Addr [6]uint8
}

type IflaVf

type IflaVf [N_IFLA_VF][]byte

type IflaVfFlag

type IflaVfFlag struct {
	Vf      uint32
	Setting uint32
}

func IflaVfFlagPtr

func IflaVfFlagPtr(b []byte) *IflaVfFlag

func (IflaVfFlag) Read

func (v IflaVfFlag) Read(b []byte) (int, error)

type IflaVfGuid

type IflaVfGuid struct {
	Vf   uint32
	Guid uint64
}

func IflaVfIbGuidPtr

func IflaVfIbGuidPtr(b []byte) *IflaVfGuid

func (IflaVfGuid) Read

func (v IflaVfGuid) Read(b []byte) (int, error)

type IflaVfLinkState

type IflaVfLinkState struct {
	Vf        uint32
	LinkState uint32
}

func IflaVfLinkStatePtr

func IflaVfLinkStatePtr(b []byte) *IflaVfLinkState

func (IflaVfLinkState) Read

func (v IflaVfLinkState) Read(b []byte) (int, error)

type IflaVfMac

type IflaVfMac struct {
	Vf  uint32
	Mac [32]byte
}

func IflaVfMacPtr

func IflaVfMacPtr(b []byte) *IflaVfMac

func (*IflaVfMac) Read

func (v *IflaVfMac) Read(b []byte) (int, error)

type IflaVfRate

type IflaVfRate struct {
	Vf        uint32
	MinTxRate uint32
	MaxTxRate uint32
}

func IflaVfRatePtr

func IflaVfRatePtr(b []byte) *IflaVfRate

func (IflaVfRate) Read

func (v IflaVfRate) Read(b []byte) (int, error)

type IflaVfStats

type IflaVfStats [N_IFLA_VF_STATS][]byte

type IflaVfTxRate

type IflaVfTxRate struct {
	Vf   uint32
	Rate uint32
}

func IflaVfTxRatePtr

func IflaVfTxRatePtr(b []byte) *IflaVfTxRate

func (IflaVfTxRate) Read

func (v IflaVfTxRate) Read(b []byte) (int, error)

type IflaVfVlan

type IflaVfVlan struct {
	Vf   uint32
	Vlan uint32 // 0 - 4095, 0 disables VLAN filter
	Qos  uint32
}

func IflaVfVlanPtr

func IflaVfVlanPtr(b []byte) *IflaVfVlan

func (IflaVfVlan) Read

func (v IflaVfVlan) Read(b []byte) (int, error)

type IflaVlanFlags

type IflaVlanFlags struct {
	Flags uint32
	Mask  uint32
}

func IflaVlanFlagsPtr

func IflaVlanFlagsPtr(b []byte) *IflaVlanFlags

func (IflaVlanFlags) Read

func (v IflaVlanFlags) Read(b []byte) (int, error)

type IflaVlanQosMapping

type IflaVlanQosMapping struct {
	From uint32
	To   uint32
}

func IflaVlanQosMappingPtr

func IflaVlanQosMappingPtr(b []byte) *IflaVlanQosMapping

func (IflaVlanQosMapping) Read

func (v IflaVlanQosMapping) Read(b []byte) (int, error)

type IflaVxlanPortRange

type IflaVxlanPortRange struct {
	Low, High uint16 // big-endian
}

func (IflaVxlanPortRange) Read

func (v IflaVxlanPortRange) Read(b []byte) (int, error)

type NdMsg

type NdMsg struct {
	Family uint8

	Index int32
	State uint16
	Flags uint8
	Type  uint8
	// contains filtered or unexported fields
}

func NdMsgPtr

func NdMsgPtr(b []byte) *NdMsg

func (NdMsg) Read

func (msg NdMsg) Read(b []byte) (int, error)

type Nda

type Nda [N_NDA][]byte

func (*Nda) Write

func (nda *Nda) Write(b []byte) (int, error)

type NdaCacheInfo

type NdaCacheInfo struct {
	Confirmed uint32
	Used      uint32
	Updated   uint32
	RefCnt    uint32
}

func NdaCacheInfoPtr

func NdaCacheInfoPtr(b []byte) *NdaCacheInfo

type NetconfMsg

type NetconfMsg struct {
	Family uint8
}

func NetconfMsgPtr

func NetconfMsgPtr(b []byte) *NetconfMsg

func (NetconfMsg) Read

func (msg NetconfMsg) Read(b []byte) (int, error)

type Netconfa

type Netconfa [N_NETCONFA][]byte

func (*Netconfa) Write

func (netconfa *Netconfa) Write(b []byte) (int, error)

type NetnsMsg

type NetnsMsg struct {
	Family uint8
	// contains filtered or unexported fields
}

func NetnsMsgPtr

func NetnsMsgPtr(b []byte) *NetnsMsg

func (NetnsMsg) Read

func (msg NetnsMsg) Read(b []byte) (int, error)

type Netnsa

type Netnsa [N_NETNSA][]byte

func (*Netnsa) Write

func (netnsa *Netnsa) Write(b []byte) (int, error)

type PrefixCacheInfo

type PrefixCacheInfo struct {
	PreferredTime uint32
	ValidTime     uint32
}

func PrefixCacheInfoPtr

func PrefixCacheInfoPtr(b []byte) *PrefixCacheInfo

type PrefixMsg

type PrefixMsg struct {
	Family uint8

	IfIndex int
	Type    uint8
	Len     uint8
	Flags   uint8
	// contains filtered or unexported fields
}

func PrefixMsgPtr

func PrefixMsgPtr(b []byte) *PrefixMsg

func (PrefixMsg) Read

func (msg PrefixMsg) Read(b []byte) (int, error)

type Prefixa

type Prefixa [N_PREFIX][]byte

func (*Prefixa) Write

func (prefixa *Prefixa) Write(b []byte) (int, error)

type Prefixer

type Prefixer interface {
	Addresser
	Len() uint8 // bits
}

func Prefix

func Prefix(s string, family uint8) (Prefixer, error)

Parse a string as prefix of the given family, or, if family is AF_UNSPEC, derive family from syntax.

type RtGenMsg

type RtGenMsg syscall.RtGenmsg

func RtGenMsgPtr

func RtGenMsgPtr(b []byte) *RtGenMsg

Point to RtGenMsg w/in full message (i.e. after Hdr)

func (RtGenMsg) Read

func (msg RtGenMsg) Read(b []byte) (int, error)

type RtMsg

type RtMsg syscall.RtMsg

func RtMsgPtr

func RtMsgPtr(b []byte) *RtMsg

func (RtMsg) Read

func (msg RtMsg) Read(b []byte) (int, error)

type RtVia

type RtVia struct {
	Family  uint16
	Address []byte
}

func (RtVia) Read

func (v RtVia) Read(b []byte) (int, error)

type Rta

type Rta [N_RTA][]byte

func (*Rta) Write

func (rta *Rta) Write(b []byte) (int, error)

type Rtnh

type Rtnh struct {
	Flags   uint8
	Hops    uint8
	Ifindex int
	// contains filtered or unexported fields
}

type RtnhAttrs

type RtnhAttrs struct {
	Rtnh
	nl.Attrs
}

func (RtnhAttrs) Read

func (v RtnhAttrs) Read(b []byte) (int, error)

type RtnhAttrsList

type RtnhAttrsList []RtnhAttrs

func (RtnhAttrsList) Read

func (v RtnhAttrsList) Read(b []byte) (int, error)

type Seg6IpTunnelEncap

type Seg6IpTunnelEncap struct {
	Mode int
	SrHdr
}

type Sr6Tlv

type Sr6Tlv struct {
	Type  uint8
	Len   uint8
	Value []byte
}

type Sr6TlvHmac

type Sr6TlvHmac struct {
	Type uint8
	Len  uint8

	HmacKeyId Be32
	Hmac      [SEG6_HMAC_FIELD_LEN]uint8
	// contains filtered or unexported fields
}

type SrHdr

type SrHdr struct {
	NextHdr      uint8
	HdrLen       uint8
	Type         uint8
	SegmentsLeft uint8
	FirstSegment uint8
	Flags        uint8
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL