Lines Matching refs:ihl
125 * @ihl: previous summed headers length
133 unsigned int ihl, unsigned int ipl,
137 int hl = ihl + jhl;
143 return (void *)(skb_network_header(skb) + ihl);
146 static int tcf_csum_ipv4_icmp(struct sk_buff *skb, unsigned int ihl,
151 icmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*icmph));
156 skb->csum = csum_partial(icmph, ipl - ihl, 0);
165 unsigned int ihl, unsigned int ipl)
169 igmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*igmph));
174 skb->csum = csum_partial(igmph, ipl - ihl, 0);
182 static int tcf_csum_ipv6_icmp(struct sk_buff *skb, unsigned int ihl,
188 icmp6h = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*icmp6h));
194 skb->csum = csum_partial(icmp6h, ipl - ihl, 0);
196 ipl - ihl, IPPROTO_ICMPV6,
204 static int tcf_csum_ipv4_tcp(struct sk_buff *skb, unsigned int ihl,
213 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph));
219 skb->csum = csum_partial(tcph, ipl - ihl, 0);
220 tcph->check = tcp_v4_check(ipl - ihl,
228 static int tcf_csum_ipv6_tcp(struct sk_buff *skb, unsigned int ihl,
237 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph));
243 skb->csum = csum_partial(tcph, ipl - ihl, 0);
245 ipl - ihl, IPPROTO_TCP,
253 static int tcf_csum_ipv4_udp(struct sk_buff *skb, unsigned int ihl,
270 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph));
283 skb->csum = csum_partial(udph, ipl - ihl, 0);
284 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl))
289 if (ul != ipl - ihl)
309 static int tcf_csum_ipv6_udp(struct sk_buff *skb, unsigned int ihl,
326 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph));
337 skb->csum = csum_partial(udph, ipl - ihl, 0);
339 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl))
345 if (ul != ipl - ihl)
364 static int tcf_csum_sctp(struct sk_buff *skb, unsigned int ihl,
372 sctph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*sctph));
377 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)))