aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_frag.h
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-10-15 05:24:19 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-15 15:26:38 -0400
commit5ab11c98d3a950faf6922b6166e5f8fc874590e7 (patch)
treeef9ab897361f106309df37b6d4f2e95fdecdb240 /include/net/inet_frag.h
parent114342f2d38439cb1a54f1f724fa38729b093c48 (diff)
[INET]: Move common fields from frag_queues in one place.
Introduce the struct inet_frag_queue in include/net/inet_frag.h file and place there all the common fields from three structs: * struct ipq in ipv4/ip_fragment.c * struct nf_ct_frag6_queue in nf_conntrack_reasm.c * struct frag_queue in ipv6/reassembly.c After this, replace these fields on appropriate structures with this structure instance and fix the users to use correct names i.e. hunks like - atomic_dec(&fq->refcnt); + atomic_dec(&fq->q.refcnt); (these occupy most of the patch) Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_frag.h')
-rw-r--r--include/net/inet_frag.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
new file mode 100644
index 000000000000..74e9cb9b6943
--- /dev/null
+++ b/include/net/inet_frag.h
@@ -0,0 +1,21 @@
1#ifndef __NET_FRAG_H__
2#define __NET_FRAG_H__
3
4struct inet_frag_queue {
5 struct hlist_node list;
6 struct list_head lru_list; /* lru list member */
7 spinlock_t lock;
8 atomic_t refcnt;
9 struct timer_list timer; /* when will this queue expire? */
10 struct sk_buff *fragments; /* list of received fragments */
11 ktime_t stamp;
12 int len; /* total length of orig datagram */
13 int meat;
14 __u8 last_in; /* first/last segment arrived? */
15
16#define COMPLETE 4
17#define FIRST_IN 2
18#define LAST_IN 1
19};
20
21#endif