Home
last modified time | relevance | path

Searched refs:tcp (Results 1 – 25 of 46) sorted by relevance

12

/tools/testing/selftests/bpf/progs/
Dtest_pkt_access.c87 struct tcphdr *tcp = NULL; in test_pkt_write_access_subprog() local
92 tcp = data + off; in test_pkt_write_access_subprog()
93 if (tcp + 1 > data_end) in test_pkt_write_access_subprog()
96 tcp->check++; in test_pkt_write_access_subprog()
106 struct tcphdr *tcp = NULL; in test_pkt_access() local
120 tcp = (struct tcphdr *)((void *)(iph) + ihl_len); in test_pkt_access()
128 tcp = (struct tcphdr *)((void *)(ip6h) + ihl_len); in test_pkt_access()
137 if (tcp) { in test_pkt_access()
138 if (test_pkt_write_access_subprog(skb, (void *)tcp - data)) in test_pkt_access()
140 if (((void *)(tcp) + 20) > data_end || proto != 6) in test_pkt_access()
[all …]
Dskb_pkt_end.c32 struct tcphdr *tcp; in main_prog() local
43 tcp = (void*)(ip + 1); in main_prog()
44 if (tcp->dest != 0) in main_prog()
46 if (!tcp) in main_prog()
49 return tcp->urg_ptr; in main_prog()
Dtest_migrate_reuseport.c50 struct tcphdr *tcp = NULL; in drop_ack() local
65 tcp = (struct tcphdr *)((void *)ip + ip->ihl * 4); in drop_ack()
77 tcp = (struct tcphdr *)(ipv6 + 1); in drop_ack()
84 if (tcp + 1 > data_end) in drop_ack()
87 if (tcp->dest != server_port) in drop_ack()
90 if (!tcp->syn && tcp->ack) in drop_ack()
Dbpf_iter_tcp6.c69 static bool tcp_in_initial_slowstart(const struct tcp_sock *tcp) in tcp_in_initial_slowstart() argument
71 return tcp->snd_ssthresh >= TCP_INFINITE_SSTHRESH; in tcp_in_initial_slowstart()
88 icsk = &tp->tcp.inet_conn; in dump_tcp6_sock()
118 rx_queue = tp->tcp.rcv_nxt - tp->tcp.copied_seq; in dump_tcp6_sock()
131 tp->tcp.write_seq - tp->tcp.snd_una, rx_queue, in dump_tcp6_sock()
143 tp->tcp.snd_cwnd, in dump_tcp6_sock()
145 : (tcp_in_initial_slowstart(&tp->tcp) ? -1 in dump_tcp6_sock()
146 : tp->tcp.snd_ssthresh) in dump_tcp6_sock()
Dfexit_bpf2bpf.c164 struct tcphdr *tcp; in new_test_pkt_write_access_subprog() local
169 tcp = data + off; in new_test_pkt_write_access_subprog()
170 if (tcp + 1 > data_end) in new_test_pkt_write_access_subprog()
174 tcp->check++; in new_test_pkt_write_access_subprog()
175 tcp->syn = 0; in new_test_pkt_write_access_subprog()
Dtest_sk_assign.c55 get_tuple(struct __sk_buff *skb, bool *ipv4, bool *tcp) in get_tuple() argument
97 *tcp = (proto == IPPROTO_TCP); in get_tuple()
178 bool tcp = false; in bpf_sk_assign_test() local
182 tuple = get_tuple(skb, &ipv4, &tcp); in bpf_sk_assign_test()
191 if (tcp) in bpf_sk_assign_test()
Dtest_tc_edt.c65 static inline int handle_tcp(struct __sk_buff *skb, struct tcphdr *tcp) in handle_tcp() argument
70 if ((void *)(tcp + 1) > data_end) in handle_tcp()
73 if (tcp->dest == bpf_htons(9000)) in handle_tcp()
Dbpf_flow.c158 struct tcphdr *tcp, _tcp; in parse_ip_proto() local
213 tcp = bpf_flow_dissect_get_header(skb, sizeof(*tcp), &_tcp); in parse_ip_proto()
214 if (!tcp) in parse_ip_proto()
217 if (tcp->doff < 5) in parse_ip_proto()
220 if ((__u8 *)tcp + (tcp->doff << 2) > data_end) in parse_ip_proto()
223 keys->sport = tcp->source; in parse_ip_proto()
224 keys->dport = tcp->dest; in parse_ip_proto()
Dtest_l4lb.c305 struct tcphdr *tcp; in parse_tcp() local
307 tcp = data + off; in parse_tcp()
308 if (tcp + 1 > data_end) in parse_tcp()
311 if (tcp->syn) in parse_tcp()
315 pckt->port16[0] = tcp->source; in parse_tcp()
316 pckt->port16[1] = tcp->dest; in parse_tcp()
318 pckt->port16[0] = tcp->dest; in parse_tcp()
319 pckt->port16[1] = tcp->source; in parse_tcp()
Dtest_l4lb_noinline.c302 struct tcphdr *tcp; in parse_tcp() local
304 tcp = data + off; in parse_tcp()
305 if (tcp + 1 > data_end) in parse_tcp()
308 if (tcp->syn) in parse_tcp()
312 pckt->port16[0] = tcp->source; in parse_tcp()
313 pckt->port16[1] = tcp->dest; in parse_tcp()
315 pckt->port16[0] = tcp->dest; in parse_tcp()
316 pckt->port16[1] = tcp->source; in parse_tcp()
Dtest_cls_redirect.c649 void *iph, struct tcphdr *tcp) in classify_tcp() argument
662 if (iph != NULL && tcp != NULL) { in classify_tcp()
669 if (bpf_tcp_check_syncookie(sk, iph, iphlen, tcp, in classify_tcp()
670 sizeof(*tcp)) == 0) { in classify_tcp()
820 struct tcphdr *tcp = buf_assign(pkt, sizeof(_tcp), &_tcp); in process_tcp() local
821 if (tcp == NULL) { in process_tcp()
826 if (tcp->syn) { in process_tcp()
832 fill_tuple(&tuple, iph, iphlen, tcp->source, tcp->dest); in process_tcp()
833 return classify_tcp(pkt->skb, &tuple, tuplen, iph, tcp); in process_tcp()
/tools/testing/selftests/bpf/prog_tests/
Dflow_dissector.c44 struct tcphdr tcp; member
51 struct tcphdr tcp; member
59 struct tcphdr tcp; member
65 struct tcphdr tcp; member
77 struct tcphdr tcp; member
87 struct tcphdr tcp; member
115 .tcp.doff = 5,
116 .tcp.source = 80,
117 .tcp.dest = 8080,
135 .tcp.doff = 5,
[all …]
Dcls_redirect.c282 struct tcphdr tcp; in build_input() local
335 tcp = (struct tcphdr){ in build_input()
340 tcp.syn = true; in build_input()
342 tcp.ack = true; in build_input()
343 p = mempcpy(p, &tcp, sizeof(tcp)); in build_input()
Dkfree_skb.c44 if (CHECK(pkt_v6->tcp.doff != 5, "check_tcp", in on_sample()
45 "tcp.doff %x\n", pkt_v6->tcp.doff)) in on_sample()
/tools/testing/selftests/netfilter/
Dconntrack_tcp_unreplied.sh97 ct state new tcp flags syn ip daddr 10.99.99.99 tcp dport 80 counter name "connreq" accept
98 ct state new ct status dnat tcp dport 8080 counter name "redir" accept
121 ip daddr 10.99.99.99 tcp dport 80 redirect to :8080
130 count=$(ip netns exec $ns2 conntrack -L -p tcp --dport 80 2>/dev/null | wc -l)
142 count=$(ip netns exec $ns2 conntrack -L -p tcp --reply-port-src 8080 2>/dev/null | wc -l)
Dnft_conntrack_helper.sh76 type "ftp" protocol tcp
80 tcp dport 2121 ct helper set "ftp"
84 tcp dport 2121 ct helper set "ftp"
103 …ip netns exec ${netns} conntrack -L -f $family -p tcp --dport $port 2> /dev/null |grep -q 'helper=…
Dnft_nat_zones.sh190tcp flags & (syn|ack) == ack add @inflows { ip saddr . tcp sport . meta iifname . ip daddr . tcp d…
191 add @inflows6 { ip6 saddr . tcp sport . meta iifname . ip6 daddr . tcp dport counter }
/tools/testing/selftests/net/forwarding/
Dsch_red.sh276 backlog=$(build_backlog $((3 * limit / 2)) tcp tos=0x01)
289 -a own -b $h3_mac -t tcp -q tos=0x01 &
312 -a own -b $h3_mac -t tcp -q tos=0x01 &
338 -a own -b $h3_mac -t tcp -q tos=0x01 &
342 backlog=$(build_backlog $((2 * limit / 3)) tcp tos=0x01)
350 backlog=$(build_backlog $((3 * limit / 2)) tcp tos=0x01)
412 -a own -b $h3_mac -t tcp -q tos=0x01 &
418 backlog=$(build_backlog $((2 * limit / 3)) tcp tos=0x01)
423 backlog=$(build_backlog $((3 * limit / 2)) tcp tos=0x01)
Dpedit_l4port.sh183 do_test_pedit_l4port "dev $swp1 ingress" tcp sport src_port
184 do_test_pedit_l4port "dev $swp2 egress" tcp sport src_port
189 do_test_pedit_l4port "dev $swp1 ingress" tcp dport dst_port
190 do_test_pedit_l4port "dev $swp2 egress" tcp dport dst_port
/tools/testing/selftests/bpf/
Dnetwork_helpers.h30 struct tcphdr tcp; member
38 struct tcphdr tcp; member
Dnetwork_helpers.c31 .tcp.urg_ptr = 123,
32 .tcp.doff = 5,
39 .tcp.urg_ptr = 123,
40 .tcp.doff = 5,
/tools/usb/usbip/
Dconfigure.ac55 AC_ARG_WITH([tcp-wrappers],
56 [AS_HELP_STRING([--with-tcp-wrappers],
69 [use tcp wrapper]) wrap_LIB="-lwrap"],
83 AC_DEFINE([HAVE_LIBWRAP], [1], [use tcp wrapper])],
/tools/testing/selftests/net/mptcp/
Dmptcp_sockopt.sh26 ip netns exec $ns $t -A OUTPUT -p tcp --syn -m mark --mark $m -j ACCEPT
29 ip netns exec $ns $t -A OUTPUT -p tcp --tcp-flags RST RST -m mark --mark 0 -j ACCEPT
31 ip netns exec $ns $t -A OUTPUT -p tcp -m mark --mark $m -j ACCEPT
32 ip netns exec $ns $t -A OUTPUT -p tcp -m mark --mark 0 -j DROP
Ddiag.sh121 ip netns exec "${listener_ns}" cat /proc/net/tcp | \
137 ip netns exec ${listener_ns} grep -q " 0100007F:${port_hex} " /proc/net/tcp && break
/tools/testing/selftests/net/
Dmsg_zerocopy.sh26 $0 4 tcp -t 1
27 $0 6 tcp -t 1

12