Home
last modified time | relevance | path

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

123

/tools/testing/selftests/net/
Dreuseport_addr_any.c34 static void build_rcv_fd(int family, int proto, int *rcv_fds, int count, in build_rcv_fd() argument
75 rcv_fds[i] = socket(family, proto, 0); in build_rcv_fd()
87 if (proto == SOCK_STREAM && listen(rcv_fds[i], 10)) in build_rcv_fd()
89 else if (proto == SOCK_DCCP) { in build_rcv_fd()
101 static int connect_and_send(int family, int proto) in connect_and_send() argument
147 fd = socket(family, proto, 0); in connect_and_send()
151 if (proto == SOCK_DCCP && in connect_and_send()
168 static int receive_once(int epfd, int proto) in receive_once() argument
178 if (proto == SOCK_STREAM || proto == SOCK_DCCP) { in receive_once()
194 static void test(int *rcv_fds, int count, int family, int proto, int fd) in test() argument
[all …]
Dgro.sh10 proto="ipv4"
44 for proto in "${PROTOS[@]}"; do
46 echo "running test ${proto} ${test}" >&2
47 exit_code=$(run_test $proto $test)
49 failed_tests+=("${proto}_${test}")
79 proto="${OPTARG}"
98 run_test "${proto}" "${test}"
Dreuseport_bpf_cpu.c34 static void build_rcv_group(int *rcv_fd, size_t len, int family, int proto) in build_rcv_group() argument
60 rcv_fd[i] = socket(family, proto, 0); in build_rcv_group()
72 if (proto == SOCK_STREAM && listen(rcv_fd[i], len * 10)) in build_rcv_group()
94 static void send_from_cpu(int cpu_id, int family, int proto) in send_from_cpu() argument
134 fd = socket(family, proto, 0); in send_from_cpu()
151 void receive_on_cpu(int *rcv_fd, int len, int epfd, int cpu_id, int proto) in receive_on_cpu() argument
161 if (proto == SOCK_STREAM) { in receive_on_cpu()
184 static void test(int *rcv_fd, int len, int family, int proto) in test() argument
189 build_rcv_group(rcv_fd, len, family, proto); in test()
204 send_from_cpu(cpu, family, proto); in test()
[all …]
Dreuseport_bpf_numa.c30 static void build_rcv_group(int *rcv_fd, size_t len, int family, int proto) in build_rcv_group() argument
56 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()
161 void receive_on_node(int *rcv_fd, int len, int epfd, int node_id, int proto) in receive_on_node() argument
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()
214 send_from_node(node, family, proto); in test()
[all …]
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()
Dl2tp.sh236 tmpl proto esp mode transport
240 tmpl proto esp mode transport
244 tmpl proto esp mode transport
248 tmpl proto esp mode transport
252 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \
257 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \
262 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \
267 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \
275 tmpl proto esp mode transport
279 tmpl proto esp mode transport
[all …]
Dvrf-xfrm-tests.sh223 tmpl src ${HOST1_4} dst ${HOST2_4} proto esp mode tunnel
228 tmpl src ${HOST1_4} dst ${HOST2_4} proto esp mode tunnel
233 tmpl src ${HOST2_4} dst ${HOST1_4} proto esp mode tunnel
238 tmpl src ${HOST2_4} dst ${HOST1_4} proto esp mode tunnel
244 tmpl src ${HOST1_6} dst ${HOST2_6} proto esp mode tunnel
249 tmpl src ${HOST1_6} dst ${HOST2_6} proto esp mode tunnel
254 tmpl src ${HOST2_6} dst ${HOST1_6} proto esp mode tunnel
259 tmpl src ${HOST2_6} dst ${HOST1_6} proto esp mode tunnel
265 proto esp spi ${SPI_1} reqid 0 mode tunnel \
272 proto esp spi ${SPI_1} reqid 0 mode tunnel \
[all …]
Dipsec.c154 static int netlink_sock(int *sock, uint32_t *seq_nr, int proto) in netlink_sock() argument
161 *sock = socket(AF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, proto); in netlink_sock()
500 uint8_t proto; member
861 switch (desc->proto) { in xfrm_state_pack_algo()
956 req.info.id.proto = desc->proto; in xfrm_state_add()
995 if (info->id.spi != spi || info->id.proto != desc->proto) in xfrm_usersa_found()
1113 struct in_addr tunsrc, struct in_addr tundst, uint8_t proto) in xfrm_policy_add() argument
1148 tmpl.id.proto = proto; in xfrm_policy_add()
1169 struct in_addr tunsrc, struct in_addr tundst, uint8_t proto) in xfrm_prepare() argument
1172 XFRM_POLICY_OUT, tunsrc, tundst, proto)) { in xfrm_prepare()
[all …]
Dgro.c78 static int proto = -1; variable
109 if (proto == PF_INET) in setup_sock_filter()
116 if (proto == PF_INET) in setup_sock_filter()
180 if (proto == PF_INET6) { in tcp_checksum()
189 } else if (proto == PF_INET) { in tcp_checksum()
225 if (proto == PF_INET6) { in fill_networklayer()
236 } else if (proto == PF_INET) { in fill_networklayer()
388 if (proto == PF_INET) { in recompute_packet()
651 if (proto == PF_INET) { in send_changed_tos()
655 } else if (proto == PF_INET6) { in send_changed_tos()
[all …]
Dpmtu.sh554 proto=${1}
561 [ ${proto} -eq 6 ] && vti_type="vti6" || vti_type="vti"
563 …run_cmd ${ns_a} ip link add vti${proto}_a type ${vti_type} local ${veth_a_addr} remote ${veth_b_ad…
564 …run_cmd ${ns_b} ip link add vti${proto}_b type ${vti_type} local ${veth_b_addr} remote ${veth_a_ad…
566 run_cmd ${ns_a} ip addr add ${vti_a_addr}/${vti_mask} dev vti${proto}_a
567 run_cmd ${ns_b} ip addr add ${vti_b_addr}/${vti_mask} dev vti${proto}_b
569 run_cmd ${ns_a} ip link set vti${proto}_a up
570 run_cmd ${ns_b} ip link set vti${proto}_b up
657 proto=${1}
662 …run_cmd ${ns_a} ip -${proto} xfrm state add src ${veth_a_addr} dst ${veth_b_addr} spi 0x1000 proto
[all …]
Dtcp_fastopen_backup_key.c91 static void build_rcv_fd(int family, int proto, int *rcv_fds) in build_rcv_fd() argument
126 rcv_fds[i] = socket(family, proto, 0); in build_rcv_fd()
138 if (proto == SOCK_STREAM && listen(rcv_fds[i], 10)) in build_rcv_fd()
143 static int connect_and_send(int family, int proto) in connect_and_send() argument
189 fd = socket(family, proto, 0); in connect_and_send()
/tools/testing/selftests/drivers/net/mlxsw/
Ddevlink_trap_l3_drops.sh192 local proto=$1; shift
203 tc filter add dev $rp2 egress protocol $proto pref 1 handle 101 \
215 devlink_trap_drop_cleanup $mz_pid $rp2 $proto 1 101
227 local proto=$1; shift
238 tc filter add dev $rp2 egress protocol $proto pref 1 handle 101 \
250 devlink_trap_drop_cleanup $mz_pid $rp2 $proto 1 101
262 local proto=$1; shift
272 tc filter add dev $rp2 egress protocol $proto pref 1 handle 101 \
284 devlink_trap_drop_cleanup $mz_pid $rp2 $proto 1 101
296 local proto=$1; shift
[all …]
Ddevlink_trap_control.sh221 -A 192.0.2.1 -B 224.0.0.1 -t ip proto=2,p=11 -p 100 -q
229 -A 192.0.2.1 -B 244.0.0.1 -t ip proto=2,p=12 -p 100 -q
237 -A 192.0.2.1 -B 244.0.0.1 -t ip proto=2,p=16 -p 100 -q
245 -A 192.0.2.1 -B 244.0.0.1 -t ip proto=2,p=22 -p 100 -q
253 -A 192.0.2.1 -B 224.0.0.2 -t ip proto=2,p=17 -p 100 -q
397 -A 192.0.2.1 -B 224.0.0.5 -t ip proto=89 -p 100 -q
401 -A 192.0.2.1 -B 192.0.2.2 -t ip proto=89 -p 100 -q
435 -A 192.0.2.1 -B 224.0.0.18 -t ip proto=112 -p 100 -q
449 -A 192.0.2.1 -B 224.0.0.13 -t ip proto=103 -p 100 -q
453 -A 192.0.2.1 -B 192.0.2.2 -t ip proto=103 -p 100 -q
[all …]
Dtc_police_occ.sh70 tc filter add dev $swp1 ingress pref 1 handle 101 proto ip \
80 tc filter add dev $swp1 ingress pref 1 handle 101 proto ip \
84 tc filter add dev $swp1 ingress pref 2 handle 102 proto ip \
Ddevlink_trap_tunnel_ipip.sh132 )"01:"$( : IP proto
159 len=48,tos=$outer_tos,proto=47,p=$payload -q &
191 )"01:"$( : IP proto
216 -A $sip -B 192.0.2.65 -t ip len=48,proto=47,p=$payload -q &
/tools/testing/selftests/bpf/progs/
Dskb_pkt_end.c33 __u8 proto = 0; in main_prog() local
38 proto = ip->protocol; in main_prog()
40 if (proto != IPPROTO_TCP) in main_prog()
Dtest_sk_assign.c62 __u8 proto = 0; in get_tuple() local
78 proto = iph->protocol; in get_tuple()
87 proto = ip6h->nexthdr; in get_tuple()
94 if (proto != IPPROTO_TCP && proto != IPPROTO_UDP) in get_tuple()
97 *tcp = (proto == IPPROTO_TCP); in get_tuple()
Dtest_pkt_access.c107 __u8 proto = 255; in test_pkt_access() local
119 proto = iph->protocol; in test_pkt_access()
127 proto = ip6h->nexthdr; in test_pkt_access()
140 if (((void *)(tcp) + 20) > data_end || proto != 6) in test_pkt_access()
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()
Dtest_sk_lookup_kern.c27 __u8 proto = 0; in get_tuple() local
36 proto = iph->protocol; in get_tuple()
45 proto = ip6h->nexthdr; in get_tuple()
50 if (data + nh_off + ihl_len > data_end || proto != IPPROTO_TCP) in get_tuple()
Dbpf_flow.c50 __be16 proto; member
115 static __always_inline int parse_eth_proto(struct __sk_buff *skb, __be16 proto) in parse_eth_proto() argument
119 switch (proto) { in parse_eth_proto()
151 static __always_inline int parse_ip_proto(struct __sk_buff *skb, __u8 proto) in parse_ip_proto() argument
161 switch (proto) { in parse_ip_proto()
200 if (gre->proto == bpf_htons(ETH_P_TEB)) { in parse_ip_proto()
210 return parse_eth_proto(skb, gre->proto); in parse_ip_proto()
Dtest_l4lb_noinline.c130 __u8 proto; member
248 pckt->proto = ip6h->nexthdr; in parse_icmpv6()
273 pckt->proto = iph->protocol; in parse_icmp()
353 pckt.proto = protocol; in process_packet()
375 pckt.proto = protocol; in process_packet()
391 protocol = pckt.proto; in process_packet()
409 vip.protocol = pckt.proto; in process_packet()
/tools/testing/selftests/bpf/prog_tests/
Dcls_redirect.c249 static void encap_init(encap_headers_t *encap, uint8_t hop_count, uint8_t proto) in encap_init() argument
267 .proto_ctype = proto in encap_init()
286 int proto; in build_input() local
288 proto = IPPROTO_IPIP; in build_input()
290 proto = IPPROTO_IPV6; in build_input()
292 encap_init(&encap, test->hops == ONE_HOP ? 1 : 0, proto); in build_input()
300 proto = IPPROTO_TCP; in build_input()
302 proto = IPPROTO_UDP; in build_input()
310 .protocol = proto, in build_input()
320 .nexthdr = proto, in build_input()
/tools/testing/selftests/net/forwarding/
Dmirror_lib.sh40 local proto=-6
43 local proto=
48 $MZ $proto $vrf_name ${sip:+-A $sip} -B $dip -a own -b bc -q \
/tools/testing/selftests/netfilter/
Dnft_queue.sh180 local proto=$1
183 table $proto blackh {
190 if [ $proto = "ip" ] ;then
193 elif [ $proto = "ip6" ]; then
202 echo "FAIL: $proto expected failure, got $lret" 1>&2
206 ip netns exec ${nsrouter} nft delete table $proto blackh
208 echo "FAIL: $proto: Could not delete blackh table"
212 echo "PASS: $proto: statement with no listener results in packet drop"

123