Lines Matching refs:ihl

126  * @ihl: previous summed headers length
134 unsigned int ihl, unsigned int ipl,
138 int hl = ihl + jhl;
144 return (void *)(skb_network_header(skb) + ihl);
147 static int tcf_csum_ipv4_icmp(struct sk_buff *skb, unsigned int ihl,
152 icmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*icmph));
157 skb->csum = csum_partial(icmph, ipl - ihl, 0);
166 unsigned int ihl, unsigned int ipl)
170 igmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*igmph));
175 skb->csum = csum_partial(igmph, ipl - ihl, 0);
183 static int tcf_csum_ipv6_icmp(struct sk_buff *skb, unsigned int ihl,
189 icmp6h = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*icmp6h));
195 skb->csum = csum_partial(icmp6h, ipl - ihl, 0);
197 ipl - ihl, IPPROTO_ICMPV6,
205 static int tcf_csum_ipv4_tcp(struct sk_buff *skb, unsigned int ihl,
214 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph));
220 skb->csum = csum_partial(tcph, ipl - ihl, 0);
221 tcph->check = tcp_v4_check(ipl - ihl,
229 static int tcf_csum_ipv6_tcp(struct sk_buff *skb, unsigned int ihl,
238 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph));
244 skb->csum = csum_partial(tcph, ipl - ihl, 0);
246 ipl - ihl, IPPROTO_TCP,
254 static int tcf_csum_ipv4_udp(struct sk_buff *skb, unsigned int ihl,
271 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph));
284 skb->csum = csum_partial(udph, ipl - ihl, 0);
285 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl))
290 if (ul != ipl - ihl)
310 static int tcf_csum_ipv6_udp(struct sk_buff *skb, unsigned int ihl,
327 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph));
338 skb->csum = csum_partial(udph, ipl - ihl, 0);
340 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl))
346 if (ul != ipl - ihl)
365 static int tcf_csum_sctp(struct sk_buff *skb, unsigned int ihl,
373 sctph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*sctph));
378 skb_network_offset(skb) + ihl);
399 if (!tcf_csum_ipv4_icmp(skb, iph->ihl * 4,
405 if (!tcf_csum_ipv4_igmp(skb, iph->ihl * 4,
411 if (!tcf_csum_ipv4_tcp(skb, iph->ihl * 4,
417 if (!tcf_csum_ipv4_udp(skb, iph->ihl * 4,
423 if (!tcf_csum_ipv4_udp(skb, iph->ihl * 4,
429 !tcf_csum_sctp(skb, iph->ihl * 4, ntohs(iph->tot_len)))