/tools/testing/selftests/bpf/prog_tests/ |
D | sockopt_sk.c | 24 socklen_t optlen; in getsetsockopt() local 35 optlen = getpagesize() * 2; in getsetsockopt() 36 big_buf = calloc(1, optlen); in getsetsockopt() 43 err = setsockopt(fd, SOL_IP, IP_TOS, big_buf, optlen); in getsetsockopt() 49 memset(big_buf, 0, optlen); in getsetsockopt() 50 optlen = 1; in getsetsockopt() 51 err = getsockopt(fd, SOL_IP, IP_TOS, big_buf, &optlen); in getsetsockopt() 82 optlen = 4; in getsetsockopt() 83 err = getsockopt(fd, SOL_CUSTOM, 0, &buf, &optlen); in getsetsockopt() 89 if (optlen != 1) { in getsetsockopt() [all …]
|
D | sockopt_multi.c | 60 socklen_t optlen; in run_getsockopt_test() local 74 optlen = 1; in run_getsockopt_test() 75 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_getsockopt_test() 97 optlen = 1; in run_getsockopt_test() 98 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_getsockopt_test() 121 optlen = 1; in run_getsockopt_test() 122 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_getsockopt_test() 148 optlen = 1; in run_getsockopt_test() 149 err = getsockopt(sock_fd, SOL_IP, IP_TOS, &buf, &optlen); in run_getsockopt_test() 167 optlen = 1; in run_getsockopt_test() [all …]
|
D | sockopt_qos_to_cc.c | 9 socklen_t optlen; in run_setsockopt_test() local 20 optlen = sizeof(cc); in run_setsockopt_test() 21 err = getsockopt(sock_fd, SOL_TCP, TCP_CONGESTION, cc, &optlen); in run_setsockopt_test()
|
D | sockopt.c | 229 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)), 622 offsetof(struct bpf_sockopt, optlen)), 640 offsetof(struct bpf_sockopt, optlen)), [all …]
|
D | tcp_rtt.c | 25 socklen_t optlen; in wait_for_ack() local 29 optlen = sizeof(info); in wait_for_ack() 30 err = getsockopt(fd, SOL_TCP, TCP_INFO, &info, &optlen); in wait_for_ack()
|
D | bpf_iter_setsockopt.c | 38 socklen_t optlen = sizeof(tcp_cc); in check_bpf_dctcp() local 43 tcp_cc, &optlen) || in check_bpf_dctcp()
|
D | sockopt_inherit.c | 41 socklen_t optlen = 1; in verify_sockopt() local 45 err = getsockopt(fd, SOL_CUSTOM, optname, &buf, &optlen); in verify_sockopt()
|
/tools/testing/selftests/bpf/progs/ |
D | sockopt_sk.c | 55 ctx->optlen = 0; /* bypass optval>PAGE_SIZE */ in _getsockopt() 98 ctx->optlen = 1; in _getsockopt() 128 ctx->optlen = 1; in _getsockopt() 159 ctx->optlen = 0; /* bypass optval>PAGE_SIZE */ in _setsockopt() 170 ctx->optlen = 4; in _setsockopt() 182 ctx->optlen = 5; in _setsockopt() 189 if (ctx->optlen != page_size * 2) in _setsockopt() 197 ctx->optlen = 1; in _setsockopt() 221 ctx->optlen = -1; /* BPF has consumed this option, don't call kernel in _setsockopt()
|
D | sockopt_multi.c | 27 ctx->optlen = 1; in _getsockopt_child() 50 ctx->optlen = 1; in _getsockopt_parent() 68 ctx->optlen = 1; in _setsockopt()
|
D | test_tcp_hdr_options.c | 164 __u8 optlen; in synack_opt_len() local 179 optlen = option_total_len(passive_synack_out.flags); in synack_opt_len() 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() [all …]
|
D | sockopt_inherit.c | 71 ctx->optlen = 1; in _getsockopt() 94 ctx->optlen = -1; in _setsockopt()
|
/tools/testing/selftests/net/ |
D | gro.c | 105 int optlen = 0; in setup_sock_filter() local 117 optlen = sizeof(struct ip_timestamp); in setup_sock_filter() 119 optlen = sizeof(struct ip6_frag); in setup_sock_filter() 129 BPF_STMT(BPF_LD + BPF_H + BPF_ABS, dport_off + optlen), in setup_sock_filter() 556 int optlen = sizeof(struct ip_timestamp); in add_ipv4_ts_option() local 559 if (optlen % 4) in add_ipv4_ts_option() 563 ts->ipt_len = optlen; in add_ipv4_ts_option() 568 memcpy(optpkt + tcp_offset + optlen, buf + tcp_offset, in add_ipv4_ts_option() 572 iph->ihl = 5 + (optlen / 4); in add_ipv4_ts_option() 573 iph->tot_len = htons(ntohs(iph->tot_len) + optlen); in add_ipv4_ts_option() [all …]
|
D | nettest.c | 376 socklen_t optlen = len; in get_bind_to_device() local 379 rc = getsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, name, &optlen); in get_bind_to_device()
|
/tools/testing/selftests/bpf/ |
D | network_helpers.c | 242 socklen_t addrlen, optlen; in connect_to_fd_opts() local 248 optlen = sizeof(type); in connect_to_fd_opts() 249 if (getsockopt(server_fd, SOL_SOCKET, SO_TYPE, &type, &optlen)) { in connect_to_fd_opts()
|
D | xdpxceiver.c | 695 socklen_t optlen; in rx_stats_are_valid() local 698 optlen = sizeof(stats); in rx_stats_are_valid() 699 err = getsockopt(fd, SOL_XDP, XDP_STATISTICS, &stats, &optlen); in rx_stats_are_valid() 706 if (optlen == sizeof(struct xdp_statistics)) { in rx_stats_are_valid() 736 socklen_t optlen; in tx_stats_validate() local 739 optlen = sizeof(stats); in tx_stats_validate() 740 err = getsockopt(fd, SOL_XDP, XDP_STATISTICS, &stats, &optlen); in tx_stats_validate()
|
D | test_maps.c | 1608 socklen_t optlen, addrlen; in prepare_reuseport_grp() local 1623 optlen = sizeof(sk_cookie); in prepare_reuseport_grp() 1663 &optlen); in prepare_reuseport_grp()
|
/tools/lib/bpf/ |
D | xsk.c | 205 socklen_t optlen; in xsk_get_mmap_offsets() local 208 optlen = sizeof(*off); in xsk_get_mmap_offsets() 209 err = getsockopt(fd, SOL_XDP, XDP_MMAP_OFFSETS, off, &optlen); in xsk_get_mmap_offsets() 213 if (optlen == sizeof(*off)) in xsk_get_mmap_offsets() 216 if (optlen == sizeof(struct xdp_mmap_offsets_v1)) { in xsk_get_mmap_offsets()
|
/tools/testing/selftests/net/mptcp/ |
D | mptcp_connect.c | 905 static void xsetsockopt(int fd, int level, int optname, const void *optval, socklen_t optlen) in xsetsockopt() argument 909 err = setsockopt(fd, level, optname, optval, optlen); in xsetsockopt()
|
/tools/include/uapi/linux/ |
D | bpf.h | 6242 __s32 optlen; member
|