diff --git a/unix/linux/types.go b/unix/linux/types.go index dfd5e502..afbfae7b 100644 --- a/unix/linux/types.go +++ b/unix/linux/types.go @@ -108,6 +108,7 @@ struct termios2 { #include #include #include +#include #include #include #include @@ -4043,3 +4044,11 @@ const ( IFLA_CAN_DATA_BITRATE_CONST = C.IFLA_CAN_DATA_BITRATE_CONST 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 diff --git a/unix/mkerrors.sh b/unix/mkerrors.sh index bcc00390..a0370874 100755 --- a/unix/mkerrors.sh +++ b/unix/mkerrors.sh @@ -232,6 +232,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -504,6 +505,7 @@ ccflags="$@" $2 ~ /^O?XTABS$/ || $2 ~ /^TC[IO](ON|OFF)$/ || $2 ~ /^IN_/ || + $2 ~ /^KCM/ || $2 ~ /^LANDLOCK_/ || $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || $2 ~ /^LO_(KEY|NAME)_SIZE$/ || diff --git a/unix/zerrors_linux.go b/unix/zerrors_linux.go index 50383410..bc7c9d07 100644 --- a/unix/zerrors_linux.go +++ b/unix/zerrors_linux.go @@ -1286,6 +1286,8 @@ const ( IUTF8 = 0x4000 IXANY = 0x800 JFFS2_SUPER_MAGIC = 0x72b6 + KCMPROTO_CONNECTED = 0x0 + KCM_RECV_DISABLE = 0x1 KEXEC_ARCH_386 = 0x30000 KEXEC_ARCH_68K = 0x40000 KEXEC_ARCH_AARCH64 = 0xb70000 @@ -2458,6 +2460,9 @@ const ( SIOCGSTAMPNS = 0x8907 SIOCGSTAMPNS_OLD = 0x8907 SIOCGSTAMP_OLD = 0x8906 + SIOCKCMATTACH = 0x89e0 + SIOCKCMCLONE = 0x89e2 + SIOCKCMUNATTACH = 0x89e1 SIOCOUTQNSD = 0x894b SIOCPROTOPRIVATE = 0x89e0 SIOCRTMSG = 0x890d diff --git a/unix/ztypes_linux.go b/unix/ztypes_linux.go index 27f7d7a5..e6a8d88c 100644 --- a/unix/ztypes_linux.go +++ b/unix/ztypes_linux.go @@ -4145,3 +4145,16 @@ const ( IFLA_CAN_DATA_BITRATE_CONST = 0xe IFLA_CAN_BITRATE_MAX = 0xf ) + +type KCMAttach struct { + Fd int32 + Bpf_fd int32 +} + +type KCMUnattach struct { + Fd int32 +} + +type KCMClone struct { + Fd int32 +}