On Tuesday 19 August 2008 13:34:04 David H. Lynch Jr. wrote: > + switch (ip->protocol) { > + case IPPROTO_TCP: > + start = sizeof(struct iphdr) + ETH_HLEN; > + insert = sizeof(struct iphdr) + ETH_HLEN + 16; > + length = ip->tot_len - sizeof(struct iphdr); > + headlen = ETH_HLEN > + + sizeof(struct iphdr) > + + sizeof(struct tcphdr); > + break; > + case IPPROTO_UDP: > + start = sizeof(struct iphdr) + ETH_HLEN; > + insert = sizeof(struct iphdr) + ETH_HLEN + 6; > + length = ip->tot_len - sizeof(struct iphdr); > + headlen = ETH_HLEN > + + sizeof(struct iphdr) > + + sizeof(struct udphdr); > + break; > + default: > + break; > + }
Why all these calculations instead of skb_transport_offset(skb) and skb->csum_offset usage? _______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded