Merge remote-tracking branch 'net-next/master' into mac80211-next
Bring in net-next which had pulled in net, so I have the changes from mac80211 and can apply a patch that would otherwise conflict. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
+1567
-329
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,128 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* Copyright (c) 2018 Facebook */
|
||||
#ifndef _UAPI__LINUX_BTF_H__
|
||||
#define _UAPI__LINUX_BTF_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define BTF_MAGIC 0xeB9F
|
||||
#define BTF_VERSION 1
|
||||
|
||||
struct btf_header {
|
||||
__u16 magic;
|
||||
__u8 version;
|
||||
__u8 flags;
|
||||
|
||||
__u32 parent_label;
|
||||
__u32 parent_name;
|
||||
|
||||
/* All offsets are in bytes relative to the end of this header */
|
||||
__u32 label_off; /* offset of label section */
|
||||
__u32 object_off; /* offset of data object section*/
|
||||
__u32 func_off; /* offset of function section */
|
||||
__u32 type_off; /* offset of type section */
|
||||
__u32 str_off; /* offset of string section */
|
||||
__u32 str_len; /* length of string section */
|
||||
};
|
||||
|
||||
/* Max # of type identifier */
|
||||
#define BTF_MAX_TYPE 0x7fffffff
|
||||
/* Max offset into the string section */
|
||||
#define BTF_MAX_NAME_OFFSET 0x7fffffff
|
||||
/* Max # of struct/union/enum members or func args */
|
||||
#define BTF_MAX_VLEN 0xffff
|
||||
|
||||
/* The type id is referring to a parent BTF */
|
||||
#define BTF_TYPE_PARENT(id) (((id) >> 31) & 0x1)
|
||||
#define BTF_TYPE_ID(id) ((id) & BTF_MAX_TYPE)
|
||||
|
||||
/* String is in the ELF string section */
|
||||
#define BTF_STR_TBL_ELF_ID(ref) (((ref) >> 31) & 0x1)
|
||||
#define BTF_STR_OFFSET(ref) ((ref) & BTF_MAX_NAME_OFFSET)
|
||||
|
||||
struct btf_type {
|
||||
__u32 name_off;
|
||||
/* "info" bits arrangement
|
||||
* bits 0-15: vlen (e.g. # of struct's members)
|
||||
* bits 16-23: unused
|
||||
* bits 24-28: kind (e.g. int, ptr, array...etc)
|
||||
* bits 29-30: unused
|
||||
* bits 31: root
|
||||
*/
|
||||
__u32 info;
|
||||
/* "size" is used by INT, ENUM, STRUCT and UNION.
|
||||
* "size" tells the size of the type it is describing.
|
||||
*
|
||||
* "type" is used by PTR, TYPEDEF, VOLATILE, CONST and RESTRICT.
|
||||
* "type" is a type_id referring to another type.
|
||||
*/
|
||||
union {
|
||||
__u32 size;
|
||||
__u32 type;
|
||||
};
|
||||
};
|
||||
|
||||
#define BTF_INFO_KIND(info) (((info) >> 24) & 0x1f)
|
||||
#define BTF_INFO_ISROOT(info) (!!(((info) >> 24) & 0x80))
|
||||
#define BTF_INFO_VLEN(info) ((info) & 0xffff)
|
||||
|
||||
#define BTF_KIND_UNKN 0 /* Unknown */
|
||||
#define BTF_KIND_INT 1 /* Integer */
|
||||
#define BTF_KIND_PTR 2 /* Pointer */
|
||||
#define BTF_KIND_ARRAY 3 /* Array */
|
||||
#define BTF_KIND_STRUCT 4 /* Struct */
|
||||
#define BTF_KIND_UNION 5 /* Union */
|
||||
#define BTF_KIND_ENUM 6 /* Enumeration */
|
||||
#define BTF_KIND_FWD 7 /* Forward */
|
||||
#define BTF_KIND_TYPEDEF 8 /* Typedef */
|
||||
#define BTF_KIND_VOLATILE 9 /* Volatile */
|
||||
#define BTF_KIND_CONST 10 /* Const */
|
||||
#define BTF_KIND_RESTRICT 11 /* Restrict */
|
||||
#define BTF_KIND_MAX 11
|
||||
#define NR_BTF_KINDS 12
|
||||
|
||||
/* For some specific BTF_KIND, "struct btf_type" is immediately
|
||||
* followed by extra data.
|
||||
*/
|
||||
|
||||
/* BTF_KIND_INT is followed by a u32 and the following
|
||||
* is the 32 bits arrangement:
|
||||
*/
|
||||
#define BTF_INT_ENCODING(VAL) (((VAL) & 0xff000000) >> 24)
|
||||
#define BTF_INT_OFFSET(VAL) (((VAL & 0x00ff0000)) >> 16)
|
||||
#define BTF_INT_BITS(VAL) ((VAL) & 0x0000ffff)
|
||||
|
||||
/* Attributes stored in the BTF_INT_ENCODING */
|
||||
#define BTF_INT_SIGNED 0x1
|
||||
#define BTF_INT_CHAR 0x2
|
||||
#define BTF_INT_BOOL 0x4
|
||||
#define BTF_INT_VARARGS 0x8
|
||||
|
||||
/* BTF_KIND_ENUM is followed by multiple "struct btf_enum".
|
||||
* The exact number of btf_enum is stored in the vlen (of the
|
||||
* info in "struct btf_type").
|
||||
*/
|
||||
struct btf_enum {
|
||||
__u32 name_off;
|
||||
__s32 val;
|
||||
};
|
||||
|
||||
/* BTF_KIND_ARRAY is followed by one "struct btf_array" */
|
||||
struct btf_array {
|
||||
__u32 type;
|
||||
__u32 index_type;
|
||||
__u32 nelems;
|
||||
};
|
||||
|
||||
/* BTF_KIND_STRUCT and BTF_KIND_UNION are followed
|
||||
* by multiple "struct btf_member". The exact number
|
||||
* of btf_member is stored in the vlen (of the info in
|
||||
* "struct btf_type").
|
||||
*/
|
||||
struct btf_member {
|
||||
__u32 name_off;
|
||||
__u32 type;
|
||||
__u32 offset; /* offset in bits */
|
||||
};
|
||||
|
||||
#endif /* _UAPI__LINUX_BTF_H__ */
|
||||
@@ -116,12 +116,16 @@ struct proc_event {
|
||||
struct coredump_proc_event {
|
||||
__kernel_pid_t process_pid;
|
||||
__kernel_pid_t process_tgid;
|
||||
__kernel_pid_t parent_pid;
|
||||
__kernel_pid_t parent_tgid;
|
||||
} coredump;
|
||||
|
||||
struct exit_proc_event {
|
||||
__kernel_pid_t process_pid;
|
||||
__kernel_pid_t process_tgid;
|
||||
__u32 exit_code, exit_signal;
|
||||
__kernel_pid_t parent_pid;
|
||||
__kernel_pid_t parent_tgid;
|
||||
} exit;
|
||||
|
||||
} event_data;
|
||||
|
||||
@@ -132,6 +132,16 @@ enum devlink_eswitch_encap_mode {
|
||||
DEVLINK_ESWITCH_ENCAP_MODE_BASIC,
|
||||
};
|
||||
|
||||
enum devlink_port_flavour {
|
||||
DEVLINK_PORT_FLAVOUR_PHYSICAL, /* Any kind of a port physically
|
||||
* facing the user.
|
||||
*/
|
||||
DEVLINK_PORT_FLAVOUR_CPU, /* CPU port */
|
||||
DEVLINK_PORT_FLAVOUR_DSA, /* Distributed switch architecture
|
||||
* interconnect port.
|
||||
*/
|
||||
};
|
||||
|
||||
enum devlink_attr {
|
||||
/* don't change the order or add anything between, this is ABI! */
|
||||
DEVLINK_ATTR_UNSPEC,
|
||||
@@ -224,6 +234,10 @@ enum devlink_attr {
|
||||
DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID, /* u64 */
|
||||
DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_UNITS,/* u64 */
|
||||
|
||||
DEVLINK_ATTR_PORT_FLAVOUR, /* u16 */
|
||||
DEVLINK_ATTR_PORT_NUMBER, /* u32 */
|
||||
DEVLINK_ATTR_PORT_SPLIT_SUBPORT_NUMBER, /* u32 */
|
||||
|
||||
/* add new attributes above here, update the policy in devlink.c */
|
||||
|
||||
__DEVLINK_ATTR_MAX,
|
||||
|
||||
@@ -421,6 +421,7 @@ typedef struct elf64_shdr {
|
||||
#define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */
|
||||
#define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension registers */
|
||||
#define NT_ARC_V2 0x600 /* ARCv2 accumulator/extra registers */
|
||||
#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note */
|
||||
|
||||
/* Note header in a PT_NOTE section */
|
||||
typedef struct elf32_note {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
|
||||
/*
|
||||
* This software is available to you under a choice of one of two
|
||||
* licenses. You may choose to be licensed under the terms of the GNU
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
|
||||
*
|
||||
* if_xdp: XDP socket user-space interface
|
||||
* Copyright(c) 2018 Intel Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* Author(s): Björn Töpel <bjorn.topel@intel.com>
|
||||
* Magnus Karlsson <magnus.karlsson@intel.com>
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_IF_XDP_H
|
||||
#define _LINUX_IF_XDP_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Options for the sxdp_flags field */
|
||||
#define XDP_SHARED_UMEM 1
|
||||
|
||||
struct sockaddr_xdp {
|
||||
__u16 sxdp_family;
|
||||
__u32 sxdp_ifindex;
|
||||
__u32 sxdp_queue_id;
|
||||
__u32 sxdp_shared_umem_fd;
|
||||
__u16 sxdp_flags;
|
||||
};
|
||||
|
||||
/* XDP socket options */
|
||||
#define XDP_RX_RING 1
|
||||
#define XDP_TX_RING 2
|
||||
#define XDP_UMEM_REG 3
|
||||
#define XDP_UMEM_FILL_RING 4
|
||||
#define XDP_UMEM_COMPLETION_RING 5
|
||||
#define XDP_STATISTICS 6
|
||||
|
||||
struct xdp_umem_reg {
|
||||
__u64 addr; /* Start of packet data area */
|
||||
__u64 len; /* Length of packet data area */
|
||||
__u32 frame_size; /* Frame size */
|
||||
__u32 frame_headroom; /* Frame head room */
|
||||
};
|
||||
|
||||
struct xdp_statistics {
|
||||
__u64 rx_dropped; /* Dropped for reasons other than invalid desc */
|
||||
__u64 rx_invalid_descs; /* Dropped due to invalid descriptor */
|
||||
__u64 tx_invalid_descs; /* Dropped due to invalid descriptor */
|
||||
};
|
||||
|
||||
/* Pgoff for mmaping the rings */
|
||||
#define XDP_PGOFF_RX_RING 0
|
||||
#define XDP_PGOFF_TX_RING 0x80000000
|
||||
#define XDP_UMEM_PGOFF_FILL_RING 0x100000000
|
||||
#define XDP_UMEM_PGOFF_COMPLETION_RING 0x180000000
|
||||
|
||||
struct xdp_desc {
|
||||
__u32 idx;
|
||||
__u32 len;
|
||||
__u16 offset;
|
||||
__u8 flags;
|
||||
__u8 padding[5];
|
||||
};
|
||||
|
||||
struct xdp_ring {
|
||||
__u32 producer __attribute__((aligned(64)));
|
||||
__u32 consumer __attribute__((aligned(64)));
|
||||
};
|
||||
|
||||
/* Used for the RX and TX queues for packets */
|
||||
struct xdp_rxtx_ring {
|
||||
struct xdp_ring ptrs;
|
||||
struct xdp_desc desc[0] __attribute__((aligned(64)));
|
||||
};
|
||||
|
||||
/* Used for the fill and completion queues for buffers */
|
||||
struct xdp_umem_ring {
|
||||
struct xdp_ring ptrs;
|
||||
__u32 desc[0] __attribute__((aligned(64)));
|
||||
};
|
||||
|
||||
#endif /* _LINUX_IF_XDP_H */
|
||||
@@ -676,6 +676,13 @@ struct kvm_ioeventfd {
|
||||
__u8 pad[36];
|
||||
};
|
||||
|
||||
#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0)
|
||||
#define KVM_X86_DISABLE_EXITS_HTL (1 << 1)
|
||||
#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2)
|
||||
#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \
|
||||
KVM_X86_DISABLE_EXITS_HTL | \
|
||||
KVM_X86_DISABLE_EXITS_PAUSE)
|
||||
|
||||
/* for KVM_ENABLE_CAP */
|
||||
struct kvm_enable_cap {
|
||||
/* in */
|
||||
|
||||
@@ -46,6 +46,9 @@ enum tcp_conntrack {
|
||||
/* Marks possibility for expected RFC5961 challenge ACK */
|
||||
#define IP_CT_EXP_CHALLENGE_ACK 0x40
|
||||
|
||||
/* Simultaneous open initialized */
|
||||
#define IP_CT_TCP_SIMULTANEOUS_OPEN 0x80
|
||||
|
||||
struct nf_ct_tcp_flags {
|
||||
__u8 flags;
|
||||
__u8 mask;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#define NF_NAT_RANGE_PROTO_RANDOM (1 << 2)
|
||||
#define NF_NAT_RANGE_PERSISTENT (1 << 3)
|
||||
#define NF_NAT_RANGE_PROTO_RANDOM_FULLY (1 << 4)
|
||||
#define NF_NAT_RANGE_PROTO_OFFSET (1 << 5)
|
||||
|
||||
#define NF_NAT_RANGE_PROTO_RANDOM_ALL \
|
||||
(NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY)
|
||||
@@ -17,7 +18,7 @@
|
||||
#define NF_NAT_RANGE_MASK \
|
||||
(NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \
|
||||
NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \
|
||||
NF_NAT_RANGE_PROTO_RANDOM_FULLY)
|
||||
NF_NAT_RANGE_PROTO_RANDOM_FULLY | NF_NAT_RANGE_PROTO_OFFSET)
|
||||
|
||||
struct nf_nat_ipv4_range {
|
||||
unsigned int flags;
|
||||
@@ -40,4 +41,13 @@ struct nf_nat_range {
|
||||
union nf_conntrack_man_proto max_proto;
|
||||
};
|
||||
|
||||
struct nf_nat_range2 {
|
||||
unsigned int flags;
|
||||
union nf_inet_addr min_addr;
|
||||
union nf_inet_addr max_addr;
|
||||
union nf_conntrack_man_proto min_proto;
|
||||
union nf_conntrack_man_proto max_proto;
|
||||
union nf_conntrack_man_proto base_proto;
|
||||
};
|
||||
|
||||
#endif /* _NETFILTER_NF_NAT_H */
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
#ifndef _NF_OSF_H
|
||||
#define _NF_OSF_H
|
||||
|
||||
#define MAXGENRELEN 32
|
||||
|
||||
#define NF_OSF_GENRE (1 << 0)
|
||||
#define NF_OSF_TTL (1 << 1)
|
||||
#define NF_OSF_LOG (1 << 2)
|
||||
#define NF_OSF_INVERT (1 << 3)
|
||||
|
||||
#define NF_OSF_LOGLEVEL_ALL 0 /* log all matched fingerprints */
|
||||
#define NF_OSF_LOGLEVEL_FIRST 1 /* log only the first matced fingerprint */
|
||||
#define NF_OSF_LOGLEVEL_ALL_KNOWN 2 /* do not log unknown packets */
|
||||
|
||||
#define NF_OSF_TTL_TRUE 0 /* True ip and fingerprint TTL comparison */
|
||||
|
||||
/* Do not compare ip and fingerprint TTL at all */
|
||||
#define NF_OSF_TTL_NOCHECK 2
|
||||
|
||||
/* Wildcard MSS (kind of).
|
||||
* It is used to implement a state machine for the different wildcard values
|
||||
* of the MSS and window sizes.
|
||||
*/
|
||||
struct nf_osf_wc {
|
||||
__u32 wc;
|
||||
__u32 val;
|
||||
};
|
||||
|
||||
/* This struct represents IANA options
|
||||
* http://www.iana.org/assignments/tcp-parameters
|
||||
*/
|
||||
struct nf_osf_opt {
|
||||
__u16 kind, length;
|
||||
struct nf_osf_wc wc;
|
||||
};
|
||||
|
||||
struct nf_osf_info {
|
||||
char genre[MAXGENRELEN];
|
||||
__u32 len;
|
||||
__u32 flags;
|
||||
__u32 loglevel;
|
||||
__u32 ttl;
|
||||
};
|
||||
|
||||
struct nf_osf_user_finger {
|
||||
struct nf_osf_wc wss;
|
||||
|
||||
__u8 ttl, df;
|
||||
__u16 ss, mss;
|
||||
__u16 opt_num;
|
||||
|
||||
char genre[MAXGENRELEN];
|
||||
char version[MAXGENRELEN];
|
||||
char subtype[MAXGENRELEN];
|
||||
|
||||
/* MAX_IPOPTLEN is maximum if all options are NOPs or EOLs */
|
||||
struct nf_osf_opt opt[MAX_IPOPTLEN];
|
||||
};
|
||||
|
||||
struct nf_osf_finger {
|
||||
struct rcu_head rcu_head;
|
||||
struct list_head finger_entry;
|
||||
struct nf_osf_user_finger finger;
|
||||
};
|
||||
|
||||
struct nf_osf_nlmsg {
|
||||
struct nf_osf_user_finger f;
|
||||
struct iphdr ip;
|
||||
struct tcphdr tcp;
|
||||
};
|
||||
|
||||
/* Defines for IANA option kinds */
|
||||
enum iana_options {
|
||||
OSFOPT_EOL = 0, /* End of options */
|
||||
OSFOPT_NOP, /* NOP */
|
||||
OSFOPT_MSS, /* Maximum segment size */
|
||||
OSFOPT_WSO, /* Window scale option */
|
||||
OSFOPT_SACKP, /* SACK permitted */
|
||||
OSFOPT_SACK, /* SACK */
|
||||
OSFOPT_ECHO,
|
||||
OSFOPT_ECHOREPLY,
|
||||
OSFOPT_TS, /* Timestamp option */
|
||||
OSFOPT_POCP, /* Partial Order Connection Permitted */
|
||||
OSFOPT_POSP, /* Partial Order Service Profile */
|
||||
|
||||
/* Others are not used in the current OSF */
|
||||
OSFOPT_EMPTY = 255,
|
||||
};
|
||||
|
||||
#endif /* _NF_OSF_H */
|
||||
@@ -831,7 +831,9 @@ enum nft_rt_keys {
|
||||
NFT_RT_NEXTHOP4,
|
||||
NFT_RT_NEXTHOP6,
|
||||
NFT_RT_TCPMSS,
|
||||
__NFT_RT_MAX
|
||||
};
|
||||
#define NFT_RT_MAX (__NFT_RT_MAX - 1)
|
||||
|
||||
/**
|
||||
* enum nft_hash_types - nf_tables hash expression types
|
||||
@@ -949,7 +951,9 @@ enum nft_ct_keys {
|
||||
NFT_CT_DST_IP,
|
||||
NFT_CT_SRC_IP6,
|
||||
NFT_CT_DST_IP6,
|
||||
__NFT_CT_MAX
|
||||
};
|
||||
#define NFT_CT_MAX (__NFT_CT_MAX - 1)
|
||||
|
||||
/**
|
||||
* enum nft_ct_attributes - nf_tables ct expression netlink attributes
|
||||
@@ -1450,6 +1454,8 @@ enum nft_trace_types {
|
||||
* @NFTA_NG_MODULUS: maximum counter value (NLA_U32)
|
||||
* @NFTA_NG_TYPE: operation type (NLA_U32)
|
||||
* @NFTA_NG_OFFSET: offset to be added to the counter (NLA_U32)
|
||||
* @NFTA_NG_SET_NAME: name of the map to lookup (NLA_STRING)
|
||||
* @NFTA_NG_SET_ID: id of the map (NLA_U32)
|
||||
*/
|
||||
enum nft_ng_attributes {
|
||||
NFTA_NG_UNSPEC,
|
||||
@@ -1457,6 +1463,8 @@ enum nft_ng_attributes {
|
||||
NFTA_NG_MODULUS,
|
||||
NFTA_NG_TYPE,
|
||||
NFTA_NG_OFFSET,
|
||||
NFTA_NG_SET_NAME,
|
||||
NFTA_NG_SET_ID,
|
||||
__NFTA_NG_MAX
|
||||
};
|
||||
#define NFTA_NG_MAX (__NFTA_NG_MAX - 1)
|
||||
|
||||
@@ -262,6 +262,7 @@ enum ctattr_stats_cpu {
|
||||
enum ctattr_stats_global {
|
||||
CTA_STATS_GLOBAL_UNSPEC,
|
||||
CTA_STATS_GLOBAL_ENTRIES,
|
||||
CTA_STATS_GLOBAL_MAX_ENTRIES,
|
||||
__CTA_STATS_GLOBAL_MAX,
|
||||
};
|
||||
#define CTA_STATS_GLOBAL_MAX (__CTA_STATS_GLOBAL_MAX - 1)
|
||||
|
||||
@@ -23,101 +23,29 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/ip.h>
|
||||
#include <linux/tcp.h>
|
||||
#include <linux/netfilter/nf_osf.h>
|
||||
|
||||
#define MAXGENRELEN 32
|
||||
#define XT_OSF_GENRE NF_OSF_GENRE
|
||||
#define XT_OSF_INVERT NF_OSF_INVERT
|
||||
|
||||
#define XT_OSF_GENRE (1<<0)
|
||||
#define XT_OSF_TTL (1<<1)
|
||||
#define XT_OSF_LOG (1<<2)
|
||||
#define XT_OSF_INVERT (1<<3)
|
||||
#define XT_OSF_TTL NF_OSF_TTL
|
||||
#define XT_OSF_LOG NF_OSF_LOG
|
||||
|
||||
#define XT_OSF_LOGLEVEL_ALL 0 /* log all matched fingerprints */
|
||||
#define XT_OSF_LOGLEVEL_FIRST 1 /* log only the first matced fingerprint */
|
||||
#define XT_OSF_LOGLEVEL_ALL_KNOWN 2 /* do not log unknown packets */
|
||||
#define XT_OSF_LOGLEVEL_ALL NF_OSF_LOGLEVEL_ALL
|
||||
#define XT_OSF_LOGLEVEL_FIRST NF_OSF_LOGLEVEL_FIRST
|
||||
#define XT_OSF_LOGLEVEL_ALL_KNOWN NF_OSF_LOGLEVEL_ALL_KNOWN
|
||||
|
||||
#define XT_OSF_TTL_TRUE 0 /* True ip and fingerprint TTL comparison */
|
||||
#define XT_OSF_TTL_LESS 1 /* Check if ip TTL is less than fingerprint one */
|
||||
#define XT_OSF_TTL_NOCHECK 2 /* Do not compare ip and fingerprint TTL at all */
|
||||
#define XT_OSF_TTL_TRUE NF_OSF_TTL_TRUE
|
||||
#define XT_OSF_TTL_NOCHECK NF_OSF_TTL_NOCHECK
|
||||
|
||||
struct xt_osf_info {
|
||||
char genre[MAXGENRELEN];
|
||||
__u32 len;
|
||||
__u32 flags;
|
||||
__u32 loglevel;
|
||||
__u32 ttl;
|
||||
};
|
||||
#define XT_OSF_TTL_LESS 1 /* Check if ip TTL is less than fingerprint one */
|
||||
|
||||
/*
|
||||
* Wildcard MSS (kind of).
|
||||
* It is used to implement a state machine for the different wildcard values
|
||||
* of the MSS and window sizes.
|
||||
*/
|
||||
struct xt_osf_wc {
|
||||
__u32 wc;
|
||||
__u32 val;
|
||||
};
|
||||
|
||||
/*
|
||||
* This struct represents IANA options
|
||||
* http://www.iana.org/assignments/tcp-parameters
|
||||
*/
|
||||
struct xt_osf_opt {
|
||||
__u16 kind, length;
|
||||
struct xt_osf_wc wc;
|
||||
};
|
||||
|
||||
struct xt_osf_user_finger {
|
||||
struct xt_osf_wc wss;
|
||||
|
||||
__u8 ttl, df;
|
||||
__u16 ss, mss;
|
||||
__u16 opt_num;
|
||||
|
||||
char genre[MAXGENRELEN];
|
||||
char version[MAXGENRELEN];
|
||||
char subtype[MAXGENRELEN];
|
||||
|
||||
/* MAX_IPOPTLEN is maximum if all options are NOPs or EOLs */
|
||||
struct xt_osf_opt opt[MAX_IPOPTLEN];
|
||||
};
|
||||
|
||||
struct xt_osf_nlmsg {
|
||||
struct xt_osf_user_finger f;
|
||||
struct iphdr ip;
|
||||
struct tcphdr tcp;
|
||||
};
|
||||
|
||||
/* Defines for IANA option kinds */
|
||||
|
||||
enum iana_options {
|
||||
OSFOPT_EOL = 0, /* End of options */
|
||||
OSFOPT_NOP, /* NOP */
|
||||
OSFOPT_MSS, /* Maximum segment size */
|
||||
OSFOPT_WSO, /* Window scale option */
|
||||
OSFOPT_SACKP, /* SACK permitted */
|
||||
OSFOPT_SACK, /* SACK */
|
||||
OSFOPT_ECHO,
|
||||
OSFOPT_ECHOREPLY,
|
||||
OSFOPT_TS, /* Timestamp option */
|
||||
OSFOPT_POCP, /* Partial Order Connection Permitted */
|
||||
OSFOPT_POSP, /* Partial Order Service Profile */
|
||||
|
||||
/* Others are not used in the current OSF */
|
||||
OSFOPT_EMPTY = 255,
|
||||
};
|
||||
|
||||
/*
|
||||
* Initial window size option state machine: multiple of mss, mtu or
|
||||
* plain numeric value. Can also be made as plain numeric value which
|
||||
* is not a multiple of specified value.
|
||||
*/
|
||||
enum xt_osf_window_size_options {
|
||||
OSF_WSS_PLAIN = 0,
|
||||
OSF_WSS_MSS,
|
||||
OSF_WSS_MTU,
|
||||
OSF_WSS_MODULO,
|
||||
OSF_WSS_MAX,
|
||||
};
|
||||
#define xt_osf_wc nf_osf_wc
|
||||
#define xt_osf_opt nf_osf_opt
|
||||
#define xt_osf_info nf_osf_info
|
||||
#define xt_osf_user_finger nf_osf_user_finger
|
||||
#define xt_osf_finger nf_osf_finger
|
||||
#define xt_osf_nlmsg nf_osf_nlmsg
|
||||
|
||||
/*
|
||||
* Add/remove fingerprint from the kernel.
|
||||
|
||||
@@ -191,6 +191,12 @@ struct ebt_entry {
|
||||
unsigned char elems[0] __attribute__ ((aligned (__alignof__(struct ebt_replace))));
|
||||
};
|
||||
|
||||
static __inline__ struct ebt_entry_target *
|
||||
ebt_get_target(struct ebt_entry *e)
|
||||
{
|
||||
return (void *)e + e->target_offset;
|
||||
}
|
||||
|
||||
/* {g,s}etsockopt numbers */
|
||||
#define EBT_BASE_CTL 128
|
||||
|
||||
|
||||
@@ -17,7 +17,10 @@
|
||||
#define IP6T_SRH_LAST_GT 0x0100
|
||||
#define IP6T_SRH_LAST_LT 0x0200
|
||||
#define IP6T_SRH_TAG 0x0400
|
||||
#define IP6T_SRH_MASK 0x07FF
|
||||
#define IP6T_SRH_PSID 0x0800
|
||||
#define IP6T_SRH_NSID 0x1000
|
||||
#define IP6T_SRH_LSID 0x2000
|
||||
#define IP6T_SRH_MASK 0x3FFF
|
||||
|
||||
/* Values for "mt_invflags" field in struct ip6t_srh */
|
||||
#define IP6T_SRH_INV_NEXTHDR 0x0001
|
||||
@@ -31,7 +34,10 @@
|
||||
#define IP6T_SRH_INV_LAST_GT 0x0100
|
||||
#define IP6T_SRH_INV_LAST_LT 0x0200
|
||||
#define IP6T_SRH_INV_TAG 0x0400
|
||||
#define IP6T_SRH_INV_MASK 0x07FF
|
||||
#define IP6T_SRH_INV_PSID 0x0800
|
||||
#define IP6T_SRH_INV_NSID 0x1000
|
||||
#define IP6T_SRH_INV_LSID 0x2000
|
||||
#define IP6T_SRH_INV_MASK 0x3FFF
|
||||
|
||||
/**
|
||||
* struct ip6t_srh - SRH match options
|
||||
@@ -54,4 +60,37 @@ struct ip6t_srh {
|
||||
__u16 mt_invflags;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ip6t_srh1 - SRH match options (revision 1)
|
||||
* @ next_hdr: Next header field of SRH
|
||||
* @ hdr_len: Extension header length field of SRH
|
||||
* @ segs_left: Segments left field of SRH
|
||||
* @ last_entry: Last entry field of SRH
|
||||
* @ tag: Tag field of SRH
|
||||
* @ psid_addr: Address of previous SID in SRH SID list
|
||||
* @ nsid_addr: Address of NEXT SID in SRH SID list
|
||||
* @ lsid_addr: Address of LAST SID in SRH SID list
|
||||
* @ psid_msk: Mask of previous SID in SRH SID list
|
||||
* @ nsid_msk: Mask of next SID in SRH SID list
|
||||
* @ lsid_msk: MAsk of last SID in SRH SID list
|
||||
* @ mt_flags: match options
|
||||
* @ mt_invflags: Invert the sense of match options
|
||||
*/
|
||||
|
||||
struct ip6t_srh1 {
|
||||
__u8 next_hdr;
|
||||
__u8 hdr_len;
|
||||
__u8 segs_left;
|
||||
__u8 last_entry;
|
||||
__u16 tag;
|
||||
struct in6_addr psid_addr;
|
||||
struct in6_addr nsid_addr;
|
||||
struct in6_addr lsid_addr;
|
||||
struct in6_addr psid_msk;
|
||||
struct in6_addr nsid_msk;
|
||||
struct in6_addr lsid_msk;
|
||||
__u16 mt_flags;
|
||||
__u16 mt_invflags;
|
||||
};
|
||||
|
||||
#endif /*_IP6T_SRH_H*/
|
||||
|
||||
@@ -2714,6 +2714,8 @@ enum nl80211_attrs {
|
||||
#define NL80211_ATTR_KEYS NL80211_ATTR_KEYS
|
||||
#define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS
|
||||
|
||||
#define NL80211_WIPHY_NAME_MAXLEN 128
|
||||
|
||||
#define NL80211_MAX_SUPP_RATES 32
|
||||
#define NL80211_MAX_SUPP_HT_RATES 77
|
||||
#define NL80211_MAX_SUPP_REG_RULES 64
|
||||
|
||||
@@ -650,11 +650,23 @@ struct perf_event_mmap_page {
|
||||
#define PERF_RECORD_MISC_COMM_EXEC (1 << 13)
|
||||
#define PERF_RECORD_MISC_SWITCH_OUT (1 << 13)
|
||||
/*
|
||||
* Indicates that the content of PERF_SAMPLE_IP points to
|
||||
* the actual instruction that triggered the event. See also
|
||||
* perf_event_attr::precise_ip.
|
||||
* These PERF_RECORD_MISC_* flags below are safely reused
|
||||
* for the following events:
|
||||
*
|
||||
* PERF_RECORD_MISC_EXACT_IP - PERF_RECORD_SAMPLE of precise events
|
||||
* PERF_RECORD_MISC_SWITCH_OUT_PREEMPT - PERF_RECORD_SWITCH* events
|
||||
*
|
||||
*
|
||||
* PERF_RECORD_MISC_EXACT_IP:
|
||||
* Indicates that the content of PERF_SAMPLE_IP points to
|
||||
* the actual instruction that triggered the event. See also
|
||||
* perf_event_attr::precise_ip.
|
||||
*
|
||||
* PERF_RECORD_MISC_SWITCH_OUT_PREEMPT:
|
||||
* Indicates that thread was preempted in TASK_RUNNING state.
|
||||
*/
|
||||
#define PERF_RECORD_MISC_EXACT_IP (1 << 14)
|
||||
#define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT (1 << 14)
|
||||
/*
|
||||
* Reserve the last bit to indicate some extended misc field
|
||||
*/
|
||||
|
||||
@@ -129,6 +129,7 @@ enum {
|
||||
#define TCA_CLS_FLAGS_SKIP_SW (1 << 1) /* don't use filter in SW */
|
||||
#define TCA_CLS_FLAGS_IN_HW (1 << 2) /* filter is offloaded to HW */
|
||||
#define TCA_CLS_FLAGS_NOT_IN_HW (1 << 3) /* filter isn't offloaded to HW */
|
||||
#define TCA_CLS_FLAGS_VERBOSE (1 << 4) /* verbose logging */
|
||||
|
||||
/* U32 filters */
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
/* Clear the entropy pool and associated counters. (Superuser only.) */
|
||||
#define RNDCLEARPOOL _IO( 'R', 0x06 )
|
||||
|
||||
/* Reseed CRNG. (Superuser only.) */
|
||||
#define RNDRESEEDCRNG _IO( 'R', 0x07 )
|
||||
|
||||
struct rand_pool_info {
|
||||
int entropy_count;
|
||||
int buf_size;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
|
||||
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
|
||||
/*
|
||||
* Copyright (c) 2008 Oracle. All rights reserved.
|
||||
*
|
||||
|
||||
@@ -276,6 +276,9 @@ enum
|
||||
LINUX_MIB_TCPKEEPALIVE, /* TCPKeepAlive */
|
||||
LINUX_MIB_TCPMTUPFAIL, /* TCPMTUPFail */
|
||||
LINUX_MIB_TCPMTUPSUCCESS, /* TCPMTUPSuccess */
|
||||
LINUX_MIB_TCPDELIVERED, /* TCPDelivered */
|
||||
LINUX_MIB_TCPDELIVEREDCE, /* TCPDeliveredCE */
|
||||
LINUX_MIB_TCPACKCOMPRESSED, /* TCPAckCompressed */
|
||||
__LINUX_MIB_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -780,24 +780,6 @@ enum {
|
||||
NET_BRIDGE_NF_FILTER_PPPOE_TAGGED = 5,
|
||||
};
|
||||
|
||||
/* proc/sys/net/irda */
|
||||
enum {
|
||||
NET_IRDA_DISCOVERY=1,
|
||||
NET_IRDA_DEVNAME=2,
|
||||
NET_IRDA_DEBUG=3,
|
||||
NET_IRDA_FAST_POLL=4,
|
||||
NET_IRDA_DISCOVERY_SLOTS=5,
|
||||
NET_IRDA_DISCOVERY_TIMEOUT=6,
|
||||
NET_IRDA_SLOT_TIMEOUT=7,
|
||||
NET_IRDA_MAX_BAUD_RATE=8,
|
||||
NET_IRDA_MIN_TX_TURN_TIME=9,
|
||||
NET_IRDA_MAX_TX_DATA_SIZE=10,
|
||||
NET_IRDA_MAX_TX_WINDOW=11,
|
||||
NET_IRDA_MAX_NOREPLY_TIME=12,
|
||||
NET_IRDA_WARN_NOREPLY_TIME=13,
|
||||
NET_IRDA_LAP_KEEPALIVE_TIME=14,
|
||||
};
|
||||
|
||||
|
||||
/* CTL_FS names: */
|
||||
enum
|
||||
|
||||
@@ -122,6 +122,10 @@ enum {
|
||||
#define TCP_MD5SIG_EXT 32 /* TCP MD5 Signature with extensions */
|
||||
#define TCP_FASTOPEN_KEY 33 /* Set the key for Fast Open (cookie) */
|
||||
#define TCP_FASTOPEN_NO_COOKIE 34 /* Enable TFO without a TFO cookie */
|
||||
#define TCP_ZEROCOPY_RECEIVE 35
|
||||
#define TCP_INQ 36 /* Notify bytes available to read as a cmsg on read */
|
||||
|
||||
#define TCP_CM_INQ TCP_INQ
|
||||
|
||||
struct tcp_repair_opt {
|
||||
__u32 opt_code;
|
||||
@@ -224,6 +228,9 @@ struct tcp_info {
|
||||
__u64 tcpi_busy_time; /* Time (usec) busy sending data */
|
||||
__u64 tcpi_rwnd_limited; /* Time (usec) limited by receive window */
|
||||
__u64 tcpi_sndbuf_limited; /* Time (usec) limited by send buffer */
|
||||
|
||||
__u32 tcpi_delivered;
|
||||
__u32 tcpi_delivered_ce;
|
||||
};
|
||||
|
||||
/* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */
|
||||
@@ -244,6 +251,8 @@ enum {
|
||||
TCP_NLA_SNDQ_SIZE, /* Data (bytes) pending in send queue */
|
||||
TCP_NLA_CA_STATE, /* ca_state of socket */
|
||||
TCP_NLA_SND_SSTHRESH, /* Slow start size threshold */
|
||||
TCP_NLA_DELIVERED, /* Data pkts delivered incl. out-of-order */
|
||||
TCP_NLA_DELIVERED_CE, /* Like above but only ones w/ CE marks */
|
||||
|
||||
};
|
||||
|
||||
@@ -271,4 +280,11 @@ struct tcp_diag_md5sig {
|
||||
__u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN];
|
||||
};
|
||||
|
||||
/* setsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...) */
|
||||
|
||||
struct tcp_zerocopy_receive {
|
||||
__u64 address; /* in: address of mapping */
|
||||
__u32 length; /* in/out: number of bytes to map/mapped */
|
||||
__u32 recv_skip_hint; /* out: amount of bytes to skip */
|
||||
};
|
||||
#endif /* _UAPI_LINUX_TCP_H */
|
||||
|
||||
@@ -73,7 +73,6 @@ struct __kernel_old_timeval {
|
||||
*/
|
||||
#define CLOCK_SGI_CYCLE 10
|
||||
#define CLOCK_TAI 11
|
||||
#define CLOCK_MONOTONIC_ACTIVE 12
|
||||
|
||||
#define MAX_CLOCKS 16
|
||||
#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
|
||||
|
||||
@@ -209,16 +209,16 @@ struct tipc_group_req {
|
||||
* The string formatting for each name element is:
|
||||
* media: media
|
||||
* interface: media:interface name
|
||||
* link: Z.C.N:interface-Z.C.N:interface
|
||||
*
|
||||
* link: node:interface-node:interface
|
||||
*/
|
||||
|
||||
#define TIPC_NODEID_LEN 16
|
||||
#define TIPC_MAX_MEDIA_NAME 16
|
||||
#define TIPC_MAX_IF_NAME 16
|
||||
#define TIPC_MAX_BEARER_NAME 32
|
||||
#define TIPC_MAX_LINK_NAME 68
|
||||
|
||||
#define SIOCGETLINKNAME SIOCPROTOPRIVATE
|
||||
#define SIOCGETLINKNAME SIOCPROTOPRIVATE
|
||||
#define SIOCGETNODEID (SIOCPROTOPRIVATE + 1)
|
||||
|
||||
struct tipc_sioc_ln_req {
|
||||
__u32 peer;
|
||||
@@ -226,6 +226,10 @@ struct tipc_sioc_ln_req {
|
||||
char linkname[TIPC_MAX_LINK_NAME];
|
||||
};
|
||||
|
||||
struct tipc_sioc_nodeid_req {
|
||||
__u32 peer;
|
||||
char node_id[TIPC_NODEID_LEN];
|
||||
};
|
||||
|
||||
/* The macros and functions below are deprecated:
|
||||
*/
|
||||
|
||||
@@ -185,6 +185,11 @@
|
||||
#define TIPC_DEF_LINK_WIN 50
|
||||
#define TIPC_MAX_LINK_WIN 8191
|
||||
|
||||
/*
|
||||
* Default MTU for UDP media
|
||||
*/
|
||||
|
||||
#define TIPC_DEF_LINK_UDP_MTU 14000
|
||||
|
||||
struct tipc_node_info {
|
||||
__be32 addr; /* network address of node */
|
||||
|
||||
@@ -266,6 +266,7 @@ enum {
|
||||
TIPC_NLA_PROP_PRIO, /* u32 */
|
||||
TIPC_NLA_PROP_TOL, /* u32 */
|
||||
TIPC_NLA_PROP_WIN, /* u32 */
|
||||
TIPC_NLA_PROP_MTU, /* u32 */
|
||||
|
||||
__TIPC_NLA_PROP_MAX,
|
||||
TIPC_NLA_PROP_MAX = __TIPC_NLA_PROP_MAX - 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
|
||||
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
|
||||
/*
|
||||
* Copyright (c) 2016-2017, Mellanox Technologies. All rights reserved.
|
||||
*
|
||||
|
||||
@@ -32,6 +32,7 @@ struct udphdr {
|
||||
#define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */
|
||||
#define UDP_NO_CHECK6_TX 101 /* Disable sending checksum for UDP6X */
|
||||
#define UDP_NO_CHECK6_RX 102 /* Disable accpeting checksum for UDP6 */
|
||||
#define UDP_SEGMENT 103 /* Set GSO segmentation size */
|
||||
|
||||
/* UDP encapsulation types */
|
||||
#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
|
||||
|
||||
@@ -57,6 +57,21 @@ struct virtio_balloon_config {
|
||||
#define VIRTIO_BALLOON_S_HTLB_PGFAIL 9 /* Hugetlb page allocation failures */
|
||||
#define VIRTIO_BALLOON_S_NR 10
|
||||
|
||||
#define VIRTIO_BALLOON_S_NAMES_WITH_PREFIX(VIRTIO_BALLOON_S_NAMES_prefix) { \
|
||||
VIRTIO_BALLOON_S_NAMES_prefix "swap-in", \
|
||||
VIRTIO_BALLOON_S_NAMES_prefix "swap-out", \
|
||||
VIRTIO_BALLOON_S_NAMES_prefix "major-faults", \
|
||||
VIRTIO_BALLOON_S_NAMES_prefix "minor-faults", \
|
||||
VIRTIO_BALLOON_S_NAMES_prefix "free-memory", \
|
||||
VIRTIO_BALLOON_S_NAMES_prefix "total-memory", \
|
||||
VIRTIO_BALLOON_S_NAMES_prefix "available-memory", \
|
||||
VIRTIO_BALLOON_S_NAMES_prefix "disk-caches", \
|
||||
VIRTIO_BALLOON_S_NAMES_prefix "hugetlb-allocations", \
|
||||
VIRTIO_BALLOON_S_NAMES_prefix "hugetlb-failures" \
|
||||
}
|
||||
|
||||
#define VIRTIO_BALLOON_S_NAMES VIRTIO_BALLOON_S_NAMES_WITH_PREFIX("")
|
||||
|
||||
/*
|
||||
* Memory statistics structure.
|
||||
* Driver fills an array of these structures and passes to device.
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _UAPI_VMCORE_H
|
||||
#define _UAPI_VMCORE_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define VMCOREDD_NOTE_NAME "LINUX"
|
||||
#define VMCOREDD_MAX_NAME_BYTES 44
|
||||
|
||||
struct vmcoredd_header {
|
||||
__u32 n_namesz; /* Name size */
|
||||
__u32 n_descsz; /* Content size */
|
||||
__u32 n_type; /* NT_VMCOREDD */
|
||||
__u8 name[8]; /* LINUX\0\0\0 */
|
||||
__u8 dump_name[VMCOREDD_MAX_NAME_BYTES]; /* Device dump's name */
|
||||
};
|
||||
|
||||
#endif /* _UAPI_VMCORE_H */
|
||||
Reference in New Issue
Block a user