4 struct inet_frag_queue
{
5 struct hlist_node list
;
6 struct list_head lru_list
; /* lru list member */
9 struct timer_list timer
; /* when will this queue expire? */
10 struct sk_buff
*fragments
; /* list of received fragments */
12 int len
; /* total length of orig datagram */
14 __u8 last_in
; /* first/last segment arrived? */
21 #define INETFRAGS_HASHSZ 64
23 struct inet_frags_ctl
{
31 struct list_head lru_list
;
32 struct hlist_head hash
[INETFRAGS_HASHSZ
];
38 struct timer_list secret_timer
;
39 struct inet_frags_ctl
*ctl
;
41 unsigned int (*hashfn
)(struct inet_frag_queue
*);
42 void (*constructor
)(struct inet_frag_queue
*q
,
44 void (*destructor
)(struct inet_frag_queue
*);
45 void (*skb_free
)(struct sk_buff
*);
46 int (*match
)(struct inet_frag_queue
*q
,
48 void (*frag_expire
)(unsigned long data
);
51 void inet_frags_init(struct inet_frags
*);
52 void inet_frags_fini(struct inet_frags
*);
54 void inet_frag_kill(struct inet_frag_queue
*q
, struct inet_frags
*f
);
55 void inet_frag_destroy(struct inet_frag_queue
*q
,
56 struct inet_frags
*f
, int *work
);
57 int inet_frag_evictor(struct inet_frags
*f
);
58 struct inet_frag_queue
*inet_frag_find(struct inet_frags
*f
, void *key
,
61 static inline void inet_frag_put(struct inet_frag_queue
*q
, struct inet_frags
*f
)
63 if (atomic_dec_and_test(&q
->refcnt
))
64 inet_frag_destroy(q
, f
, NULL
);