Lines Matching refs:ihl

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