• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _CONNTRACK_PROTO_GRE_H
3 #define _CONNTRACK_PROTO_GRE_H
4 #include <asm/byteorder.h>
5 #include <net/gre.h>
6 #include <net/pptp.h>
7 
8 struct nf_ct_gre {
9 	unsigned int stream_timeout;
10 	unsigned int timeout;
11 };
12 
13 #include <net/netfilter/nf_conntrack_tuple.h>
14 
15 struct nf_conn;
16 
17 /* structure for original <-> reply keymap */
18 struct nf_ct_gre_keymap {
19 	struct list_head list;
20 	struct nf_conntrack_tuple tuple;
21 	struct rcu_head rcu;
22 };
23 
24 /* add new tuple->key_reply pair to keymap */
25 int nf_ct_gre_keymap_add(struct nf_conn *ct, enum ip_conntrack_dir dir,
26 			 struct nf_conntrack_tuple *t);
27 
28 void nf_ct_gre_keymap_flush(struct net *net);
29 /* delete keymap entries */
30 void nf_ct_gre_keymap_destroy(struct nf_conn *ct);
31 
32 bool gre_pkt_to_tuple(const struct sk_buff *skb, unsigned int dataoff,
33 		      struct net *net, struct nf_conntrack_tuple *tuple);
34 #endif /* _CONNTRACK_PROTO_GRE_H */
35