Home
last modified time | relevance | path

Searched refs:optname (Results 1 – 25 of 116) sorted by relevance

12345

/kernel/linux/common_modules/newip/third_party/linux-5.10/net/newip/
Dnip_sockglue.c43 static bool nip_setsockopt_needs_rtnl(int optname) in nip_setsockopt_needs_rtnl() argument
45 switch (optname) { in nip_setsockopt_needs_rtnl()
53 static bool nip_getsockopt_needs_rtnl(int optname) in nip_getsockopt_needs_rtnl() argument
55 switch (optname) { in nip_getsockopt_needs_rtnl()
63 static int do_nip_setsockopt(struct sock *sk, int level, int optname, in do_nip_setsockopt() argument
69 bool needs_rtnl = nip_setsockopt_needs_rtnl(optname); in do_nip_setsockopt()
86 switch (optname) { in do_nip_setsockopt()
103 int nip_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, in nip_setsockopt() argument
111 err = do_nip_setsockopt(sk, level, optname, optval, optlen); in nip_setsockopt()
116 static int do_nip_getsockopt(struct sock *sk, int level, int optname, in do_nip_getsockopt() argument
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/
Dsockopt_sk.c35 if (ctx->level == SOL_IP && ctx->optname == IP_TOS) { in _getsockopt()
44 if (ctx->level == SOL_SOCKET && ctx->optname == SO_SNDBUF) { in _getsockopt()
52 if (ctx->level == SOL_TCP && ctx->optname == TCP_CONGESTION) { in _getsockopt()
60 if (ctx->level == SOL_IP && ctx->optname == IP_FREEBIND) { in _getsockopt()
110 if (ctx->level == SOL_IP && ctx->optname == IP_TOS) { in _setsockopt()
119 if (ctx->level == SOL_SOCKET && ctx->optname == SO_SNDBUF) { in _setsockopt()
131 if (ctx->level == SOL_TCP && ctx->optname == TCP_CONGESTION) { in _setsockopt()
143 if (ctx->level == SOL_IP && ctx->optname == IP_FREEBIND) { in _setsockopt()
Dsockopt_multi.c15 if (ctx->level != SOL_IP || ctx->optname != IP_TOS) in _getsockopt_child()
38 if (ctx->level != SOL_IP || ctx->optname != IP_TOS) in _getsockopt_parent()
61 if (ctx->level != SOL_IP || ctx->optname != IP_TOS) in _setsockopt()
/kernel/linux/linux-5.10/net/rds/
Dinfo.c73 void rds_info_register_func(int optname, rds_info_func func) in rds_info_register_func() argument
75 int offset = optname - RDS_INFO_FIRST; in rds_info_register_func()
77 BUG_ON(optname < RDS_INFO_FIRST || optname > RDS_INFO_LAST); in rds_info_register_func()
86 void rds_info_deregister_func(int optname, rds_info_func func) in rds_info_deregister_func() argument
88 int offset = optname - RDS_INFO_FIRST; in rds_info_deregister_func()
90 BUG_ON(optname < RDS_INFO_FIRST || optname > RDS_INFO_LAST); in rds_info_deregister_func()
158 int rds_info_getsockopt(struct socket *sock, int optname, char __user *optval, in rds_info_getsockopt() argument
208 func = rds_info_funcs[optname - RDS_INFO_FIRST]; in rds_info_getsockopt()
Dinfo.h22 void rds_info_register_func(int optname, rds_info_func func);
23 void rds_info_deregister_func(int optname, rds_info_func func);
24 int rds_info_getsockopt(struct socket *sock, int optname, char __user *optval,
/kernel/linux/linux-5.10/net/ipv6/
Dipv6_sockglue.c119 static bool setsockopt_needs_rtnl(int optname) in setsockopt_needs_rtnl() argument
121 switch (optname) { in setsockopt_needs_rtnl()
162 static int do_ipv6_mcast_group_source(struct sock *sk, int optname, in do_ipv6_mcast_group_source() argument
177 if (optname == MCAST_BLOCK_SOURCE) { in do_ipv6_mcast_group_source()
180 } else if (optname == MCAST_UNBLOCK_SOURCE) { in do_ipv6_mcast_group_source()
183 } else if (optname == MCAST_JOIN_SOURCE_GROUP) { in do_ipv6_mcast_group_source()
278 static int ipv6_mcast_join_leave(struct sock *sk, int optname, in ipv6_mcast_join_leave() argument
292 if (optname == MCAST_JOIN_GROUP) in ipv6_mcast_join_leave()
298 static int compat_ipv6_mcast_join_leave(struct sock *sk, int optname, in compat_ipv6_mcast_join_leave() argument
312 if (optname == MCAST_JOIN_GROUP) in compat_ipv6_mcast_join_leave()
[all …]
Draw.c979 static int rawv6_seticmpfilter(struct sock *sk, int level, int optname, in rawv6_seticmpfilter() argument
982 switch (optname) { in rawv6_seticmpfilter()
996 static int rawv6_geticmpfilter(struct sock *sk, int level, int optname, in rawv6_geticmpfilter() argument
1001 switch (optname) { in rawv6_geticmpfilter()
1022 static int do_rawv6_setsockopt(struct sock *sk, int level, int optname, in do_rawv6_setsockopt() argument
1034 switch (optname) { in do_rawv6_setsockopt()
1072 static int rawv6_setsockopt(struct sock *sk, int level, int optname, in rawv6_setsockopt() argument
1082 return rawv6_seticmpfilter(sk, level, optname, optval, optlen); in rawv6_setsockopt()
1084 if (optname == IPV6_CHECKSUM || in rawv6_setsockopt()
1085 optname == IPV6_HDRINCL) in rawv6_setsockopt()
[all …]
Dudp_impl.h19 int udpv6_getsockopt(struct sock *sk, int level, int optname,
21 int udpv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval,
/kernel/linux/linux-5.10/net/ipv4/bpfilter/
Dsockopt.c24 static int bpfilter_mbox_request(struct sock *sk, int optname, sockptr_t optval, in bpfilter_mbox_request() argument
48 err = bpfilter_ops.sockopt(sk, optname, optval, optlen, is_set); in bpfilter_mbox_request()
54 int bpfilter_ip_set_sockopt(struct sock *sk, int optname, sockptr_t optval, in bpfilter_ip_set_sockopt() argument
57 return bpfilter_mbox_request(sk, optname, optval, optlen, true); in bpfilter_ip_set_sockopt()
60 int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval, in bpfilter_ip_get_sockopt() argument
68 return bpfilter_mbox_request(sk, optname, USER_SOCKPTR(optval), len, in bpfilter_ip_get_sockopt()
/kernel/linux/linux-5.10/net/ipv4/
Dip_sockglue.c646 static bool setsockopt_needs_rtnl(int optname) in setsockopt_needs_rtnl() argument
648 switch (optname) { in setsockopt_needs_rtnl()
728 static int do_mcast_group_source(struct sock *sk, int optname, in do_mcast_group_source() argument
750 if (optname == MCAST_BLOCK_SOURCE) { in do_mcast_group_source()
753 } else if (optname == MCAST_UNBLOCK_SOURCE) { in do_mcast_group_source()
756 } else if (optname == MCAST_JOIN_SOURCE_GROUP) { in do_mcast_group_source()
851 static int ip_mcast_join_leave(struct sock *sk, int optname, in ip_mcast_join_leave() argument
868 if (optname == MCAST_JOIN_GROUP) in ip_mcast_join_leave()
873 static int compat_ip_mcast_join_leave(struct sock *sk, int optname, in compat_ip_mcast_join_leave() argument
891 if (optname == MCAST_JOIN_GROUP) in compat_ip_mcast_join_leave()
[all …]
Dudp_impl.h15 int udp_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval,
17 int udp_getsockopt(struct sock *sk, int level, int optname,
/kernel/linux/linux-5.10/include/linux/
Dbpfilter.h10 int bpfilter_ip_set_sockopt(struct sock *sk, int optname, sockptr_t optval,
12 int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
20 int (*sockopt)(struct sock *sk, int optname, sockptr_t optval,
Dbpf-cgroup.h141 int *optname, char __user *optval,
144 int optname, char __user *optval,
331 #define BPF_CGROUP_RUN_PROG_SETSOCKOPT(sock, level, optname, optval, optlen, \ argument
337 optname, optval, \
351 #define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, optlen, \ argument
357 optname, optval, \
440 #define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, \ argument
442 #define BPF_CGROUP_RUN_PROG_SETSOCKOPT(sock, level, optname, optval, optlen, \ argument
Dmroute.h26 static inline int ip_mroute_setsockopt(struct sock *sock, int optname, in ip_mroute_setsockopt() argument
32 static inline int ip_mroute_getsockopt(struct sock *sock, int optname, in ip_mroute_getsockopt() argument
Dmroute6.h37 static inline int ip6_mroute_setsockopt(struct sock *sock, int optname, in ip6_mroute_setsockopt() argument
45 int optname, char __user *optval, int __user *optlen) in ip6_mroute_getsockopt() argument
/kernel/linux/linux-5.10/net/dccp/
Dccid.h79 const int optname, int len,
83 const int optname, int len,
242 const int optname, int len, in ccid_hc_rx_getsockopt() argument
247 rc = ccid->ccid_ops->ccid_hc_rx_getsockopt(sk, optname, len, in ccid_hc_rx_getsockopt()
253 const int optname, int len, in ccid_hc_tx_getsockopt() argument
258 rc = ccid->ccid_ops->ccid_hc_tx_getsockopt(sk, optname, len, in ccid_hc_tx_getsockopt()
Dproto.c514 static int do_dccp_setsockopt(struct sock *sk, int level, int optname, in do_dccp_setsockopt() argument
520 switch (optname) { in do_dccp_setsockopt()
531 return dccp_setsockopt_ccid(sk, optname, optval, optlen); in do_dccp_setsockopt()
540 if (optname == DCCP_SOCKOPT_SERVICE) in do_dccp_setsockopt()
544 switch (optname) { in do_dccp_setsockopt()
580 int dccp_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, in dccp_setsockopt() argument
585 optname, optval, in dccp_setsockopt()
587 return do_dccp_setsockopt(sk, level, optname, optval, optlen); in dccp_setsockopt()
620 static int do_dccp_getsockopt(struct sock *sk, int level, int optname, in do_dccp_getsockopt() argument
634 switch (optname) { in do_dccp_getsockopt()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/chelsio/inline_crypto/chtls/
Dchtls_hw.c178 static int get_new_keyid(struct chtls_sock *csk, u32 optname) in get_new_keyid() argument
193 if (optname == TLS_RX) in get_new_keyid()
252 u32 keylen, u32 optname, in chtls_key_info() argument
313 if (optname == TLS_RX) { in chtls_key_info()
358 u32 optname, int cipher_type) in chtls_setkey() argument
378 if (optname == TLS_TX) { in chtls_setkey()
389 keyid = get_new_keyid(csk, optname); in chtls_setkey()
405 kwr->wr.reneg_to_write_rx = optname; in chtls_setkey()
423 ret = chtls_key_info(csk, kctx, keylen, optname, cipher_type); in chtls_setkey()
439 if (optname == TLS_RX) { in chtls_setkey()
Dchtls_main.c478 static int chtls_getsockopt(struct sock *sk, int level, int optname, in chtls_getsockopt() argument
485 optname, optval, optlen); in chtls_getsockopt()
490 static int do_chtls_setsockopt(struct sock *sk, int optname, in do_chtls_setsockopt() argument
564 rc = chtls_setkey(csk, keylen, optname, cipher_type); in do_chtls_setsockopt()
569 static int chtls_setsockopt(struct sock *sk, int level, int optname, in chtls_setsockopt() argument
576 optname, optval, optlen); in chtls_setsockopt()
578 return do_chtls_setsockopt(sk, optname, optval, optlen); in chtls_setsockopt()
/kernel/linux/linux-5.10/net/atm/
Dpvc.c65 static int pvc_setsockopt(struct socket *sock, int level, int optname, in pvc_setsockopt() argument
72 error = vcc_setsockopt(sock, level, optname, optval, optlen); in pvc_setsockopt()
77 static int pvc_getsockopt(struct socket *sock, int level, int optname, in pvc_getsockopt() argument
84 error = vcc_getsockopt(sock, level, optname, optval, optlen); in pvc_getsockopt()
Dcommon.h23 int vcc_setsockopt(struct socket *sock, int level, int optname,
25 int vcc_getsockopt(struct socket *sock, int level, int optname,
/kernel/liteos_a/compat/posix/src/
Dsocket.c77 int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) in getsockopt() argument
79 return lwip_getsockopt(s, level, optname, optval, optlen); in getsockopt()
82 int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen) in setsockopt() argument
84 return lwip_setsockopt(s, level, optname, optval, optlen); in setsockopt()
/kernel/linux/linux-5.10/net/tls/
Dtls_main.c431 static int do_tls_getsockopt(struct sock *sk, int optname, in do_tls_getsockopt() argument
438 switch (optname) { in do_tls_getsockopt()
442 optname == TLS_TX); in do_tls_getsockopt()
454 static int tls_getsockopt(struct sock *sk, int level, int optname, in tls_getsockopt() argument
461 optname, optval, optlen); in tls_getsockopt()
463 return do_tls_getsockopt(sk, optname, optval, optlen); in tls_getsockopt()
594 static int do_tls_setsockopt(struct sock *sk, int optname, sockptr_t optval, in do_tls_setsockopt() argument
599 switch (optname) { in do_tls_setsockopt()
604 optname == TLS_TX); in do_tls_setsockopt()
614 static int tls_setsockopt(struct sock *sk, int level, int optname, in tls_setsockopt() argument
[all …]
/kernel/linux/linux-5.10/Documentation/security/
DSCTP.rst40 based on the ``@optname`` that will result in either a bind or connect
46 @optname - Name of the option to validate.
54 | @optname | @address contains |
63 | @optname | @address contains |
71 A summary of the ``@optname`` entries is as follows::
105 ASCONF chunk when the corresponding ``@optname``'s are present::
107 @optname ASCONF Parameter
229 Checks permissions required for ipv4/ipv6 addresses based on the ``@optname``
234 | @optname | @address contains |
243 | @optname | @address contains |
[all …]
/kernel/linux/linux-5.10/security/selinux/
Dnetlabel.c482 static inline int selinux_netlbl_option(int level, int optname) in selinux_netlbl_option() argument
484 return (level == IPPROTO_IP && optname == IP_OPTIONS) || in selinux_netlbl_option()
485 (level == IPPROTO_IPV6 && optname == IPV6_HOPOPTS); in selinux_netlbl_option()
503 int optname) in selinux_netlbl_socket_setsockopt() argument
510 if (selinux_netlbl_option(level, optname) && in selinux_netlbl_socket_setsockopt()

12345