Home
last modified time | relevance | path

Searched refs:tcphdr (Results 1 - 25 of 414) sorted by relevance

12345678910>>...17

/third_party/lwip/src/core/
H A Dtcp_in.c75 static struct tcp_hdr *tcphdr; variable
141 tcphdr = (struct tcp_hdr *)p->payload;
144 tcp_debug_print(tcphdr);
170 tcp_debug_print(tcphdr);
178 hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr);
231 tcphdr->src = lwip_ntohs(tcphdr->src);
232 tcphdr->dest = lwip_ntohs(tcphdr->dest);
233 seqno = tcphdr
[all...]
H A Dtcp_out.c208 seg->tcphdr = (struct tcp_hdr *)seg->p->payload; in tcp_create_segment()
209 seg->tcphdr->src = lwip_htons(pcb->local_port); in tcp_create_segment()
210 seg->tcphdr->dest = lwip_htons(pcb->remote_port); in tcp_create_segment()
211 seg->tcphdr->seqno = lwip_htonl(seqno); in tcp_create_segment()
213 TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags); in tcp_create_segment()
215 seg->tcphdr->urgp = 0; in tcp_create_segment()
702 lwip_ntohl(seg->tcphdr->seqno), in tcp_write()
703 lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg))); in tcp_write()
803 if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE) == 0)) { in tcp_write()
804 TCPH_SET_FLAG(seg->tcphdr, TCP_PS in tcp_write()
1835 struct tcp_hdr *tcphdr; tcp_output_alloc_header_common() local
1887 struct tcp_hdr *tcphdr; tcp_output_fill_options() local
1949 struct tcp_hdr *tcphdr = (struct tcp_hdr *)p->payload; tcp_output_control_segment() local
2133 struct tcp_hdr *tcphdr; tcp_zero_window_probe() local
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/
H A Dcgroup_tcp_skb.c25 int needed_tcp_pkt(struct __sk_buff *skb, struct tcphdr *tcph) in needed_tcp_pkt()
48 static int egress_accept(struct tcphdr *tcph) in egress_accept()
61 static int ingress_accept(struct tcphdr *tcph) in ingress_accept()
84 static int egress_connect(struct tcphdr *tcph) in egress_connect()
97 static int ingress_connect(struct tcphdr *tcph) in ingress_connect()
111 static int egress_close_remote(struct tcphdr *tcph) in egress_close_remote()
135 static int ingress_close_remote(struct tcphdr *tcph) in ingress_close_remote()
156 static int egress_close_local(struct tcphdr *tcph) in egress_close_local()
176 static int ingress_close_local(struct tcphdr *tcph) in ingress_close_local()
208 struct tcphdr tcp in server_egress()
[all...]
H A Dtest_parse_tcp_hdr_opt.c88 struct tcphdr *tcp_hdr; in xdp_ingress_v6()
93 tcp_hdr = (struct tcphdr *)(data + tcp_offset); in xdp_ingress_v6()
97 tcp_hdr_opt_len = (tcp_hdr->doff * 4) - sizeof(struct tcphdr); in xdp_ingress_v6()
102 opt_state.byte_offset = sizeof(struct tcphdr) + tcp_offset; in xdp_ingress_v6()
H A Dtest_parse_tcp_hdr_opt_dynptr.c77 __u8 buffer[sizeof(struct tcphdr)] = {}; in xdp_ingress_v6()
79 struct tcphdr *tcp_hdr; in xdp_ingress_v6()
94 tcp_hdr_opt_len = (tcp_hdr->doff * 4) - sizeof(struct tcphdr); in xdp_ingress_v6()
100 off += sizeof(struct tcphdr); in xdp_ingress_v6()
/kernel/linux/linux-5.10/net/ipv4/netfilter/
H A Dnf_reject_ipv4.c15 const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb, in nf_reject_ip_tcphdr_get()
16 struct tcphdr *_oth, int hook) in nf_reject_ip_tcphdr_get()
18 const struct tcphdr *oth; in nf_reject_ip_tcphdr_get()
28 sizeof(struct tcphdr), _oth); in nf_reject_ip_tcphdr_get()
70 const struct tcphdr *oth) in nf_reject_ip_tcphdr_put()
73 struct tcphdr *tcph; in nf_reject_ip_tcphdr_put()
76 tcph = skb_put_zero(nskb, sizeof(struct tcphdr)); in nf_reject_ip_tcphdr_put()
79 tcph->doff = sizeof(struct tcphdr) / 4; in nf_reject_ip_tcphdr_put()
91 tcph->check = ~tcp_v4_check(sizeof(struct tcphdr), niph->saddr, in nf_reject_ip_tcphdr_put()
95 nskb->csum_offset = offsetof(struct tcphdr, chec in nf_reject_ip_tcphdr_put()
[all...]
/kernel/linux/linux-6.6/net/ipv4/netfilter/
H A Dnf_reject_ipv4.c44 const struct tcphdr *oth; in nf_reject_skb_v4_tcp_reset()
47 struct tcphdr _oth; in nf_reject_skb_v4_tcp_reset()
56 nskb = alloc_skb(sizeof(struct iphdr) + sizeof(struct tcphdr) + in nf_reject_skb_v4_tcp_reset()
139 const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb, in nf_reject_ip_tcphdr_get()
140 struct tcphdr *_oth, int hook) in nf_reject_ip_tcphdr_get()
142 const struct tcphdr *oth; in nf_reject_ip_tcphdr_get()
152 sizeof(struct tcphdr), _oth); in nf_reject_ip_tcphdr_get()
194 const struct tcphdr *oth) in nf_reject_ip_tcphdr_put()
197 struct tcphdr *tcph; in nf_reject_ip_tcphdr_put()
200 tcph = skb_put_zero(nskb, sizeof(struct tcphdr)); in nf_reject_ip_tcphdr_put()
[all...]
/kernel/linux/linux-5.10/net/ipv6/netfilter/
H A Dnf_reject_ipv6.c15 const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb, in nf_reject_ip6_tcphdr_get()
16 struct tcphdr *otcph, in nf_reject_ip6_tcphdr_get()
36 if (proto != IPPROTO_TCP || *otcplen < sizeof(struct tcphdr)) { in nf_reject_ip6_tcphdr_get()
42 otcph = skb_header_pointer(oldskb, tcphoff, sizeof(struct tcphdr), in nf_reject_ip6_tcphdr_get()
89 const struct tcphdr *oth, unsigned int otcplen) in nf_reject_ip6_tcphdr_put()
91 struct tcphdr *tcph; in nf_reject_ip6_tcphdr_put()
95 tcph = skb_put(nskb, sizeof(struct tcphdr)); in nf_reject_ip6_tcphdr_put()
97 tcph->doff = sizeof(struct tcphdr)/4; in nf_reject_ip6_tcphdr_put()
123 sizeof(struct tcphdr), IPPROTO_TCP, in nf_reject_ip6_tcphdr_put()
125 sizeof(struct tcphdr), in nf_reject_ip6_tcphdr_put()
[all...]
/kernel/linux/linux-6.6/net/ipv6/netfilter/
H A Dnf_reject_ipv6.c65 const struct tcphdr *oth; in nf_reject_skb_v6_tcp_reset()
66 struct tcphdr _oth; in nf_reject_skb_v6_tcp_reset()
77 nskb = alloc_skb(sizeof(struct ipv6hdr) + sizeof(struct tcphdr) + in nf_reject_skb_v6_tcp_reset()
149 const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb, in nf_reject_ip6_tcphdr_get()
150 struct tcphdr *otcph, in nf_reject_ip6_tcphdr_get()
170 if (proto != IPPROTO_TCP || *otcplen < sizeof(struct tcphdr)) { in nf_reject_ip6_tcphdr_get()
176 otcph = skb_header_pointer(oldskb, tcphoff, sizeof(struct tcphdr), in nf_reject_ip6_tcphdr_get()
223 const struct tcphdr *oth, unsigned int otcplen) in nf_reject_ip6_tcphdr_put()
225 struct tcphdr *tcph; in nf_reject_ip6_tcphdr_put()
229 tcph = skb_put(nskb, sizeof(struct tcphdr)); in nf_reject_ip6_tcphdr_put()
[all...]
/kernel/linux/linux-5.10/include/net/netfilter/
H A Dnf_synproxy.h46 const struct tcphdr *th,
53 const struct tcphdr *th,
58 const struct tcphdr *th,
71 const struct tcphdr *th,
75 const struct tcphdr *th,
/kernel/linux/linux-6.6/include/net/netfilter/
H A Dnf_synproxy.h46 const struct tcphdr *th,
53 const struct tcphdr *th,
58 const struct tcphdr *th,
71 const struct tcphdr *th,
75 const struct tcphdr *th,
/kernel/linux/linux-6.6/tools/testing/selftests/net/
H A Dgro.c69 #define TOTAL_HDR_LEN (ETH_HLEN + sizeof(struct ipv6hdr) + sizeof(struct tcphdr))
70 #define MSS (4096 - sizeof(struct tcphdr) - sizeof(struct ipv6hdr))
71 #define MAX_PAYLOAD (IP_MAXPACKET - sizeof(struct tcphdr) - sizeof(struct ipv6hdr))
73 #define MAX_HDR_LEN (ETH_HLEN + sizeof(struct ipv6hdr) + sizeof(struct tcphdr))
104 const int dport_off = tcp_offset + offsetof(struct tcphdr, dest); in setup_sock_filter()
187 ph6.payload_len = htons(sizeof(struct tcphdr) + payload_len); in tcp_checksum()
196 ph4.payload_len = htons(sizeof(struct tcphdr) + payload_len); in tcp_checksum()
201 return checksum_fold(buf, sizeof(struct tcphdr) + payload_len, sum); in tcp_checksum()
230 ip6h->payload_len = htons(sizeof(struct tcphdr) + payload_len); in fill_networklayer()
244 iph->tot_len = htons(sizeof(struct tcphdr) in fill_networklayer()
378 struct tcphdr *tcphdr = (struct tcphdr *)(buf + tcp_offset); recompute_packet() local
[all...]
/kernel/linux/linux-5.10/net/netfilter/
H A Dxt_TCPMSS.c78 struct tcphdr *tcph; in tcpmss_mangle_packet()
93 if (len < (int)sizeof(struct tcphdr)) in tcpmss_mangle_packet()
96 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpmss_mangle_packet()
99 if (len < tcp_hdrlen || tcp_hdrlen < sizeof(struct tcphdr)) in tcpmss_mangle_packet()
117 for (i = sizeof(struct tcphdr); i <= tcp_hdrlen - TCPOLEN_MSS; i += optlen(opt, i)) { in tcpmss_mangle_packet()
159 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpmss_mangle_packet()
176 opt = (u_int8_t *)tcph + sizeof(struct tcphdr); in tcpmss_mangle_packet()
177 memmove(opt + TCPOLEN_MSS, opt, len - sizeof(struct tcphdr)); in tcpmss_mangle_packet()
205 sizeof(*iph) + sizeof(struct tcphdr)); in tcpmss_tg4()
234 sizeof(*ipv6h) + sizeof(struct tcphdr)); in tcpmss_tg6()
[all...]
H A Dnf_synproxy_core.c29 const struct tcphdr *th, struct synproxy_options *opts) in synproxy_parse_options()
115 synproxy_build_options(struct tcphdr *th, const struct synproxy_options *opts) in synproxy_build_options()
186 struct tcphdr *th, struct nf_conn *ct, in synproxy_tstamp_adjust()
196 optoff = protoff + sizeof(struct tcphdr); in synproxy_tstamp_adjust()
444 struct iphdr *niph, struct tcphdr *nth, in synproxy_send_tcp()
450 nskb->csum_offset = offsetof(struct tcphdr, check); in synproxy_send_tcp()
471 const struct sk_buff *skb, const struct tcphdr *th, in synproxy_send_client_synack()
476 struct tcphdr *nth; in synproxy_send_client_synack()
514 const struct sk_buff *skb, const struct tcphdr *th, in synproxy_send_server_syn()
520 struct tcphdr *nt in synproxy_send_server_syn()
[all...]
H A Dnfnetlink_osf.c165 static const struct tcphdr *nf_osf_hdr_ctx_init(struct nf_osf_hdr_ctx *ctx, in nf_osf_hdr_ctx_init()
169 struct tcphdr *_tcph) in nf_osf_hdr_ctx_init()
171 const struct tcphdr *tcp; in nf_osf_hdr_ctx_init()
173 tcp = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(struct tcphdr), _tcph); in nf_osf_hdr_ctx_init()
184 if (tcp->doff * 4 > sizeof(struct tcphdr)) { in nf_osf_hdr_ctx_init()
185 ctx->optsize = tcp->doff * 4 - sizeof(struct tcphdr); in nf_osf_hdr_ctx_init()
188 sizeof(struct tcphdr), ctx->optsize, opts); in nf_osf_hdr_ctx_init()
209 const struct tcphdr *tcp; in nf_osf_match()
210 struct tcphdr _tcph; in nf_osf_match()
270 const struct tcphdr *tc in nf_osf_find()
[all...]
H A Dnf_log_common.c57 struct tcphdr _tcph; in nf_log_dump_tcp_header()
58 const struct tcphdr *th; in nf_log_dump_tcp_header()
107 if ((logflags & NF_LOG_TCPOPT) && th->doff*4 > sizeof(struct tcphdr)) { in nf_log_dump_tcp_header()
108 u_int8_t _opt[60 - sizeof(struct tcphdr)]; in nf_log_dump_tcp_header()
111 unsigned int optsize = th->doff*4 - sizeof(struct tcphdr); in nf_log_dump_tcp_header()
113 op = skb_header_pointer(skb, offset + sizeof(struct tcphdr), in nf_log_dump_tcp_header()
/kernel/linux/linux-6.6/net/netfilter/
H A Dxt_TCPMSS.c78 struct tcphdr *tcph; in tcpmss_mangle_packet()
93 if (len < (int)sizeof(struct tcphdr)) in tcpmss_mangle_packet()
96 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpmss_mangle_packet()
99 if (len < tcp_hdrlen || tcp_hdrlen < sizeof(struct tcphdr)) in tcpmss_mangle_packet()
117 for (i = sizeof(struct tcphdr); i <= tcp_hdrlen - TCPOLEN_MSS; i += optlen(opt, i)) { in tcpmss_mangle_packet()
159 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpmss_mangle_packet()
176 opt = (u_int8_t *)tcph + sizeof(struct tcphdr); in tcpmss_mangle_packet()
177 memmove(opt + TCPOLEN_MSS, opt, len - sizeof(struct tcphdr)); in tcpmss_mangle_packet()
205 sizeof(*iph) + sizeof(struct tcphdr)); in tcpmss_tg4()
234 sizeof(*ipv6h) + sizeof(struct tcphdr)); in tcpmss_tg6()
[all...]
H A Dnf_synproxy_core.c29 const struct tcphdr *th, struct synproxy_options *opts) in synproxy_parse_options()
115 synproxy_build_options(struct tcphdr *th, const struct synproxy_options *opts) in synproxy_build_options()
186 struct tcphdr *th, struct nf_conn *ct, in synproxy_tstamp_adjust()
196 optoff = protoff + sizeof(struct tcphdr); in synproxy_tstamp_adjust()
421 struct iphdr *niph, struct tcphdr *nth, in synproxy_send_tcp()
427 nskb->csum_offset = offsetof(struct tcphdr, check); in synproxy_send_tcp()
448 const struct sk_buff *skb, const struct tcphdr *th, in synproxy_send_client_synack()
453 struct tcphdr *nth; in synproxy_send_client_synack()
491 const struct sk_buff *skb, const struct tcphdr *th, in synproxy_send_server_syn()
497 struct tcphdr *nt in synproxy_send_server_syn()
[all...]
H A Dnfnetlink_osf.c165 static const struct tcphdr *nf_osf_hdr_ctx_init(struct nf_osf_hdr_ctx *ctx, in nf_osf_hdr_ctx_init()
169 struct tcphdr *_tcph) in nf_osf_hdr_ctx_init()
171 const struct tcphdr *tcp; in nf_osf_hdr_ctx_init()
173 tcp = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(struct tcphdr), _tcph); in nf_osf_hdr_ctx_init()
184 if (tcp->doff * 4 > sizeof(struct tcphdr)) { in nf_osf_hdr_ctx_init()
185 ctx->optsize = tcp->doff * 4 - sizeof(struct tcphdr); in nf_osf_hdr_ctx_init()
188 sizeof(struct tcphdr), ctx->optsize, opts); in nf_osf_hdr_ctx_init()
209 const struct tcphdr *tcp; in nf_osf_match()
210 struct tcphdr _tcph; in nf_osf_match()
270 const struct tcphdr *tc in nf_osf_find()
[all...]
/kernel/linux/linux-5.10/include/net/netfilter/ipv6/
H A Dnf_reject.h12 const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb,
13 struct tcphdr *otcph,
20 const struct tcphdr *oth, unsigned int otcplen);
/kernel/linux/linux-5.10/include/net/netfilter/ipv4/
H A Dnf_reject.h13 const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb,
14 struct tcphdr *_oth, int hook);
19 const struct tcphdr *oth);
/kernel/linux/linux-5.10/net/ipv4/
H A Dtcp_offload.c35 if (!pskb_may_pull(skb, sizeof(struct tcphdr))) in tcp4_gso_segment()
40 struct tcphdr *th = tcp_hdr(skb); in tcp4_gso_segment()
59 struct tcphdr *th; in tcp_gso_segment()
184 struct tcphdr *th; in tcp_gro_receive()
185 struct tcphdr *th2; in tcp_gro_receive()
290 struct tcphdr *th = tcp_hdr(skb); in tcp_gro_complete()
293 skb->csum_offset = offsetof(struct tcphdr, check); in tcp_gro_complete()
325 struct tcphdr *th = tcp_hdr(skb); in tcp4_gro_complete()
/kernel/linux/linux-6.6/include/net/netfilter/ipv6/
H A Dnf_reject.h12 const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb,
13 struct tcphdr *otcph,
20 const struct tcphdr *oth, unsigned int otcplen);
/kernel/linux/linux-6.6/include/net/netfilter/ipv4/
H A Dnf_reject.h13 const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb,
14 struct tcphdr *_oth, int hook);
19 const struct tcphdr *oth);
/third_party/lwip/test/unit/tcp/
H A Dtcp_helper.c53 struct tcp_hdr* tcphdr; in tcp_create_segment_wnd() local
82 tcphdr = (struct tcp_hdr*)p->payload; in tcp_create_segment_wnd()
83 tcphdr->src = htons(src_port); in tcp_create_segment_wnd()
84 tcphdr->dest = htons(dst_port); in tcp_create_segment_wnd()
85 tcphdr->seqno = htonl(seqno); in tcp_create_segment_wnd()
86 tcphdr->ackno = htonl(ackno); in tcp_create_segment_wnd()
87 TCPH_HDRLEN_SET(tcphdr, sizeof(struct tcp_hdr)/4); in tcp_create_segment_wnd()
88 TCPH_FLAGS_SET(tcphdr, headerflags); in tcp_create_segment_wnd()
89 tcphdr->wnd = htons(wnd); in tcp_create_segment_wnd()
102 tcphdr in tcp_create_segment_wnd()
[all...]

Completed in 12 milliseconds

12345678910>>...17