/linux-4.1.27/net/ipv4/ |
D | inet_lro.c | 38 #define TCP_HDR_LEN(tcph) (tcph->doff << 2) argument 40 #define TCP_PAYLOAD_LENGTH(iph, tcph) \ argument 41 (ntohs(iph->tot_len) - IP_HDR_LEN(iph) - TCP_HDR_LEN(tcph)) 55 static int lro_tcp_ip_check(const struct iphdr *iph, const struct tcphdr *tcph, in lro_tcp_ip_check() argument 62 if (TCP_PAYLOAD_LENGTH(iph, tcph) == 0) in lro_tcp_ip_check() 68 if (tcph->cwr || tcph->ece || tcph->urg || !tcph->ack || in lro_tcp_ip_check() 69 tcph->rst || tcph->syn || tcph->fin) in lro_tcp_ip_check() 75 if (tcph->doff != TCPH_LEN_WO_OPTIONS && in lro_tcp_ip_check() 76 tcph->doff != TCPH_LEN_W_TIMESTAMP) in lro_tcp_ip_check() 80 if (tcph->doff == TCPH_LEN_W_TIMESTAMP) { in lro_tcp_ip_check() [all …]
|
/linux-4.1.27/net/netfilter/ |
D | nf_conntrack_seqadj.c | 75 struct tcphdr *tcph, in nf_ct_sack_block_adjust() argument 105 inet_proto_csum_replace4(&tcph->check, skb, in nf_ct_sack_block_adjust() 107 inet_proto_csum_replace4(&tcph->check, skb, in nf_ct_sack_block_adjust() 118 struct tcphdr *tcph, in nf_ct_sack_adjust() argument 126 optend = protoff + tcph->doff * 4; in nf_ct_sack_adjust() 152 nf_ct_sack_block_adjust(skb, tcph, optoff + 2, in nf_ct_sack_adjust() 167 struct tcphdr *tcph; in nf_ct_seq_adjust() local 177 if (!skb_make_writable(skb, protoff + sizeof(*tcph))) in nf_ct_seq_adjust() 180 tcph = (void *)skb->data + protoff; in nf_ct_seq_adjust() 182 if (after(ntohl(tcph->seq), this_way->correction_pos)) in nf_ct_seq_adjust() [all …]
|
D | xt_TCPMSS.c | 86 struct tcphdr *tcph; in tcpmss_mangle_packet() local 104 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpmss_mangle_packet() 105 tcp_hdrlen = tcph->doff * 4; in tcpmss_mangle_packet() 128 opt = (u_int8_t *)tcph; in tcpmss_mangle_packet() 145 inet_proto_csum_replace2(&tcph->check, skb, in tcpmss_mangle_packet() 167 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpmss_mangle_packet() 184 opt = (u_int8_t *)tcph + sizeof(struct tcphdr); in tcpmss_mangle_packet() 187 inet_proto_csum_replace2(&tcph->check, skb, in tcpmss_mangle_packet() 194 inet_proto_csum_replace4(&tcph->check, skb, 0, *((__be32 *)opt), 0); in tcpmss_mangle_packet() 196 oldval = ((__be16 *)tcph)[6]; in tcpmss_mangle_packet() [all …]
|
D | xt_TCPOPTSTRIP.c | 38 struct tcphdr *tcph; in tcpoptstrip_mangle_packet() local 54 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpoptstrip_mangle_packet() 55 tcp_hdrlen = tcph->doff * 4; in tcpoptstrip_mangle_packet() 60 opt = (u_int8_t *)tcph; in tcpoptstrip_mangle_packet() 82 inet_proto_csum_replace2(&tcph->check, skb, htons(o), in tcpoptstrip_mangle_packet()
|
D | nf_nat_helper.c | 102 struct tcphdr *tcph; in __nf_nat_mangle_tcp_packet() local 115 tcph = (void *)skb->data + protoff; in __nf_nat_mangle_tcp_packet() 118 mangle_contents(skb, protoff + tcph->doff*4, in __nf_nat_mangle_tcp_packet() 124 l3proto->csum_recalc(skb, IPPROTO_TCP, tcph, &tcph->check, in __nf_nat_mangle_tcp_packet() 128 nf_ct_seqadj_set(ct, ctinfo, tcph->seq, in __nf_nat_mangle_tcp_packet()
|
D | nf_conntrack_proto_tcp.c | 325 static unsigned int get_conntrack_index(const struct tcphdr *tcph) in get_conntrack_index() argument 327 if (tcph->rst) return TCP_RST_SET; in get_conntrack_index() 328 else if (tcph->syn) return (tcph->ack ? TCP_SYNACK_SET : TCP_SYN_SET); in get_conntrack_index() 329 else if (tcph->fin) return TCP_FIN_SET; in get_conntrack_index() 330 else if (tcph->ack) return TCP_ACK_SET; in get_conntrack_index() 366 const struct tcphdr *tcph) in segment_seq_plus_len() argument 370 return (seq + len - dataoff - tcph->doff*4 in segment_seq_plus_len() 371 + (tcph->syn ? 1 : 0) + (tcph->fin ? 1 : 0)); in segment_seq_plus_len() 385 const struct tcphdr *tcph, in tcp_options() argument 390 int length = (tcph->doff*4) - sizeof(struct tcphdr); in tcp_options() [all …]
|
D | nf_conntrack_pptp.c | 514 const struct tcphdr *tcph; in conntrack_pptp_help() local 531 tcph = skb_header_pointer(skb, nexthdr_off, sizeof(_tcph), &_tcph); in conntrack_pptp_help() 532 BUG_ON(!tcph); in conntrack_pptp_help() 533 nexthdr_off += tcph->doff * 4; in conntrack_pptp_help() 534 datalen = tcplen - tcph->doff * 4; in conntrack_pptp_help()
|
/linux-4.1.27/net/ipv4/netfilter/ |
D | ipt_ECN.c | 50 struct tcphdr _tcph, *tcph; in set_ect_tcp() local 54 tcph = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(_tcph), &_tcph); in set_ect_tcp() 55 if (!tcph) in set_ect_tcp() 59 tcph->ece == einfo->proto.tcp.ece) && in set_ect_tcp() 61 tcph->cwr == einfo->proto.tcp.cwr)) in set_ect_tcp() 64 if (!skb_make_writable(skb, ip_hdrlen(skb) + sizeof(*tcph))) in set_ect_tcp() 66 tcph = (void *)ip_hdr(skb) + ip_hdrlen(skb); in set_ect_tcp() 68 oldval = ((__be16 *)tcph)[6]; in set_ect_tcp() 70 tcph->ece = einfo->proto.tcp.ece; in set_ect_tcp() 72 tcph->cwr = einfo->proto.tcp.cwr; in set_ect_tcp() [all …]
|
D | nf_reject_ipv4.c | 74 struct tcphdr *tcph; in nf_reject_ip_tcphdr_put() local 77 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); in nf_reject_ip_tcphdr_put() 78 memset(tcph, 0, sizeof(*tcph)); in nf_reject_ip_tcphdr_put() 79 tcph->source = oth->dest; in nf_reject_ip_tcphdr_put() 80 tcph->dest = oth->source; in nf_reject_ip_tcphdr_put() 81 tcph->doff = sizeof(struct tcphdr) / 4; in nf_reject_ip_tcphdr_put() 84 tcph->seq = oth->ack_seq; in nf_reject_ip_tcphdr_put() 86 tcph->ack_seq = htonl(ntohl(oth->seq) + oth->syn + oth->fin + in nf_reject_ip_tcphdr_put() 89 tcph->ack = 1; in nf_reject_ip_tcphdr_put() 92 tcph->rst = 1; in nf_reject_ip_tcphdr_put() [all …]
|
/linux-4.1.27/net/ipv6/netfilter/ |
D | nf_reject_ipv6.c | 95 struct tcphdr *tcph; in nf_reject_ip6_tcphdr_put() local 99 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); in nf_reject_ip6_tcphdr_put() 101 tcph->doff = sizeof(struct tcphdr)/4; in nf_reject_ip6_tcphdr_put() 102 tcph->source = oth->dest; in nf_reject_ip6_tcphdr_put() 103 tcph->dest = oth->source; in nf_reject_ip6_tcphdr_put() 107 tcph->seq = oth->ack_seq; in nf_reject_ip6_tcphdr_put() 108 tcph->ack_seq = 0; in nf_reject_ip6_tcphdr_put() 111 tcph->ack_seq = htonl(ntohl(oth->seq) + oth->syn + oth->fin + in nf_reject_ip6_tcphdr_put() 113 tcph->seq = 0; in nf_reject_ip6_tcphdr_put() 117 ((u_int8_t *)tcph)[13] = 0; in nf_reject_ip6_tcphdr_put() [all …]
|
/linux-4.1.27/net/netfilter/ipvs/ |
D | ip_vs_proto_tcp.c | 89 tcp_fast_csum_update(int af, struct tcphdr *tcph, in tcp_fast_csum_update() argument 96 tcph->check = in tcp_fast_csum_update() 99 ~csum_unfold(tcph->check)))); in tcp_fast_csum_update() 102 tcph->check = in tcp_fast_csum_update() 105 ~csum_unfold(tcph->check)))); in tcp_fast_csum_update() 110 tcp_partial_csum_update(int af, struct tcphdr *tcph, in tcp_partial_csum_update() argument 117 tcph->check = in tcp_partial_csum_update() 120 csum_unfold(tcph->check)))); in tcp_partial_csum_update() 123 tcph->check = in tcp_partial_csum_update() 126 csum_unfold(tcph->check)))); in tcp_partial_csum_update() [all …]
|
/linux-4.1.27/net/core/ |
D | tso.c | 18 struct tcphdr *tcph; in tso_build_hdr() local 26 tcph = (struct tcphdr *)(hdr + skb_transport_offset(skb)); in tso_build_hdr() 27 put_unaligned_be32(tso->tcp_seq, &tcph->seq); in tso_build_hdr() 32 tcph->psh = 0; in tso_build_hdr() 33 tcph->fin = 0; in tso_build_hdr() 34 tcph->rst = 0; in tso_build_hdr()
|
/linux-4.1.27/net/sched/ |
D | act_csum.c | 176 struct tcphdr *tcph; in tcf_csum_ipv4_tcp() local 179 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph)); in tcf_csum_ipv4_tcp() 180 if (tcph == NULL) in tcf_csum_ipv4_tcp() 184 tcph->check = 0; in tcf_csum_ipv4_tcp() 185 skb->csum = csum_partial(tcph, ipl - ihl, 0); in tcf_csum_ipv4_tcp() 186 tcph->check = tcp_v4_check(ipl - ihl, in tcf_csum_ipv4_tcp() 197 struct tcphdr *tcph; in tcf_csum_ipv6_tcp() local 200 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph)); in tcf_csum_ipv6_tcp() 201 if (tcph == NULL) in tcf_csum_ipv6_tcp() 205 tcph->check = 0; in tcf_csum_ipv6_tcp() [all …]
|
D | act_nat.c | 155 struct tcphdr *tcph; in tcf_nat() local 157 if (!pskb_may_pull(skb, ihl + sizeof(*tcph) + noff) || in tcf_nat() 159 !skb_clone_writable(skb, ihl + sizeof(*tcph) + noff) && in tcf_nat() 163 tcph = (void *)(skb_network_header(skb) + ihl); in tcf_nat() 164 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, 1); in tcf_nat()
|
/linux-4.1.27/drivers/infiniband/hw/nes/ |
D | nes_cm.c | 115 static int handle_tcp_options(struct nes_cm_node *cm_node, struct tcphdr *tcph, struct sk_buff *skb… 439 struct tcphdr *tcph; in form_cm_frame() local 445 packetsize += sizeof(*tcph); in form_cm_frame() 449 memset(skb->data, 0x00, ETH_HLEN + sizeof(*iph) + sizeof(*tcph)); in form_cm_frame() 458 tcph = (struct tcphdr *)buf; in form_cm_frame() 462 buf += sizeof(*tcph); in form_cm_frame() 488 tcph->source = htons(cm_node->mapped_loc_port); in form_cm_frame() 489 tcph->dest = htons(cm_node->mapped_rem_port); in form_cm_frame() 490 tcph->seq = htonl(cm_node->tcp_cntxt.loc_seq_num); in form_cm_frame() 494 tcph->ack_seq = htonl(cm_node->tcp_cntxt.loc_ack_num); in form_cm_frame() [all …]
|
D | nes_mgt.c | 178 struct tcphdr *tcph = (struct tcphdr *)(((char *)iph) + (4 * iph->ihl)); in nes_get_seq() local 180 *ack = be32_to_cpu(tcph->ack_seq); in nes_get_seq() 181 *wnd = be16_to_cpu(tcph->window); in nes_get_seq() 182 *fin_rcvd = tcph->fin; in nes_get_seq() 183 *rst_rcvd = tcph->rst; in nes_get_seq() 184 return be32_to_cpu(tcph->seq); in nes_get_seq() 246 struct tcphdr *tcph; in get_fpdu_info() local 338 tcph = (struct tcphdr *)(((char *)iph) + (4 * iph->ihl)); in get_fpdu_info() 339 fpdu_info->hdr_len = (((unsigned char *)tcph) + 4 * (tcph->doff)) - cb->data_start; in get_fpdu_info() 358 tcph = (struct tcphdr *)(((char *)iph) + (4 * iph->ihl)); in get_fpdu_info() [all …]
|
D | nes_nic.c | 365 struct tcphdr *tcph; in nes_nic_send() local 391 tcph = tcp_hdr(skb); in nes_nic_send() 396 ((u32)tcph->doff) | in nes_nic_send() 397 (((u32)(((unsigned char *)tcph) - skb->data)) << 4)); in nes_nic_send() 471 struct tcphdr *tcph; in nes_netdev_start_xmit() local 606 tcph = (struct tcphdr *) in nes_netdev_start_xmit() 609 tcph->fin = 0; in nes_netdev_start_xmit() 610 tcph->psh = 0; in nes_netdev_start_xmit() 611 tcph->rst = 0; in nes_netdev_start_xmit() 612 tcph->urg = 0; in nes_netdev_start_xmit() [all …]
|
D | nes_hw.c | 1646 void **tcph, u64 *hdr_flags, void *priv) in nes_lro_get_skb_hdr() argument 1656 *tcph = tcp_hdr(skb); in nes_lro_get_skb_hdr()
|
/linux-4.1.27/include/linux/ |
D | inet_lro.h | 52 struct tcphdr *tcph; member
|
/linux-4.1.27/drivers/staging/gdm72xx/ |
D | gdm_qos.c | 259 struct tcphdr *tcph; in gdm_qos_send_hci_pkt() local 264 tcph = (struct tcphdr *)iph + iph->ihl*4; in gdm_qos_send_hci_pkt() 277 index = get_qos_index(nic, (u8 *)iph, (u8 *)tcph); in gdm_qos_send_hci_pkt()
|
/linux-4.1.27/drivers/infiniband/hw/cxgb4/ |
D | cm.c | 2224 const struct tcphdr *tcph; in accept_cr() local 2227 tcph = (const void *)(req + 1) + ETH_HDR_LEN_G(hlen) + in accept_cr() 2229 if (tcph->ece && tcph->cwr) in accept_cr() 3653 struct tcphdr *tcph; in rx_pkt() local 3705 tcph = (struct tcphdr *)(iph + 1); in rx_pkt() 3707 skb_set_transport_header(skb, (void *)tcph - (void *)rss); in rx_pkt() 3711 ntohl(iph->daddr), ntohs(tcph->dest), ntohl(iph->saddr), in rx_pkt() 3712 ntohs(tcph->source), iph->tos); in rx_pkt() 3714 dst = find_route(dev, iph->daddr, iph->saddr, tcph->dest, tcph->source, in rx_pkt() 3752 window = (__force u16) htons((__force u16)tcph->window); in rx_pkt() [all …]
|
/linux-4.1.27/drivers/net/ethernet/intel/i40evf/ |
D | i40e_txrx.c | 1424 struct tcphdr *tcph; in i40e_tso() local 1440 tcph = skb->encapsulation ? inner_tcp_hdr(skb) : tcp_hdr(skb); in i40e_tso() 1443 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in i40e_tso() 1446 tcph = skb->encapsulation ? inner_tcp_hdr(skb) : tcp_hdr(skb); in i40e_tso() 1448 tcph->check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, in i40e_tso()
|
/linux-4.1.27/drivers/net/ethernet/intel/i40e/ |
D | i40e_txrx.c | 2135 struct tcphdr *tcph; in i40e_tso() local 2151 tcph = skb->encapsulation ? inner_tcp_hdr(skb) : tcp_hdr(skb); in i40e_tso() 2154 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in i40e_tso() 2157 tcph = skb->encapsulation ? inner_tcp_hdr(skb) : tcp_hdr(skb); in i40e_tso() 2159 tcph->check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, in i40e_tso()
|
/linux-4.1.27/drivers/net/ethernet/neterion/ |
D | s2io.c | 8296 (lro->tcph->source != tcp->source) || in check_for_socket_match() 8297 (lro->tcph->dest != tcp->dest)) in check_for_socket_match() 8314 lro->tcph = tcp; in initiate_new_session() 8338 struct tcphdr *tcp = lro->tcph; in update_L3L4_header() 8449 struct tcphdr *tcph; in s2io_club_tcp_session() local 8462 tcph = (struct tcphdr *)*tcp; in s2io_club_tcp_session() 8463 *tcp_len = get_l4_pyld_length(ip, tcph); in s2io_club_tcp_session() 8467 if (check_for_socket_match(l_lro, ip, tcph)) in s2io_club_tcp_session() 8472 if ((*lro)->tcp_next_seq != ntohl(tcph->seq)) { in s2io_club_tcp_session() 8477 ntohl(tcph->seq)); in s2io_club_tcp_session() [all …]
|
D | s2io.h | 676 struct tcphdr *tcph; member
|
/linux-4.1.27/drivers/s390/net/ |
D | qeth_l3_main.c | 2895 struct tcphdr *tcph = tcp_hdr(skb); in qeth_tso_fill_header() local 2910 hdr->ext.dg_hdr_len = (__u16)(iph->ihl*4 + tcph->doff*4); in qeth_tso_fill_header() 2913 tcph->check = 0; in qeth_tso_fill_header() 2916 tcph->check = ~csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in qeth_tso_fill_header() 2920 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in qeth_tso_fill_header()
|
/linux-4.1.27/drivers/net/ethernet/pasemi/ |
D | pasemi_mac.c | 261 void **tcph, u64 *hdr_flags, void *data) in get_skb_hdr() argument 279 *tcph = tcp_hdr(skb); in get_skb_hdr()
|
/linux-4.1.27/drivers/net/vmxnet3/ |
D | vmxnet3_drv.c | 892 struct tcphdr *tcph = tcp_hdr(skb); in vmxnet3_prepare_tso() local 898 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, 0, in vmxnet3_prepare_tso() 903 tcph->check = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, 0, in vmxnet3_prepare_tso()
|
/linux-4.1.27/drivers/net/ethernet/broadcom/ |
D | tg3.c | 7901 struct tcphdr *tcph = NULL; in tg3_start_xmit() local 7969 tcph = tcp_hdr(skb); in tg3_start_xmit() 7970 tcp_csum = tcph->check; in tg3_start_xmit() 7975 tcph->check = 0; in tg3_start_xmit() 7978 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in tg3_start_xmit() 8099 tcph->check = tcp_csum; in tg3_start_xmit()
|