netfilter: nf_tables: kill nft_pktinfo.ops
[deliverable/linux.git] / include / net / netfilter / nf_tables_ipv4.h
CommitLineData
0ca743a5
PNA
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
7static inline void
8nft_set_pktinfo_ipv4(struct nft_pktinfo *pkt,
0ca743a5 9 struct sk_buff *skb,
073bfd56 10 const struct nf_hook_state *state)
0ca743a5
PNA
11{
12 struct iphdr *ip;
13
6aa187f2 14 nft_set_pktinfo(pkt, skb, state);
0ca743a5 15
0ca743a5 16 ip = ip_hdr(pkt->skb);
4566bf27
PM
17 pkt->tprot = ip->protocol;
18 pkt->xt.thoff = ip_hdrlen(pkt->skb);
0ca743a5
PNA
19 pkt->xt.fragoff = ntohs(ip->frag_off) & IP_OFFSET;
20}
21
1d49144c
PM
22extern struct nft_af_info nft_af_ipv4;
23
0ca743a5 24#endif
This page took 0.11814 seconds and 5 git commands to generate.