Home
last modified time | relevance | path

Searched +full:sock +full:- +full:priv (Results 1 – 25 of 98) sorted by relevance

1234

/linux/net/can/j1939/
H A Dsocket.c1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (c) 2010-2011 EIA Electronics,
4 // Copyright (c) 2010-2011 EIA Electronics,
8 // Copyright (c) 2017-2019 Pengutronix,
9 // Marc Kleine-Budde <kernel@pengutronix.de>
10 // Copyright (c) 2017-2019 Pengutronix,
15 #include <linux/can/can-ml.h>
21 #include "j1939-priv.h"
25 /* conversion function between struct sock::sk_priority from linux and
32 return 7 - sk_priority; in j1939_prio()
[all …]
H A Dj1939-priv.h1 /* SPDX-License-Identifier: GPL-2.0 */
2 // Copyright (c) 2010-2011 EIA Electronics,
4 // Copyright (c) 2017-2019 Pengutronix,
5 // Marc Kleine-Budde <kernel@pengutronix.de>
6 // Copyright (c) 2017-2019 Pengutronix,
13 #include <net/sock.h>
40 struct j1939_priv *priv; member
48 /* local list entry in priv
99 int j1939_local_ecu_get(struct j1939_priv *priv, name_t name, u8 sa);
100 void j1939_local_ecu_put(struct j1939_priv *priv, name_t name, u8 sa);
[all …]
/linux/net/netfilter/
H A Dnft_socket.c1 /* SPDX-License-Identifier: GPL-2.0 */
21 struct nft_regs *regs, struct sock *sk, in nft_socket_wildcard()
26 nft_reg_store8(dest, inet_sk(sk)->inet_rcv_saddr == 0); in nft_socket_wildcard()
30 nft_reg_store8(dest, ipv6_addr_any(&sk->sk_v6_rcv_saddr)); in nft_socket_wildcard()
34 regs->verdict.code = NFT_BREAK; in nft_socket_wildcard()
41 nft_sock_get_eval_cgroupv2(u32 *dest, struct sock *sk, const struct nft_pktinfo *pkt, u32 level) in nft_sock_get_eval_cgroupv2()
49 cgrp = cgroup_ancestor(sock_cgroup_ptr(&sk->sk_cgrp_data), level); in nft_sock_get_eval_cgroupv2()
58 /* process context only, uses current->nsproxy. */
67 level = cgrp->level; in nft_socket_cgroup_subtree_level()
72 return -ERANGE; in nft_socket_cgroup_subtree_level()
[all …]
H A Dnft_meta.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2008-2009 Patrick McHardy <kaber@trash.net>
22 #include <net/sock.h>
42 secs -= NFT_META_SECS_PER_MINUTE * sys_tz.tz_minuteswest; in nft_meta_weekday()
83 const struct sk_buff *skb = pkt->skb; in nft_meta_get_eval_pkttype_lo()
87 if (ipv4_is_multicast(ip_hdr(skb)->daddr)) in nft_meta_get_eval_pkttype_lo()
96 switch (skb->protocol) { in nft_meta_get_eval_pkttype_lo()
106 if (ipv4_is_multicast(iph->daddr)) in nft_meta_get_eval_pkttype_lo()
134 struct sock *sk = skb_to_full_sk(pkt->skb); in nft_meta_get_eval_skugid()
135 struct socket *sock; in nft_meta_get_eval_skugid() local
[all …]
H A Dxt_cgroup.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Might be used to implement individual "per-application" firewall
18 #include <net/sock.h>
28 struct xt_cgroup_info_v0 *info = par->matchinfo; in cgroup_mt_check_v0()
30 if (info->invert & ~1) in cgroup_mt_check_v0()
31 return -EINVAL; in cgroup_mt_check_v0()
38 struct xt_cgroup_info_v1 *info = par->matchinfo; in cgroup_mt_check_v1()
41 if ((info->invert_path & ~1) || (info->invert_classid & ~1)) in cgroup_mt_check_v1()
42 return -EINVAL; in cgroup_mt_check_v1()
44 if (!info->has_path && !info->has_classid) { in cgroup_mt_check_v1()
[all …]
H A Dnft_tproxy.c1 /* SPDX-License-Identifier: GPL-2.0 */
25 const struct nft_tproxy *priv = nft_expr_priv(expr); in nft_tproxy_eval_v4() local
26 struct sk_buff *skb = pkt->skb; in nft_tproxy_eval_v4()
31 struct sock *sk; in nft_tproxy_eval_v4()
33 if (pkt->tprot != IPPROTO_TCP && in nft_tproxy_eval_v4()
34 pkt->tprot != IPPROTO_UDP) { in nft_tproxy_eval_v4()
35 regs->verdict.code = NFT_BREAK; in nft_tproxy_eval_v4()
41 regs->verdict.code = NFT_BREAK; in nft_tproxy_eval_v4()
49 sk = nf_tproxy_get_sock_v4(nft_net(pkt), skb, iph->protocol, in nft_tproxy_eval_v4()
50 iph->saddr, iph->daddr, in nft_tproxy_eval_v4()
[all …]
/linux/net/smc/
H A Dsmc_rx.c1 // SPDX-License-Identifier: GPL-2.0
3 * Shared Memory Communications over RDMA (SMC-R) and RoCE
18 #include <net/sock.h>
19 #include <trace/events/sock.h>
32 static void smc_rx_wake_up(struct sock *sk) in smc_rx_wake_up()
41 wq = rcu_dereference(sk->sk_wq); in smc_rx_wake_up()
43 wake_up_interruptible_sync_poll(&wq->wait, EPOLLIN | EPOLLPRI | in smc_rx_wake_up()
46 if ((sk->sk_shutdown == SHUTDOWN_MASK) || in smc_rx_wake_up()
47 (sk->sk_state == SMC_CLOSED)) in smc_rx_wake_up()
62 struct smc_connection *conn = &smc->conn; in smc_rx_update_consumer()
[all …]
/linux/net/l2tp/
H A Dl2tp_eth.c1 // SPDX-License-Identifier: GPL-2.0-or-later
17 #include <net/sock.h>
50 eth_broadcast_addr(dev->broadcast); in l2tp_eth_dev_init()
58 struct l2tp_eth *priv = netdev_priv(dev); in l2tp_eth_dev_uninit() local
61 spriv = l2tp_session_priv(priv->session); in l2tp_eth_dev_uninit()
62 RCU_INIT_POINTER(spriv->dev, NULL); in l2tp_eth_dev_uninit()
70 struct l2tp_eth *priv = netdev_priv(dev); in l2tp_eth_dev_xmit() local
71 struct l2tp_session *session = priv->session; in l2tp_eth_dev_xmit()
72 unsigned int len = skb->len; in l2tp_eth_dev_xmit()
99 dev->priv_flags &= ~IFF_TX_SKB_SHARING; in l2tp_eth_dev_setup()
[all …]
H A Dl2tp_core.h1 /* SPDX-License-Identifier: GPL-2.0-only */
12 #include <net/sock.h>
63 * Is linked into a per-tunnel session list and a per-net ("global") IDR tree.
88 struct list_head list; /* per-tunnel list node */
90 struct hlist_node hlist; /* per-net session hlist */
117 * out pseudowire-specific shutdown actions.
124 * Pseudowire-specific implementation of debugfs session rendering.
128 void (*show)(struct seq_file *m, void *priv);
130 u8 priv[]; /* private data */ member
137 /* Used only for kernel-created sockets */
[all …]
/linux/include/linux/
H A Dnetfilter.h1 /* SPDX-License-Identifier: GPL-2.0 */
22 return -(verdict >> NF_VERDICT_QBITS); in NF_DROP_GETERR()
44 return a1->all[0] == a2->all[0] && in nf_inet_addr_cmp()
45 a1->all[1] == a2->all[1] && in nf_inet_addr_cmp()
46 a1->all[2] == a2->all[2] && in nf_inet_addr_cmp()
47 a1->all[3] == a2->all[3]; in nf_inet_addr_cmp()
63 result->all[0] = a1->all[0] & mask->all[0]; in nf_inet_addr_mask()
64 result->all[1] = a1->all[1] & mask->all[1]; in nf_inet_addr_mask()
65 result->all[2] = a1->all[2] & mask->all[2]; in nf_inet_addr_mask()
66 result->all[3] = a1->all[3] & mask->all[3]; in nf_inet_addr_mask()
[all …]
/linux/include/net/
H A Dxdp_sock.h1 /* SPDX-License-Identifier: GPL-2.0 */
15 #include <net/sock.h>
49 /* struct sock must be the first member of struct xdp_sock */
50 struct sock sk;
101 * void (*tmo_request_timestamp)(void *priv)
104 * u64 (*tmo_fill_timestamp)(void *priv)
108 * void (*tmo_request_checksum)(u16 csum_start, u16 csum_offset, void *priv)
115 void (*tmo_request_timestamp)(void *priv);
116 u64 (*tmo_fill_timestamp)(void *priv);
117 void (*tmo_request_checksum)(u16 csum_start, u16 csum_offset, void *priv);
[all …]
H A Dudp_tunnel.h1 /* SPDX-License-Identifier: GPL-2.0 */
16 /* Used only for kernel-created sockets */
58 if (cfg->family == AF_INET) in udp_sock_create()
61 if (cfg->family == AF_INET6) in udp_sock_create()
64 return -EPFNOSUPPORT; in udp_sock_create()
67 typedef int (*udp_tunnel_encap_rcv_t)(struct sock *sk, struct sk_buff *skb);
68 typedef int (*udp_tunnel_encap_err_lookup_t)(struct sock *sk,
70 typedef void (*udp_tunnel_encap_err_rcv_t)(struct sock *sk,
73 typedef void (*udp_tunnel_encap_destroy_t)(struct sock *sk);
74 typedef struct sk_buff *(*udp_tunnel_gro_receive_t)(struct sock *sk,
[all …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
H A Dktls_rx.c1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
13 struct mlx5e_priv *priv; member
39 struct mlx5e_priv *priv; member
48 struct sock *sk;
65 if (!refcount_dec_and_test(&priv_rx->resync.refcnt)) in mlx5e_ktls_priv_rx_put()
74 refcount_inc(&priv_rx->resync.refcnt); in mlx5e_ktls_priv_rx_get()
95 return ERR_PTR(-ENOMEM); in mlx5e_ktls_rx_resync_create_resp_list()
97 INIT_LIST_HEAD(&resp_list->list); in mlx5e_ktls_rx_resync_create_resp_list()
98 spin_lock_init(&resp_list->lock); in mlx5e_ktls_rx_resync_create_resp_list()
111 if (unlikely(test_bit(MLX5E_PRIV_RX_FLAG_DELETING, priv_rx->flags))) in accel_rule_handle_work()
[all …]
H A Dktls.c1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
18 switch (crypto_info->cipher_type) { in mlx5_ktls_create_key()
23 key = info->key; in mlx5_ktls_create_key()
24 sz_bytes = sizeof(info->key); in mlx5_ktls_create_key()
31 key = info->key; in mlx5_ktls_create_key()
32 sz_bytes = sizeof(info->key); in mlx5_ktls_create_key()
36 return ERR_PTR(-EINVAL); in mlx5_ktls_create_key()
48 static int mlx5e_ktls_add(struct net_device *netdev, struct sock *sk, in mlx5e_ktls_add()
53 struct mlx5e_priv *priv = netdev_priv(netdev); in mlx5e_ktls_add() local
54 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_ktls_add()
[all …]
H A Dmacsec_stats.c1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
5 #include <net/sock.h>
25 if (!priv->macsec) in MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS()
28 if (mlx5e_is_macsec_device(priv->mdev)) in MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS()
40 if (!priv->macsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS()
43 if (!mlx5e_is_macsec_device(priv->mdev)) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS()
55 if (!priv->macsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
58 if (!mlx5e_is_macsec_device(priv->mdev)) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
61 macsec_fs = priv->mdev->macsec_fs; in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
H A Dktls_stats.c14 * - Redistributions of source code must retain the above
18 * - Redistributions in binary form must reproduce the above
35 #include <net/sock.h>
53 int mlx5e_ktls_get_count(struct mlx5e_priv *priv) in mlx5e_ktls_get_count() argument
55 if (!priv->tls) in mlx5e_ktls_get_count()
61 void mlx5e_ktls_get_strings(struct mlx5e_priv *priv, u8 **data) in mlx5e_ktls_get_strings() argument
65 if (!priv->tls) in mlx5e_ktls_get_strings()
68 n = mlx5e_ktls_get_count(priv); in mlx5e_ktls_get_strings()
74 void mlx5e_ktls_get_stats(struct mlx5e_priv *priv, u64 **data) in mlx5e_ktls_get_stats() argument
78 if (!priv->tls) in mlx5e_ktls_get_stats()
[all …]
H A Dipsec_stats.c14 * - Redistributions of source code must retain the above
18 * - Redistributions in binary form must reproduce the above
35 #include <net/sock.h>
68 if (!priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS()
80 if (!priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS()
91 if (!priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
94 mlx5e_accel_ipsec_fs_read_stats(priv, &priv->ipsec->hw_stats); in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
98 MLX5E_READ_CTR_ATOMIC64(&priv->ipsec->hw_stats, in MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS()
104 return priv->ipsec ? NUM_IPSEC_SW_COUNTERS : 0; in MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS()
113 if (priv->ipsec) in MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS()
[all …]
/linux/drivers/atm/
H A Datmtcp.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* drivers/atm/atmtcp.c - ATM over TCP "device" driver */
4 /* Written 1997-2000 by Werner Almesberger, EPFL LRC/ICA */
21 #define PRIV(dev) ((struct atmtcp_dev_data *) ((dev)->dev_data)) macro
26 int persist; /* non-zero if persistent */
38 * waiting for an answer, so we need to re-validate out_vcc every once
53 out_vcc = PRIV(vcc->dev) ? PRIV(vcc->dev)->vcc : NULL; in atmtcp_send_control()
54 if (!out_vcc) return -EUNATCH; in atmtcp_send_control()
56 if (!skb) return -ENOMEM; in atmtcp_send_control()
58 out_vcc = PRIV(vcc->dev) ? PRIV(vcc->dev)->vcc : NULL; in atmtcp_send_control()
[all …]
/linux/include/net/netfilter/
H A Dbr_netfilter.h1 /* SPDX-License-Identifier: GPL-2.0 */
25 int br_nf_hook_thresh(unsigned int hook, struct net *net, struct sock *sk,
28 int (*okfn)(struct net *, struct sock *,
38 skb->network_header -= len; in nf_bridge_push_encap_header()
41 int br_nf_pre_routing_finish_bridge(struct net *net, struct sock *sk, struct sk_buff *skb);
49 return port ? &port->br->fake_rtable : NULL; in bridge_parent_rtable()
60 unsigned int br_nf_pre_routing_ipv6(void *priv,
66 return -1; in br_validate_ipv6()
70 br_nf_pre_routing_ipv6(void *priv, struct sk_buff *skb, in br_nf_pre_routing_ipv6() argument
/linux/include/linux/soc/qcom/
H A Dqmi.h1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
19 * struct qmi_header - wireformat header of QMI messages
59 * struct qmi_elem_info - describes how to encode a single QMI element
68 * @ei_array: Null-terminated array of @qmi_elem_info to describe nested
96 * struct qmi_response_type_v01 - common response header (decoded)
108 * struct qmi_service - context to track lookup-results
114 * @priv: handle for client's use
125 void *priv; member
132 * struct qmi_ops - callbacks for qmi_handle
[all …]
/linux/include/crypto/
H A Dif_alg.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * if_alg: User-space algorithm interface
17 #include <net/sock.h>
25 /* struct sock must be the first member of struct alg_sock */
26 struct sock sk;
28 struct sock *parent;
48 int (*accept)(void *private, struct sock *sk);
49 int (*accept_nokey)(void *private, struct sock *sk);
71 #define MAX_SGL_ENTS ((4096 - sizeof(struct af_alg_tsgl)) / \
72 sizeof(struct scatterlist) - 1)
[all …]
/linux/net/bridge/netfilter/
H A Dnf_conntrack_bridge.c1 /* SPDX-License-Identifier: GPL-2.0 */
27 static int nf_br_ip_fragment(struct net *net, struct sock *sk, in nf_br_ip_fragment()
30 int (*output)(struct net *, struct sock *sk, in nf_br_ip_fragment()
34 int frag_max_size = BR_INPUT_SKB_CB(skb)->frag_max_size; in nf_br_ip_fragment()
35 u8 tstamp_type = skb->tstamp_type; in nf_br_ip_fragment()
37 ktime_t tstamp = skb->tstamp; in nf_br_ip_fragment()
43 if (skb->ip_summed == CHECKSUM_PARTIAL && in nf_br_ip_fragment()
53 hlen = iph->ihl * 4; in nf_br_ip_fragment()
54 frag_max_size -= hlen; in nf_br_ip_fragment()
55 ll_rs = LL_RESERVED_SPACE(skb->dev); in nf_br_ip_fragment()
[all …]
/linux/net/atm/
H A Dlec.c1 // SPDX-License-Identifier: GPL-2.0-only
19 #include <net/sock.h>
45 /* Hardening for Spectre-v1 */
67 static struct lec_arp_table *lec_arp_find(struct lec_priv *priv,
69 static int lec_arp_remove(struct lec_priv *priv,
79 static int lec_addr_delete(struct lec_priv *priv, const unsigned char *atm_addr,
81 static void lec_arp_check_empties(struct lec_priv *priv,
83 static void lec_arp_destroy(struct lec_priv *priv);
84 static void lec_arp_init(struct lec_priv *priv);
85 static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv,
[all …]
H A Dclip.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* net/atm/clip.c - RFC1577 Classical IP over ATM */
4 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
54 struct sock *sk; in to_atmarpd()
60 return -EUNATCH; in to_atmarpd()
63 return -ENOMEM; in to_atmarpd()
65 ctrl->type = type; in to_atmarpd()
66 ctrl->itf_num = itf; in to_atmarpd()
67 ctrl->ip = ip; in to_atmarpd()
68 atm_force_charge(atmarpd, skb->truesize); in to_atmarpd()
[all …]
/linux/tools/virtio/
H A Dvhost_net_test.c1 // SPDX-License-Identifier: GPL-2.0
55 int sock; member
98 memcpy(dev->mac, &ifr.ifr_hwaddr.sa_data, ETHER_ADDR_LEN); in tun_alloc()
106 dev->sock = socket(AF_PACKET, SOCK_RAW, htons(TEST_PTYPE)); in vdev_create_socket()
107 assert(dev->sock != -1); in vdev_create_socket()
110 assert(ioctl(dev->sock, SIOCGIFINDEX, &ifr) >= 0); in vdev_create_socket()
112 dev->ifindex = ifr.ifr_ifindex; in vdev_create_socket()
115 assert(ioctl(dev->sock, SIOCGIFFLAGS, &ifr) >= 0); in vdev_create_socket()
117 assert(ioctl(dev->sock, SIOCSIFFLAGS, &ifr) >= 0); in vdev_create_socket()
122 char *sendbuf = dev->test_buf + HDR_LEN; in vdev_send_packet()
[all …]

1234