Home
last modified time | relevance | path

Searched refs:proto (Results 1 – 25 of 117) sorted by relevance

12345

/tools/testing/selftests/net/
A Dsk_so_peek_off.c13 static char *afstr(int af, int proto) in afstr() argument
15 if (proto == IPPROTO_TCP) in afstr()
21 int sk_peek_offset_probe(sa_family_t af, int proto) in sk_peek_offset_probe() argument
28 s = socket(af, type, proto); in sk_peek_offset_probe()
75 s[0] = recv_sock = socket(af, type, proto); in sk_peek_offset_test()
76 s[1] = socket(af, type, proto); in sk_peek_offset_test()
98 if (proto == IPPROTO_TCP) { in sk_peek_offset_test()
161 if (proto == IPPROTO_TCP && recv_sock >= 0) in sk_peek_offset_test()
170 static int do_test(int proto) in do_test() argument
174 res4 = sk_peek_offset_probe(AF_INET, proto); in do_test()
[all …]
A Dreuseport_addr_any.c70 rcv_fds[i] = socket(family, proto, 0); in build_rcv_fd()
82 if (proto == SOCK_STREAM && listen(rcv_fds[i], 10)) in build_rcv_fd()
87 static int connect_and_send(int family, int proto) in connect_and_send() argument
133 fd = socket(family, proto, 0); in connect_and_send()
149 static int receive_once(int epfd, int proto) in receive_once() argument
159 if (proto == SOCK_STREAM) { in receive_once()
191 send_fd = connect_and_send(family, proto); in test()
193 recv_fd = receive_once(epfd, proto); in test()
214 build_rcv_fd(AF_INET, proto, rcv_fds, 2, NULL); in run_one_test()
219 test(rcv_fds, 9, fam_send, proto, rcv_fds[4]); in run_one_test()
[all …]
A Dgro.sh10 proto="ipv4"
49 for proto in "${PROTOS[@]}"; do
51 echo "running test ${proto} ${test}" >&2
52 exit_code=$(run_test $proto $test)
54 failed_tests+=("${proto}_${test}")
84 proto="${OPTARG}"
103 exit_code=$(run_test "${proto}" "${test}")
A Dcmsg_so_priority.sh43 local proto=$4
47 if [[ "$proto" == "u" ]]; then
49 elif [[ "$ip_type" == "ipv4" && "$proto" == "i" ]]; then
51 elif [[ "$ip_type" == "ipv6" && "$proto" == "i" ]]; then
56 egress pref 1 handle "$handle" proto 802.1q \
87 for proto in u i r; do
88 echo "Test IPV$i, prot: $proto"
90 if [[ $i == 4 && $proto == "r" ]]; then
92 elif [[ $i == 6 && $proto == "r" ]]; then
116 -p $proto $TGT $PORT
[all …]
A Dreuseport_bpf_cpu.c60 rcv_fd[i] = socket(family, proto, 0); in build_rcv_group()
134 fd = socket(family, proto, 0); in send_from_cpu()
161 if (proto == SOCK_STREAM) { in receive_on_cpu()
189 build_rcv_group(rcv_fd, len, family, proto); in test()
204 send_from_cpu(cpu, family, proto); in test()
205 receive_on_cpu(rcv_fd, len, epfd, cpu, proto); in test()
210 send_from_cpu(cpu, family, proto); in test()
211 receive_on_cpu(rcv_fd, len, epfd, cpu, proto); in test()
216 send_from_cpu(cpu, family, proto); in test()
217 receive_on_cpu(rcv_fd, len, epfd, cpu, proto); in test()
[all …]
A Dreuseport_bpf_numa.c56 rcv_fd[i] = socket(family, proto, 0); in build_rcv_group()
68 if (proto == SOCK_STREAM && listen(rcv_fd[i], len * 10)) in build_rcv_group()
107 static void send_from_node(int node_id, int family, int proto) in send_from_node() argument
144 fd = socket(family, proto, 0); in send_from_node()
171 if (proto == SOCK_STREAM) { in receive_on_node()
194 static void test(int *rcv_fd, int len, int family, int proto) in test() argument
199 build_rcv_group(rcv_fd, len, family, proto); in test()
216 send_from_node(node, family, proto); in test()
217 receive_on_node(rcv_fd, len, epfd, node, proto); in test()
224 send_from_node(node, family, proto); in test()
[all …]
A Dreuseport_dualstack.c31 static void build_rcv_fd(int family, int proto, int *rcv_fds, int count) in build_rcv_fd() argument
56 rcv_fds[i] = socket(family, proto, 0); in build_rcv_fd()
68 if (proto == SOCK_STREAM && listen(rcv_fds[i], 10)) in build_rcv_fd()
73 static void send_from_v4(int proto) in send_from_v4() argument
86 fd = socket(AF_INET, proto, 0); in send_from_v4()
102 static int receive_once(int epfd, int proto) in receive_once() argument
112 if (proto == SOCK_STREAM) { in receive_once()
128 static void test(int *rcv_fds, int count, int proto) in test() argument
146 send_from_v4(proto); in test()
148 test_fd = receive_once(epfd, proto); in test()
A Dl2tp.sh230 tmpl proto esp mode transport
234 tmpl proto esp mode transport
238 tmpl proto esp mode transport
242 tmpl proto esp mode transport
246 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \
251 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \
256 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \
269 tmpl proto esp mode transport
273 tmpl proto esp mode transport
277 tmpl proto esp mode transport
[all …]
A Dvrf-xfrm-tests.sh218 tmpl src ${HOST1_4} dst ${HOST2_4} proto esp mode tunnel
223 tmpl src ${HOST1_4} dst ${HOST2_4} proto esp mode tunnel
228 tmpl src ${HOST2_4} dst ${HOST1_4} proto esp mode tunnel
260 proto esp spi ${SPI_1} reqid 0 mode tunnel \
267 proto esp spi ${SPI_1} reqid 0 mode tunnel \
275 proto esp spi ${SPI_2} reqid 0 mode tunnel \
282 proto esp spi ${SPI_2} reqid 0 mode tunnel \
290 proto esp spi ${SPI_1} reqid 0 mode tunnel \
297 proto esp spi ${SPI_1} reqid 0 mode tunnel \
305 proto esp spi ${SPI_2} reqid 0 mode tunnel \
[all …]
/tools/testing/selftests/bpf/progs/
A Dskb_pkt_end.c35 __u8 proto = 0; in main_prog() local
42 proto = ip->protocol; in main_prog()
44 if (proto != IPPROTO_TCP) in main_prog()
56 proto++; in main_prog()
58 bpf_skb_store_bytes(skb, offset, &proto, sizeof(proto), BPF_F_RECOMPUTE_CSUM); in main_prog()
A Dxdpwall.c102 __u8 proto; member
237 if (info->proto == IPPROTO_TCP) { in filter_transport_hdr()
280 info->proto = inner_ip6h->nexthdr; in parse_gue_v6()
290 info->proto = inner_ip4h->protocol; in parse_gue_v6()
306 info->proto = ip6h->nexthdr; in parse_ipv6_gue()
311 if (info->proto == IPPROTO_UDP) in parse_ipv6_gue()
327 __u32 proto; in edgewall() local
333 proto = eth->h_proto; in edgewall()
334 if (proto != bpf_htons(ETH_P_IPV6)) in edgewall()
340 if (info.proto == IPPROTO_ICMPV6) in edgewall()
[all …]
A Dtest_tcp_custom_syncookie.h54 __u32 len, __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument
61 s += proto + len; in csum_tcpudp_nofold()
63 s += (proto + len) << 8; in csum_tcpudp_nofold()
79 __u8 proto, __wsum sum) in csum_tcpudp_magic() argument
81 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic()
87 __u32 len, __u8 proto, __wsum csum) in csum_ipv6_magic() argument
131 uproto = (__force u32)bpf_htonl(proto); in csum_ipv6_magic()
A Dtest_sk_assign.c61 __u8 proto = 0; in get_tuple() local
77 proto = iph->protocol; in get_tuple()
86 proto = ip6h->nexthdr; in get_tuple()
93 if (proto != IPPROTO_TCP && proto != IPPROTO_UDP) in get_tuple()
96 *tcp = (proto == IPPROTO_TCP); in get_tuple()
A Dtest_pkt_access.c109 __u8 proto = 255; in test_pkt_access() local
121 proto = iph->protocol; in test_pkt_access()
129 proto = ip6h->nexthdr; in test_pkt_access()
142 if (((void *)(tcp) + 20) > data_end || proto != 6) in test_pkt_access()
A Dtest_tc_peer.c46 __u16 proto = skb->protocol; in tc_src_l3() local
57 if (bpf_skb_store_bytes(skb, ETH_ALEN + ETH_ALEN, &proto, sizeof(__u16), 0) != 0) in tc_src_l3()
/tools/testing/selftests/net/forwarding/
A Dtc_flower_port_range.sh78 local proto=$1; shift
100 tc filter add dev $swp2 egress protocol $proto handle 101 pref 1 \
152 local proto=ipv4
159 __test_port_range $proto $ip_proto $sip $dip $mode "$name"
164 local proto=ipv4
171 __test_port_range $proto $ip_proto $sip $dip $mode "$name"
176 local proto=ipv6
183 __test_port_range $proto $ip_proto $sip $dip $mode "$name"
188 local proto=ipv6
195 __test_port_range $proto $ip_proto $sip $dip $mode "$name"
[all …]
A Dtc_flower_l2_miss.sh127 local proto=$1; shift
137 tc filter add dev $swp2 egress protocol $proto handle 101 pref 1 \
141 tc filter add dev $swp2 egress protocol $proto handle 102 pref 1 \
184 local proto="ipv4"
191 test_l2_miss_multicast_common $proto $sip $dip $dmac $mode $name
196 local proto="ipv6"
203 test_l2_miss_multicast_common $proto $sip $dip $dmac $mode $name
245 local proto=$1; shift
254 tc filter add dev $swp2 egress protocol $proto handle 101 pref 1 \
270 local proto=ipv4
[all …]
/tools/testing/selftests/net/mptcp/
A Dmptcp_diag.c129 if (proto == IPPROTO_MPTCP) { in send_query()
131 rta_proto.rta_len = RTA_LENGTH(sizeof(proto)); in send_query()
134 iov[iovlen++] = (struct iovec){ &proto, sizeof(proto)}; in send_query()
135 req.nlh.nlmsg_len += RTA_LENGTH(sizeof(proto)); in send_query()
270 if (proto == IPPROTO_MPTCP && tb[INET_DIAG_INFO]) { in parse_nlmsg()
284 if (proto == IPPROTO_TCP && tb[INET_DIAG_ULP_INFO]) { in parse_nlmsg()
302 static void recv_nlmsg(int fd, __u32 proto) in recv_nlmsg() argument
335 parse_nlmsg(nlh, proto); in recv_nlmsg()
349 __u32 proto = IPPROTO_MPTCP; in get_mptcpinfo() local
356 send_query(fd, &r, proto); in get_mptcpinfo()
[all …]
/tools/testing/selftests/bpf/test_kmods/
A Dbpf_testmod-events.h53 #define BPF_TESTMOD_DECLARE_TRACE(call, proto, args, size) \ argument
54 DECLARE_TRACE_WRITABLE(call, PARAMS(proto), PARAMS(args), size)
56 #define BPF_TESTMOD_DECLARE_TRACE(call, proto, args, size) \ argument
57 DECLARE_TRACE(call, PARAMS(proto), PARAMS(args))
/tools/testing/selftests/drivers/net/mlxsw/
A Ddevlink_trap_l3_drops.sh192 local proto=$1; shift
215 devlink_trap_drop_cleanup $mz_pid $rp2 $proto 1 101
227 local proto=$1; shift
250 devlink_trap_drop_cleanup $mz_pid $rp2 $proto 1 101
262 local proto=$1; shift
284 devlink_trap_drop_cleanup $mz_pid $rp2 $proto 1 101
296 local proto=$1; shift
319 devlink_trap_drop_cleanup $mz_pid $rp2 $proto 1 101
368 )"01:"$( : IP proto
519 local proto=$1; shift
[all …]
A Dport_range_occ.sh73 tc filter add dev $swp1 ingress pref 1 handle 101 proto ip \
79 tc filter add dev $swp1 ingress pref 1 handle 102 proto ip \
82 tc filter add dev $swp1 ingress pref 2 handle 103 proto ipv6 \
85 tc filter add dev $swp1 ingress pref 2 handle 104 proto ipv6 \
A Ddevlink_trap_control.sh223 -A 192.0.2.1 -B 224.0.0.1 -t ip proto=2,p=11 -p 100 -q
231 -A 192.0.2.1 -B 244.0.0.1 -t ip proto=2,p=12 -p 100 -q
239 -A 192.0.2.1 -B 244.0.0.1 -t ip proto=2,p=16 -p 100 -q
247 -A 192.0.2.1 -B 244.0.0.1 -t ip proto=2,p=22 -p 100 -q
255 -A 192.0.2.1 -B 224.0.0.2 -t ip proto=2,p=17 -p 100 -q
399 -A 192.0.2.1 -B 224.0.0.5 -t ip proto=89 -p 100 -q
403 -A 192.0.2.1 -B 192.0.2.2 -t ip proto=89 -p 100 -q
437 -A 192.0.2.1 -B 224.0.0.18 -t ip proto=112 -p 100 -q
451 -A 192.0.2.1 -B 224.0.0.13 -t ip proto=103 -p 100 -q
455 -A 192.0.2.1 -B 192.0.2.2 -t ip proto=103 -p 100 -q
[all …]
/tools/testing/selftests/bpf/
A Dnetwork_helpers.c363 opts.proto = protocol; in connect_to_fd()
867 if (proto == IPPROTO_UDP) { in show_transport()
896 if (proto == IPPROTO_TCP) in show_transport()
918 u_char proto; in show_ipv6_packet() local
926 proto = pkt->nexthdr; in show_ipv6_packet()
937 u_char proto; in show_ipv4_packet() local
945 proto = pkt->protocol; in show_ipv4_packet()
963 u16 proto; in traffic_monitor_thread() local
1008 memcpy(&proto, packet, 2); in traffic_monitor_thread()
1009 proto = ntohs(proto); in traffic_monitor_thread()
[all …]
/tools/testing/selftests/net/lib/
A Dcsum.c177 sum += htons(proto); in checksum()
196 iph->protocol = proto; in build_packet_ipv4()
215 ip6h->nexthdr = proto; in build_packet_ipv6()
297 uint8_t proto; in build_packet() local
317 proto = IPPROTO_UDP; in build_packet()
320 proto = cfg_proto; in build_packet()
324 off = build_packet_ipv4(buf, proto, tlen); in build_packet()
326 off = build_packet_ipv6(buf, proto, tlen); in build_packet()
659 if (len < sizeof(*iph) || iph->protocol != proto) in recv_verify_packet_ipv4()
668 if (proto == IPPROTO_TCP) in recv_verify_packet_ipv4()
[all …]
/tools/testing/selftests/bpf/prog_tests/
A Dcls_redirect.c218 static void encap_init(encap_headers_t *encap, uint8_t hop_count, uint8_t proto) in encap_init() argument
236 .proto_ctype = proto in encap_init()
255 int proto; in build_input() local
257 proto = IPPROTO_IPIP; in build_input()
259 proto = IPPROTO_IPV6; in build_input()
261 encap_init(&encap, test->hops == ONE_HOP ? 1 : 0, proto); in build_input()
269 proto = IPPROTO_TCP; in build_input()
271 proto = IPPROTO_UDP; in build_input()
279 .protocol = proto, in build_input()
289 .nexthdr = proto, in build_input()

Completed in 46 milliseconds

12345