mirror of
https://github.com/golang/sys.git
synced 2026-02-08 03:36:03 +03:00
unix: add Linux lwtunnel constants for use with rtnetlink APIs
Change-Id: Ibe39b315321c18916870dcfc97b083a18b91be2b Reviewed-on: https://go-review.googlesource.com/c/sys/+/271077 Run-TryBot: Matt Layher <mdlayher@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Matt Layher <mdlayher@gmail.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
@@ -102,6 +102,7 @@ struct termios2 {
|
||||
#include <linux/if_xdp.h>
|
||||
#include <linux/keyctl.h>
|
||||
#include <linux/loop.h>
|
||||
#include <linux/lwtunnel.h>
|
||||
#include <linux/ncsi.h>
|
||||
#include <linux/net_namespace.h>
|
||||
#include <linux/net_tstamp.h>
|
||||
@@ -2921,3 +2922,18 @@ const (
|
||||
PPS_GETCAP = C.PPS_GETCAP
|
||||
PPS_FETCH = C.PPS_FETCH
|
||||
)
|
||||
|
||||
// lwtunnel APIs
|
||||
|
||||
const (
|
||||
LWTUNNEL_ENCAP_NONE = C.LWTUNNEL_ENCAP_NONE
|
||||
LWTUNNEL_ENCAP_MPLS = C.LWTUNNEL_ENCAP_MPLS
|
||||
LWTUNNEL_ENCAP_IP = C.LWTUNNEL_ENCAP_IP
|
||||
LWTUNNEL_ENCAP_ILA = C.LWTUNNEL_ENCAP_ILA
|
||||
LWTUNNEL_ENCAP_IP6 = C.LWTUNNEL_ENCAP_IP6
|
||||
LWTUNNEL_ENCAP_SEG6 = C.LWTUNNEL_ENCAP_SEG6
|
||||
LWTUNNEL_ENCAP_BPF = C.LWTUNNEL_ENCAP_BPF
|
||||
LWTUNNEL_ENCAP_SEG6_LOCAL = C.LWTUNNEL_ENCAP_SEG6_LOCAL
|
||||
LWTUNNEL_ENCAP_RPL = C.LWTUNNEL_ENCAP_RPL
|
||||
LWTUNNEL_ENCAP_MAX = C.LWTUNNEL_ENCAP_MAX
|
||||
)
|
||||
|
||||
@@ -225,6 +225,7 @@ struct ltchars {
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/keyctl.h>
|
||||
#include <linux/loop.h>
|
||||
#include <linux/lwtunnel.h>
|
||||
#include <linux/magic.h>
|
||||
#include <linux/memfd.h>
|
||||
#include <linux/module.h>
|
||||
@@ -561,6 +562,7 @@ ccflags="$@"
|
||||
$2 ~ /^CRYPTO_/ ||
|
||||
$2 ~ /^TIPC_/ ||
|
||||
$2 ~ /^DEVLINK_/ ||
|
||||
$2 ~ /^LWTUNNEL_IP/ ||
|
||||
$2 !~ "WMESGLEN" &&
|
||||
$2 ~ /^W[A-Z0-9]+$/ ||
|
||||
$2 ~/^PPPIOC/ ||
|
||||
|
||||
@@ -1217,6 +1217,12 @@ const (
|
||||
LOOP_SET_STATUS_SETTABLE_FLAGS = 0xc
|
||||
LO_KEY_SIZE = 0x20
|
||||
LO_NAME_SIZE = 0x40
|
||||
LWTUNNEL_IP6_MAX = 0x8
|
||||
LWTUNNEL_IP_MAX = 0x8
|
||||
LWTUNNEL_IP_OPTS_MAX = 0x3
|
||||
LWTUNNEL_IP_OPT_ERSPAN_MAX = 0x4
|
||||
LWTUNNEL_IP_OPT_GENEVE_MAX = 0x3
|
||||
LWTUNNEL_IP_OPT_VXLAN_MAX = 0x1
|
||||
MADV_COLD = 0x14
|
||||
MADV_DODUMP = 0x11
|
||||
MADV_DOFORK = 0xb
|
||||
|
||||
@@ -2981,3 +2981,16 @@ type PPSKTime struct {
|
||||
Nsec int32
|
||||
Flags uint32
|
||||
}
|
||||
|
||||
const (
|
||||
LWTUNNEL_ENCAP_NONE = 0x0
|
||||
LWTUNNEL_ENCAP_MPLS = 0x1
|
||||
LWTUNNEL_ENCAP_IP = 0x2
|
||||
LWTUNNEL_ENCAP_ILA = 0x3
|
||||
LWTUNNEL_ENCAP_IP6 = 0x4
|
||||
LWTUNNEL_ENCAP_SEG6 = 0x5
|
||||
LWTUNNEL_ENCAP_BPF = 0x6
|
||||
LWTUNNEL_ENCAP_SEG6_LOCAL = 0x7
|
||||
LWTUNNEL_ENCAP_RPL = 0x8
|
||||
LWTUNNEL_ENCAP_MAX = 0x8
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user