Skip to content

Commit

Permalink
unix: move NETLINK_* consts to own section
Browse files Browse the repository at this point in the history
This makes it easier to distinguish them from the IFLA_* and add new
entries. Also refresh the IFLA_* consts while at it.

Change-Id: I94aa56c9f99d0714668d8150cb6185d57e2d789c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/622515
Auto-Submit: Tobias Klauser <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
  • Loading branch information
tklauser authored and gopherbot committed Oct 28, 2024
1 parent d045236 commit 18e038c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 13 deletions.
24 changes: 17 additions & 7 deletions unix/linux/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ const (
)

// generated by:
// perl -nlE '/^\s*((IFLA|NETKIT)\w+)/ && say "$1 = C.$1"' /usr/include/linux/if_link.h
// perl -nlE '/^\s*(IFLA\w+)/ && say "$1 = C.$1"' /usr/include/linux/if_link.h
const (
IFLA_UNSPEC = C.IFLA_UNSPEC
IFLA_ADDRESS = C.IFLA_ADDRESS
Expand Down Expand Up @@ -1814,12 +1814,6 @@ const (
IFLA_IPVLAN_UNSPEC = C.IFLA_IPVLAN_UNSPEC
IFLA_IPVLAN_MODE = C.IFLA_IPVLAN_MODE
IFLA_IPVLAN_FLAGS = C.IFLA_IPVLAN_FLAGS
NETKIT_NEXT = C.NETKIT_NEXT
NETKIT_PASS = C.NETKIT_PASS
NETKIT_DROP = C.NETKIT_DROP
NETKIT_REDIRECT = C.NETKIT_REDIRECT
NETKIT_L2 = C.NETKIT_L2
NETKIT_L3 = C.NETKIT_L3
IFLA_NETKIT_UNSPEC = C.IFLA_NETKIT_UNSPEC
IFLA_NETKIT_PEER_INFO = C.IFLA_NETKIT_PEER_INFO
IFLA_NETKIT_PRIMARY = C.IFLA_NETKIT_PRIMARY
Expand Down Expand Up @@ -1858,6 +1852,7 @@ const (
IFLA_VXLAN_DF = C.IFLA_VXLAN_DF
IFLA_VXLAN_VNIFILTER = C.IFLA_VXLAN_VNIFILTER
IFLA_VXLAN_LOCALBYPASS = C.IFLA_VXLAN_LOCALBYPASS
IFLA_VXLAN_LABEL_POLICY = C.IFLA_VXLAN_LABEL_POLICY
IFLA_GENEVE_UNSPEC = C.IFLA_GENEVE_UNSPEC
IFLA_GENEVE_ID = C.IFLA_GENEVE_ID
IFLA_GENEVE_REMOTE = C.IFLA_GENEVE_REMOTE
Expand Down Expand Up @@ -1887,6 +1882,8 @@ const (
IFLA_GTP_ROLE = C.IFLA_GTP_ROLE
IFLA_GTP_CREATE_SOCKETS = C.IFLA_GTP_CREATE_SOCKETS
IFLA_GTP_RESTART_COUNT = C.IFLA_GTP_RESTART_COUNT
IFLA_GTP_LOCAL = C.IFLA_GTP_LOCAL
IFLA_GTP_LOCAL6 = C.IFLA_GTP_LOCAL6
IFLA_BOND_UNSPEC = C.IFLA_BOND_UNSPEC
IFLA_BOND_MODE = C.IFLA_BOND_MODE
IFLA_BOND_ACTIVE_SLAVE = C.IFLA_BOND_ACTIVE_SLAVE
Expand Down Expand Up @@ -1919,6 +1916,7 @@ const (
IFLA_BOND_AD_LACP_ACTIVE = C.IFLA_BOND_AD_LACP_ACTIVE
IFLA_BOND_MISSED_MAX = C.IFLA_BOND_MISSED_MAX
IFLA_BOND_NS_IP6_TARGET = C.IFLA_BOND_NS_IP6_TARGET
IFLA_BOND_COUPLED_CONTROL = C.IFLA_BOND_COUPLED_CONTROL
IFLA_BOND_AD_INFO_UNSPEC = C.IFLA_BOND_AD_INFO_UNSPEC
IFLA_BOND_AD_INFO_AGGREGATOR = C.IFLA_BOND_AD_INFO_AGGREGATOR
IFLA_BOND_AD_INFO_NUM_PORTS = C.IFLA_BOND_AD_INFO_NUM_PORTS
Expand Down Expand Up @@ -1987,6 +1985,7 @@ const (
IFLA_HSR_SEQ_NR = C.IFLA_HSR_SEQ_NR
IFLA_HSR_VERSION = C.IFLA_HSR_VERSION
IFLA_HSR_PROTOCOL = C.IFLA_HSR_PROTOCOL
IFLA_HSR_INTERLINK = C.IFLA_HSR_INTERLINK
IFLA_STATS_UNSPEC = C.IFLA_STATS_UNSPEC
IFLA_STATS_LINK_64 = C.IFLA_STATS_LINK_64
IFLA_STATS_LINK_XSTATS = C.IFLA_STATS_LINK_XSTATS
Expand Down Expand Up @@ -2039,6 +2038,17 @@ const (
IFLA_DSA_MASTER = C.IFLA_DSA_MASTER
)

// netkit
// perl -nlE '/^\s*(NETKIT\w+)/ && say "$1 = C.$1"' /usr/include/linux/if_link.h
const (
NETKIT_NEXT = C.NETKIT_NEXT
NETKIT_PASS = C.NETKIT_PASS
NETKIT_DROP = C.NETKIT_DROP
NETKIT_REDIRECT = C.NETKIT_REDIRECT
NETKIT_L2 = C.NETKIT_L2
NETKIT_L3 = C.NETKIT_L3
)

// netfilter
// generated using:
// perl -nlE '/^\s*(NF\w+)/ && say "$1 = C.$1"' /usr/include/linux/netfilter.h
Expand Down
20 changes: 14 additions & 6 deletions unix/ztypes_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 18e038c

Please sign in to comment.