/linux-3.4.99/net/ipv4/ |
D | inet_lro.c | 37 #define TCP_HDR_LEN(tcph) (tcph->doff << 2) argument 39 #define TCP_PAYLOAD_LENGTH(iph, tcph) \ argument 40 (ntohs(iph->tot_len) - IP_HDR_LEN(iph) - TCP_HDR_LEN(tcph)) 54 static int lro_tcp_ip_check(const struct iphdr *iph, const struct tcphdr *tcph, in lro_tcp_ip_check() argument 61 if (TCP_PAYLOAD_LENGTH(iph, tcph) == 0) in lro_tcp_ip_check() 67 if (tcph->cwr || tcph->ece || tcph->urg || !tcph->ack || in lro_tcp_ip_check() 68 tcph->rst || tcph->syn || tcph->fin) in lro_tcp_ip_check() 74 if (tcph->doff != TCPH_LEN_WO_OPTIONS && in lro_tcp_ip_check() 75 tcph->doff != TCPH_LEN_W_TIMESTAMP) in lro_tcp_ip_check() 79 if (tcph->doff == TCPH_LEN_W_TIMESTAMP) { in lro_tcp_ip_check() [all …]
|
/linux-3.4.99/net/ipv4/netfilter/ |
D | nf_nat_helper.c | 202 struct tcphdr *tcph; in __nf_nat_mangle_tcp_packet() local 216 tcph = (void *)iph + iph->ihl*4; in __nf_nat_mangle_tcp_packet() 219 mangle_contents(skb, iph->ihl*4 + tcph->doff*4, in __nf_nat_mangle_tcp_packet() 223 nf_nat_csum(skb, iph, tcph, datalen, &tcph->check, oldlen); in __nf_nat_mangle_tcp_packet() 226 nf_nat_set_seq_adjust(ct, ctinfo, tcph->seq, in __nf_nat_mangle_tcp_packet() 288 struct tcphdr *tcph, in sack_adjust() argument 318 inet_proto_csum_replace4(&tcph->check, skb, in sack_adjust() 320 inet_proto_csum_replace4(&tcph->check, skb, in sack_adjust() 331 struct tcphdr *tcph, in nf_nat_sack_adjust() argument 339 optend = ip_hdrlen(skb) + tcph->doff * 4; in nf_nat_sack_adjust() [all …]
|
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 | ipt_REJECT.c | 42 struct tcphdr _otcph, *tcph; in send_reset() local 84 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); in send_reset() 85 memset(tcph, 0, sizeof(*tcph)); in send_reset() 86 tcph->source = oth->dest; in send_reset() 87 tcph->dest = oth->source; in send_reset() 88 tcph->doff = sizeof(struct tcphdr) / 4; in send_reset() 91 tcph->seq = oth->ack_seq; in send_reset() 93 tcph->ack_seq = htonl(ntohl(oth->seq) + oth->syn + oth->fin + in send_reset() 96 tcph->ack = 1; in send_reset() 99 tcph->rst = 1; in send_reset() [all …]
|
/linux-3.4.99/net/ipv6/netfilter/ |
D | ip6t_REJECT.c | 43 struct tcphdr otcph, *tcph; in send_reset() local 136 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); in send_reset() 138 tcph->doff = sizeof(struct tcphdr)/4; in send_reset() 139 tcph->source = otcph.dest; in send_reset() 140 tcph->dest = otcph.source; in send_reset() 144 tcph->seq = otcph.ack_seq; in send_reset() 145 tcph->ack_seq = 0; in send_reset() 148 tcph->ack_seq = htonl(ntohl(otcph.seq) + otcph.syn + otcph.fin in send_reset() 150 tcph->seq = 0; in send_reset() 154 ((u_int8_t *)tcph)[13] = 0; in send_reset() [all …]
|
/linux-3.4.99/net/netfilter/ |
D | xt_TCPMSS.c | 52 struct tcphdr *tcph; in tcpmss_mangle_packet() local 62 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpmss_mangle_packet() 65 if (tcplen < tcph->doff*4) in tcpmss_mangle_packet() 85 opt = (u_int8_t *)tcph; in tcpmss_mangle_packet() 86 for (i = sizeof(struct tcphdr); i < tcph->doff*4; i += optlen(opt, i)) { in tcpmss_mangle_packet() 87 if (opt[i] == TCPOPT_MSS && tcph->doff*4 - i >= TCPOLEN_MSS && in tcpmss_mangle_packet() 103 inet_proto_csum_replace2(&tcph->check, skb, in tcpmss_mangle_packet() 113 if (tcplen > tcph->doff*4) in tcpmss_mangle_packet() 124 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpmss_mangle_packet() 129 opt = (u_int8_t *)tcph + sizeof(struct tcphdr); in tcpmss_mangle_packet() [all …]
|
D | nf_conntrack_proto_tcp.c | 316 static unsigned int get_conntrack_index(const struct tcphdr *tcph) in get_conntrack_index() argument 318 if (tcph->rst) return TCP_RST_SET; in get_conntrack_index() 319 else if (tcph->syn) return (tcph->ack ? TCP_SYNACK_SET : TCP_SYN_SET); in get_conntrack_index() 320 else if (tcph->fin) return TCP_FIN_SET; in get_conntrack_index() 321 else if (tcph->ack) return TCP_ACK_SET; in get_conntrack_index() 357 const struct tcphdr *tcph) in segment_seq_plus_len() argument 361 return (seq + len - dataoff - tcph->doff*4 in segment_seq_plus_len() 362 + (tcph->syn ? 1 : 0) + (tcph->fin ? 1 : 0)); in segment_seq_plus_len() 376 const struct tcphdr *tcph, in tcp_options() argument 381 int length = (tcph->doff*4) - sizeof(struct tcphdr); in tcp_options() [all …]
|
D | xt_TCPOPTSTRIP.c | 37 struct tcphdr *tcph; in tcpoptstrip_mangle_packet() local 44 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpoptstrip_mangle_packet() 45 opt = (u_int8_t *)tcph; in tcpoptstrip_mangle_packet() 67 inet_proto_csum_replace2(&tcph->check, skb, htons(o), in tcpoptstrip_mangle_packet()
|
D | nf_conntrack_pptp.c | 510 const struct tcphdr *tcph; in conntrack_pptp_help() local 527 tcph = skb_header_pointer(skb, nexthdr_off, sizeof(_tcph), &_tcph); in conntrack_pptp_help() 528 BUG_ON(!tcph); in conntrack_pptp_help() 529 nexthdr_off += tcph->doff * 4; in conntrack_pptp_help() 530 datalen = tcplen - tcph->doff * 4; in conntrack_pptp_help()
|
/linux-3.4.99/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-3.4.99/net/sched/ |
D | act_csum.c | 192 struct tcphdr *tcph; in tcf_csum_ipv4_tcp() local 194 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph)); in tcf_csum_ipv4_tcp() 195 if (tcph == NULL) in tcf_csum_ipv4_tcp() 198 tcph->check = 0; in tcf_csum_ipv4_tcp() 199 skb->csum = csum_partial(tcph, ipl - ihl, 0); in tcf_csum_ipv4_tcp() 200 tcph->check = tcp_v4_check(ipl - ihl, in tcf_csum_ipv4_tcp() 211 struct tcphdr *tcph; in tcf_csum_ipv6_tcp() local 213 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph)); in tcf_csum_ipv6_tcp() 214 if (tcph == NULL) in tcf_csum_ipv6_tcp() 217 tcph->check = 0; in tcf_csum_ipv6_tcp() [all …]
|
D | act_nat.c | 174 struct tcphdr *tcph; in tcf_nat() local 176 if (!pskb_may_pull(skb, ihl + sizeof(*tcph) + noff) || in tcf_nat() 178 !skb_clone_writable(skb, ihl + sizeof(*tcph) + noff) && in tcf_nat() 182 tcph = (void *)(skb_network_header(skb) + ihl); in tcf_nat() 183 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, 1); in tcf_nat()
|
/linux-3.4.99/drivers/infiniband/hw/nes/ |
D | nes_cm.c | 114 static int handle_tcp_options(struct nes_cm_node *cm_node, struct tcphdr *tcph, struct sk_buff *skb… 407 struct tcphdr *tcph; in form_cm_frame() local 413 packetsize += sizeof(*tcph); in form_cm_frame() 417 memset(skb->data, 0x00, ETH_HLEN + sizeof(*iph) + sizeof(*tcph)); in form_cm_frame() 426 tcph = (struct tcphdr *)buf; in form_cm_frame() 430 buf += sizeof(*tcph); in form_cm_frame() 454 tcph->source = htons(cm_node->loc_port); in form_cm_frame() 455 tcph->dest = htons(cm_node->rem_port); in form_cm_frame() 456 tcph->seq = htonl(cm_node->tcp_cntxt.loc_seq_num); in form_cm_frame() 460 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() 244 struct tcphdr *tcph; in get_fpdu_info() local 342 tcph = (struct tcphdr *)(((char *)iph) + (4 * iph->ihl)); in get_fpdu_info() 343 fpdu_info->hdr_len = (((unsigned char *)tcph) + 4 * (tcph->doff)) - cb->data_start; in get_fpdu_info() 362 tcph = (struct tcphdr *)(((char *)iph) + (4 * iph->ihl)); in get_fpdu_info() [all …]
|
D | nes_nic.c | 366 struct tcphdr *tcph; in nes_nic_send() local 390 tcph = tcp_hdr(skb); in nes_nic_send() 398 ((u32)tcph->doff) | in nes_nic_send() 399 (((u32)(((unsigned char *)tcph) - skb->data)) << 4)); in nes_nic_send() 476 struct tcphdr *tcph; in nes_netdev_start_xmit() local 610 tcph = (struct tcphdr *) in nes_netdev_start_xmit() 613 tcph->fin = 0; in nes_netdev_start_xmit() 614 tcph->psh = 0; in nes_netdev_start_xmit() 615 tcph->rst = 0; in nes_netdev_start_xmit() 616 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-3.4.99/include/linux/ |
D | inet_lro.h | 52 struct tcphdr *tcph; member 163 struct iphdr *iph, struct tcphdr *tcph);
|
/linux-3.4.99/drivers/net/ethernet/neterion/ |
D | s2io.c | 8301 (lro->tcph->source != tcp->source) || in check_for_socket_match() 8302 (lro->tcph->dest != tcp->dest)) in check_for_socket_match() 8319 lro->tcph = tcp; in initiate_new_session() 8343 struct tcphdr *tcp = lro->tcph; in update_L3L4_header() 8457 struct tcphdr *tcph; in s2io_club_tcp_session() local 8470 tcph = (struct tcphdr *)*tcp; in s2io_club_tcp_session() 8471 *tcp_len = get_l4_pyld_length(ip, tcph); in s2io_club_tcp_session() 8475 if (check_for_socket_match(l_lro, ip, tcph)) in s2io_club_tcp_session() 8480 if ((*lro)->tcp_next_seq != ntohl(tcph->seq)) { in s2io_club_tcp_session() 8485 ntohl(tcph->seq)); in s2io_club_tcp_session() [all …]
|
D | s2io.h | 676 struct tcphdr *tcph; member
|
/linux-3.4.99/drivers/s390/net/ |
D | qeth_l3_main.c | 2931 struct tcphdr *tcph = tcp_hdr(skb); in qeth_tso_fill_header() local 2946 hdr->ext.dg_hdr_len = (__u16)(iph->ihl*4 + tcph->doff*4); in qeth_tso_fill_header() 2949 tcph->check = 0; in qeth_tso_fill_header() 2952 tcph->check = ~csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in qeth_tso_fill_header() 2956 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in qeth_tso_fill_header()
|
/linux-3.4.99/drivers/net/xen-netback/ |
D | netback.c | 1313 struct tcphdr *tcph = (struct tcphdr *)th; in checksum_setup() local 1314 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in checksum_setup()
|
/linux-3.4.99/drivers/net/ |
D | xen-netfront.c | 838 struct tcphdr *tcph = (struct tcphdr *)th; in checksum_setup() local 839 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in checksum_setup()
|
/linux-3.4.99/drivers/net/ethernet/pasemi/ |
D | pasemi_mac.c | 262 void **tcph, u64 *hdr_flags, void *data) in get_skb_hdr() argument 280 *tcph = tcp_hdr(skb); in get_skb_hdr()
|
/linux-3.4.99/drivers/net/vmxnet3/ |
D | vmxnet3_drv.c | 873 struct tcphdr *tcph = tcp_hdr(skb); in vmxnet3_prepare_tso() local 879 tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, 0, in vmxnet3_prepare_tso() 884 tcph->check = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, 0, in vmxnet3_prepare_tso()
|
/linux-3.4.99/drivers/net/ethernet/marvell/ |
D | mv643xx_eth.c | 528 mv643xx_get_skb_header(struct sk_buff *skb, void **iphdr, void **tcph, in mv643xx_get_skb_header() argument 547 *tcph = tcp_hdr(skb); in mv643xx_get_skb_header()
|