/openbmc/linux/net/mptcp/ |
H A D | sockopt.c | 70 static void mptcp_sol_socket_sync_intval(struct mptcp_sock *msk, int optname, int val) in mptcp_sol_socket_sync_intval() argument 82 switch (optname) { in mptcp_sol_socket_sync_intval() 123 static int mptcp_sol_socket_intval(struct mptcp_sock *msk, int optname, int val) in mptcp_sol_socket_intval() argument 129 ret = sock_setsockopt(sk->sk_socket, SOL_SOCKET, optname, in mptcp_sol_socket_intval() 134 mptcp_sol_socket_sync_intval(msk, optname, val); in mptcp_sol_socket_intval() 147 static int mptcp_setsockopt_sol_socket_tstamp(struct mptcp_sock *msk, int optname, int val) in mptcp_setsockopt_sol_socket_tstamp() argument 154 ret = sock_setsockopt(sk->sk_socket, SOL_SOCKET, optname, in mptcp_setsockopt_sol_socket_tstamp() 164 sock_set_timestamp(sk, optname, !!val); in mptcp_setsockopt_sol_socket_tstamp() 172 static int mptcp_setsockopt_sol_socket_int(struct mptcp_sock *msk, int optname, in mptcp_setsockopt_sol_socket_int() argument 182 switch (optname) { in mptcp_setsockopt_sol_socket_int() [all …]
|
/openbmc/linux/net/rds/ |
H A D | info.c | 73 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()
|
H A D | info.h | 22 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,
|
/openbmc/linux/tools/testing/selftests/bpf/progs/ |
H A D | sockopt_sk.c | 50 if (ctx->level == SOL_IP && ctx->optname == IP_TOS) { in _getsockopt() 58 if (ctx->level == SOL_SOCKET && ctx->optname == SO_SNDBUF) { in _getsockopt() 66 if (ctx->level == SOL_TCP && ctx->optname == TCP_CONGESTION) { in _getsockopt() 74 if (ctx->level == SOL_TCP && ctx->optname == TCP_ZEROCOPY_RECEIVE) { in _getsockopt() 90 if (ctx->level == SOL_IP && ctx->optname == IP_FREEBIND) { in _getsockopt() 160 if (ctx->level == SOL_IP && ctx->optname == IP_TOS) { in _setsockopt() 169 if (ctx->level == SOL_SOCKET && ctx->optname == SO_SNDBUF) { in _setsockopt() 181 if (ctx->level == SOL_TCP && ctx->optname == TCP_CONGESTION) { in _setsockopt() 193 if (ctx->level == SOL_IP && ctx->optname == IP_FREEBIND) { in _setsockopt()
|
H A D | sockopt_multi.c | 16 if (ctx->level != SOL_IP || ctx->optname != IP_TOS) in _getsockopt_child() 45 if (ctx->level != SOL_IP || ctx->optname != IP_TOS) in _getsockopt_parent() 74 if (ctx->level != SOL_IP || ctx->optname != IP_TOS) in _setsockopt()
|
/openbmc/linux/net/ipv6/ |
H A D | ipv6_sockglue.c | 120 static bool setsockopt_needs_rtnl(int optname) in setsockopt_needs_rtnl() argument 122 switch (optname) { in setsockopt_needs_rtnl() 163 static int do_ipv6_mcast_group_source(struct sock *sk, int optname, in do_ipv6_mcast_group_source() argument 178 if (optname == MCAST_BLOCK_SOURCE) { in do_ipv6_mcast_group_source() 181 } else if (optname == MCAST_UNBLOCK_SOURCE) { in do_ipv6_mcast_group_source() 184 } else if (optname == MCAST_JOIN_SOURCE_GROUP) { in do_ipv6_mcast_group_source() 279 static int ipv6_mcast_join_leave(struct sock *sk, int optname, in ipv6_mcast_join_leave() argument 293 if (optname == MCAST_JOIN_GROUP) in ipv6_mcast_join_leave() 299 static int compat_ipv6_mcast_join_leave(struct sock *sk, int optname, in compat_ipv6_mcast_join_leave() argument 313 if (optname == MCAST_JOIN_GROUP) in compat_ipv6_mcast_join_leave() [all …]
|
H A D | raw.c | 938 static int rawv6_seticmpfilter(struct sock *sk, int level, int optname, in rawv6_seticmpfilter() argument 941 switch (optname) { in rawv6_seticmpfilter() 955 static int rawv6_geticmpfilter(struct sock *sk, int level, int optname, in rawv6_geticmpfilter() argument 960 switch (optname) { in rawv6_geticmpfilter() 981 static int do_rawv6_setsockopt(struct sock *sk, int level, int optname, in do_rawv6_setsockopt() argument 993 switch (optname) { in do_rawv6_setsockopt() 1031 static int rawv6_setsockopt(struct sock *sk, int level, int optname, in rawv6_setsockopt() argument 1041 return rawv6_seticmpfilter(sk, level, optname, optval, optlen); in rawv6_setsockopt() 1043 if (optname == IPV6_CHECKSUM || in rawv6_setsockopt() 1044 optname == IPV6_HDRINCL) in rawv6_setsockopt() [all …]
|
H A D | udp_impl.h | 19 int udpv6_getsockopt(struct sock *sk, int level, int optname, 21 int udpv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval,
|
/openbmc/linux/net/ipv4/bpfilter/ |
H A D | sockopt.c | 15 static int bpfilter_mbox_request(struct sock *sk, int optname, sockptr_t optval, in bpfilter_mbox_request() argument 39 err = bpfilter_ops.sockopt(sk, optname, optval, optlen, is_set); in bpfilter_mbox_request() 45 int bpfilter_ip_set_sockopt(struct sock *sk, int optname, sockptr_t optval, in bpfilter_ip_set_sockopt() argument 48 return bpfilter_mbox_request(sk, optname, optval, optlen, true); in bpfilter_ip_set_sockopt() 51 int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval, in bpfilter_ip_get_sockopt() argument 59 return bpfilter_mbox_request(sk, optname, USER_SOCKPTR(optval), len, in bpfilter_ip_get_sockopt()
|
/openbmc/linux/net/ipv4/ |
H A D | ip_sockglue.c | 642 static bool setsockopt_needs_rtnl(int optname) in setsockopt_needs_rtnl() argument 644 switch (optname) { in setsockopt_needs_rtnl() 723 static int do_mcast_group_source(struct sock *sk, int optname, in do_mcast_group_source() argument 745 if (optname == MCAST_BLOCK_SOURCE) { in do_mcast_group_source() 748 } else if (optname == MCAST_UNBLOCK_SOURCE) { in do_mcast_group_source() 751 } else if (optname == MCAST_JOIN_SOURCE_GROUP) { in do_mcast_group_source() 847 static int ip_mcast_join_leave(struct sock *sk, int optname, in ip_mcast_join_leave() argument 864 if (optname == MCAST_JOIN_GROUP) in ip_mcast_join_leave() 869 static int compat_ip_mcast_join_leave(struct sock *sk, int optname, in compat_ip_mcast_join_leave() argument 887 if (optname == MCAST_JOIN_GROUP) in compat_ip_mcast_join_leave() [all …]
|
H A D | udp_impl.h | 15 int udp_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, 17 int udp_getsockopt(struct sock *sk, int level, int optname,
|
/openbmc/linux/include/linux/ |
H A D | bpf-cgroup.h | 141 int *optname, sockptr_t optval, 145 int optname, sockptr_t optval, 150 int optname, void *optval, 365 #define BPF_CGROUP_RUN_PROG_SETSOCKOPT(sock, level, optname, optval, optlen, \ argument 372 optname, optval, \ 378 #define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, optlen, \ argument 387 level, optname)) \ 389 sock, level, optname, optval, optlen, \ 394 #define BPF_CGROUP_RUN_PROG_GETSOCKOPT_KERN(sock, level, optname, optval, \ argument 400 sock, level, optname, optval, optlen, retval); \ [all …]
|
H A D | bpfilter.h | 10 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, 19 int (*sockopt)(struct sock *sk, int optname, sockptr_t optval,
|
H A D | mroute.h | 27 static inline int ip_mroute_setsockopt(struct sock *sock, int optname, in ip_mroute_setsockopt() argument 33 static inline int ip_mroute_getsockopt(struct sock *sk, int optname, in ip_mroute_getsockopt() argument
|
/openbmc/linux/net/dccp/ |
H A D | ccid.h | 79 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()
|
H A D | proto.c | 509 static int do_dccp_setsockopt(struct sock *sk, int level, int optname, in do_dccp_setsockopt() argument 515 switch (optname) { in do_dccp_setsockopt() 526 return dccp_setsockopt_ccid(sk, optname, optval, optlen); in do_dccp_setsockopt() 535 if (optname == DCCP_SOCKOPT_SERVICE) in do_dccp_setsockopt() 539 switch (optname) { in do_dccp_setsockopt() 575 int dccp_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, in dccp_setsockopt() argument 580 optname, optval, in dccp_setsockopt() 582 return do_dccp_setsockopt(sk, level, optname, optval, optlen); in dccp_setsockopt() 615 static int do_dccp_getsockopt(struct sock *sk, int level, int optname, in do_dccp_getsockopt() argument 629 switch (optname) { in do_dccp_getsockopt() [all …]
|
/openbmc/linux/drivers/net/ethernet/chelsio/inline_crypto/chtls/ |
H A D | chtls_hw.c | 178 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()
|
H A D | chtls_main.c | 479 static int chtls_getsockopt(struct sock *sk, int level, int optname, in chtls_getsockopt() 486 optname, optval, optlen); in chtls_getsockopt() 491 static int do_chtls_setsockopt(struct sock *sk, int optname, in do_chtls_setsockopt() 565 rc = chtls_setkey(csk, keylen, optname, cipher_type); in do_chtls_setsockopt() 570 static int chtls_setsockopt(struct sock *sk, int level, int optname, in chtls_setsockopt() 577 optname, optval, optlen); in chtls_setsockopt() 579 return do_chtls_setsockopt(sk, optname, optval, optlen); in chtls_setsockopt() 478 chtls_getsockopt(struct sock * sk,int level,int optname,char __user * optval,int __user * optlen) chtls_getsockopt() argument 490 do_chtls_setsockopt(struct sock * sk,int optname,sockptr_t optval,unsigned int optlen) do_chtls_setsockopt() argument 569 chtls_setsockopt(struct sock * sk,int level,int optname,sockptr_t optval,unsigned int optlen) chtls_setsockopt() argument
|
/openbmc/linux/net/atm/ |
H A D | pvc.c | 65 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()
|
H A D | common.h | 23 int vcc_setsockopt(struct socket *sock, int level, int optname, 25 int vcc_getsockopt(struct socket *sock, int level, int optname,
|
/openbmc/linux/Documentation/security/ |
H A D | SCTP.rst | 37 based on the ``@optname`` that will result in either a bind or connect 43 @optname - Name of the option to validate. 51 | @optname | @address contains | 60 | @optname | @address contains | 68 A summary of the ``@optname`` entries is as follows:: 102 ASCONF chunk when the corresponding ``@optname``'s are present:: 104 @optname ASCONF Parameter 230 Checks permissions required for ipv4/ipv6 addresses based on the ``@optname`` 235 | @optname | @address contains | 244 | @optname | @address contains | [all …]
|
/openbmc/linux/Documentation/bpf/ |
H A D | prog_cgroup_sockopt.rst | 16 all input arguments: ``level``, ``optname``, ``optval`` and ``optlen``. 84 to the input arguments (``level``, ``optname``, ``optval``, ``optlen``), 116 if (ctx->level == MY_SOL && ctx->optname == MY_OPTNAME) { 124 if (ctx->level == SOL_IP && ctx->optname == IP_FREEBIND) { 142 if (ctx->level == MY_SOL && ctx->optname == MY_OPTNAME) { 149 if (ctx->level == SOL_IP && ctx->optname == IP_FREEBIND) {
|
/openbmc/linux/security/selinux/ |
H A D | netlabel.c | 485 static inline int selinux_netlbl_option(int level, int optname) in selinux_netlbl_option() argument 487 return (level == IPPROTO_IP && optname == IP_OPTIONS) || in selinux_netlbl_option() 488 (level == IPPROTO_IPV6 && optname == IPV6_HOPOPTS); in selinux_netlbl_option() 506 int optname) in selinux_netlbl_socket_setsockopt() argument 513 if (selinux_netlbl_option(level, optname) && in selinux_netlbl_socket_setsockopt()
|
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | sockopt_inherit.c | 41 static int verify_sockopt(int fd, int optname, const char *msg, char expected) in verify_sockopt() argument 47 err = getsockopt(fd, SOL_CUSTOM, optname, &buf, &optlen); in verify_sockopt() 53 printf("%s %d: got=0x%x ? expected=0x%x\n", msg, optname, buf, expected); in verify_sockopt()
|
/openbmc/linux/net/bluetooth/rfcomm/ |
H A D | sock.c | 619 static int rfcomm_sock_setsockopt_old(struct socket *sock, int optname, in rfcomm_sock_setsockopt_old() argument 630 switch (optname) { in rfcomm_sock_setsockopt_old() 661 static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, in rfcomm_sock_setsockopt() argument 672 return rfcomm_sock_setsockopt_old(sock, optname, optval, optlen); in rfcomm_sock_setsockopt() 679 switch (optname) { in rfcomm_sock_setsockopt() 726 static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __user *optval, int __… in rfcomm_sock_getsockopt_old() argument 743 switch (optname) { in rfcomm_sock_getsockopt_old() 802 static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval,… in rfcomm_sock_getsockopt() argument 812 return rfcomm_sock_getsockopt_old(sock, optname, optval, optlen); in rfcomm_sock_getsockopt() 822 switch (optname) { in rfcomm_sock_getsockopt()
|