Searched refs:tcph (Results 1 - 25 of 44) sorted by relevance

12

/linux-master/tools/testing/selftests/bpf/progs/
H A Dcgroup_tcp_skb.c25 int needed_tcp_pkt(struct __sk_buff *skb, struct tcphdr *tcph) argument
37 if (bpf_skb_load_bytes(skb, sizeof(ip6h), tcph, sizeof(*tcph)))
40 if (tcph->source != bpf_htons(g_sock_port) &&
41 tcph->dest != bpf_htons(g_sock_port))
48 static int egress_accept(struct tcphdr *tcph) argument
51 if (tcph->fin || !tcph->syn || !tcph->ack)
61 static int ingress_accept(struct tcphdr *tcph) argument
84 egress_connect(struct tcphdr *tcph) argument
97 ingress_connect(struct tcphdr *tcph) argument
111 egress_close_remote(struct tcphdr *tcph) argument
135 ingress_close_remote(struct tcphdr *tcph) argument
156 egress_close_local(struct tcphdr *tcph) argument
176 ingress_close_local(struct tcphdr *tcph) argument
208 struct tcphdr tcph; local
231 struct tcphdr tcph; local
254 struct tcphdr tcph; local
277 struct tcphdr tcph; local
300 struct tcphdr tcph; local
323 struct tcphdr tcph; local
346 struct tcphdr tcph; local
369 struct tcphdr tcph; local
[all...]
H A Dtest_tcp_check_syncookie_kern.c28 struct tcphdr *tcph)
30 __u32 thlen = tcph->doff * 4;
32 if (tcph->syn && !tcph->ack) {
37 if ((void *)tcph + thlen > data_end)
40 return bpf_tcp_gen_syncookie(sk, iph, ip_size, tcph, thlen);
53 struct tcphdr *tcph; local
73 tcph = data + sizeof(struct ethhdr) + sizeof(struct iphdr);
74 if (tcph + 1 > data_end)
79 tup.ipv4.sport = tcph
26 gen_syncookie(void *data_end, struct bpf_sock *sk, void *iph, __u32 ip_size, struct tcphdr *tcph) argument
[all...]
H A Dcgroup_skb_sk_lookup_kern.c31 const struct tcphdr *tcph)
35 tuple->ipv6.sport = tcph->dest;
36 tuple->ipv6.dport = tcph->source;
41 const struct tcphdr *tcph)
48 set_tuple(&tuple, ip6h, tcph);
70 struct tcphdr tcph; local
85 if (bpf_skb_load_bytes(skb, sizeof(ip6h), &tcph, sizeof(tcph)))
91 if (tcph.dest != g_serv_port)
94 return is_allowed_peer_cg(skb, &ip6h, &tcph);
29 set_tuple(struct bpf_sock_tuple *tuple, const struct ipv6hdr *ip6h, const struct tcphdr *tcph) argument
39 is_allowed_peer_cg(struct __sk_buff *skb, const struct ipv6hdr *ip6h, const struct tcphdr *tcph) argument
[all...]
H A Dtest_tc_tunnel.c100 struct tcphdr tcph; local
149 &tcph, sizeof(tcph)) < 0)
152 if (tcph.dest != __bpf_constant_htons(cfg_port))
268 struct tcphdr tcph; local
280 &tcph, sizeof(tcph)) < 0)
283 if (tcph.dest != __bpf_constant_htons(cfg_port))
377 struct tcphdr tcph; local
388 &tcph, sizeo
[all...]
/linux-master/net/netfilter/
H A Dnf_conntrack_seqadj.c76 struct tcphdr *tcph,
106 inet_proto_csum_replace4(&tcph->check, skb,
108 inet_proto_csum_replace4(&tcph->check, skb,
122 struct tcphdr *tcph = (void *)skb->data + protoff; local
127 optend = protoff + tcph->doff * 4;
132 tcph = (void *)skb->data + protoff;
154 nf_ct_sack_block_adjust(skb, tcph, optoff + 2,
169 struct tcphdr *tcph; local
179 if (skb_ensure_writable(skb, protoff + sizeof(*tcph)))
182 tcph
75 nf_ct_sack_block_adjust(struct sk_buff *skb, struct tcphdr *tcph, unsigned int sackoff, unsigned int sackend, struct nf_ct_seqadj *seq) argument
[all...]
H A Dxt_TCPOPTSTRIP.c34 struct tcphdr *tcph, _th; local
44 tcph = skb_header_pointer(skb, tcphoff, sizeof(_th), &_th);
45 if (!tcph)
48 tcp_hdrlen = tcph->doff * 4;
55 /* must reload tcph, might have been moved */
56 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff);
57 opt = (u8 *)tcph;
79 inet_proto_csum_replace2(&tcph->check, skb, htons(o),
H A Dxt_TCPMSS.c78 struct tcphdr *tcph; local
96 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff);
97 tcp_hdrlen = tcph->doff * 4;
116 opt = (u_int8_t *)tcph;
133 inet_proto_csum_replace2(&tcph->check, skb,
147 /* tcph->doff has 4 bits, do not wrap it to 0 */
159 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff);
176 opt = (u_int8_t *)tcph + sizeof(struct tcphdr);
179 inet_proto_csum_replace2(&tcph->check, skb,
186 inet_proto_csum_replace4(&tcph
[all...]
H A Dnft_exthdr.c174 struct tcphdr *tcph; local
179 tcph = skb_header_pointer(pkt->skb, nft_thoff(pkt), sizeof(*tcph), buffer);
180 if (!tcph)
183 *tcphdr_len = __tcp_hdrlen(tcph);
184 if (*tcphdr_len < sizeof(*tcph) || *tcphdr_len > len)
198 struct tcphdr *tcph; local
201 tcph = nft_tcp_header_pointer(pkt, sizeof(buff), buff, &tcphdr_len);
202 if (!tcph)
205 opt = (u8 *)tcph;
241 struct tcphdr *tcph; local
321 struct tcphdr *tcph; local
[all...]
H A Dnf_nat_helper.c95 struct tcphdr *tcph; local
106 tcph = (void *)skb->data + protoff;
109 mangle_contents(skb, protoff + tcph->doff*4,
115 tcph, &tcph->check, datalen, oldlen);
118 nf_ct_seqadj_set(ct, ctinfo, tcph->seq,
H A Dnf_conntrack_proto_tcp.c275 static unsigned int get_conntrack_index(const struct tcphdr *tcph) argument
277 if (tcph->rst) return TCP_RST_SET;
278 else if (tcph->syn) return (tcph->ack ? TCP_SYNACK_SET : TCP_SYN_SET);
279 else if (tcph->fin) return TCP_FIN_SET;
280 else if (tcph->ack) return TCP_ACK_SET;
316 const struct tcphdr *tcph)
320 return (seq + len - dataoff - tcph->doff*4
321 + (tcph->syn ? 1 : 0) + (tcph
313 segment_seq_plus_len(__u32 seq, size_t len, unsigned int dataoff, const struct tcphdr *tcph) argument
333 tcp_options(const struct sk_buff *skb, unsigned int dataoff, const struct tcphdr *tcph, struct ip_ct_tcp_state *state) argument
391 tcp_sack(const struct sk_buff *skb, unsigned int dataoff, const struct tcphdr *tcph, __u32 *sack) argument
455 tcp_init_sender(struct ip_ct_tcp_state *sender, struct ip_ct_tcp_state *receiver, const struct sk_buff *skb, unsigned int dataoff, const struct tcphdr *tcph, u32 end, u32 win, enum ip_conntrack_dir dir) argument
510 tcp_in_window(struct nf_conn *ct, enum ip_conntrack_dir dir, unsigned int index, const struct sk_buff *skb, unsigned int dataoff, const struct tcphdr *tcph, const struct nf_hook_state *hook_state) argument
[all...]
H A Dnf_flow_table_ip.c25 struct tcphdr *tcph; local
30 tcph = (void *)(skb_network_header(skb) + thoff);
31 if (unlikely(tcph->fin || tcph->rst)) {
42 struct tcphdr *tcph; local
44 tcph = (void *)(skb_network_header(skb) + thoff);
45 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, true);
477 struct tcphdr *tcph; local
479 tcph = (void *)(skb_network_header(skb) + thoff);
480 inet_proto_csum_replace16(&tcph
[all...]
H A Dnft_flow_offload.c297 struct tcphdr _tcph, *tcph = NULL; local
314 tcph = skb_header_pointer(pkt->skb, nft_thoff(pkt),
316 if (unlikely(!tcph || tcph->fin || tcph->rst ||
359 if (tcph) {
/linux-master/net/ipv4/netfilter/
H A Dipt_ECN.c47 struct tcphdr _tcph, *tcph; local
51 tcph = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(_tcph), &_tcph);
52 if (!tcph)
56 tcph->ece == einfo->proto.tcp.ece) &&
58 tcph->cwr == einfo->proto.tcp.cwr))
61 if (skb_ensure_writable(skb, ip_hdrlen(skb) + sizeof(*tcph)))
63 tcph = (void *)ip_hdr(skb) + ip_hdrlen(skb);
65 oldval = ((__be16 *)tcph)[6];
67 tcph->ece = einfo->proto.tcp.ece;
69 tcph
[all...]
H A Dnf_reject_ipv4.c197 struct tcphdr *tcph; local
200 tcph = skb_put_zero(nskb, sizeof(struct tcphdr));
201 tcph->source = oth->dest;
202 tcph->dest = oth->source;
203 tcph->doff = sizeof(struct tcphdr) / 4;
206 tcph->seq = oth->ack_seq;
208 tcph->ack_seq = htonl(ntohl(oth->seq) + oth->syn + oth->fin +
211 tcph->ack = 1;
214 tcph->rst = 1;
215 tcph
[all...]
/linux-master/net/core/
H A Dtso.c28 struct tcphdr *tcph = (struct tcphdr *)hdr; local
30 put_unaligned_be32(tso->tcp_seq, &tcph->seq);
34 tcph->psh = 0;
35 tcph->fin = 0;
36 tcph->rst = 0;
/linux-master/net/ipv6/netfilter/
H A Dnf_reject_ipv6.c225 struct tcphdr *tcph; local
229 tcph = skb_put(nskb, sizeof(struct tcphdr));
231 tcph->doff = sizeof(struct tcphdr)/4;
232 tcph->source = oth->dest;
233 tcph->dest = oth->source;
237 tcph->seq = oth->ack_seq;
238 tcph->ack_seq = 0;
241 tcph->ack_seq = htonl(ntohl(oth->seq) + oth->syn + oth->fin +
243 tcph->seq = 0;
247 ((u_int8_t *)tcph)[1
[all...]
/linux-master/net/netfilter/ipvs/
H A Dip_vs_proto_tcp.c105 tcp_fast_csum_update(int af, struct tcphdr *tcph, argument
112 tcph->check =
115 ~csum_unfold(tcph->check))));
118 tcph->check =
121 ~csum_unfold(tcph->check))));
126 tcp_partial_csum_update(int af, struct tcphdr *tcph, argument
133 tcph->check =
136 csum_unfold(tcph->check))));
139 tcph->check =
142 csum_unfold(tcph
150 struct tcphdr *tcph; local
228 struct tcphdr *tcph; local
[all...]
/linux-master/tools/testing/selftests/net/
H A Dgro.c280 struct tcphdr *tcph = buf; local
282 memset(tcph, 0, sizeof(*tcph));
284 tcph->source = htons(SPORT);
285 tcph->dest = htons(DPORT);
286 tcph->seq = ntohl(START_SEQ + seq_offset);
287 tcph->ack_seq = ntohl(START_ACK + ack_offset);
288 tcph->ack = 1;
289 tcph->fin = fin;
290 tcph
325 struct tcphdr *tcph; local
494 struct tcphdr *tcph = (struct tcphdr *)(buf + tcp_offset); local
509 struct tcphdr *tcph = (struct tcphdr *)(buf + tcp_offset); local
803 struct tcphdr *tcph; local
[all...]
/linux-master/tools/testing/selftests/net/tcp_ao/
H A Dicmps-accept.c191 } tcph; member in struct:__anon4474
209 packet_len = sizeof(packet.iphe) + sizeof(packet.tcph);
212 packet.tcph.sport = dst->sin_port;
213 packet.tcph.dport = src->sin_port;
214 packet.tcph.seq = htonl(rcv_nxt);
306 } tcph; member in struct:__anon4477
321 packet_len = sizeof(packet.iphe) + sizeof(packet.tcph);
324 packet.tcph.sport = dst->sin6_port;
325 packet.tcph.dport = src->sin6_port;
326 packet.tcph
[all...]
H A Dicmps-discard.c191 } tcph; member in struct:__anon4479
209 packet_len = sizeof(packet.iphe) + sizeof(packet.tcph);
212 packet.tcph.sport = dst->sin_port;
213 packet.tcph.dport = src->sin_port;
214 packet.tcph.seq = htonl(rcv_nxt);
306 } tcph; member in struct:__anon4482
321 packet_len = sizeof(packet.iphe) + sizeof(packet.tcph);
324 packet.tcph.sport = dst->sin6_port;
325 packet.tcph.dport = src->sin6_port;
326 packet.tcph
[all...]
/linux-master/drivers/infiniband/hw/irdma/
H A Dcm.c310 struct tcphdr *tcph; local
338 pktsize = sizeof(*tcph) + opts_len + hdr_len + pd_len;
340 memset(buf, 0, sizeof(*tcph));
343 sqbuf->tcphlen = sizeof(*tcph) + opts_len;
346 tcph = (struct tcphdr *)buf;
347 buf += sizeof(*tcph);
349 tcph->source = htons(cm_node->loc_port);
350 tcph->dest = htons(cm_node->rem_port);
351 tcph->seq = htonl(cm_node->tcp_cntxt.loc_seq_num);
355 tcph
420 struct tcphdr *tcph; local
747 irdma_handle_tcp_options(struct irdma_cm_node *cm_node, struct tcphdr *tcph, int optionsize, int passive) argument
2619 irdma_check_syn(struct irdma_cm_node *cm_node, struct tcphdr *tcph) argument
2634 irdma_check_seq(struct irdma_cm_node *cm_node, struct tcphdr *tcph) argument
2677 struct tcphdr *tcph = (struct tcphdr *)rbuf->tcph; local
2743 struct tcphdr *tcph = (struct tcphdr *)rbuf->tcph; local
2816 struct tcphdr *tcph = (struct tcphdr *)rbuf->tcph; local
2900 struct tcphdr *tcph = (struct tcphdr *)rbuf->tcph; local
3142 struct tcphdr *tcph; local
[all...]
H A Dutils.c1420 struct tcphdr *tcph = (struct tcphdr *)buf->tcph; local
1430 loc_port = ntohs(tcph->dest);
1431 rem_port = ntohs(tcph->source);
1451 struct tcphdr *tcph = (struct tcphdr *)buf->tcph; local
1454 cm_node->tcp_cntxt.loc_seq_num = ntohl(tcph->ack_seq);
1513 struct tcphdr *tcph; local
1521 tcph = (struct tcphdr *)(addr + buf->maclen + iphlen);
1524 tcph
1536 struct tcphdr *tcph; local
1558 struct tcphdr *tcph; local
1611 struct tcphdr *tcph; local
[all...]
/linux-master/net/sched/
H A Dact_csum.c208 struct tcphdr *tcph; local
214 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph));
215 if (tcph == NULL)
219 tcph->check = 0;
220 skb->csum = csum_partial(tcph, ipl - ihl, 0);
221 tcph->check = tcp_v4_check(ipl - ihl,
232 struct tcphdr *tcph; local
238 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph));
[all...]
H A Dact_nat.c181 struct tcphdr *tcph; local
183 if (!pskb_may_pull(skb, ihl + sizeof(*tcph) + noff) ||
184 skb_try_make_writable(skb, ihl + sizeof(*tcph) + noff))
187 tcph = (void *)(skb_network_header(skb) + ihl);
188 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr,
H A Dsch_cake.c907 const struct tcphdr *tcph; local
946 tcph = skb_header_pointer(skb, offset, sizeof(_tcph), &_tcph);
947 if (!tcph || tcph->doff < 5)
951 min(__tcp_hdrlen(tcph), bufsize), buf);
954 static const void *cake_get_tcpopt(const struct tcphdr *tcph, argument
958 int length = __tcp_hdrlen(tcph) - sizeof(struct tcphdr);
959 const u8 *ptr = (const u8 *)(tcph + 1);
1066 static void cake_tcph_get_tstamp(const struct tcphdr *tcph, argument
1072 ptr = cake_get_tcpopt(tcph, TCPOPT_TIMESTAM
1080 cake_tcph_may_drop(const struct tcphdr *tcph, u32 tstamp_new, u32 tsecr_new) argument
1160 const struct tcphdr *tcph, *tcph_check; local
[all...]

Completed in 403 milliseconds

12