/linux-6.8/Documentation/userspace-api/netlink/ |
D | c-code-gen.rst | 1 .. SPDX-License-Identifier: BSD-3-Clause 4 Netlink spec C code generation 8 C code (uAPI, policies etc.). It also defines the additional properties 9 allowed in older families by the ``genetlink-c`` protocol level, 12 For brevity this document refers to ``name`` properties of various 14 of ``name`` in an attribute, and ``$family`` is the name of the 15 family (the global ``name`` property). 17 The upper case is used to denote literal values, e.g. ``$family-CMD`` 18 means the concatenation of ``$family``, a dash character, and the literal 22 and with dashes (``-``) replaced by underscores (``_``). [all …]
|
D | specs.rst | 1 .. SPDX-License-Identifier: BSD-3-Clause 10 hand written Netlink code for each new family, command, attribute. 12 or C header file, making it easy to use in languages which can't include 17 - the C uAPI header 18 …- documentation of the protocol as a ReST file - see :ref:`Documentation/networking/netlink_spec/i… 19 - policy tables for input attribute validation 20 - operation tables 25 See :doc:`intro-specs` for a practical starting guide. 28 ``((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)`` 40 - ``genetlink`` - most streamlined, should be used by all new families [all …]
|
D | intro-specs.rst | 1 .. SPDX-License-Identifier: BSD-3-Clause 21 - ``--spec`` - point to the spec file 22 - ``--do $name`` / ``--dump $name`` - issue request ``$name`` 23 - ``--json $attrs`` - provide attributes for the request 24 - ``--subscribe $group`` - receive notifications from ``$group`` 30 $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/ethtool.yaml \ 31 --do rings-get \ 32 --json '{"header":{"dev-index": 18}}' 33 {'header': {'dev-index': 18, 'dev-name': 'eni1np1'}, 35 'rx-jumbo': 0, [all …]
|
/linux-6.8/Documentation/netlink/specs/ |
D | mptcp_pm.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 3 name: mptcp_pm 4 protocol: genetlink-legacy 7 c-family-name: mptcp-pm-name 8 c-version-name: mptcp-pm-ver 9 max-by-define: true 10 kernel-policy: per-op 11 cmd-cnt-name: --mptcp-pm-cmd-after-last 14 - 16 name: event-type [all …]
|
/linux-6.8/net/netfilter/ipset/ |
D | ip_set_core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu> 4 * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org> 61 ip_set_dereference((inst)->ip_set_list)[id] 63 rcu_dereference_raw((inst)->ip_set_list)[id] 87 find_set_type(const char *name, u8 family, u8 revision) in find_set_type() argument 93 if (STRNCMP(type->name, name) && in find_set_type() 94 (type->family == family || in find_set_type() 95 type->family == NFPROTO_UNSPEC) && in find_set_type() 96 revision >= type->revision_min && in find_set_type() [all …]
|
/linux-6.8/drivers/w1/ |
D | w1.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (c) 2004 Evgeniy Polyakov <zbr@ioremap.net> 42 * on a static 1-wire bus. Memory is not allocated based on this number, just 63 return -ENODEV; in w1_master_probe() 70 dev_dbg(dev, "%s: Releasing %s.\n", __func__, md->name); in w1_master_release() 79 dev_dbg(dev, "%s: Releasing %s [%p]\n", __func__, sl->name, sl); in w1_slave_release() 81 w1_family_put(sl->family); in w1_slave_release() 82 sl->master->slave_count--; in w1_slave_release() 89 return sprintf(buf, "%s\n", sl->name); in name_show() 91 static DEVICE_ATTR_RO(name); [all …]
|
/linux-6.8/tools/testing/selftests/bpf/prog_tests/ |
D | sockmap_helpers.h | 37 if (__ret == -1) \ 45 if (__ret == -1) \ 53 if (__ret == -1) \ 61 if (__ret == -1) \ 69 if (__ret == -1) \ 74 #define xgetsockopt(fd, level, name, val, len) \ argument 76 int __ret = getsockopt((fd), (level), (name), (val), (len)); \ 77 if (__ret == -1) \ 78 FAIL_ERRNO("getsockopt(" #name ")"); \ 85 if (__ret == -1) \ [all …]
|
D | sk_assign.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (c) 2018 Facebook 3 // Copyright (c) 2019 Cloudflare 4 // Copyright (c) 2020 Isovalent, Inc. 38 tc = popen("tc -V", "r"); in configure_stack() 59 if (CHECK_FAIL(system("ip -6 route add local default dev lo"))) in configure_stack() 66 "direct-action object-file", prog, in configure_stack() 70 "run with -vv for more info\n")) in configure_stack() 81 fd = socket(addr->sa_family, type, 0); in start_server() 82 if (CHECK_FAIL(fd == -1)) in start_server() [all …]
|
D | sockmap_listen.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (c) 2020 Cloudflare 6 * 1. BPF map operations - bpf_map_{update,lookup delete}_elem 7 * 2. BPF redirect helpers - bpf_{sk,msg}_redirect_map 8 * 3. BPF reuseport helper - bpf_sk_select_reuseport 33 int family, int sotype, int mapfd) in test_insert_invalid() argument 39 value = -1; in test_insert_invalid() 51 int family, int sotype, int mapfd) in test_insert_opened() argument 57 s = xsocket(family, sotype, 0); in test_insert_opened() 58 if (s == -1) in test_insert_opened() [all …]
|
/linux-6.8/Documentation/netlink/ |
D | genetlink-legacy.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 3 --- 4 $id: http://kernel.org/schemas/netlink/genetlink-legacy.yaml# 5 $schema: https://json-schema.org/draft-07/schema 12 len-or-define: 14 pattern: ^[0-9A-Za-z_]+( - 1)?$ 16 len-or-limit: 17 # literal int or limit based on fixed-width type e.g. u8-min, u16-max, etc. 19 pattern: ^[su](8|16|32|64)-(min|max)$ 26 required: [ name, doc, attribute-sets, operations ] [all …]
|
D | genetlink-c.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 3 --- 4 $id: http://kernel.org/schemas/netlink/genetlink-c.yaml# 5 $schema: https://json-schema.org/draft-07/schema 12 len-or-define: 14 pattern: ^[0-9A-Za-z_]+( - 1)?$ 16 len-or-limit: 17 # literal int or limit based on fixed-width type e.g. u8-min, u16-max, etc. 19 pattern: ^[su](8|16|32|64)-(min|max)$ 26 required: [ name, doc, attribute-sets, operations ] [all …]
|
D | netlink-raw.yaml | 1 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 3 --- 4 $id: http://kernel.org/schemas/netlink/netlink-raw.yaml# 5 $schema: https://json-schema.org/draft-07/schema 12 len-or-define: 14 pattern: ^[0-9A-Za-z_]+( - 1)?$ 21 required: [ name, doc, attribute-sets, operations ] 24 name: 25 description: Name of the netlink family. 31 enum: [ netlink-raw ] # Trim [all …]
|
/linux-6.8/drivers/soc/renesas/ |
D | renesas-soc.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2014-2016 Glider bvba 16 const char name[16]; member 21 .name = "R-Car Gen1", 26 .name = "R-Car Gen2", 31 .name = "R-Car Gen3", 36 .name = "R-Car Gen4", 40 .name = "R-Mobile", 45 .name = "RZ/A1", 49 .name = "RZ/A2", [all …]
|
/linux-6.8/tools/net/ynl/ |
D | ynl-gen-c.py | 2 # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 16 def c_upper(name): argument 17 return name.upper().replace('-', '_') 20 def c_lower(name): argument 21 return name.lower().replace('-', '_') 24 def limit_to_number(name): argument 26 Turn a string limit like u32-max or s64-min into its numerical value 28 if name[0] == 'u' and name.endswith('-min'): 30 width = int(name[1:-4]) 31 if name[0] == 's': [all …]
|
/linux-6.8/tools/net/ynl/lib/ |
D | nlspec.py | 1 # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 26 family back reference to the full family 28 name name of the entity as listed in the spec (optional) 29 ident_name name which can be safely used as identifier in code (optional) 31 def __init__(self, family, yaml): argument 33 self.family = family 35 if 'name' in self.yaml: 36 self.name = self.yaml['name'] 37 self.ident_name = self.name.replace('-', '_') 40 family.add_unresolved(self) [all …]
|
/linux-6.8/net/netfilter/ |
D | xt_recent.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2006 Patrick McHardy <kaber@trash.net> 4 * Copyright © CC Computer Consultants GmbH, 2007 - 2008 10 * Copyright 2002-2003, Stephen Frost, 2.5.x port by laforge@netfilter.org 38 MODULE_DESCRIPTION("Xtables: \"recently-seen\" host matching"); 70 u_int16_t family; member 79 char name[XT_RECENT_NAME_LEN]; member 113 return jhash_1word((__force u32)addr->ip, hash_rnd) & in recent_entry_hash4() 114 (ip_list_hash_size - 1); in recent_entry_hash4() 119 return jhash2((u32 *)addr->ip6, ARRAY_SIZE(addr->ip6), hash_rnd) & in recent_entry_hash6() [all …]
|
D | xt_socket.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2007-2008 BalaBit IT Ltd. 40 * - match: if there's a fully established connection matching the 43 * - match: if there's a non-zero bound listener (possibly with a 44 * non-local address) We don't accept zero-bound listeners, since 53 struct sock *sk = skb->sk; in socket_match() 68 wildcard = (!(info->flags & XT_SOCKET_NOWILDCARD) && in socket_match() 70 inet_sk(sk)->inet_rcv_saddr == 0); in socket_match() 72 /* Ignore non-transparent sockets, in socket_match() 75 if (info->flags & XT_SOCKET_TRANSPARENT) in socket_match() [all …]
|
D | nfnetlink_hook.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (c) 2021 Red Hat GmbH 30 .len = IFNAMSIZ - 1 }, 40 struct netlink_dump_control *c) in nf_netlink_dump_start_rcu() argument 45 return -EINVAL; in nf_netlink_dump_start_rcu() 48 err = netlink_dump_start(nlsk, skb, nlh, c); in nf_netlink_dump_start_rcu() 93 return -EMSGSIZE; in nfnl_hook_put_bpf_prog_info() 99 ret = nla_put_be32(nlskb, NFNLA_HOOK_BPF_ID, htonl(prog->aux->id)); in nfnl_hook_put_bpf_prog_info() 109 return -EMSGSIZE; in nfnl_hook_put_bpf_prog_info() 117 struct net *net = sock_net(nlskb->sk); in nfnl_hook_put_nft_chain_info() [all …]
|
D | xt_LOG.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 /* (C) 1999-2001 Paul `Rusty' Russell 7 * (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org> 31 const struct xt_log_info *loginfo = par->targinfo; in log_tg() 36 li.u.log.level = loginfo->level; in log_tg() 37 li.u.log.logflags = loginfo->logflags; in log_tg() 40 xt_out(par), &li, "%s", loginfo->prefix); in log_tg() 46 const struct xt_log_info *loginfo = par->targinfo; in log_tg_check() 49 if (par->family != NFPROTO_IPV4 && par->family != NFPROTO_IPV6) in log_tg_check() 50 return -EINVAL; in log_tg_check() [all …]
|
D | xt_helper.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * (C) 2001 Martin Josefsson <gandalf@wlug.westbo.se> 26 const struct xt_helper_info *info = par->matchinfo; in helper_mt() 31 bool ret = info->invert; in helper_mt() 34 if (!ct || !ct->master) in helper_mt() 37 master_help = nfct_help(ct->master); in helper_mt() 42 helper = rcu_dereference(master_help->helper); in helper_mt() 46 if (info->name[0] == '\0') in helper_mt() 49 ret ^= !strncmp(helper->name, info->name, in helper_mt() 50 strlen(helper->name)); in helper_mt() [all …]
|
/linux-6.8/drivers/dma/ti/ |
D | k3-psil.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com 15 #include "k3-psil-priv.h" 21 { .family = "AM65X", .data = &am654_ep_map }, 22 { .family = "J721E", .data = &j721e_ep_map }, 23 { .family = "J7200", .data = &j7200_ep_map }, 24 { .family = "AM64X", .data = &am64_ep_map }, 25 { .family = "J721S2", .data = &j721s2_ep_map }, 26 { .family = "AM62X", .data = &am62_ep_map }, 27 { .family = "AM62AX", .data = &am62a_ep_map }, [all …]
|
/linux-6.8/tools/testing/selftests/netfilter/ |
D | nft_nat.sh | 6 # Kselftest framework requirement - SKIP code is 4. 11 sfx=$(mktemp -u "XXXXXXXX") 12 ns0="ns0-$sfx" 13 ns1="ns1-$sfx" 14 ns2="ns2-$sfx" 18 for i in 0 1 2; do ip netns del ns$i-"$sfx";done 21 nft --version > /dev/null 2>&1 22 if [ $? -ne 0 ];then 27 ip -Version > /dev/null 2>&1 28 if [ $? -ne 0 ];then [all …]
|
/linux-6.8/security/apparmor/include/ |
D | net.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 7 * Copyright (C) 1998-2008 Novell/SUSE 8 * Copyright 2009-2017 Canonical Ltd. 54 #define SK_CTX(X) ((X)->sk_security) 57 return sk->sk_security; in aa_sock() 60 #define DEFINE_AUDIT_NET(NAME, OP, SK, F, T, P) \ argument 61 struct lsm_network_audit NAME ## _net = { .sk = (SK), \ 62 .family = (F)}; \ 63 DEFINE_AUDIT_DATA(NAME, \ 68 NAME.common.u.net = &(NAME ## _net); \ [all …]
|
/linux-6.8/net/netlink/ |
D | genetlink.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * NETLINK Generic Netlink Family 55 static void genl_op_lock(const struct genl_family *family) in genl_op_lock() argument 57 if (!family->parallel_ops) in genl_op_lock() 61 static void genl_op_unlock(const struct genl_family *family) in genl_op_unlock() argument 63 if (!family->parallel_ops) in genl_op_unlock() 75 * Bit 1 is marked as already used since the drop-monitor code 80 * and the code no longer marks pre-reserved IDs as used. 82 * also abused this API and relied on family == group ID, we 83 * cater to that by giving it a static family and group ID. [all …]
|
/linux-6.8/security/tomoyo/ |
D | network.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * security/tomoyo/network.c 5 * Copyright (C) 2005-2011 NTT DATA CORPORATION 43 * tomoyo_parse_ipaddr_union - Parse an IP address. 53 u8 * const min = ptr->ip[0].in6_u.u6_addr8; in tomoyo_parse_ipaddr_union() 54 u8 * const max = ptr->ip[1].in6_u.u6_addr8; in tomoyo_parse_ipaddr_union() 59 in4_pton(address, -1, min, '-', &end) > 0) { in tomoyo_parse_ipaddr_union() 60 ptr->is_ipv6 = false; in tomoyo_parse_ipaddr_union() 62 ptr->ip[1].s6_addr32[0] = ptr->ip[0].s6_addr32[0]; in tomoyo_parse_ipaddr_union() 63 else if (*end++ != '-' || in tomoyo_parse_ipaddr_union() [all …]
|