/net/ipv4/ |
H A D | inet_lro.c | 38 #define TCP_HDR_LEN(tcph) (tcph->doff << 2) 40 #define TCP_PAYLOAD_LENGTH(iph, tcph) \ 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, argument 62 if (TCP_PAYLOAD_LENGTH(iph, tcph) == 0) 68 if (tcph->cwr || tcph->ece || tcph->urg || !tcph 106 struct tcphdr *tcph = lro_desc->tcph; local 130 lro_tcp_data_csum(struct iphdr *iph, struct tcphdr *tcph, int len) argument 147 lro_init_desc(struct net_lro_desc *lro_desc, struct sk_buff *skb, struct iphdr *iph, struct tcphdr *tcph) argument 185 lro_add_common(struct net_lro_desc *lro_desc, struct iphdr *iph, struct tcphdr *tcph, int tcp_data_len) argument 214 lro_add_packet(struct net_lro_desc *lro_desc, struct sk_buff *skb, struct iphdr *iph, struct tcphdr *tcph) argument 234 lro_check_tcp_conn(struct net_lro_desc *lro_desc, struct iphdr *iph, struct tcphdr *tcph) argument 246 lro_get_desc(struct net_lro_mgr *lro_mgr, struct net_lro_desc *lro_arr, struct iphdr *iph, struct tcphdr *tcph) argument 299 struct tcphdr *tcph; local [all...] |
/net/netfilter/ |
H A D | nf_conntrack_seqadj.c | 75 struct tcphdr *tcph, 105 inet_proto_csum_replace4(&tcph->check, skb, 107 inet_proto_csum_replace4(&tcph->check, skb, 118 struct tcphdr *tcph, 126 optend = protoff + tcph->doff * 4; 152 nf_ct_sack_block_adjust(skb, tcph, optoff + 2, 167 struct tcphdr *tcph; local 177 if (!skb_make_writable(skb, protoff + sizeof(*tcph))) 180 tcph = (void *)skb->data + protoff; 182 if (after(ntohl(tcph 74 nf_ct_sack_block_adjust(struct sk_buff *skb, struct tcphdr *tcph, unsigned int sackoff, unsigned int sackend, struct nf_ct_seqadj *seq) argument 116 nf_ct_sack_adjust(struct sk_buff *skb, unsigned int protoff, struct tcphdr *tcph, struct nf_conn *ct, enum ip_conntrack_info ctinfo) argument [all...] |
H A D | xt_TCPMSS.c | 86 struct tcphdr *tcph; local 104 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); 105 tcp_hdrlen = tcph->doff * 4; 128 opt = (u_int8_t *)tcph; 145 inet_proto_csum_replace2(&tcph->check, skb, 167 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); 184 opt = (u_int8_t *)tcph + sizeof(struct tcphdr); 187 inet_proto_csum_replace2(&tcph->check, skb, 194 inet_proto_csum_replace4(&tcph->check, skb, 0, *((__be32 *)opt), 0); 196 oldval = ((__be16 *)tcph)[ [all...] |
H A D | xt_TCPOPTSTRIP.c | 38 struct tcphdr *tcph; local 54 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); 55 tcp_hdrlen = tcph->doff * 4; 60 opt = (u_int8_t *)tcph; 82 inet_proto_csum_replace2(&tcph->check, skb, htons(o),
|
H A D | nf_nat_helper.c | 102 struct tcphdr *tcph; local 115 tcph = (void *)skb->data + protoff; 118 mangle_contents(skb, protoff + tcph->doff*4, 124 l3proto->csum_recalc(skb, IPPROTO_TCP, tcph, &tcph->check, 128 nf_ct_seqadj_set(ct, ctinfo, tcph->seq,
|
H A D | nf_conntrack_proto_tcp.c | 325 static unsigned int get_conntrack_index(const struct tcphdr *tcph) argument 327 if (tcph->rst) return TCP_RST_SET; 328 else if (tcph->syn) return (tcph->ack ? TCP_SYNACK_SET : TCP_SYN_SET); 329 else if (tcph->fin) return TCP_FIN_SET; 330 else if (tcph->ack) return TCP_ACK_SET; 366 const struct tcphdr *tcph) 370 return (seq + len - dataoff - tcph->doff*4 371 + (tcph->syn ? 1 : 0) + (tcph 363 segment_seq_plus_len(__u32 seq, size_t len, unsigned int dataoff, const struct tcphdr *tcph) argument 383 tcp_options(const struct sk_buff *skb, unsigned int dataoff, const struct tcphdr *tcph, struct ip_ct_tcp_state *state) argument 439 tcp_sack(const struct sk_buff *skb, unsigned int dataoff, const struct tcphdr *tcph, __u32 *sack) argument 500 tcp_in_window(const struct nf_conn *ct, struct ip_ct_tcp *state, enum ip_conntrack_dir dir, unsigned int index, const struct sk_buff *skb, unsigned int dataoff, const struct tcphdr *tcph, u_int8_t pf) argument [all...] |
H A D | nf_conntrack_pptp.c | 514 const struct tcphdr *tcph; local 531 tcph = skb_header_pointer(skb, nexthdr_off, sizeof(_tcph), &_tcph); 532 BUG_ON(!tcph); 533 nexthdr_off += tcph->doff * 4; 534 datalen = tcplen - tcph->doff * 4;
|
/net/ipv4/netfilter/ |
H A D | nf_reject_ipv4.c | 72 struct tcphdr *tcph; local 75 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); 76 memset(tcph, 0, sizeof(*tcph)); 77 tcph->source = oth->dest; 78 tcph->dest = oth->source; 79 tcph->doff = sizeof(struct tcphdr) / 4; 82 tcph->seq = oth->ack_seq; 84 tcph->ack_seq = htonl(ntohl(oth->seq) + oth->syn + oth->fin + 87 tcph [all...] |
H A D | ipt_ECN.c | 50 struct tcphdr _tcph, *tcph; local 54 tcph = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(_tcph), &_tcph); 55 if (!tcph) 59 tcph->ece == einfo->proto.tcp.ece) && 61 tcph->cwr == einfo->proto.tcp.cwr)) 64 if (!skb_make_writable(skb, ip_hdrlen(skb) + sizeof(*tcph))) 66 tcph = (void *)ip_hdr(skb) + ip_hdrlen(skb); 68 oldval = ((__be16 *)tcph)[6]; 70 tcph->ece = einfo->proto.tcp.ece; 72 tcph [all...] |
/net/ipv6/netfilter/ |
H A D | nf_reject_ipv6.c | 93 struct tcphdr *tcph; local 97 tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr)); 99 tcph->doff = sizeof(struct tcphdr)/4; 100 tcph->source = oth->dest; 101 tcph->dest = oth->source; 105 tcph->seq = oth->ack_seq; 106 tcph->ack_seq = 0; 109 tcph->ack_seq = htonl(ntohl(oth->seq) + oth->syn + oth->fin + 111 tcph->seq = 0; 115 ((u_int8_t *)tcph)[1 [all...] |
/net/core/ |
H A D | tso.c | 18 struct tcphdr *tcph; local 26 tcph = (struct tcphdr *)(hdr + skb_transport_offset(skb)); 27 put_unaligned_be32(tso->tcp_seq, &tcph->seq); 32 tcph->psh = 0; 33 tcph->fin = 0; 34 tcph->rst = 0;
|
/net/netfilter/ipvs/ |
H A D | ip_vs_proto_tcp.c | 89 tcp_fast_csum_update(int af, struct tcphdr *tcph, argument 96 tcph->check = 99 ~csum_unfold(tcph->check)))); 102 tcph->check = 105 ~csum_unfold(tcph->check)))); 110 tcp_partial_csum_update(int af, struct tcphdr *tcph, argument 117 tcph->check = 120 csum_unfold(tcph->check)))); 123 tcph->check = 126 csum_unfold(tcph 134 struct tcphdr *tcph; local 212 struct tcphdr *tcph; local [all...] |
/net/sched/ |
H A D | act_csum.c | 176 struct tcphdr *tcph; local 179 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph)); 180 if (tcph == NULL) 184 tcph->check = 0; 185 skb->csum = csum_partial(tcph, ipl - ihl, 0); 186 tcph->check = tcp_v4_check(ipl - ihl, 197 struct tcphdr *tcph; local 200 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph)); [all...] |
H A D | act_nat.c | 155 struct tcphdr *tcph; local 157 if (!pskb_may_pull(skb, ihl + sizeof(*tcph) + noff) || 159 !skb_clone_writable(skb, ihl + sizeof(*tcph) + noff) && 163 tcph = (void *)(skb_network_header(skb) + ihl); 164 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, 1);
|