Home
last modified time | relevance | path

Searched refs:optlen (Results 1 – 25 of 166) sorted by relevance

1234567

/linux/net/ipv4/
A Dip_options.c95 int optlen; in __ip_options_echo() local
117 dopt->optlen += optlen; in __ip_options_echo()
154 dopt->optlen += optlen; in __ip_options_echo()
193 dopt->optlen += optlen; in __ip_options_echo()
213 int optlen; in ip_options_fragment() local
225 if (optlen < 2 || optlen > l) in ip_options_fragment()
229 l -= optlen; in ip_options_fragment()
292 if (optlen < 2 || optlen > l) { in __ip_options_compile()
313 if (optptr[2] != 4 || optlen < 7 || ((optlen-3) & 3)) { in __ip_options_compile()
463 l -= optlen; in __ip_options_compile()
[all …]
A Dip_sockglue.c801 int optlen) in compat_ip_set_mcast_msfilter() argument
954 if (optlen > 40) in do_ip_setsockopt()
1050 if (optlen < 1) in do_ip_setsockopt()
1091 if (optlen < 1) in do_ip_setsockopt()
1100 if (optlen < 1) in do_ip_setsockopt()
1303 optlen); in do_ip_setsockopt()
1320 if (optlen < 1) in do_ip_setsockopt()
1328 if (optlen < 1) in do_ip_setsockopt()
1347 if (optlen < 1) in do_ip_setsockopt()
1353 if (optlen < 1) in do_ip_setsockopt()
[all …]
/linux/net/ipv6/
A Dipv6_sockglue.c206 int optlen) in ipv6_set_mcast_msfilter() argument
237 int optlen) in compat_ipv6_set_mcast_msfilter() argument
245 if (optlen < size0) in compat_ipv6_set_mcast_msfilter()
321 int optlen) in ipv6_set_opt_hdr() argument
336 if (optlen > 0) { in ipv6_set_opt_hdr()
340 optlen & 0x7 || in ipv6_set_opt_hdr()
666 if (optlen == 0) in do_ipv6_setsockopt()
696 if (optlen == 0) in do_ipv6_setsockopt()
875 optlen); in do_ipv6_setsockopt()
878 optlen); in do_ipv6_setsockopt()
[all …]
A Dexthdrs_core.c136 int optlen; in ipv6_find_tlv() local
143 optlen = 1; in ipv6_find_tlv()
146 optlen = nh[offset + 1] + 2; in ipv6_find_tlv()
147 if (optlen > len) in ipv6_find_tlv()
151 offset += optlen; in ipv6_find_tlv()
152 len -= optlen; in ipv6_find_tlv()
/linux/tools/testing/selftests/bpf/prog_tests/
A Dsockopt_sk.c23 socklen_t optlen; in getsetsockopt() local
34 optlen = getpagesize() * 2; in getsetsockopt()
35 big_buf = calloc(1, optlen); in getsetsockopt()
48 memset(big_buf, 0, optlen); in getsetsockopt()
49 optlen = 1; in getsetsockopt()
81 optlen = 4; in getsetsockopt()
88 if (optlen != 1) { in getsetsockopt()
129 optlen = 4; in getsetsockopt()
152 optlen = sizeof(buf.cc); in getsetsockopt()
167 optlen = sizeof(buf.zc); in getsetsockopt()
[all …]
A Dsockopt_multi.c60 socklen_t optlen; in run_getsockopt_test() local
74 optlen = 1; in run_getsockopt_test()
97 optlen = 1; in run_getsockopt_test()
121 optlen = 1; in run_getsockopt_test()
148 optlen = 1; in run_getsockopt_test()
167 optlen = 1; in run_getsockopt_test()
187 optlen = 1; in run_getsockopt_test()
210 socklen_t optlen; in run_setsockopt_test() local
224 optlen = 1; in run_setsockopt_test()
251 optlen = 1; in run_setsockopt_test()
[all …]
A Dsockopt.c229 offsetof(struct bpf_sockopt, optlen)),
257 offsetof(struct bpf_sockopt, optlen)),
300 offsetof(struct bpf_sockopt, optlen)),
477 offsetof(struct bpf_sockopt, optlen)),
531 offsetof(struct bpf_sockopt, optlen)),
578 offsetof(struct bpf_sockopt, optlen)),
585 offsetof(struct bpf_sockopt, optlen)),
606 offsetof(struct bpf_sockopt, optlen)),
926 socklen_t optlen = test->get_optlen; in run_test() local
931 optval, &optlen); in run_test()
[all …]
/linux/net/mptcp/
A Dsockopt.c60 if (optlen < sizeof(int)) in mptcp_get_int_option()
172 unsigned int optlen) in mptcp_setsockopt_sol_socket_int() argument
258 if (optlen < sizeof(ling)) in mptcp_setsockopt_sol_socket_linger()
336 optlen); in mptcp_setsockopt_sol_socket()
340 optval, optlen); in mptcp_setsockopt_sol_socket()
566 if (optlen < 1) in mptcp_setsockopt_sol_tcp_congestion()
715 if (get_user(len, optlen)) in mptcp_getsockopt_info()
722 if (put_user(len, optlen)) in mptcp_getsockopt_info()
734 int __user *optlen) in mptcp_put_subflow_data() argument
757 if (get_user(len, optlen)) in mptcp_get_subflow_data()
[all …]
/linux/net/sctp/
A Dsocket.c4095 optlen = min_t(unsigned int, optlen, USHRT_MAX + in sctp_setsockopt_reset_streams()
4581 optlen = min_t(unsigned int, optlen, in sctp_setsockopt()
4743 optlen); in sctp_setsockopt()
8146 optlen); in sctp_getsockopt()
8150 optlen); in sctp_getsockopt()
8161 optlen); in sctp_getsockopt()
8180 optlen); in sctp_getsockopt()
8184 optlen); in sctp_getsockopt()
8217 optlen); in sctp_getsockopt()
8221 optlen); in sctp_getsockopt()
[all …]
/linux/tools/testing/selftests/bpf/progs/
A Dsockopt_sk.c49 ctx->optlen = 0; /* bypass optval>PAGE_SIZE */ in _getsockopt()
92 ctx->optlen = 1; in _getsockopt()
122 ctx->optlen = 1; in _getsockopt()
147 ctx->optlen = 0; /* bypass optval>PAGE_SIZE */ in _setsockopt()
158 ctx->optlen = 4; in _setsockopt()
170 ctx->optlen = 5; in _setsockopt()
177 if (ctx->optlen != page_size * 2) in _setsockopt()
185 ctx->optlen = 1; in _setsockopt()
209 ctx->optlen = -1; /* BPF has consumed this option, don't call kernel in _setsockopt()
A Dtest_tcp_hdr_options.c164 __u8 optlen; in synack_opt_len() local
180 if (optlen) { in synack_opt_len()
181 err = bpf_reserve_hdr_opt(skops, optlen, 0); in synack_opt_len()
208 __u8 optlen; in syn_opt_len() local
214 optlen = option_total_len(active_syn_out.flags); in syn_opt_len()
215 if (optlen) { in syn_opt_len()
216 err = bpf_reserve_hdr_opt(skops, optlen, 0); in syn_opt_len()
236 __u8 optlen; in fin_opt_len() local
251 optlen = option_total_len(opt->flags); in fin_opt_len()
252 if (optlen) { in fin_opt_len()
[all …]
/linux/net/rds/
A Daf_rds.c331 int optlen) in rds_set_bool_option() argument
335 if (optlen < sizeof(int)) in rds_set_bool_option()
367 if (optlen != sizeof(int)) in rds_set_transport()
382 int optlen, int optname) in rds_enable_recvtstamp() argument
386 if (optlen != sizeof(int)) in rds_enable_recvtstamp()
406 int optlen) in rds_recv_track_latency() argument
448 ret = rds_get_mr(rs, optval, optlen); in rds_setsockopt()
493 if (get_user(len, optlen)) { in rds_getsockopt()
501 optlen); in rds_getsockopt()
509 put_user(sizeof(int), optlen)) in rds_getsockopt()
[all …]
/linux/net/dccp/
A Dproto.c423 if (optlen > sizeof(service)) { in dccp_setsockopt_service()
424 sl = kmalloc(optlen, GFP_KERNEL); in dccp_setsockopt_service()
489 if (optlen < 1 || optlen > DCCP_FEAT_MAX_SP_VALS) in dccp_setsockopt_ccid()
492 val = memdup_sockptr(optval, optlen); in dccp_setsockopt_ccid()
528 if (optlen < (int)sizeof(int)) in do_dccp_setsockopt()
575 unsigned int optlen) in dccp_setsockopt() argument
580 optlen); in dccp_setsockopt()
588 int __user *optlen) in dccp_getsockopt_service() argument
605 if (put_user(total_len, optlen) || in dccp_getsockopt_service()
620 if (get_user(len, optlen)) in do_dccp_getsockopt()
[all …]
/linux/net/ipv6/netfilter/
A Dip6t_hbh.c57 unsigned int optlen; in hbh_mt6() local
137 optlen = *lp + 2; in hbh_mt6()
140 optlen = 1; in hbh_mt6()
144 pr_debug("len%04X\n", optlen); in hbh_mt6()
146 if ((ptr > skb->len - optlen || hdrlen < optlen) && in hbh_mt6()
151 ptr += optlen; in hbh_mt6()
152 hdrlen -= optlen; in hbh_mt6()
/linux/net/ipv4/bpfilter/
A Dsockopt.c25 unsigned int optlen, bool is_set) in bpfilter_mbox_request() argument
48 err = bpfilter_ops.sockopt(sk, optname, optval, optlen, is_set); in bpfilter_mbox_request()
55 unsigned int optlen) in bpfilter_ip_set_sockopt() argument
57 return bpfilter_mbox_request(sk, optname, optval, optlen, true); in bpfilter_ip_set_sockopt()
61 int __user *optlen) in bpfilter_ip_get_sockopt() argument
65 if (get_user(len, optlen)) in bpfilter_ip_get_sockopt()
/linux/Documentation/bpf/
A Dprog_cgroup_sockopt.rst16 all input arguments: ``level``, ``optname``, ``optval`` and ``optlen``.
26 If BPF program sets ``optlen`` to -1, the control will be returned
30 Note, that ``optlen`` can not be increased beyond the user-supplied
44 sockopt. The BPF hook can observe ``optval``, ``optlen`` and ``retval``
46 the values above, adjust ``optlen`` and reset ``retval`` to 0. If ``optlen``
60 * ``1`` - success: copy ``optval`` and ``optlen`` to userspace, return
78 adjust ``optval``, ``optlen`` and reset ``retval`` to 0. After that
84 to the input arguments (``level``, ``optname``, ``optval``, ``optlen``),
94 * Set ``optlen`` to zero, which indicates that the kernel should
97 * Set ``optlen`` to the value less than ``PAGE_SIZE``, which
[all …]
/linux/net/netfilter/
A Dxt_tcpmss.c33 unsigned int i, optlen; in tcpmss_mt() local
44 optlen = th->doff*4 - sizeof(*th); in tcpmss_mt()
45 if (!optlen) in tcpmss_mt()
49 op = skb_header_pointer(skb, par->thoff + sizeof(*th), optlen, _opt); in tcpmss_mt()
53 for (i = 0; i < optlen; ) { in tcpmss_mt()
55 && (optlen - i) >= TCPOLEN_MSS in tcpmss_mt()
/linux/include/linux/
A Dbpf-cgroup.h187 int *optlen, char **kernel_optval);
190 int __user *optlen, int max_optlen,
195 int *optlen, int retval);
407 optlen, \
416 get_user(__ret, optlen); \
430 sock, level, optname, optval, optlen, \
436 optlen, retval) \ argument
441 sock, level, optname, optval, optlen, retval); \
520 #define BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN(optlen) ({ 0; }) argument
522 optlen, max_optlen, retval) ({ retval; }) argument
[all …]
A Dbpfilter.h11 unsigned int optlen);
13 int __user *optlen);
21 unsigned int optlen, bool is_set);
/linux/net/can/
A Draw.c515 sockptr_t optval, unsigned int optlen) in raw_setsockopt() argument
541 filter = memdup_sockptr(optval, optlen); in raw_setsockopt()
602 if (optlen != sizeof(err_mask)) in raw_setsockopt()
646 if (optlen != sizeof(ro->loopback)) in raw_setsockopt()
655 if (optlen != sizeof(ro->recv_own_msgs)) in raw_setsockopt()
664 if (optlen != sizeof(ro->fd_frames)) in raw_setsockopt()
673 if (optlen != sizeof(ro->join_filters)) in raw_setsockopt()
698 if (get_user(len, optlen)) in raw_getsockopt()
713 if (put_user(fsize, optlen)) in raw_getsockopt()
727 err = put_user(len, optlen); in raw_getsockopt()
[all …]
/linux/kernel/bpf/
A Dcgroup.c1446 ctx.optlen = *optlen; in __cgroup_bpf_run_filter_setsockopt()
1466 } else if (ctx.optlen > max_optlen || ctx.optlen < -1) { in __cgroup_bpf_run_filter_setsockopt()
1481 *optlen = ctx.optlen; in __cgroup_bpf_run_filter_setsockopt()
1546 if (get_user(ctx.optlen, optlen)) { in __cgroup_bpf_run_filter_getsockopt()
1551 if (ctx.optlen < 0) { in __cgroup_bpf_run_filter_getsockopt()
1573 if (ctx.optlen > max_optlen || ctx.optlen < 0) { in __cgroup_bpf_run_filter_getsockopt()
1588 put_user(ctx.optlen, optlen)) { in __cgroup_bpf_run_filter_getsockopt()
1611 .optlen = *optlen, in __cgroup_bpf_run_filter_getsockopt_kern()
1630 if (ctx.optlen > *optlen) in __cgroup_bpf_run_filter_getsockopt_kern()
1641 if (ctx.optlen != 0) in __cgroup_bpf_run_filter_getsockopt_kern()
[all …]
/linux/net/xfrm/
A Dxfrm_output.c229 int hdrlen, optlen; in xfrm4_beet_encap_add() local
232 optlen = XFRM_MODE_SKB_CB(skb)->optlen; in xfrm4_beet_encap_add()
233 if (unlikely(optlen)) in xfrm4_beet_encap_add()
250 if (unlikely(optlen)) { in xfrm4_beet_encap_add()
251 if (WARN_ON(optlen < 0)) in xfrm4_beet_encap_add()
255 ph->hdrlen = optlen / 8; in xfrm4_beet_encap_add()
358 int optlen, hdr_len; in xfrm6_beet_encap_add() local
361 optlen = XFRM_MODE_SKB_CB(skb)->optlen; in xfrm6_beet_encap_add()
362 if (unlikely(optlen)) in xfrm6_beet_encap_add()
376 if (unlikely(optlen)) { in xfrm6_beet_encap_add()
[all …]
/linux/samples/bpf/
A Dtest_cgrp2_sock.c128 socklen_t optlen = len; in get_bind_to_device() local
132 rc = getsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, &optlen); in get_bind_to_device()
142 socklen_t optlen = sizeof(mark); in get_somark() local
145 rc = getsockopt(sd, SOL_SOCKET, SO_MARK, &mark, &optlen); in get_somark()
155 socklen_t optlen = sizeof(prio); in get_priority() local
158 rc = getsockopt(sd, SOL_SOCKET, SO_PRIORITY, &prio, &optlen); in get_priority()
/linux/net/rxrpc/
A Dserver_key.c118 int rxrpc_server_keyring(struct rxrpc_sock *rx, sockptr_t optval, int optlen) in rxrpc_server_keyring() argument
125 if (optlen <= 0 || optlen > PAGE_SIZE - 1) in rxrpc_server_keyring()
128 description = memdup_sockptr_nul(optval, optlen); in rxrpc_server_keyring()
/linux/net/tls/
A Dtls_main.c336 int __user *optlen, int tx) in do_tls_getsockopt_conf() argument
344 if (get_user(len, optlen)) in do_tls_getsockopt_conf()
517 char __user *optval, int __user *optlen) in do_tls_getsockopt() argument
535 char __user *optval, int __user *optlen) in tls_getsockopt() argument
541 optname, optval, optlen); in tls_getsockopt()
547 unsigned int optlen, int tx) in do_tls_setsockopt_conf() argument
622 if (optlen != optsize) { in do_tls_setsockopt_conf()
629 optlen - sizeof(*crypto_info)); in do_tls_setsockopt_conf()
684 unsigned int optlen) in do_tls_setsockopt() argument
704 sockptr_t optval, unsigned int optlen) in tls_setsockopt() argument
[all …]

Completed in 56 milliseconds

1234567