]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
include: update kernel headers from v6.19~rc1
authorLuca Boccassi <luca.boccassi@gmail.com>
Tue, 16 Dec 2025 11:43:29 +0000 (11:43 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 16 Dec 2025 11:43:29 +0000 (11:43 +0000)
src/include/uapi/linux/bpf.h
src/include/uapi/linux/btrfs.h
src/include/uapi/linux/can/netlink.h
src/include/uapi/linux/ethtool.h
src/include/uapi/linux/fou.h
src/include/uapi/linux/fs.h
src/include/uapi/linux/if_ether.h
src/include/uapi/linux/magic.h
src/include/uapi/linux/netfilter/nf_tables.h
src/include/uapi/linux/wireguard.h

index ece0fe39116eff7a8de9181f0c475dc77a71f3f3..22eae247bf35f65a1efab460d635b7bec8ee9a41 100644 (file)
@@ -1026,6 +1026,7 @@ enum bpf_map_type {
        BPF_MAP_TYPE_USER_RINGBUF,
        BPF_MAP_TYPE_CGRP_STORAGE,
        BPF_MAP_TYPE_ARENA,
+       BPF_MAP_TYPE_INSN_ARRAY,
        __MAX_BPF_MAP_TYPE
 };
 
@@ -1430,6 +1431,9 @@ enum {
 
 /* Do not translate kernel bpf_arena pointers to user pointers */
        BPF_F_NO_USER_CONV      = (1U << 18),
+
+/* Enable BPF ringbuf overwrite mode */
+       BPF_F_RB_OVERWRITE      = (1U << 19),
 };
 
 /* Flags for BPF_PROG_QUERY. */
@@ -5618,7 +5622,7 @@ union bpf_attr {
  *     Return
  *             *sk* if casting is valid, or **NULL** otherwise.
  *
- * long bpf_dynptr_from_mem(void *data, u32 size, u64 flags, struct bpf_dynptr *ptr)
+ * long bpf_dynptr_from_mem(void *data, u64 size, u64 flags, struct bpf_dynptr *ptr)
  *     Description
  *             Get a dynptr to local memory *data*.
  *
@@ -5661,7 +5665,7 @@ union bpf_attr {
  *     Return
  *             Nothing. Always succeeds.
  *
- * long bpf_dynptr_read(void *dst, u32 len, const struct bpf_dynptr *src, u32 offset, u64 flags)
+ * long bpf_dynptr_read(void *dst, u64 len, const struct bpf_dynptr *src, u64 offset, u64 flags)
  *     Description
  *             Read *len* bytes from *src* into *dst*, starting from *offset*
  *             into *src*.
@@ -5671,7 +5675,7 @@ union bpf_attr {
  *             of *src*'s data, -EINVAL if *src* is an invalid dynptr or if
  *             *flags* is not 0.
  *
- * long bpf_dynptr_write(const struct bpf_dynptr *dst, u32 offset, void *src, u32 len, u64 flags)
+ * long bpf_dynptr_write(const struct bpf_dynptr *dst, u64 offset, void *src, u64 len, u64 flags)
  *     Description
  *             Write *len* bytes from *src* into *dst*, starting from *offset*
  *             into *dst*.
@@ -5692,7 +5696,7 @@ union bpf_attr {
  *             is a read-only dynptr or if *flags* is not correct. For skb-type dynptrs,
  *             other errors correspond to errors returned by **bpf_skb_store_bytes**\ ().
  *
- * void *bpf_dynptr_data(const struct bpf_dynptr *ptr, u32 offset, u32 len)
+ * void *bpf_dynptr_data(const struct bpf_dynptr *ptr, u64 offset, u64 len)
  *     Description
  *             Get a pointer to the underlying dynptr data.
  *
@@ -6231,6 +6235,7 @@ enum {
        BPF_RB_RING_SIZE = 1,
        BPF_RB_CONS_POS = 2,
        BPF_RB_PROD_POS = 3,
+       BPF_RB_OVERWRITE_POS = 4,
 };
 
 /* BPF ring buffer constants */
@@ -7200,6 +7205,8 @@ enum {
        TCP_BPF_SYN_MAC         = 1007, /* Copy the MAC, IP[46], and TCP header */
        TCP_BPF_SOCK_OPS_CB_FLAGS = 1008, /* Get or Set TCP sock ops flags */
        SK_BPF_CB_FLAGS         = 1009, /* Get or set sock ops flags in socket */
+       SK_BPF_BYPASS_PROT_MEM  = 1010, /* Get or Set sk->sk_bypass_prot_mem */
+
 };
 
 enum {
@@ -7645,4 +7652,24 @@ enum bpf_kfunc_flags {
        BPF_F_PAD_ZEROS = (1ULL << 0),
 };
 
+/*
+ * Values of a BPF_MAP_TYPE_INSN_ARRAY entry must be of this type.
+ *
+ * Before the map is used the orig_off field should point to an
+ * instruction inside the program being loaded. The other fields
+ * must be set to 0.
+ *
+ * After the program is loaded, the xlated_off will be adjusted
+ * by the verifier to point to the index of the original instruction
+ * in the xlated program. If the instruction is deleted, it will
+ * be set to (u32)-1. The jitted_off will be set to the corresponding
+ * offset in the jitted image of the program.
+ */
+struct bpf_insn_array_value {
+       __u32 orig_off;
+       __u32 xlated_off;
+       __u32 jitted_off;
+       __u32 :32;
+};
+
 #endif /* __LINUX_BPF_H__ */
index cb6d6e4de0a30e7ebed7279369cb104d4230a05c..df4b2f88f3cfdde8e7cee247871df1e3f4ebdf0b 100644 (file)
@@ -1097,6 +1097,12 @@ enum btrfs_err_code {
        BTRFS_ERROR_DEV_RAID1C4_MIN_NOT_MET,
 };
 
+/* Flags for IOC_SHUTDOWN, must match XFS_FSOP_GOING_FLAGS_* flags. */
+#define BTRFS_SHUTDOWN_FLAGS_DEFAULT                   0x0
+#define BTRFS_SHUTDOWN_FLAGS_LOGFLUSH                  0x1
+#define BTRFS_SHUTDOWN_FLAGS_NOLOGFLUSH                        0x2
+#define BTRFS_SHUTDOWN_FLAGS_LAST                      0x3
+
 #define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
                                   struct btrfs_ioctl_vol_args)
 #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
@@ -1218,6 +1224,9 @@ enum btrfs_err_code {
 #define BTRFS_IOC_SUBVOL_SYNC_WAIT _IOW(BTRFS_IOCTL_MAGIC, 65, \
                                        struct btrfs_ioctl_subvol_wait)
 
+/* Shutdown ioctl should follow XFS's interfaces, thus not using btrfs magic. */
+#define BTRFS_IOC_SHUTDOWN     _IOR('X', 125, __u32)
+
 #ifdef __cplusplus
 }
 #endif
index 5cf825ebc4d0e64d3ce052f5aa3dcea03a649189..33297c813a1d6154f89143fc11f0c383e819ecd9 100644 (file)
@@ -5,6 +5,7 @@
  * Definitions for the CAN netlink interface
  *
  * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com>
+ * Copyright (c) 2021-2025 Vincent Mailhol <mailhol@kernel.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the version 2 of the GNU General Public License
@@ -103,6 +104,11 @@ struct can_ctrlmode {
 #define CAN_CTRLMODE_CC_LEN8_DLC       0x100   /* Classic CAN DLC option */
 #define CAN_CTRLMODE_TDC_AUTO          0x200   /* FD transceiver automatically calculates TDCV */
 #define CAN_CTRLMODE_TDC_MANUAL                0x400   /* FD TDCV is manually set up by user */
+#define CAN_CTRLMODE_RESTRICTED                0x800   /* Restricted operation mode */
+#define CAN_CTRLMODE_XL                        0x1000  /* CAN XL mode */
+#define CAN_CTRLMODE_XL_TDC_AUTO       0x2000  /* XL transceiver automatically calculates TDCV */
+#define CAN_CTRLMODE_XL_TDC_MANUAL     0x4000  /* XL TDCV is manually set up by user */
+#define CAN_CTRLMODE_XL_TMS            0x8000  /* Transceiver Mode Switching */
 
 /*
  * CAN device statistics
@@ -138,6 +144,11 @@ enum {
        IFLA_CAN_BITRATE_MAX,
        IFLA_CAN_TDC, /* FD */
        IFLA_CAN_CTRLMODE_EXT,
+       IFLA_CAN_XL_DATA_BITTIMING,
+       IFLA_CAN_XL_DATA_BITTIMING_CONST,
+       IFLA_CAN_XL_DATA_BITRATE_CONST,
+       IFLA_CAN_XL_TDC,
+       IFLA_CAN_XL_PWM,
 
        /* add new constants above here */
        __IFLA_CAN_MAX,
@@ -179,6 +190,29 @@ enum {
        IFLA_CAN_CTRLMODE_MAX = __IFLA_CAN_CTRLMODE - 1
 };
 
+/*
+ * CAN FD/XL Pulse-Width Modulation (PWM)
+ *
+ * Please refer to struct can_pwm_const and can_pwm in
+ * include/linux/can/bittiming.h for further details.
+ */
+enum {
+       IFLA_CAN_PWM_UNSPEC,
+       IFLA_CAN_PWM_PWMS_MIN,  /* u32 */
+       IFLA_CAN_PWM_PWMS_MAX,  /* u32 */
+       IFLA_CAN_PWM_PWML_MIN,  /* u32 */
+       IFLA_CAN_PWM_PWML_MAX,  /* u32 */
+       IFLA_CAN_PWM_PWMO_MIN,  /* u32 */
+       IFLA_CAN_PWM_PWMO_MAX,  /* u32 */
+       IFLA_CAN_PWM_PWMS,      /* u32 */
+       IFLA_CAN_PWM_PWML,      /* u32 */
+       IFLA_CAN_PWM_PWMO,      /* u32 */
+
+       /* add new constants above here */
+       __IFLA_CAN_PWM,
+       IFLA_CAN_PWM_MAX = __IFLA_CAN_PWM - 1
+};
+
 /* u16 termination range: 1..65535 Ohms */
 #define CAN_TERMINATION_DISABLED 0
 
index 6e454027e69cf57bfea6284fddbdb00faf316b38..877f8722e0b3e449948e4c1981f104e7141c9a12 100644 (file)
@@ -2075,6 +2075,10 @@ enum ethtool_link_mode_bit_indices {
        ETHTOOL_LINK_MODE_800000baseDR4_2_Full_BIT       = 118,
        ETHTOOL_LINK_MODE_800000baseSR4_Full_BIT         = 119,
        ETHTOOL_LINK_MODE_800000baseVR4_Full_BIT         = 120,
+       ETHTOOL_LINK_MODE_1600000baseCR8_Full_BIT        = 121,
+       ETHTOOL_LINK_MODE_1600000baseKR8_Full_BIT        = 122,
+       ETHTOOL_LINK_MODE_1600000baseDR8_Full_BIT        = 123,
+       ETHTOOL_LINK_MODE_1600000baseDR8_2_Full_BIT      = 124,
 
        /* must be last entry */
        __ETHTOOL_LINK_MODE_MASK_NBITS
@@ -2188,6 +2192,7 @@ enum ethtool_link_mode_bit_indices {
 #define SPEED_200000           200000
 #define SPEED_400000           400000
 #define SPEED_800000           800000
+#define SPEED_1600000          1600000
 
 #define SPEED_UNKNOWN          -1
 
index 1c2b680bb476336166c07e7cdb1e5f6f0142c705..0b4ddf10383e065547b6404c8f33c76c1350f53c 100644 (file)
@@ -2,6 +2,7 @@
 /* Do not edit directly, auto-generated from: */
 /*     Documentation/netlink/specs/fou.yaml */
 /* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
 
 #ifndef _LINUX_FOU_H
 #define _LINUX_FOU_H
index b450f43ef3263a91c6052b48ca30ffe5a8d852dd..e1a9b51fe091d6fd9bcdd2180b92342aabf168c8 100644 (file)
@@ -294,8 +294,9 @@ struct file_attr {
 #define BLKROTATIONAL _IO(0x12,126)
 #define BLKZEROOUT _IO(0x12,127)
 #define BLKGETDISKSEQ _IOR(0x12,128,__u64)
-/* 130-136 are used by zoned block device ioctls (uapi/linux/blkzoned.h) */
+/* 130-136 and 142 are used by zoned block device ioctls (uapi/linux/blkzoned.h) */
 /* 137-141 are used by blk-crypto ioctls (uapi/linux/blk-crypto.h) */
+#define BLKTRACESETUP2 _IOWR(0x12, 142, struct blk_user_trace_setup2)
 
 #define BMAP_IOCTL 1           /* obsolete - kept for compatibility */
 #define FIBMAP    _IO(0x00,1)  /* bmap access */
index a1aff8e337998e7d870c0fb96f805532f3df7a7a..7867b630dcec85b137c6662b24d198f457ac2dca 100644 (file)
@@ -92,6 +92,9 @@
 #define ETH_P_ETHERCAT 0x88A4          /* EtherCAT                     */
 #define ETH_P_8021AD   0x88A8          /* 802.1ad Service VLAN         */
 #define ETH_P_802_EX1  0x88B5          /* 802.1 Local Experimental 1.  */
+#define ETH_P_MXLGSW   0x88C3          /* Infineon Technologies Corporate Research ST
+                                        * Used by MaxLinear GSW DSA
+                                        */
 #define ETH_P_PREAUTH  0x88C7          /* 802.11 Preauthentication */
 #define ETH_P_TIPC     0x88CA          /* TIPC                         */
 #define ETH_P_LLDP     0x88CC          /* Link Layer Discovery Protocol */
 #define ETH_P_QINQ1    0x9100          /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_QINQ2    0x9200          /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_QINQ3    0x9300          /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
+#define ETH_P_YT921X   0x9988          /* Motorcomm YT921x DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_EDSA     0xDADA          /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_DSA_8021Q        0xDADB          /* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_DSA_A5PSW        0xE001          /* A5PSW Tag Value [ NOT AN OFFICIALLY REGISTERED ID ] */
index bb575f3ab45e59aff283602f8e7c8af13e8bcc6a..638ca21b7a9095d51787b6561471c15646e68605 100644 (file)
 #define DEVMEM_MAGIC           0x454d444d      /* "DMEM" */
 #define SECRETMEM_MAGIC                0x5345434d      /* "SECM" */
 #define PID_FS_MAGIC           0x50494446      /* "PIDF" */
+#define GUEST_MEMFD_MAGIC      0x474d454d      /* "GMEM" */
 
 #endif /* __LINUX_MAGIC_H__ */
index 7c0c915f030688e5b652e8ab66e072c256813c0e..45c71f7d21c253421381ab5026d62b5383660a66 100644 (file)
@@ -881,7 +881,7 @@ enum nft_exthdr_flags {
  * enum nft_exthdr_op - nf_tables match options
  *
  * @NFT_EXTHDR_OP_IPV6: match against ipv6 extension headers
- * @NFT_EXTHDR_OP_TCP: match against tcp options
+ * @NFT_EXTHDR_OP_TCPOPT: match against tcp options
  * @NFT_EXTHDR_OP_IPV4: match against ipv4 options
  * @NFT_EXTHDR_OP_SCTP: match against sctp chunks
  * @NFT_EXTHDR_OP_DCCP: match against dccp otions
@@ -1200,7 +1200,7 @@ enum nft_ct_attributes {
 #define NFTA_CT_MAX            (__NFTA_CT_MAX - 1)
 
 /**
- * enum nft_flow_attributes - ct offload expression attributes
+ * enum nft_offload_attributes - ct offload expression attributes
  * @NFTA_FLOW_TABLE_NAME: flow table name (NLA_STRING)
  */
 enum nft_offload_attributes {
@@ -1410,7 +1410,7 @@ enum nft_reject_types {
 };
 
 /**
- * enum nft_reject_code - Generic reject codes for IPv4/IPv6
+ * enum nft_reject_inet_code - Generic reject codes for IPv4/IPv6
  *
  * @NFT_REJECT_ICMPX_NO_ROUTE: no route to host / network unreachable
  * @NFT_REJECT_ICMPX_PORT_UNREACH: port unreachable
@@ -1480,9 +1480,9 @@ enum nft_nat_attributes {
 /**
  * enum nft_tproxy_attributes - nf_tables tproxy expression netlink attributes
  *
- * NFTA_TPROXY_FAMILY: Target address family (NLA_U32: nft_registers)
- * NFTA_TPROXY_REG_ADDR: Target address register (NLA_U32: nft_registers)
- * NFTA_TPROXY_REG_PORT: Target port register (NLA_U32: nft_registers)
+ * @NFTA_TPROXY_FAMILY: Target address family (NLA_U32: nft_registers)
+ * @NFTA_TPROXY_REG_ADDR: Target address register (NLA_U32: nft_registers)
+ * @NFTA_TPROXY_REG_PORT: Target port register (NLA_U32: nft_registers)
  */
 enum nft_tproxy_attributes {
        NFTA_TPROXY_UNSPEC,
@@ -1783,7 +1783,7 @@ enum nft_synproxy_attributes {
 #define NFTA_SYNPROXY_MAX (__NFTA_SYNPROXY_MAX - 1)
 
 /**
- * enum nft_device_attributes - nf_tables device netlink attributes
+ * enum nft_devices_attributes - nf_tables device netlink attributes
  *
  * @NFTA_DEVICE_NAME: name of this device (NLA_STRING)
  * @NFTA_DEVICE_PREFIX: device name prefix, a simple wildcard (NLA_STRING)
index 8c26391196d50fbbd32e1a2c2b335ad51d360872..f70d96a04ecb336a44ee443a894b4185c669bddd 100644 (file)
-/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
-/*
- * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
- *
- * Documentation
- * =============
- *
- * The below enums and macros are for interfacing with WireGuard, using generic
- * netlink, with family WG_GENL_NAME and version WG_GENL_VERSION. It defines two
- * methods: get and set. Note that while they share many common attributes,
- * these two functions actually accept a slightly different set of inputs and
- * outputs.
- *
- * WG_CMD_GET_DEVICE
- * -----------------
- *
- * May only be called via NLM_F_REQUEST | NLM_F_DUMP. The command should contain
- * one but not both of:
- *
- *    WGDEVICE_A_IFINDEX: NLA_U32
- *    WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
- *
- * The kernel will then return several messages (NLM_F_MULTI) containing the
- * following tree of nested items:
- *
- *    WGDEVICE_A_IFINDEX: NLA_U32
- *    WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
- *    WGDEVICE_A_PRIVATE_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
- *    WGDEVICE_A_PUBLIC_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
- *    WGDEVICE_A_LISTEN_PORT: NLA_U16
- *    WGDEVICE_A_FWMARK: NLA_U32
- *    WGDEVICE_A_PEERS: NLA_NESTED
- *        0: NLA_NESTED
- *            WGPEER_A_PUBLIC_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
- *            WGPEER_A_PRESHARED_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
- *            WGPEER_A_ENDPOINT: NLA_MIN_LEN(struct sockaddr), struct sockaddr_in or struct sockaddr_in6
- *            WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16
- *            WGPEER_A_LAST_HANDSHAKE_TIME: NLA_EXACT_LEN, struct __kernel_timespec
- *            WGPEER_A_RX_BYTES: NLA_U64
- *            WGPEER_A_TX_BYTES: NLA_U64
- *            WGPEER_A_ALLOWEDIPS: NLA_NESTED
- *                0: NLA_NESTED
- *                    WGALLOWEDIP_A_FAMILY: NLA_U16
- *                    WGALLOWEDIP_A_IPADDR: NLA_MIN_LEN(struct in_addr), struct in_addr or struct in6_addr
- *                    WGALLOWEDIP_A_CIDR_MASK: NLA_U8
- *                0: NLA_NESTED
- *                    ...
- *                0: NLA_NESTED
- *                    ...
- *                ...
- *            WGPEER_A_PROTOCOL_VERSION: NLA_U32
- *        0: NLA_NESTED
- *            ...
- *        ...
- *
- * It is possible that all of the allowed IPs of a single peer will not
- * fit within a single netlink message. In that case, the same peer will
- * be written in the following message, except it will only contain
- * WGPEER_A_PUBLIC_KEY and WGPEER_A_ALLOWEDIPS. This may occur several
- * times in a row for the same peer. It is then up to the receiver to
- * coalesce adjacent peers. Likewise, it is possible that all peers will
- * not fit within a single message. So, subsequent peers will be sent
- * in following messages, except those will only contain WGDEVICE_A_IFNAME
- * and WGDEVICE_A_PEERS. It is then up to the receiver to coalesce these
- * messages to form the complete list of peers.
- *
- * Since this is an NLA_F_DUMP command, the final message will always be
- * NLMSG_DONE, even if an error occurs. However, this NLMSG_DONE message
- * contains an integer error code. It is either zero or a negative error
- * code corresponding to the errno.
- *
- * WG_CMD_SET_DEVICE
- * -----------------
- *
- * May only be called via NLM_F_REQUEST. The command should contain the
- * following tree of nested items, containing one but not both of
- * WGDEVICE_A_IFINDEX and WGDEVICE_A_IFNAME:
- *
- *    WGDEVICE_A_IFINDEX: NLA_U32
- *    WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
- *    WGDEVICE_A_FLAGS: NLA_U32, 0 or WGDEVICE_F_REPLACE_PEERS if all current
- *                      peers should be removed prior to adding the list below.
- *    WGDEVICE_A_PRIVATE_KEY: len WG_KEY_LEN, all zeros to remove
- *    WGDEVICE_A_LISTEN_PORT: NLA_U16, 0 to choose randomly
- *    WGDEVICE_A_FWMARK: NLA_U32, 0 to disable
- *    WGDEVICE_A_PEERS: NLA_NESTED
- *        0: NLA_NESTED
- *            WGPEER_A_PUBLIC_KEY: len WG_KEY_LEN
- *            WGPEER_A_FLAGS: NLA_U32, 0 and/or WGPEER_F_REMOVE_ME if the
- *                            specified peer should not exist at the end of the
- *                            operation, rather than added/updated and/or
- *                            WGPEER_F_REPLACE_ALLOWEDIPS if all current allowed
- *                            IPs of this peer should be removed prior to adding
- *                            the list below and/or WGPEER_F_UPDATE_ONLY if the
- *                            peer should only be set if it already exists.
- *            WGPEER_A_PRESHARED_KEY: len WG_KEY_LEN, all zeros to remove
- *            WGPEER_A_ENDPOINT: struct sockaddr_in or struct sockaddr_in6
- *            WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16, 0 to disable
- *            WGPEER_A_ALLOWEDIPS: NLA_NESTED
- *                0: NLA_NESTED
- *                    WGALLOWEDIP_A_FAMILY: NLA_U16
- *                    WGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr
- *                    WGALLOWEDIP_A_CIDR_MASK: NLA_U8
- *                    WGALLOWEDIP_A_FLAGS: NLA_U32, WGALLOWEDIP_F_REMOVE_ME if
- *                                         the specified IP should be removed;
- *                                         otherwise, this IP will be added if
- *                                         it is not already present.
- *                0: NLA_NESTED
- *                    ...
- *                0: NLA_NESTED
- *                    ...
- *                ...
- *            WGPEER_A_PROTOCOL_VERSION: NLA_U32, should not be set or used at
- *                                       all by most users of this API, as the
- *                                       most recent protocol will be used when
- *                                       this is unset. Otherwise, must be set
- *                                       to 1.
- *        0: NLA_NESTED
- *            ...
- *        ...
- *
- * It is possible that the amount of configuration data exceeds that of
- * the maximum message length accepted by the kernel. In that case, several
- * messages should be sent one after another, with each successive one
- * filling in information not contained in the prior. Note that if
- * WGDEVICE_F_REPLACE_PEERS is specified in the first message, it probably
- * should not be specified in fragments that come after, so that the list
- * of peers is only cleared the first time but appended after. Likewise for
- * peers, if WGPEER_F_REPLACE_ALLOWEDIPS is specified in the first message
- * of a peer, it likely should not be specified in subsequent fragments.
- *
- * If an error occurs, NLMSG_ERROR will reply containing an errno.
- */
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
+/* Do not edit directly, auto-generated from: */
+/*     Documentation/netlink/specs/wireguard.yaml */
+/* YNL-GEN uapi header */
+/* To regenerate run: tools/net/ynl/ynl-regen.sh */
 
-#ifndef _WG_UAPI_WIREGUARD_H
-#define _WG_UAPI_WIREGUARD_H
+#ifndef _LINUX_WIREGUARD_H
+#define _LINUX_WIREGUARD_H
 
-#define WG_GENL_NAME "wireguard"
-#define WG_GENL_VERSION 1
+#define WG_GENL_NAME   "wireguard"
+#define WG_GENL_VERSION        1
 
-#define WG_KEY_LEN 32
+#define WG_KEY_LEN     32
 
-enum wg_cmd {
-       WG_CMD_GET_DEVICE,
-       WG_CMD_SET_DEVICE,
-       __WG_CMD_MAX
+enum wgdevice_flag {
+       WGDEVICE_F_REPLACE_PEERS = 1,
 };
-#define WG_CMD_MAX (__WG_CMD_MAX - 1)
 
-enum wgdevice_flag {
-       WGDEVICE_F_REPLACE_PEERS = 1U << 0,
-       __WGDEVICE_F_ALL = WGDEVICE_F_REPLACE_PEERS
+enum wgpeer_flag {
+       WGPEER_F_REMOVE_ME = 1,
+       WGPEER_F_REPLACE_ALLOWEDIPS = 2,
+       WGPEER_F_UPDATE_ONLY = 4,
+};
+
+enum wgallowedip_flag {
+       WGALLOWEDIP_F_REMOVE_ME = 1,
 };
+
 enum wgdevice_attribute {
        WGDEVICE_A_UNSPEC,
        WGDEVICE_A_IFINDEX,
@@ -161,17 +36,11 @@ enum wgdevice_attribute {
        WGDEVICE_A_LISTEN_PORT,
        WGDEVICE_A_FWMARK,
        WGDEVICE_A_PEERS,
+
        __WGDEVICE_A_LAST
 };
 #define WGDEVICE_A_MAX (__WGDEVICE_A_LAST - 1)
 
-enum wgpeer_flag {
-       WGPEER_F_REMOVE_ME = 1U << 0,
-       WGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1,
-       WGPEER_F_UPDATE_ONLY = 1U << 2,
-       __WGPEER_F_ALL = WGPEER_F_REMOVE_ME | WGPEER_F_REPLACE_ALLOWEDIPS |
-                        WGPEER_F_UPDATE_ONLY
-};
 enum wgpeer_attribute {
        WGPEER_A_UNSPEC,
        WGPEER_A_PUBLIC_KEY,
@@ -184,22 +53,28 @@ enum wgpeer_attribute {
        WGPEER_A_TX_BYTES,
        WGPEER_A_ALLOWEDIPS,
        WGPEER_A_PROTOCOL_VERSION,
+
        __WGPEER_A_LAST
 };
 #define WGPEER_A_MAX (__WGPEER_A_LAST - 1)
 
-enum wgallowedip_flag {
-       WGALLOWEDIP_F_REMOVE_ME = 1U << 0,
-       __WGALLOWEDIP_F_ALL = WGALLOWEDIP_F_REMOVE_ME
-};
 enum wgallowedip_attribute {
        WGALLOWEDIP_A_UNSPEC,
        WGALLOWEDIP_A_FAMILY,
        WGALLOWEDIP_A_IPADDR,
        WGALLOWEDIP_A_CIDR_MASK,
        WGALLOWEDIP_A_FLAGS,
+
        __WGALLOWEDIP_A_LAST
 };
 #define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1)
 
-#endif /* _WG_UAPI_WIREGUARD_H */
+enum wg_cmd {
+       WG_CMD_GET_DEVICE,
+       WG_CMD_SET_DEVICE,
+
+       __WG_CMD_MAX
+};
+#define WG_CMD_MAX (__WG_CMD_MAX - 1)
+
+#endif /* _LINUX_WIREGUARD_H */