/net/ipv6/ |
D | ipv6_sockglue.c | 119 static bool setsockopt_needs_rtnl(int optname) in setsockopt_needs_rtnl() argument 121 switch (optname) { in setsockopt_needs_rtnl() 139 static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, in do_ipv6_setsockopt() argument 146 bool needs_rtnl = setsockopt_needs_rtnl(optname); in do_ipv6_setsockopt() 160 if (ip6_mroute_opt(optname)) in do_ipv6_setsockopt() 161 return ip6_mroute_setsockopt(sk, optname, optval, optlen); in do_ipv6_setsockopt() 167 switch (optname) { in do_ipv6_setsockopt() 403 if (optname != IPV6_RTHDR && !ns_capable(net->user_ns, CAP_NET_RAW)) in do_ipv6_setsockopt() 430 opt = ipv6_renew_options(sk, opt, optname, new); in do_ipv6_setsockopt() 439 if (optname == IPV6_RTHDR && opt && opt->srcrt) { in do_ipv6_setsockopt() [all …]
|
D | raw.c | 974 static int rawv6_seticmpfilter(struct sock *sk, int level, int optname, in rawv6_seticmpfilter() argument 977 switch (optname) { in rawv6_seticmpfilter() 991 static int rawv6_geticmpfilter(struct sock *sk, int level, int optname, in rawv6_geticmpfilter() argument 996 switch (optname) { in rawv6_geticmpfilter() 1017 static int do_rawv6_setsockopt(struct sock *sk, int level, int optname, in do_rawv6_setsockopt() argument 1026 switch (optname) { in do_rawv6_setsockopt() 1064 static int rawv6_setsockopt(struct sock *sk, int level, int optname, in rawv6_setsockopt() argument 1074 return rawv6_seticmpfilter(sk, level, optname, optval, optlen); in rawv6_setsockopt() 1076 if (optname == IPV6_CHECKSUM || in rawv6_setsockopt() 1077 optname == IPV6_HDRINCL) in rawv6_setsockopt() [all …]
|
D | udp_impl.h | 18 int udpv6_getsockopt(struct sock *sk, int level, int optname, 20 int udpv6_setsockopt(struct sock *sk, int level, int optname, 23 int compat_udpv6_setsockopt(struct sock *sk, int level, int optname, 25 int compat_udpv6_getsockopt(struct sock *sk, int level, int optname,
|
D | udp.c | 1559 int udpv6_setsockopt(struct sock *sk, int level, int optname, in udpv6_setsockopt() argument 1563 return udp_lib_setsockopt(sk, level, optname, optval, optlen, in udpv6_setsockopt() 1565 return ipv6_setsockopt(sk, level, optname, optval, optlen); in udpv6_setsockopt() 1569 int compat_udpv6_setsockopt(struct sock *sk, int level, int optname, in compat_udpv6_setsockopt() argument 1573 return udp_lib_setsockopt(sk, level, optname, optval, optlen, in compat_udpv6_setsockopt() 1575 return compat_ipv6_setsockopt(sk, level, optname, optval, optlen); in compat_udpv6_setsockopt() 1579 int udpv6_getsockopt(struct sock *sk, int level, int optname, in udpv6_getsockopt() argument 1583 return udp_lib_getsockopt(sk, level, optname, optval, optlen); in udpv6_getsockopt() 1584 return ipv6_getsockopt(sk, level, optname, optval, optlen); in udpv6_getsockopt() 1588 int compat_udpv6_getsockopt(struct sock *sk, int level, int optname, in compat_udpv6_getsockopt() argument [all …]
|
/net/ipv4/ |
D | ip_sockglue.c | 568 static bool setsockopt_needs_rtnl(int optname) in setsockopt_needs_rtnl() argument 570 switch (optname) { in setsockopt_needs_rtnl() 591 int optname, char __user *optval, unsigned int optlen) in do_ip_setsockopt() argument 596 bool needs_rtnl = setsockopt_needs_rtnl(optname); in do_ip_setsockopt() 598 switch (optname) { in do_ip_setsockopt() 637 if (optname == IP_ROUTER_ALERT) in do_ip_setsockopt() 639 if (ip_mroute_opt(optname)) in do_ip_setsockopt() 640 return ip_mroute_setsockopt(sk, optname, optval, optlen); in do_ip_setsockopt() 647 switch (optname) { in do_ip_setsockopt() 926 if (optname == IP_ADD_MEMBERSHIP) in do_ip_setsockopt() [all …]
|
D | udp_impl.h | 15 int udp_setsockopt(struct sock *sk, int level, int optname, 17 int udp_getsockopt(struct sock *sk, int level, int optname, 21 int compat_udp_setsockopt(struct sock *sk, int level, int optname, 23 int compat_udp_getsockopt(struct sock *sk, int level, int optname,
|
D | raw.c | 840 static int do_raw_setsockopt(struct sock *sk, int level, int optname, in do_raw_setsockopt() argument 843 if (optname == ICMP_FILTER) { in do_raw_setsockopt() 852 static int raw_setsockopt(struct sock *sk, int level, int optname, in raw_setsockopt() argument 856 return ip_setsockopt(sk, level, optname, optval, optlen); in raw_setsockopt() 857 return do_raw_setsockopt(sk, level, optname, optval, optlen); in raw_setsockopt() 861 static int compat_raw_setsockopt(struct sock *sk, int level, int optname, in compat_raw_setsockopt() argument 865 return compat_ip_setsockopt(sk, level, optname, optval, optlen); in compat_raw_setsockopt() 866 return do_raw_setsockopt(sk, level, optname, optval, optlen); in compat_raw_setsockopt() 870 static int do_raw_getsockopt(struct sock *sk, int level, int optname, in do_raw_getsockopt() argument 873 if (optname == ICMP_FILTER) { in do_raw_getsockopt() [all …]
|
/net/rds/ |
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 209 func = rds_info_funcs[optname - RDS_INFO_FIRST]; in rds_info_getsockopt()
|
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,
|
D | af_rds.c | 384 int optlen, int optname) in rds_enable_recvtstamp() argument 396 if (optname == SO_TIMESTAMP_NEW) in rds_enable_recvtstamp() 434 static int rds_setsockopt(struct socket *sock, int level, int optname, in rds_setsockopt() argument 445 switch (optname) { in rds_setsockopt() 472 ret = rds_enable_recvtstamp(sock->sk, optval, optlen, optname); in rds_setsockopt() 485 static int rds_getsockopt(struct socket *sock, int level, int optname, in rds_getsockopt() argument 500 switch (optname) { in rds_getsockopt() 502 ret = rds_info_getsockopt(sock, optname, optval, in rds_getsockopt()
|
/net/ |
D | compat.c | 340 static int do_set_attach_filter(struct socket *sock, int level, int optname, in do_set_attach_filter() argument 349 return sock_setsockopt(sock, level, optname, (char __user *)kfprog, in do_set_attach_filter() 353 static int compat_sock_setsockopt(struct socket *sock, int level, int optname, in compat_sock_setsockopt() argument 356 if (optname == SO_ATTACH_FILTER || in compat_sock_setsockopt() 357 optname == SO_ATTACH_REUSEPORT_CBPF) in compat_sock_setsockopt() 358 return do_set_attach_filter(sock, level, optname, in compat_sock_setsockopt() 360 return sock_setsockopt(sock, level, optname, optval, optlen); in compat_sock_setsockopt() 363 static int __compat_sys_setsockopt(int fd, int level, int optname, in __compat_sys_setsockopt() argument 374 err = security_socket_setsockopt(sock, level, optname); in __compat_sys_setsockopt() 382 optname, optval, optlen); in __compat_sys_setsockopt() [all …]
|
/net/ipv4/bpfilter/ |
D | sockopt.c | 25 static int bpfilter_mbox_request(struct sock *sk, int optname, in bpfilter_mbox_request() argument 46 err = bpfilter_ops.sockopt(sk, optname, optval, optlen, is_set); in bpfilter_mbox_request() 52 int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char __user *optval, in bpfilter_ip_set_sockopt() argument 55 return bpfilter_mbox_request(sk, optname, optval, optlen, true); in bpfilter_ip_set_sockopt() 58 int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval, in bpfilter_ip_get_sockopt() argument 66 return bpfilter_mbox_request(sk, optname, optval, len, false); in bpfilter_ip_get_sockopt()
|
/net/dccp/ |
D | proto.c | 500 static int do_dccp_setsockopt(struct sock *sk, int level, int optname, in do_dccp_setsockopt() argument 506 switch (optname) { in do_dccp_setsockopt() 517 return dccp_setsockopt_ccid(sk, optname, optval, optlen); in do_dccp_setsockopt() 526 if (optname == DCCP_SOCKOPT_SERVICE) in do_dccp_setsockopt() 530 switch (optname) { in do_dccp_setsockopt() 566 int dccp_setsockopt(struct sock *sk, int level, int optname, in dccp_setsockopt() argument 571 optname, optval, in dccp_setsockopt() 573 return do_dccp_setsockopt(sk, level, optname, optval, optlen); in dccp_setsockopt() 579 int compat_dccp_setsockopt(struct sock *sk, int level, int optname, in compat_dccp_setsockopt() argument 583 return inet_csk_compat_setsockopt(sk, level, optname, in compat_dccp_setsockopt() [all …]
|
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()
|
/net/atm/ |
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()
|
D | common.c | 747 int vcc_setsockopt(struct socket *sock, int level, int optname, in vcc_setsockopt() argument 754 if (__SO_LEVEL_MATCH(optname, level) && optlen != __SO_SIZE(optname)) in vcc_setsockopt() 758 switch (optname) { in vcc_setsockopt() 791 return vcc->dev->ops->setsockopt(vcc, level, optname, optval, optlen); in vcc_setsockopt() 794 int vcc_getsockopt(struct socket *sock, int level, int optname, in vcc_getsockopt() argument 802 if (__SO_LEVEL_MATCH(optname, level) && len != __SO_SIZE(optname)) in vcc_getsockopt() 806 switch (optname) { in vcc_getsockopt() 835 return vcc->dev->ops->getsockopt(vcc, level, optname, optval, len); in vcc_getsockopt()
|
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,
|
D | svc.c | 453 static int svc_setsockopt(struct socket *sock, int level, int optname, in svc_setsockopt() argument 461 switch (optname) { in svc_setsockopt() 490 error = vcc_setsockopt(sock, level, optname, optval, optlen); in svc_setsockopt() 498 static int svc_getsockopt(struct socket *sock, int level, int optname, in svc_getsockopt() argument 505 if (!__SO_LEVEL_MATCH(optname, level) || optname != SO_ATMSAP) { in svc_getsockopt() 506 error = vcc_getsockopt(sock, level, optname, optval, optlen); in svc_getsockopt()
|
/net/tls/ |
D | tls_main.c | 419 static int do_tls_getsockopt(struct sock *sk, int optname, in do_tls_getsockopt() argument 424 switch (optname) { in do_tls_getsockopt() 435 static int tls_getsockopt(struct sock *sk, int level, int optname, in tls_getsockopt() argument 442 optname, optval, optlen); in tls_getsockopt() 444 return do_tls_getsockopt(sk, optname, optval, optlen); in tls_getsockopt() 566 static int do_tls_setsockopt(struct sock *sk, int optname, in do_tls_setsockopt() argument 571 switch (optname) { in do_tls_setsockopt() 576 optname == TLS_TX); in do_tls_setsockopt() 586 static int tls_setsockopt(struct sock *sk, int level, int optname, in tls_setsockopt() argument 592 return ctx->sk_proto->setsockopt(sk, level, optname, optval, in tls_setsockopt() [all …]
|
/net/bluetooth/rfcomm/ |
D | sock.c | 650 static int rfcomm_sock_setsockopt_old(struct socket *sock, int optname, char __user *optval, unsign… in rfcomm_sock_setsockopt_old() argument 660 switch (optname) { in rfcomm_sock_setsockopt_old() 691 static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval,… in rfcomm_sock_setsockopt() argument 702 return rfcomm_sock_setsockopt_old(sock, optname, optval, optlen); in rfcomm_sock_setsockopt() 709 switch (optname) { in rfcomm_sock_setsockopt() 759 static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __user *optval, int __… in rfcomm_sock_getsockopt_old() argument 775 switch (optname) { in rfcomm_sock_getsockopt_old() 834 static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval,… in rfcomm_sock_getsockopt() argument 843 return rfcomm_sock_getsockopt_old(sock, optname, optval, optlen); in rfcomm_sock_getsockopt() 853 switch (optname) { in rfcomm_sock_getsockopt()
|
/net/l2tp/ |
D | l2tp_ppp.c | 1152 int optname, int val) in pppol2tp_tunnel_setsockopt() argument 1156 switch (optname) { in pppol2tp_tunnel_setsockopt() 1175 int optname, int val) in pppol2tp_session_setsockopt() argument 1179 switch (optname) { in pppol2tp_session_setsockopt() 1246 static int pppol2tp_setsockopt(struct socket *sock, int level, int optname, in pppol2tp_setsockopt() argument 1279 err = pppol2tp_tunnel_setsockopt(sk, tunnel, optname, val); in pppol2tp_setsockopt() 1281 err = pppol2tp_session_setsockopt(sk, session, optname, val); in pppol2tp_setsockopt() 1293 int optname, int *val) in pppol2tp_tunnel_getsockopt() argument 1297 switch (optname) { in pppol2tp_tunnel_getsockopt() 1316 int optname, int *val) in pppol2tp_session_getsockopt() argument [all …]
|
/net/decnet/ |
D | af_decnet.c | 153 static int __dn_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsign… 154 static int __dn_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __… 1323 static int dn_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned… in dn_setsockopt() argument 1329 err = __dn_setsockopt(sock, level, optname, optval, optlen, 0); in dn_setsockopt() 1333 if (err == -ENOPROTOOPT && optname != DSO_LINKINFO && in dn_setsockopt() 1334 optname != DSO_STREAM && optname != DSO_SEQPACKET) in dn_setsockopt() 1335 err = nf_setsockopt(sk, PF_DECnet, optname, optval, optlen); in dn_setsockopt() 1341 static int __dn_setsockopt(struct socket *sock, int level,int optname, char __user *optval, unsigne… in __dn_setsockopt() argument 1366 switch (optname) { in __dn_setsockopt() 1502 static int dn_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __us… in dn_getsockopt() argument [all …]
|
/net/core/ |
D | sock.c | 722 int sock_setsockopt(struct socket *sock, int level, int optname, in sock_setsockopt() argument 736 if (optname == SO_BINDTODEVICE) in sock_setsockopt() 749 switch (optname) { in sock_setsockopt() 912 if (optname == SO_TIMESTAMP_NEW || optname == SO_TIMESTAMPNS_NEW) in sock_setsockopt() 917 if (optname == SO_TIMESTAMP_OLD || optname == SO_TIMESTAMP_NEW) in sock_setsockopt() 965 if (optname == SO_TIMESTAMPING_NEW) in sock_setsockopt() 984 ret = sock_set_timeout(&sk->sk_rcvtimeo, optval, optlen, optname == SO_RCVTIMEO_OLD); in sock_setsockopt() 989 ret = sock_set_timeout(&sk->sk_sndtimeo, optval, optlen, optname == SO_SNDTIMEO_OLD); in sock_setsockopt() 1215 int sock_getsockopt(struct socket *sock, int level, int optname, in sock_getsockopt() argument 1241 switch (optname) { in sock_getsockopt() [all …]
|
/net/bpfilter/ |
D | bpfilter_kern.c | 36 static int __bpfilter_process_sockopt(struct sock *sk, int optname, in __bpfilter_process_sockopt() argument 48 req.cmd = optname; in __bpfilter_process_sockopt()
|
/net/bluetooth/ |
D | l2cap_sock.c | 392 static int l2cap_sock_getsockopt_old(struct socket *sock, int optname, in l2cap_sock_getsockopt_old() argument 409 switch (optname) { in l2cap_sock_getsockopt_old() 495 static int l2cap_sock_getsockopt(struct socket *sock, int level, int optname, in l2cap_sock_getsockopt() argument 507 return l2cap_sock_getsockopt_old(sock, optname, optval, optlen); in l2cap_sock_getsockopt() 517 switch (optname) { in l2cap_sock_getsockopt() 631 static int l2cap_sock_setsockopt_old(struct socket *sock, int optname, in l2cap_sock_setsockopt_old() argument 644 switch (optname) { in l2cap_sock_setsockopt_old() 743 static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, in l2cap_sock_setsockopt() argument 757 return l2cap_sock_setsockopt_old(sock, optname, optval, optlen); in l2cap_sock_setsockopt() 764 switch (optname) { in l2cap_sock_setsockopt()
|