mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-06 09:07:16 -04:00
unix: add Linux Kernel Connection Multiplexor types and constants
For details on KCM, see: https://www.kernel.org/doc/Documentation/networking/kcm.txt. Change-Id: I14ebf0aaad17f5a9078f027bd50e050c69b08981 Reviewed-on: https://go-review.googlesource.com/c/sys/+/348449 Trust: Matt Layher <mdlayher@gmail.com> Run-TryBot: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
@@ -108,6 +108,7 @@ struct termios2 {
|
|||||||
#include <linux/if_pppox.h>
|
#include <linux/if_pppox.h>
|
||||||
#include <linux/if_xdp.h>
|
#include <linux/if_xdp.h>
|
||||||
#include <linux/ipc.h>
|
#include <linux/ipc.h>
|
||||||
|
#include <linux/kcm.h>
|
||||||
#include <linux/keyctl.h>
|
#include <linux/keyctl.h>
|
||||||
#include <linux/landlock.h>
|
#include <linux/landlock.h>
|
||||||
#include <linux/loop.h>
|
#include <linux/loop.h>
|
||||||
@@ -4043,3 +4044,11 @@ const (
|
|||||||
IFLA_CAN_DATA_BITRATE_CONST = C.IFLA_CAN_DATA_BITRATE_CONST
|
IFLA_CAN_DATA_BITRATE_CONST = C.IFLA_CAN_DATA_BITRATE_CONST
|
||||||
IFLA_CAN_BITRATE_MAX = C.IFLA_CAN_BITRATE_MAX
|
IFLA_CAN_BITRATE_MAX = C.IFLA_CAN_BITRATE_MAX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Kernel connection multiplexor
|
||||||
|
|
||||||
|
type KCMAttach C.struct_kcm_attach
|
||||||
|
|
||||||
|
type KCMUnattach C.struct_kcm_unattach
|
||||||
|
|
||||||
|
type KCMClone C.struct_kcm_clone
|
||||||
|
|||||||
@@ -232,6 +232,7 @@ struct ltchars {
|
|||||||
#include <linux/if_packet.h>
|
#include <linux/if_packet.h>
|
||||||
#include <linux/if_xdp.h>
|
#include <linux/if_xdp.h>
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
#include <linux/kcm.h>
|
||||||
#include <linux/kexec.h>
|
#include <linux/kexec.h>
|
||||||
#include <linux/keyctl.h>
|
#include <linux/keyctl.h>
|
||||||
#include <linux/landlock.h>
|
#include <linux/landlock.h>
|
||||||
@@ -504,6 +505,7 @@ ccflags="$@"
|
|||||||
$2 ~ /^O?XTABS$/ ||
|
$2 ~ /^O?XTABS$/ ||
|
||||||
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
$2 ~ /^TC[IO](ON|OFF)$/ ||
|
||||||
$2 ~ /^IN_/ ||
|
$2 ~ /^IN_/ ||
|
||||||
|
$2 ~ /^KCM/ ||
|
||||||
$2 ~ /^LANDLOCK_/ ||
|
$2 ~ /^LANDLOCK_/ ||
|
||||||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
|
||||||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
|
||||||
|
|||||||
@@ -1286,6 +1286,8 @@ const (
|
|||||||
IUTF8 = 0x4000
|
IUTF8 = 0x4000
|
||||||
IXANY = 0x800
|
IXANY = 0x800
|
||||||
JFFS2_SUPER_MAGIC = 0x72b6
|
JFFS2_SUPER_MAGIC = 0x72b6
|
||||||
|
KCMPROTO_CONNECTED = 0x0
|
||||||
|
KCM_RECV_DISABLE = 0x1
|
||||||
KEXEC_ARCH_386 = 0x30000
|
KEXEC_ARCH_386 = 0x30000
|
||||||
KEXEC_ARCH_68K = 0x40000
|
KEXEC_ARCH_68K = 0x40000
|
||||||
KEXEC_ARCH_AARCH64 = 0xb70000
|
KEXEC_ARCH_AARCH64 = 0xb70000
|
||||||
@@ -2458,6 +2460,9 @@ const (
|
|||||||
SIOCGSTAMPNS = 0x8907
|
SIOCGSTAMPNS = 0x8907
|
||||||
SIOCGSTAMPNS_OLD = 0x8907
|
SIOCGSTAMPNS_OLD = 0x8907
|
||||||
SIOCGSTAMP_OLD = 0x8906
|
SIOCGSTAMP_OLD = 0x8906
|
||||||
|
SIOCKCMATTACH = 0x89e0
|
||||||
|
SIOCKCMCLONE = 0x89e2
|
||||||
|
SIOCKCMUNATTACH = 0x89e1
|
||||||
SIOCOUTQNSD = 0x894b
|
SIOCOUTQNSD = 0x894b
|
||||||
SIOCPROTOPRIVATE = 0x89e0
|
SIOCPROTOPRIVATE = 0x89e0
|
||||||
SIOCRTMSG = 0x890d
|
SIOCRTMSG = 0x890d
|
||||||
|
|||||||
@@ -4145,3 +4145,16 @@ const (
|
|||||||
IFLA_CAN_DATA_BITRATE_CONST = 0xe
|
IFLA_CAN_DATA_BITRATE_CONST = 0xe
|
||||||
IFLA_CAN_BITRATE_MAX = 0xf
|
IFLA_CAN_BITRATE_MAX = 0xf
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type KCMAttach struct {
|
||||||
|
Fd int32
|
||||||
|
Bpf_fd int32
|
||||||
|
}
|
||||||
|
|
||||||
|
type KCMUnattach struct {
|
||||||
|
Fd int32
|
||||||
|
}
|
||||||
|
|
||||||
|
type KCMClone struct {
|
||||||
|
Fd int32
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user