Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / include / net / netfilter / nf_tables_ipv4.h
1 #ifndef _NF_TABLES_IPV4_H_
2 #define _NF_TABLES_IPV4_H_
3
4 #include <net/netfilter/nf_tables.h>
5 #include <net/ip.h>
6
7 static inline void
8 nft_set_pktinfo_ipv4(struct nft_pktinfo *pkt,
9                      const struct nf_hook_ops *ops,
10                      struct sk_buff *skb,
11                      const struct nf_hook_state *state)
12 {
13         struct iphdr *ip;
14
15         nft_set_pktinfo(pkt, ops, skb, state);
16
17         ip = ip_hdr(pkt->skb);
18         pkt->tprot = ip->protocol;
19         pkt->xt.thoff = ip_hdrlen(pkt->skb);
20         pkt->xt.fragoff = ntohs(ip->frag_off) & IP_OFFSET;
21 }
22
23 extern struct nft_af_info nft_af_ipv4;
24
25 #endif