/linux-master/drivers/net/ethernet/wangxun/libwx/ |
H A D | wx_lib.c | 1218 struct tcphdr *tcph; local 1236 tcph = enc ? inner_tcp_hdr(skb) : tcp_hdr(skb); 1239 tcph->check = ~csum_tcpudp_magic(iph->saddr, 1248 tcph = enc ? inner_tcp_hdr(skb) : tcp_hdr(skb); 1250 tcph->check = ~csum_ipv6_magic(&ipv6h->saddr,
|
/linux-master/tools/testing/selftests/net/lib/ |
H A D | csum.c | 618 struct tcphdr *tcph = th; local 620 if (len < sizeof(*tcph) || tcph->dest != htons(cfg_port_dst)) 623 return recv_verify_csum(th, len, ntohs(tcph->source), tcph->check);
|
/linux-master/tools/testing/selftests/net/ |
H A D | gro.c | 284 struct tcphdr *tcph = buf; local 286 memset(tcph, 0, sizeof(*tcph)); 288 tcph->source = htons(SPORT); 289 tcph->dest = htons(DPORT); 290 tcph->seq = ntohl(START_SEQ + seq_offset); 291 tcph->ack_seq = ntohl(START_ACK + ack_offset); 292 tcph->ack = 1; 293 tcph->fin = fin; 294 tcph 329 struct tcphdr *tcph; local 498 struct tcphdr *tcph = (struct tcphdr *)(buf + tcp_offset); local 513 struct tcphdr *tcph = (struct tcphdr *)(buf + tcp_offset); local 914 struct tcphdr *tcph; local [all...] |
/linux-master/net/sched/ |
H A D | sch_cake.c | 907 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...] |
H A D | act_nat.c | 181 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 D | act_ct.c | 507 struct tcphdr **tcph) 550 *tcph = (void *)(skb_network_header(skb) + thoff); 580 struct tcphdr **tcph) 619 *tcph = (void *)(skb_network_header(skb) + thoff); 654 struct tcphdr *tcph = NULL; local 662 if (!tcf_ct_flow_table_fill_tuple_ipv4(skb, &tuple, &tcph)) 666 if (!tcf_ct_flow_table_fill_tuple_ipv6(skb, &tuple, &tcph)) 696 if (tcph && (unlikely(tcph->fin || tcph 505 tcf_ct_flow_table_fill_tuple_ipv4(struct sk_buff *skb, struct flow_offload_tuple *tuple, struct tcphdr **tcph) argument 578 tcf_ct_flow_table_fill_tuple_ipv6(struct sk_buff *skb, struct flow_offload_tuple *tuple, struct tcphdr **tcph) argument [all...] |
H A D | act_csum.c | 208 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...] |
/linux-master/net/netfilter/ |
H A D | nf_flow_table_ip.c | 25 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 D | nf_flow_table_core.c | 456 struct tcphdr *tcph; local 458 tcph = (void *)(skb_network_header(skb) + thoff); 459 inet_proto_csum_replace2(&tcph->check, skb, port, new_port, false);
|
H A D | nft_flow_offload.c | 297 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) {
|
H A D | nf_conntrack_proto_tcp.c | 275 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...] |
/linux-master/net/ipv4/ |
H A D | route.c | 3126 struct tcphdr *tcph; local 3128 tcph = skb_put_zero(skb, sizeof(struct tcphdr)); 3129 tcph->source = sport; 3130 tcph->dest = dport; 3131 tcph->doff = sizeof(struct tcphdr) / 4; 3132 tcph->rst = 1; 3133 tcph->check = ~tcp_v4_check(sizeof(struct tcphdr),
|
/linux-master/drivers/net/vmxnet3/ |
H A D | vmxnet3_drv.c | 1022 struct tcphdr *tcph = inner_tcp_hdr(skb); local 1027 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, 0, 1032 tcph->check = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, 0, 1041 struct tcphdr *tcph = tcp_hdr(skb); local 1047 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, 0,
|
/linux-master/drivers/net/ethernet/neterion/ |
H A D | s2io.c | 8208 (lro->tcph->source != tcp->source) || 8209 (lro->tcph->dest != tcp->dest)) 8226 lro->tcph = tcp; 8250 struct tcphdr *tcp = lro->tcph; 8361 struct tcphdr *tcph; local 8374 tcph = (struct tcphdr *)*tcp; 8375 *tcp_len = get_l4_pyld_length(ip, tcph); 8379 if (check_for_socket_match(l_lro, ip, tcph)) 8384 if ((*lro)->tcp_next_seq != ntohl(tcph->seq)) { 8389 ntohl(tcph [all...] |
/linux-master/drivers/net/ethernet/ibm/ |
H A D | ibmveth.c | 1217 struct tcphdr *tcph; local 1246 tcph = (struct tcphdr *)(skb->data + offset); 1250 skb_shinfo(skb)->gso_size = ntohs(tcph->check); 1251 tcph->check = 0; 1255 hdr_len = offset + tcph->doff * 4; 1310 struct tcphdr *tcph = (struct tcphdr *)(skb->data + iphlen); local 1312 if (tcph->check == 0x0000) { 1316 tcph->check = 1320 tcph->check =
|
/linux-master/drivers/net/ethernet/freescale/enetc/ |
H A D | enetc.c | 434 struct tcphdr *tcph = (struct tcphdr *)(l4_hdr); local 436 tcph->check = 0; 478 struct tcphdr *tcph = (struct tcphdr *)(l4_hdr); local 480 tcph->check = csum_final;
|
/linux-master/drivers/net/ethernet/broadcom/ |
H A D | tg3.c | 7946 struct tcphdr *tcph = NULL; local 8014 tcph = tcp_hdr(skb); 8015 tcp_csum = tcph->check; 8020 tcph->check = 0; 8023 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, 8150 tcph->check = tcp_csum;
|
/linux-master/drivers/infiniband/hw/irdma/ |
H A D | cm.c | 310 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 2620 irdma_check_syn(struct irdma_cm_node *cm_node, struct tcphdr *tcph) argument 2635 irdma_check_seq(struct irdma_cm_node *cm_node, struct tcphdr *tcph) argument 2678 struct tcphdr *tcph = (struct tcphdr *)rbuf->tcph; local 2744 struct tcphdr *tcph = (struct tcphdr *)rbuf->tcph; local 2817 struct tcphdr *tcph = (struct tcphdr *)rbuf->tcph; local 2901 struct tcphdr *tcph = (struct tcphdr *)rbuf->tcph; local 3143 struct tcphdr *tcph; local [all...] |
/linux-master/tools/testing/selftests/bpf/progs/ |
H A D | test_tc_tunnel.c | 100 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/ipv6/netfilter/ |
H A D | nf_reject_ipv6.c | 225 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/drivers/net/ethernet/intel/ice/ |
H A D | ice_virtchnl_fdir.c | 821 struct tcphdr *tcph; local 865 tcph = (struct tcphdr *)hdr->buffer; 873 input->ip.v4.src_port = tcph->source; 874 input->ip.v4.dst_port = tcph->dest; 876 input->ip.v6.src_port = tcph->source; 877 input->ip.v6.dst_port = tcph->dest;
|
/linux-master/net/ipv4/netfilter/ |
H A D | nf_reject_ipv4.c | 197 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/tools/testing/selftests/net/tcp_ao/ |
H A D | icmps-accept.c | 191 } 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 D | icmps-discard.c | 191 } 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/net/ethernet/intel/iavf/ |
H A D | iavf_fdir.c | 399 struct tcphdr *tcph = (struct tcphdr *)hdr->buffer; local 404 tcph->source = fltr->ip_data.src_port; 409 tcph->dest = fltr->ip_data.dst_port;
|