15 #ifndef _INET_TIMEWAIT_SOCK_
16 #define _INET_TIMEWAIT_SOCK_
20 #include <linux/list.h>
22 #include <linux/types.h>
34 #define INET_TWDR_RECYCLE_SLOTS_LOG 5
35 #define INET_TWDR_RECYCLE_SLOTS (1 << INET_TWDR_RECYCLE_SLOTS_LOG)
41 #if HZ <= 16 || HZ > 4096
42 # error Unsupported: HZ <= 16 or HZ > 4096
44 # define INET_TWDR_RECYCLE_TICK (5 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
46 # define INET_TWDR_RECYCLE_TICK (6 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
48 # define INET_TWDR_RECYCLE_TICK (7 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
50 # define INET_TWDR_RECYCLE_TICK (8 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
52 # define INET_TWDR_RECYCLE_TICK (9 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
54 # define INET_TWDR_RECYCLE_TICK (10 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
56 # define INET_TWDR_RECYCLE_TICK (11 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
58 # define INET_TWDR_RECYCLE_TICK (12 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
62 #define INET_TWDR_TWKILL_SLOTS 8
64 #define INET_TWDR_TWKILL_QUOTA 100
103 #define tw_family __tw_common.skc_family
104 #define tw_state __tw_common.skc_state
105 #define tw_reuse __tw_common.skc_reuse
106 #define tw_bound_dev_if __tw_common.skc_bound_dev_if
107 #define tw_node __tw_common.skc_nulls_node
108 #define tw_bind_node __tw_common.skc_bind_node
109 #define tw_refcnt __tw_common.skc_refcnt
110 #define tw_hash __tw_common.skc_hash
111 #define tw_prot __tw_common.skc_prot
112 #define tw_net __tw_common.skc_net
113 #define tw_daddr __tw_common.skc_daddr
114 #define tw_rcv_saddr __tw_common.skc_rcv_saddr
136 #define tw_tclass tw_tos
141 hlist_nulls_add_head_rcu(&tw->tw_node, list);
147 hlist_add_head(&tw->tw_bind_node, list);
163 inet_twsk_dead_node_init(tw);
168 if (inet_twsk_dead_hashed(tw)) {
169 __inet_twsk_del_dead_node(tw);
175 #define inet_twsk_for_each(tw, node, head) \
176 hlist_nulls_for_each_entry(tw, node, head, tw_node)
178 #define inet_twsk_for_each_inmate(tw, node, jail) \
179 hlist_for_each_entry(tw, node, jail, tw_death_node)
181 #define inet_twsk_for_each_inmate_safe(tw, node, safe, jail) \
182 hlist_for_each_entry_safe(tw, node, safe, jail, tw_death_node)
189 static inline __be32 sk_rcv_saddr(
const struct sock *
sk)
211 const int timeo,
const int timewait_len);