-static int tcp_exp_matches_pkt(struct ip_conntrack_expect *exp,
- const struct sk_buff *skb)
-{
- const struct iphdr *iph = skb->nh.iph;
- struct tcphdr *th, _tcph;
- unsigned int datalen;
-
- th = skb_header_pointer(skb, iph->ihl * 4,
- sizeof(_tcph), &_tcph);
- if (th == NULL)
- return 0;
- datalen = skb->len - iph->ihl*4 - th->doff*4;
-
- return between(exp->seq, ntohl(th->seq), ntohl(th->seq) + datalen);
-}
-