aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2006-11-13 19:19:07 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:22:26 -0500
commit1ed176a801b83915b7c8ab80e0a2a6376a2d6051 (patch)
tree4939b1d74f3500eeb380082d934b98d629339795
parent5f3f24faf322e54752d1df00cdb768a013de5d1f (diff)
[SCTP]: Cleanup of the sctp state table code.
I noticed an insane high density of repeated characters fixable by a simple regular expression: % s/{.fn = \([^,]*\),[[:space:]]\+\(\\\n[[:space:]]\+\)\?.name = "\1"}/TYPE_SCTP_FUNC(\1)/g (NOTE: the .name for .fn = sctp_sf_do_9_2_start_shutdown didn't match) Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sctp/sm_statetable.c696
1 files changed, 335 insertions, 361 deletions
diff --git a/net/sctp/sm_statetable.c b/net/sctp/sm_statetable.c
index 8bcca5676151..733dd87b3a7d 100644
--- a/net/sctp/sm_statetable.c
+++ b/net/sctp/sm_statetable.c
@@ -104,325 +104,322 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
104 }; 104 };
105} 105}
106 106
107#define TYPE_SCTP_FUNC(func) {.fn = func, .name = #func}
108
107#define TYPE_SCTP_DATA { \ 109#define TYPE_SCTP_DATA { \
108 /* SCTP_STATE_EMPTY */ \ 110 /* SCTP_STATE_EMPTY */ \
109 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 111 TYPE_SCTP_FUNC(sctp_sf_ootb), \
110 /* SCTP_STATE_CLOSED */ \ 112 /* SCTP_STATE_CLOSED */ \
111 {.fn = sctp_sf_tabort_8_4_8, .name = "sctp_sf_tabort_8_4_8"}, \ 113 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
112 /* SCTP_STATE_COOKIE_WAIT */ \ 114 /* SCTP_STATE_COOKIE_WAIT */ \
113 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 115 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
114 /* SCTP_STATE_COOKIE_ECHOED */ \ 116 /* SCTP_STATE_COOKIE_ECHOED */ \
115 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 117 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
116 /* SCTP_STATE_ESTABLISHED */ \ 118 /* SCTP_STATE_ESTABLISHED */ \
117 {.fn = sctp_sf_eat_data_6_2, .name = "sctp_sf_eat_data_6_2"}, \ 119 TYPE_SCTP_FUNC(sctp_sf_eat_data_6_2), \
118 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 120 /* SCTP_STATE_SHUTDOWN_PENDING */ \
119 {.fn = sctp_sf_eat_data_6_2, .name = "sctp_sf_eat_data_6_2"}, \ 121 TYPE_SCTP_FUNC(sctp_sf_eat_data_6_2), \
120 /* SCTP_STATE_SHUTDOWN_SENT */ \ 122 /* SCTP_STATE_SHUTDOWN_SENT */ \
121 {.fn = sctp_sf_eat_data_fast_4_4, .name = "sctp_sf_eat_data_fast_4_4"}, \ 123 TYPE_SCTP_FUNC(sctp_sf_eat_data_fast_4_4), \
122 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 124 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
123 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 125 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
124 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 126 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
125 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 127 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
126} /* TYPE_SCTP_DATA */ 128} /* TYPE_SCTP_DATA */
127 129
128#define TYPE_SCTP_INIT { \ 130#define TYPE_SCTP_INIT { \
129 /* SCTP_STATE_EMPTY */ \ 131 /* SCTP_STATE_EMPTY */ \
130 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 132 TYPE_SCTP_FUNC(sctp_sf_bug), \
131 /* SCTP_STATE_CLOSED */ \ 133 /* SCTP_STATE_CLOSED */ \
132 {.fn = sctp_sf_do_5_1B_init, .name = "sctp_sf_do_5_1B_init"}, \ 134 TYPE_SCTP_FUNC(sctp_sf_do_5_1B_init), \
133 /* SCTP_STATE_COOKIE_WAIT */ \ 135 /* SCTP_STATE_COOKIE_WAIT */ \
134 {.fn = sctp_sf_do_5_2_1_siminit, .name = "sctp_sf_do_5_2_1_siminit"}, \ 136 TYPE_SCTP_FUNC(sctp_sf_do_5_2_1_siminit), \
135 /* SCTP_STATE_COOKIE_ECHOED */ \ 137 /* SCTP_STATE_COOKIE_ECHOED */ \
136 {.fn = sctp_sf_do_5_2_1_siminit, .name = "sctp_sf_do_5_2_1_siminit"}, \ 138 TYPE_SCTP_FUNC(sctp_sf_do_5_2_1_siminit), \
137 /* SCTP_STATE_ESTABLISHED */ \ 139 /* SCTP_STATE_ESTABLISHED */ \
138 {.fn = sctp_sf_do_5_2_2_dupinit, .name = "sctp_sf_do_5_2_2_dupinit"}, \ 140 TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \
139 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 141 /* SCTP_STATE_SHUTDOWN_PENDING */ \
140 {.fn = sctp_sf_do_5_2_2_dupinit, .name = "sctp_sf_do_5_2_2_dupinit"}, \ 142 TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \
141 /* SCTP_STATE_SHUTDOWN_SENT */ \ 143 /* SCTP_STATE_SHUTDOWN_SENT */ \
142 {.fn = sctp_sf_do_5_2_2_dupinit, .name = "sctp_sf_do_5_2_2_dupinit"}, \ 144 TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \
143 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 145 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
144 {.fn = sctp_sf_do_5_2_2_dupinit, .name = "sctp_sf_do_5_2_2_dupinit"}, \ 146 TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \
145 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 147 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
146 {.fn = sctp_sf_do_9_2_reshutack, .name = "sctp_sf_do_9_2_reshutack"}, \ 148 TYPE_SCTP_FUNC(sctp_sf_do_9_2_reshutack), \
147} /* TYPE_SCTP_INIT */ 149} /* TYPE_SCTP_INIT */
148 150
149#define TYPE_SCTP_INIT_ACK { \ 151#define TYPE_SCTP_INIT_ACK { \
150 /* SCTP_STATE_EMPTY */ \ 152 /* SCTP_STATE_EMPTY */ \
151 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 153 TYPE_SCTP_FUNC(sctp_sf_ootb), \
152 /* SCTP_STATE_CLOSED */ \ 154 /* SCTP_STATE_CLOSED */ \
153 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 155 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
154 /* SCTP_STATE_COOKIE_WAIT */ \ 156 /* SCTP_STATE_COOKIE_WAIT */ \
155 {.fn = sctp_sf_do_5_1C_ack, .name = "sctp_sf_do_5_1C_ack"}, \ 157 TYPE_SCTP_FUNC(sctp_sf_do_5_1C_ack), \
156 /* SCTP_STATE_COOKIE_ECHOED */ \ 158 /* SCTP_STATE_COOKIE_ECHOED */ \
157 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 159 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
158 /* SCTP_STATE_ESTABLISHED */ \ 160 /* SCTP_STATE_ESTABLISHED */ \
159 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 161 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
160 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 162 /* SCTP_STATE_SHUTDOWN_PENDING */ \
161 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 163 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
162 /* SCTP_STATE_SHUTDOWN_SENT */ \ 164 /* SCTP_STATE_SHUTDOWN_SENT */ \
163 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 165 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
164 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 166 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
165 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 167 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
166 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 168 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
167 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 169 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
168} /* TYPE_SCTP_INIT_ACK */ 170} /* TYPE_SCTP_INIT_ACK */
169 171
170#define TYPE_SCTP_SACK { \ 172#define TYPE_SCTP_SACK { \
171 /* SCTP_STATE_EMPTY */ \ 173 /* SCTP_STATE_EMPTY */ \
172 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 174 TYPE_SCTP_FUNC(sctp_sf_ootb), \
173 /* SCTP_STATE_CLOSED */ \ 175 /* SCTP_STATE_CLOSED */ \
174 {.fn = sctp_sf_tabort_8_4_8, .name = "sctp_sf_tabort_8_4_8"}, \ 176 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
175 /* SCTP_STATE_COOKIE_WAIT */ \ 177 /* SCTP_STATE_COOKIE_WAIT */ \
176 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 178 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
177 /* SCTP_STATE_COOKIE_ECHOED */ \ 179 /* SCTP_STATE_COOKIE_ECHOED */ \
178 {.fn = sctp_sf_eat_sack_6_2, .name = "sctp_sf_eat_sack_6_2"}, \ 180 TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \
179 /* SCTP_STATE_ESTABLISHED */ \ 181 /* SCTP_STATE_ESTABLISHED */ \
180 {.fn = sctp_sf_eat_sack_6_2, .name = "sctp_sf_eat_sack_6_2"}, \ 182 TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \
181 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 183 /* SCTP_STATE_SHUTDOWN_PENDING */ \
182 {.fn = sctp_sf_eat_sack_6_2, .name = "sctp_sf_eat_sack_6_2"}, \ 184 TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \
183 /* SCTP_STATE_SHUTDOWN_SENT */ \ 185 /* SCTP_STATE_SHUTDOWN_SENT */ \
184 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 186 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
185 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 187 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
186 {.fn = sctp_sf_eat_sack_6_2, .name = "sctp_sf_eat_sack_6_2"}, \ 188 TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \
187 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 189 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
188 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 190 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
189} /* TYPE_SCTP_SACK */ 191} /* TYPE_SCTP_SACK */
190 192
191#define TYPE_SCTP_HEARTBEAT { \ 193#define TYPE_SCTP_HEARTBEAT { \
192 /* SCTP_STATE_EMPTY */ \ 194 /* SCTP_STATE_EMPTY */ \
193 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 195 TYPE_SCTP_FUNC(sctp_sf_ootb), \
194 /* SCTP_STATE_CLOSED */ \ 196 /* SCTP_STATE_CLOSED */ \
195 {.fn = sctp_sf_tabort_8_4_8, .name = "sctp_sf_tabort_8_4_8"}, \ 197 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
196 /* SCTP_STATE_COOKIE_WAIT */ \ 198 /* SCTP_STATE_COOKIE_WAIT */ \
197 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 199 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
198 /* SCTP_STATE_COOKIE_ECHOED */ \ 200 /* SCTP_STATE_COOKIE_ECHOED */ \
199 {.fn = sctp_sf_beat_8_3, .name = "sctp_sf_beat_8_3"}, \ 201 TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \
200 /* SCTP_STATE_ESTABLISHED */ \ 202 /* SCTP_STATE_ESTABLISHED */ \
201 {.fn = sctp_sf_beat_8_3, .name = "sctp_sf_beat_8_3"}, \ 203 TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \
202 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 204 /* SCTP_STATE_SHUTDOWN_PENDING */ \
203 {.fn = sctp_sf_beat_8_3, .name = "sctp_sf_beat_8_3"}, \ 205 TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \
204 /* SCTP_STATE_SHUTDOWN_SENT */ \ 206 /* SCTP_STATE_SHUTDOWN_SENT */ \
205 {.fn = sctp_sf_beat_8_3, .name = "sctp_sf_beat_8_3"}, \ 207 TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \
206 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 208 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
207 {.fn = sctp_sf_beat_8_3, .name = "sctp_sf_beat_8_3"}, \ 209 TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \
208 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 210 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
209 /* This should not happen, but we are nice. */ \ 211 /* This should not happen, but we are nice. */ \
210 {.fn = sctp_sf_beat_8_3, .name = "sctp_sf_beat_8_3"}, \ 212 TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \
211} /* TYPE_SCTP_HEARTBEAT */ 213} /* TYPE_SCTP_HEARTBEAT */
212 214
213#define TYPE_SCTP_HEARTBEAT_ACK { \ 215#define TYPE_SCTP_HEARTBEAT_ACK { \
214 /* SCTP_STATE_EMPTY */ \ 216 /* SCTP_STATE_EMPTY */ \
215 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 217 TYPE_SCTP_FUNC(sctp_sf_ootb), \
216 /* SCTP_STATE_CLOSED */ \ 218 /* SCTP_STATE_CLOSED */ \
217 {.fn = sctp_sf_tabort_8_4_8, .name = "sctp_sf_tabort_8_4_8"}, \ 219 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
218 /* SCTP_STATE_COOKIE_WAIT */ \ 220 /* SCTP_STATE_COOKIE_WAIT */ \
219 {.fn = sctp_sf_violation, .name = "sctp_sf_violation"}, \ 221 TYPE_SCTP_FUNC(sctp_sf_violation), \
220 /* SCTP_STATE_COOKIE_ECHOED */ \ 222 /* SCTP_STATE_COOKIE_ECHOED */ \
221 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 223 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
222 /* SCTP_STATE_ESTABLISHED */ \ 224 /* SCTP_STATE_ESTABLISHED */ \
223 {.fn = sctp_sf_backbeat_8_3, .name = "sctp_sf_backbeat_8_3"}, \ 225 TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \
224 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 226 /* SCTP_STATE_SHUTDOWN_PENDING */ \
225 {.fn = sctp_sf_backbeat_8_3, .name = "sctp_sf_backbeat_8_3"}, \ 227 TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \
226 /* SCTP_STATE_SHUTDOWN_SENT */ \ 228 /* SCTP_STATE_SHUTDOWN_SENT */ \
227 {.fn = sctp_sf_backbeat_8_3, .name = "sctp_sf_backbeat_8_3"}, \ 229 TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \
228 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 230 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
229 {.fn = sctp_sf_backbeat_8_3, .name = "sctp_sf_backbeat_8_3"}, \ 231 TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \
230 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 232 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
231 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 233 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
232} /* TYPE_SCTP_HEARTBEAT_ACK */ 234} /* TYPE_SCTP_HEARTBEAT_ACK */
233 235
234#define TYPE_SCTP_ABORT { \ 236#define TYPE_SCTP_ABORT { \
235 /* SCTP_STATE_EMPTY */ \ 237 /* SCTP_STATE_EMPTY */ \
236 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 238 TYPE_SCTP_FUNC(sctp_sf_ootb), \
237 /* SCTP_STATE_CLOSED */ \ 239 /* SCTP_STATE_CLOSED */ \
238 {.fn = sctp_sf_pdiscard, .name = "sctp_sf_pdiscard"}, \ 240 TYPE_SCTP_FUNC(sctp_sf_pdiscard), \
239 /* SCTP_STATE_COOKIE_WAIT */ \ 241 /* SCTP_STATE_COOKIE_WAIT */ \
240 {.fn = sctp_sf_cookie_wait_abort, .name = "sctp_sf_cookie_wait_abort"}, \ 242 TYPE_SCTP_FUNC(sctp_sf_cookie_wait_abort), \
241 /* SCTP_STATE_COOKIE_ECHOED */ \ 243 /* SCTP_STATE_COOKIE_ECHOED */ \
242 {.fn = sctp_sf_cookie_echoed_abort, \ 244 TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_abort), \
243 .name = "sctp_sf_cookie_echoed_abort"}, \
244 /* SCTP_STATE_ESTABLISHED */ \ 245 /* SCTP_STATE_ESTABLISHED */ \
245 {.fn = sctp_sf_do_9_1_abort, .name = "sctp_sf_do_9_1_abort"}, \ 246 TYPE_SCTP_FUNC(sctp_sf_do_9_1_abort), \
246 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 247 /* SCTP_STATE_SHUTDOWN_PENDING */ \
247 {.fn = sctp_sf_shutdown_pending_abort, \ 248 TYPE_SCTP_FUNC(sctp_sf_shutdown_pending_abort), \
248 .name = "sctp_sf_shutdown_pending_abort"}, \
249 /* SCTP_STATE_SHUTDOWN_SENT */ \ 249 /* SCTP_STATE_SHUTDOWN_SENT */ \
250 {.fn = sctp_sf_shutdown_sent_abort, \ 250 TYPE_SCTP_FUNC(sctp_sf_shutdown_sent_abort), \
251 .name = "sctp_sf_shutdown_sent_abort"}, \
252 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 251 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
253 {.fn = sctp_sf_do_9_1_abort, .name = "sctp_sf_do_9_1_abort"}, \ 252 TYPE_SCTP_FUNC(sctp_sf_do_9_1_abort), \
254 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 253 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
255 {.fn = sctp_sf_shutdown_ack_sent_abort, \ 254 TYPE_SCTP_FUNC(sctp_sf_shutdown_ack_sent_abort), \
256 .name = "sctp_sf_shutdown_ack_sent_abort"}, \
257} /* TYPE_SCTP_ABORT */ 255} /* TYPE_SCTP_ABORT */
258 256
259#define TYPE_SCTP_SHUTDOWN { \ 257#define TYPE_SCTP_SHUTDOWN { \
260 /* SCTP_STATE_EMPTY */ \ 258 /* SCTP_STATE_EMPTY */ \
261 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 259 TYPE_SCTP_FUNC(sctp_sf_ootb), \
262 /* SCTP_STATE_CLOSED */ \ 260 /* SCTP_STATE_CLOSED */ \
263 {.fn = sctp_sf_tabort_8_4_8, .name = "sctp_sf_tabort_8_4_8"}, \ 261 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
264 /* SCTP_STATE_COOKIE_WAIT */ \ 262 /* SCTP_STATE_COOKIE_WAIT */ \
265 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 263 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
266 /* SCTP_STATE_COOKIE_ECHOED */ \ 264 /* SCTP_STATE_COOKIE_ECHOED */ \
267 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 265 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
268 /* SCTP_STATE_ESTABLISHED */ \ 266 /* SCTP_STATE_ESTABLISHED */ \
269 {.fn = sctp_sf_do_9_2_shutdown, .name = "sctp_sf_do_9_2_shutdown"}, \ 267 TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown), \
270 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 268 /* SCTP_STATE_SHUTDOWN_PENDING */ \
271 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 269 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
272 /* SCTP_STATE_SHUTDOWN_SENT */ \ 270 /* SCTP_STATE_SHUTDOWN_SENT */ \
273 {.fn = sctp_sf_do_9_2_shutdown_ack, \ 271 TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown_ack), \
274 .name = "sctp_sf_do_9_2_shutdown_ack"}, \
275 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 272 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
276 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 273 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
277 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 274 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
278 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 275 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
279} /* TYPE_SCTP_SHUTDOWN */ 276} /* TYPE_SCTP_SHUTDOWN */
280 277
281#define TYPE_SCTP_SHUTDOWN_ACK { \ 278#define TYPE_SCTP_SHUTDOWN_ACK { \
282 /* SCTP_STATE_EMPTY */ \ 279 /* SCTP_STATE_EMPTY */ \
283 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 280 TYPE_SCTP_FUNC(sctp_sf_ootb), \
284 /* SCTP_STATE_CLOSED */ \ 281 /* SCTP_STATE_CLOSED */ \
285 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 282 TYPE_SCTP_FUNC(sctp_sf_ootb), \
286 /* SCTP_STATE_COOKIE_WAIT */ \ 283 /* SCTP_STATE_COOKIE_WAIT */ \
287 {.fn = sctp_sf_do_8_5_1_E_sa, .name = "sctp_sf_do_8_5_1_E_sa"}, \ 284 TYPE_SCTP_FUNC(sctp_sf_do_8_5_1_E_sa), \
288 /* SCTP_STATE_COOKIE_ECHOED */ \ 285 /* SCTP_STATE_COOKIE_ECHOED */ \
289 {.fn = sctp_sf_do_8_5_1_E_sa, .name = "sctp_sf_do_8_5_1_E_sa"}, \ 286 TYPE_SCTP_FUNC(sctp_sf_do_8_5_1_E_sa), \
290 /* SCTP_STATE_ESTABLISHED */ \ 287 /* SCTP_STATE_ESTABLISHED */ \
291 {.fn = sctp_sf_violation, .name = "sctp_sf_violation"}, \ 288 TYPE_SCTP_FUNC(sctp_sf_violation), \
292 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 289 /* SCTP_STATE_SHUTDOWN_PENDING */ \
293 {.fn = sctp_sf_violation, .name = "sctp_sf_violation"}, \ 290 TYPE_SCTP_FUNC(sctp_sf_violation), \
294 /* SCTP_STATE_SHUTDOWN_SENT */ \ 291 /* SCTP_STATE_SHUTDOWN_SENT */ \
295 {.fn = sctp_sf_do_9_2_final, .name = "sctp_sf_do_9_2_final"}, \ 292 TYPE_SCTP_FUNC(sctp_sf_do_9_2_final), \
296 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 293 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
297 {.fn = sctp_sf_violation, .name = "sctp_sf_violation"}, \ 294 TYPE_SCTP_FUNC(sctp_sf_violation), \
298 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 295 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
299 {.fn = sctp_sf_do_9_2_final, .name = "sctp_sf_do_9_2_final"}, \ 296 TYPE_SCTP_FUNC(sctp_sf_do_9_2_final), \
300} /* TYPE_SCTP_SHUTDOWN_ACK */ 297} /* TYPE_SCTP_SHUTDOWN_ACK */
301 298
302#define TYPE_SCTP_ERROR { \ 299#define TYPE_SCTP_ERROR { \
303 /* SCTP_STATE_EMPTY */ \ 300 /* SCTP_STATE_EMPTY */ \
304 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 301 TYPE_SCTP_FUNC(sctp_sf_ootb), \
305 /* SCTP_STATE_CLOSED */ \ 302 /* SCTP_STATE_CLOSED */ \
306 {.fn = sctp_sf_tabort_8_4_8, .name = "sctp_sf_tabort_8_4_8"}, \ 303 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
307 /* SCTP_STATE_COOKIE_WAIT */ \ 304 /* SCTP_STATE_COOKIE_WAIT */ \
308 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 305 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
309 /* SCTP_STATE_COOKIE_ECHOED */ \ 306 /* SCTP_STATE_COOKIE_ECHOED */ \
310 {.fn = sctp_sf_cookie_echoed_err, .name = "sctp_sf_cookie_echoed_err"}, \ 307 TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_err), \
311 /* SCTP_STATE_ESTABLISHED */ \ 308 /* SCTP_STATE_ESTABLISHED */ \
312 {.fn = sctp_sf_operr_notify, .name = "sctp_sf_operr_notify"}, \ 309 TYPE_SCTP_FUNC(sctp_sf_operr_notify), \
313 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 310 /* SCTP_STATE_SHUTDOWN_PENDING */ \
314 {.fn = sctp_sf_operr_notify, .name = "sctp_sf_operr_notify"}, \ 311 TYPE_SCTP_FUNC(sctp_sf_operr_notify), \
315 /* SCTP_STATE_SHUTDOWN_SENT */ \ 312 /* SCTP_STATE_SHUTDOWN_SENT */ \
316 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 313 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
317 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 314 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
318 {.fn = sctp_sf_operr_notify, .name = "sctp_sf_operr_notify"}, \ 315 TYPE_SCTP_FUNC(sctp_sf_operr_notify), \
319 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 316 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
320 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 317 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
321} /* TYPE_SCTP_ERROR */ 318} /* TYPE_SCTP_ERROR */
322 319
323#define TYPE_SCTP_COOKIE_ECHO { \ 320#define TYPE_SCTP_COOKIE_ECHO { \
324 /* SCTP_STATE_EMPTY */ \ 321 /* SCTP_STATE_EMPTY */ \
325 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 322 TYPE_SCTP_FUNC(sctp_sf_bug), \
326 /* SCTP_STATE_CLOSED */ \ 323 /* SCTP_STATE_CLOSED */ \
327 {.fn = sctp_sf_do_5_1D_ce, .name = "sctp_sf_do_5_1D_ce"}, \ 324 TYPE_SCTP_FUNC(sctp_sf_do_5_1D_ce), \
328 /* SCTP_STATE_COOKIE_WAIT */ \ 325 /* SCTP_STATE_COOKIE_WAIT */ \
329 {.fn = sctp_sf_do_5_2_4_dupcook, .name = "sctp_sf_do_5_2_4_dupcook"}, \ 326 TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
330 /* SCTP_STATE_COOKIE_ECHOED */ \ 327 /* SCTP_STATE_COOKIE_ECHOED */ \
331 {.fn = sctp_sf_do_5_2_4_dupcook, .name = "sctp_sf_do_5_2_4_dupcook"}, \ 328 TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
332 /* SCTP_STATE_ESTABLISHED */ \ 329 /* SCTP_STATE_ESTABLISHED */ \
333 {.fn = sctp_sf_do_5_2_4_dupcook, .name = "sctp_sf_do_5_2_4_dupcook"}, \ 330 TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
334 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 331 /* SCTP_STATE_SHUTDOWN_PENDING */ \
335 {.fn = sctp_sf_do_5_2_4_dupcook, .name = "sctp_sf_do_5_2_4_dupcook"}, \ 332 TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
336 /* SCTP_STATE_SHUTDOWN_SENT */ \ 333 /* SCTP_STATE_SHUTDOWN_SENT */ \
337 {.fn = sctp_sf_do_5_2_4_dupcook, .name = "sctp_sf_do_5_2_4_dupcook"}, \ 334 TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
338 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 335 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
339 {.fn = sctp_sf_do_5_2_4_dupcook, .name = "sctp_sf_do_5_2_4_dupcook"}, \ 336 TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
340 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 337 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
341 {.fn = sctp_sf_do_5_2_4_dupcook, .name = "sctp_sf_do_5_2_4_dupcook"}, \ 338 TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
342} /* TYPE_SCTP_COOKIE_ECHO */ 339} /* TYPE_SCTP_COOKIE_ECHO */
343 340
344#define TYPE_SCTP_COOKIE_ACK { \ 341#define TYPE_SCTP_COOKIE_ACK { \
345 /* SCTP_STATE_EMPTY */ \ 342 /* SCTP_STATE_EMPTY */ \
346 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 343 TYPE_SCTP_FUNC(sctp_sf_ootb), \
347 /* SCTP_STATE_CLOSED */ \ 344 /* SCTP_STATE_CLOSED */ \
348 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 345 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
349 /* SCTP_STATE_COOKIE_WAIT */ \ 346 /* SCTP_STATE_COOKIE_WAIT */ \
350 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 347 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
351 /* SCTP_STATE_COOKIE_ECHOED */ \ 348 /* SCTP_STATE_COOKIE_ECHOED */ \
352 {.fn = sctp_sf_do_5_1E_ca, .name = "sctp_sf_do_5_1E_ca"}, \ 349 TYPE_SCTP_FUNC(sctp_sf_do_5_1E_ca), \
353 /* SCTP_STATE_ESTABLISHED */ \ 350 /* SCTP_STATE_ESTABLISHED */ \
354 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 351 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
355 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 352 /* SCTP_STATE_SHUTDOWN_PENDING */ \
356 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 353 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
357 /* SCTP_STATE_SHUTDOWN_SENT */ \ 354 /* SCTP_STATE_SHUTDOWN_SENT */ \
358 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 355 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
359 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 356 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
360 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 357 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
361 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 358 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
362 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 359 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
363} /* TYPE_SCTP_COOKIE_ACK */ 360} /* TYPE_SCTP_COOKIE_ACK */
364 361
365#define TYPE_SCTP_ECN_ECNE { \ 362#define TYPE_SCTP_ECN_ECNE { \
366 /* SCTP_STATE_EMPTY */ \ 363 /* SCTP_STATE_EMPTY */ \
367 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 364 TYPE_SCTP_FUNC(sctp_sf_ootb), \
368 /* SCTP_STATE_CLOSED */ \ 365 /* SCTP_STATE_CLOSED */ \
369 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 366 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
370 /* SCTP_STATE_COOKIE_WAIT */ \ 367 /* SCTP_STATE_COOKIE_WAIT */ \
371 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 368 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
372 /* SCTP_STATE_COOKIE_ECHOED */ \ 369 /* SCTP_STATE_COOKIE_ECHOED */ \
373 {.fn = sctp_sf_do_ecne, .name = "sctp_sf_do_ecne"}, \ 370 TYPE_SCTP_FUNC(sctp_sf_do_ecne), \
374 /* SCTP_STATE_ESTABLISHED */ \ 371 /* SCTP_STATE_ESTABLISHED */ \
375 {.fn = sctp_sf_do_ecne, .name = "sctp_sf_do_ecne"}, \ 372 TYPE_SCTP_FUNC(sctp_sf_do_ecne), \
376 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 373 /* SCTP_STATE_SHUTDOWN_PENDING */ \
377 {.fn = sctp_sf_do_ecne, .name = "sctp_sf_do_ecne"}, \ 374 TYPE_SCTP_FUNC(sctp_sf_do_ecne), \
378 /* SCTP_STATE_SHUTDOWN_SENT */ \ 375 /* SCTP_STATE_SHUTDOWN_SENT */ \
379 {.fn = sctp_sf_do_ecne, .name = "sctp_sf_do_ecne"}, \ 376 TYPE_SCTP_FUNC(sctp_sf_do_ecne), \
380 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 377 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
381 {.fn = sctp_sf_do_ecne, .name = "sctp_sf_do_ecne"}, \ 378 TYPE_SCTP_FUNC(sctp_sf_do_ecne), \
382 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 379 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
383 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 380 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
384} /* TYPE_SCTP_ECN_ECNE */ 381} /* TYPE_SCTP_ECN_ECNE */
385 382
386#define TYPE_SCTP_ECN_CWR { \ 383#define TYPE_SCTP_ECN_CWR { \
387 /* SCTP_STATE_EMPTY */ \ 384 /* SCTP_STATE_EMPTY */ \
388 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 385 TYPE_SCTP_FUNC(sctp_sf_ootb), \
389 /* SCTP_STATE_CLOSED */ \ 386 /* SCTP_STATE_CLOSED */ \
390 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 387 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
391 /* SCTP_STATE_COOKIE_WAIT */ \ 388 /* SCTP_STATE_COOKIE_WAIT */ \
392 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 389 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
393 /* SCTP_STATE_COOKIE_ECHOED */ \ 390 /* SCTP_STATE_COOKIE_ECHOED */ \
394 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 391 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
395 /* SCTP_STATE_ESTABLISHED */ \ 392 /* SCTP_STATE_ESTABLISHED */ \
396 {.fn = sctp_sf_do_ecn_cwr, .name = "sctp_sf_do_ecn_cwr"}, \ 393 TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \
397 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 394 /* SCTP_STATE_SHUTDOWN_PENDING */ \
398 {.fn = sctp_sf_do_ecn_cwr, .name = "sctp_sf_do_ecn_cwr"}, \ 395 TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \
399 /* SCTP_STATE_SHUTDOWN_SENT */ \ 396 /* SCTP_STATE_SHUTDOWN_SENT */ \
400 {.fn = sctp_sf_do_ecn_cwr, .name = "sctp_sf_do_ecn_cwr"}, \ 397 TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \
401 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 398 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
402 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 399 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
403 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 400 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
404 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 401 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
405} /* TYPE_SCTP_ECN_CWR */ 402} /* TYPE_SCTP_ECN_CWR */
406 403
407#define TYPE_SCTP_SHUTDOWN_COMPLETE { \ 404#define TYPE_SCTP_SHUTDOWN_COMPLETE { \
408 /* SCTP_STATE_EMPTY */ \ 405 /* SCTP_STATE_EMPTY */ \
409 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 406 TYPE_SCTP_FUNC(sctp_sf_ootb), \
410 /* SCTP_STATE_CLOSED */ \ 407 /* SCTP_STATE_CLOSED */ \
411 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 408 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
412 /* SCTP_STATE_COOKIE_WAIT */ \ 409 /* SCTP_STATE_COOKIE_WAIT */ \
413 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 410 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
414 /* SCTP_STATE_COOKIE_ECHOED */ \ 411 /* SCTP_STATE_COOKIE_ECHOED */ \
415 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 412 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
416 /* SCTP_STATE_ESTABLISHED */ \ 413 /* SCTP_STATE_ESTABLISHED */ \
417 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 414 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
418 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 415 /* SCTP_STATE_SHUTDOWN_PENDING */ \
419 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 416 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
420 /* SCTP_STATE_SHUTDOWN_SENT */ \ 417 /* SCTP_STATE_SHUTDOWN_SENT */ \
421 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 418 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
422 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 419 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
423 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 420 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
424 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 421 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
425 {.fn = sctp_sf_do_4_C, .name = "sctp_sf_do_4_C"}, \ 422 TYPE_SCTP_FUNC(sctp_sf_do_4_C), \
426} /* TYPE_SCTP_SHUTDOWN_COMPLETE */ 423} /* TYPE_SCTP_SHUTDOWN_COMPLETE */
427 424
428/* The primary index for this table is the chunk type. 425/* The primary index for this table is the chunk type.
@@ -450,44 +447,44 @@ static const sctp_sm_table_entry_t chunk_event_table[SCTP_NUM_BASE_CHUNK_TYPES][
450 447
451#define TYPE_SCTP_ASCONF { \ 448#define TYPE_SCTP_ASCONF { \
452 /* SCTP_STATE_EMPTY */ \ 449 /* SCTP_STATE_EMPTY */ \
453 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 450 TYPE_SCTP_FUNC(sctp_sf_ootb), \
454 /* SCTP_STATE_CLOSED */ \ 451 /* SCTP_STATE_CLOSED */ \
455 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 452 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
456 /* SCTP_STATE_COOKIE_WAIT */ \ 453 /* SCTP_STATE_COOKIE_WAIT */ \
457 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 454 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
458 /* SCTP_STATE_COOKIE_ECHOED */ \ 455 /* SCTP_STATE_COOKIE_ECHOED */ \
459 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 456 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
460 /* SCTP_STATE_ESTABLISHED */ \ 457 /* SCTP_STATE_ESTABLISHED */ \
461 {.fn = sctp_sf_do_asconf, .name = "sctp_sf_do_asconf"}, \ 458 TYPE_SCTP_FUNC(sctp_sf_do_asconf), \
462 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 459 /* SCTP_STATE_SHUTDOWN_PENDING */ \
463 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 460 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
464 /* SCTP_STATE_SHUTDOWN_SENT */ \ 461 /* SCTP_STATE_SHUTDOWN_SENT */ \
465 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 462 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
466 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 463 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
467 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 464 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
468 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 465 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
469 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 466 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
470} /* TYPE_SCTP_ASCONF */ 467} /* TYPE_SCTP_ASCONF */
471 468
472#define TYPE_SCTP_ASCONF_ACK { \ 469#define TYPE_SCTP_ASCONF_ACK { \
473 /* SCTP_STATE_EMPTY */ \ 470 /* SCTP_STATE_EMPTY */ \
474 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 471 TYPE_SCTP_FUNC(sctp_sf_ootb), \
475 /* SCTP_STATE_CLOSED */ \ 472 /* SCTP_STATE_CLOSED */ \
476 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 473 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
477 /* SCTP_STATE_COOKIE_WAIT */ \ 474 /* SCTP_STATE_COOKIE_WAIT */ \
478 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 475 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
479 /* SCTP_STATE_COOKIE_ECHOED */ \ 476 /* SCTP_STATE_COOKIE_ECHOED */ \
480 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 477 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
481 /* SCTP_STATE_ESTABLISHED */ \ 478 /* SCTP_STATE_ESTABLISHED */ \
482 {.fn = sctp_sf_do_asconf_ack, .name = "sctp_sf_do_asconf_ack"}, \ 479 TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \
483 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 480 /* SCTP_STATE_SHUTDOWN_PENDING */ \
484 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 481 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
485 /* SCTP_STATE_SHUTDOWN_SENT */ \ 482 /* SCTP_STATE_SHUTDOWN_SENT */ \
486 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 483 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
487 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 484 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
488 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 485 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
489 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 486 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
490 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 487 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
491} /* TYPE_SCTP_ASCONF_ACK */ 488} /* TYPE_SCTP_ASCONF_ACK */
492 489
493/* The primary index for this table is the chunk type. 490/* The primary index for this table is the chunk type.
@@ -500,23 +497,23 @@ static const sctp_sm_table_entry_t addip_chunk_event_table[SCTP_NUM_ADDIP_CHUNK_
500 497
501#define TYPE_SCTP_FWD_TSN { \ 498#define TYPE_SCTP_FWD_TSN { \
502 /* SCTP_STATE_EMPTY */ \ 499 /* SCTP_STATE_EMPTY */ \
503 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, \ 500 TYPE_SCTP_FUNC(sctp_sf_ootb), \
504 /* SCTP_STATE_CLOSED */ \ 501 /* SCTP_STATE_CLOSED */ \
505 {.fn = sctp_sf_tabort_8_4_8, .name = "sctp_sf_tabort_8_4_8"}, \ 502 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8), \
506 /* SCTP_STATE_COOKIE_WAIT */ \ 503 /* SCTP_STATE_COOKIE_WAIT */ \
507 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 504 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
508 /* SCTP_STATE_COOKIE_ECHOED */ \ 505 /* SCTP_STATE_COOKIE_ECHOED */ \
509 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 506 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
510 /* SCTP_STATE_ESTABLISHED */ \ 507 /* SCTP_STATE_ESTABLISHED */ \
511 {.fn = sctp_sf_eat_fwd_tsn, .name = "sctp_sf_eat_fwd_tsn"}, \ 508 TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn), \
512 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 509 /* SCTP_STATE_SHUTDOWN_PENDING */ \
513 {.fn = sctp_sf_eat_fwd_tsn, .name = "sctp_sf_eat_fwd_tsn"}, \ 510 TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn), \
514 /* SCTP_STATE_SHUTDOWN_SENT */ \ 511 /* SCTP_STATE_SHUTDOWN_SENT */ \
515 {.fn = sctp_sf_eat_fwd_tsn_fast, .name = "sctp_sf_eat_fwd_tsn_fast"}, \ 512 TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn_fast), \
516 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 513 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
517 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 514 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
518 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 515 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
519 {.fn = sctp_sf_discard_chunk, .name = "sctp_sf_discard_chunk"}, \ 516 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
520} /* TYPE_SCTP_FWD_TSN */ 517} /* TYPE_SCTP_FWD_TSN */
521 518
522/* The primary index for this table is the chunk type. 519/* The primary index for this table is the chunk type.
@@ -529,167 +526,150 @@ static const sctp_sm_table_entry_t prsctp_chunk_event_table[SCTP_NUM_PRSCTP_CHUN
529static const sctp_sm_table_entry_t 526static const sctp_sm_table_entry_t
530chunk_event_table_unknown[SCTP_STATE_NUM_STATES] = { 527chunk_event_table_unknown[SCTP_STATE_NUM_STATES] = {
531 /* SCTP_STATE_EMPTY */ 528 /* SCTP_STATE_EMPTY */
532 {.fn = sctp_sf_ootb, .name = "sctp_sf_ootb"}, 529 TYPE_SCTP_FUNC(sctp_sf_ootb),
533 /* SCTP_STATE_CLOSED */ 530 /* SCTP_STATE_CLOSED */
534 {.fn = sctp_sf_tabort_8_4_8, .name = "sctp_sf_tabort_8_4_8"}, 531 TYPE_SCTP_FUNC(sctp_sf_tabort_8_4_8),
535 /* SCTP_STATE_COOKIE_WAIT */ 532 /* SCTP_STATE_COOKIE_WAIT */
536 {.fn = sctp_sf_unk_chunk, .name = "sctp_sf_unk_chunk"}, 533 TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
537 /* SCTP_STATE_COOKIE_ECHOED */ 534 /* SCTP_STATE_COOKIE_ECHOED */
538 {.fn = sctp_sf_unk_chunk, .name = "sctp_sf_unk_chunk"}, 535 TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
539 /* SCTP_STATE_ESTABLISHED */ 536 /* SCTP_STATE_ESTABLISHED */
540 {.fn = sctp_sf_unk_chunk, .name = "sctp_sf_unk_chunk"}, 537 TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
541 /* SCTP_STATE_SHUTDOWN_PENDING */ 538 /* SCTP_STATE_SHUTDOWN_PENDING */
542 {.fn = sctp_sf_unk_chunk, .name = "sctp_sf_unk_chunk"}, 539 TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
543 /* SCTP_STATE_SHUTDOWN_SENT */ 540 /* SCTP_STATE_SHUTDOWN_SENT */
544 {.fn = sctp_sf_unk_chunk, .name = "sctp_sf_unk_chunk"}, 541 TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
545 /* SCTP_STATE_SHUTDOWN_RECEIVED */ 542 /* SCTP_STATE_SHUTDOWN_RECEIVED */
546 {.fn = sctp_sf_unk_chunk, .name = "sctp_sf_unk_chunk"}, 543 TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
547 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ 544 /* SCTP_STATE_SHUTDOWN_ACK_SENT */
548 {.fn = sctp_sf_unk_chunk, .name = "sctp_sf_unk_chunk"}, 545 TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
549}; /* chunk unknown */ 546}; /* chunk unknown */
550 547
551 548
552#define TYPE_SCTP_PRIMITIVE_ASSOCIATE { \ 549#define TYPE_SCTP_PRIMITIVE_ASSOCIATE { \
553 /* SCTP_STATE_EMPTY */ \ 550 /* SCTP_STATE_EMPTY */ \
554 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 551 TYPE_SCTP_FUNC(sctp_sf_bug), \
555 /* SCTP_STATE_CLOSED */ \ 552 /* SCTP_STATE_CLOSED */ \
556 {.fn = sctp_sf_do_prm_asoc, .name = "sctp_sf_do_prm_asoc"}, \ 553 TYPE_SCTP_FUNC(sctp_sf_do_prm_asoc), \
557 /* SCTP_STATE_COOKIE_WAIT */ \ 554 /* SCTP_STATE_COOKIE_WAIT */ \
558 {.fn = sctp_sf_not_impl, .name = "sctp_sf_not_impl"}, \ 555 TYPE_SCTP_FUNC(sctp_sf_not_impl), \
559 /* SCTP_STATE_COOKIE_ECHOED */ \ 556 /* SCTP_STATE_COOKIE_ECHOED */ \
560 {.fn = sctp_sf_not_impl, .name = "sctp_sf_not_impl"}, \ 557 TYPE_SCTP_FUNC(sctp_sf_not_impl), \
561 /* SCTP_STATE_ESTABLISHED */ \ 558 /* SCTP_STATE_ESTABLISHED */ \
562 {.fn = sctp_sf_not_impl, .name = "sctp_sf_not_impl"}, \ 559 TYPE_SCTP_FUNC(sctp_sf_not_impl), \
563 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 560 /* SCTP_STATE_SHUTDOWN_PENDING */ \
564 {.fn = sctp_sf_not_impl, .name = "sctp_sf_not_impl"}, \ 561 TYPE_SCTP_FUNC(sctp_sf_not_impl), \
565 /* SCTP_STATE_SHUTDOWN_SENT */ \ 562 /* SCTP_STATE_SHUTDOWN_SENT */ \
566 {.fn = sctp_sf_not_impl, .name = "sctp_sf_not_impl"}, \ 563 TYPE_SCTP_FUNC(sctp_sf_not_impl), \
567 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 564 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
568 {.fn = sctp_sf_not_impl, .name = "sctp_sf_not_impl"}, \ 565 TYPE_SCTP_FUNC(sctp_sf_not_impl), \
569 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 566 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
570 {.fn = sctp_sf_not_impl, .name = "sctp_sf_not_impl"}, \ 567 TYPE_SCTP_FUNC(sctp_sf_not_impl), \
571} /* TYPE_SCTP_PRIMITIVE_ASSOCIATE */ 568} /* TYPE_SCTP_PRIMITIVE_ASSOCIATE */
572 569
573#define TYPE_SCTP_PRIMITIVE_SHUTDOWN { \ 570#define TYPE_SCTP_PRIMITIVE_SHUTDOWN { \
574 /* SCTP_STATE_EMPTY */ \ 571 /* SCTP_STATE_EMPTY */ \
575 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 572 TYPE_SCTP_FUNC(sctp_sf_bug), \
576 /* SCTP_STATE_CLOSED */ \ 573 /* SCTP_STATE_CLOSED */ \
577 {.fn = sctp_sf_error_closed, .name = "sctp_sf_error_closed"}, \ 574 TYPE_SCTP_FUNC(sctp_sf_error_closed), \
578 /* SCTP_STATE_COOKIE_WAIT */ \ 575 /* SCTP_STATE_COOKIE_WAIT */ \
579 {.fn = sctp_sf_cookie_wait_prm_shutdown, \ 576 TYPE_SCTP_FUNC(sctp_sf_cookie_wait_prm_shutdown), \
580 .name = "sctp_sf_cookie_wait_prm_shutdown"}, \
581 /* SCTP_STATE_COOKIE_ECHOED */ \ 577 /* SCTP_STATE_COOKIE_ECHOED */ \
582 {.fn = sctp_sf_cookie_echoed_prm_shutdown, \ 578 TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_prm_shutdown),\
583 .name = "sctp_sf_cookie_echoed_prm_shutdown"},\
584 /* SCTP_STATE_ESTABLISHED */ \ 579 /* SCTP_STATE_ESTABLISHED */ \
585 {.fn = sctp_sf_do_9_2_prm_shutdown, \ 580 TYPE_SCTP_FUNC(sctp_sf_do_9_2_prm_shutdown), \
586 .name = "sctp_sf_do_9_2_prm_shutdown"}, \
587 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 581 /* SCTP_STATE_SHUTDOWN_PENDING */ \
588 {.fn = sctp_sf_ignore_primitive, .name = "sctp_sf_ignore_primitive"}, \ 582 TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \
589 /* SCTP_STATE_SHUTDOWN_SENT */ \ 583 /* SCTP_STATE_SHUTDOWN_SENT */ \
590 {.fn = sctp_sf_ignore_primitive, .name = "sctp_sf_ignore_primitive"}, \ 584 TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \
591 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 585 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
592 {.fn = sctp_sf_ignore_primitive, .name = "sctp_sf_ignore_primitive"}, \ 586 TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \
593 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 587 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
594 {.fn = sctp_sf_ignore_primitive, .name = "sctp_sf_ignore_primitive"}, \ 588 TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \
595} /* TYPE_SCTP_PRIMITIVE_SHUTDOWN */ 589} /* TYPE_SCTP_PRIMITIVE_SHUTDOWN */
596 590
597#define TYPE_SCTP_PRIMITIVE_ABORT { \ 591#define TYPE_SCTP_PRIMITIVE_ABORT { \
598 /* SCTP_STATE_EMPTY */ \ 592 /* SCTP_STATE_EMPTY */ \
599 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 593 TYPE_SCTP_FUNC(sctp_sf_bug), \
600 /* SCTP_STATE_CLOSED */ \ 594 /* SCTP_STATE_CLOSED */ \
601 {.fn = sctp_sf_error_closed, .name = "sctp_sf_error_closed"}, \ 595 TYPE_SCTP_FUNC(sctp_sf_error_closed), \
602 /* SCTP_STATE_COOKIE_WAIT */ \ 596 /* SCTP_STATE_COOKIE_WAIT */ \
603 {.fn = sctp_sf_cookie_wait_prm_abort, \ 597 TYPE_SCTP_FUNC(sctp_sf_cookie_wait_prm_abort), \
604 .name = "sctp_sf_cookie_wait_prm_abort"}, \
605 /* SCTP_STATE_COOKIE_ECHOED */ \ 598 /* SCTP_STATE_COOKIE_ECHOED */ \
606 {.fn = sctp_sf_cookie_echoed_prm_abort, \ 599 TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_prm_abort), \
607 .name = "sctp_sf_cookie_echoed_prm_abort"}, \
608 /* SCTP_STATE_ESTABLISHED */ \ 600 /* SCTP_STATE_ESTABLISHED */ \
609 {.fn = sctp_sf_do_9_1_prm_abort, \ 601 TYPE_SCTP_FUNC(sctp_sf_do_9_1_prm_abort), \
610 .name = "sctp_sf_do_9_1_prm_abort"}, \
611 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 602 /* SCTP_STATE_SHUTDOWN_PENDING */ \
612 {.fn = sctp_sf_shutdown_pending_prm_abort, \ 603 TYPE_SCTP_FUNC(sctp_sf_shutdown_pending_prm_abort), \
613 .name = "sctp_sf_shutdown_pending_prm_abort"}, \
614 /* SCTP_STATE_SHUTDOWN_SENT */ \ 604 /* SCTP_STATE_SHUTDOWN_SENT */ \
615 {.fn = sctp_sf_shutdown_sent_prm_abort, \ 605 TYPE_SCTP_FUNC(sctp_sf_shutdown_sent_prm_abort), \
616 .name = "sctp_sf_shutdown_sent_prm_abort"}, \
617 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 606 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
618 {.fn = sctp_sf_do_9_1_prm_abort, \ 607 TYPE_SCTP_FUNC(sctp_sf_do_9_1_prm_abort), \
619 .name = "sctp_sf_do_9_1_prm_abort"}, \
620 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 608 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
621 {.fn = sctp_sf_shutdown_ack_sent_prm_abort, \ 609 TYPE_SCTP_FUNC(sctp_sf_shutdown_ack_sent_prm_abort), \
622 .name = "sctp_sf_shutdown_ack_sent_prm_abort"}, \
623} /* TYPE_SCTP_PRIMITIVE_ABORT */ 610} /* TYPE_SCTP_PRIMITIVE_ABORT */
624 611
625#define TYPE_SCTP_PRIMITIVE_SEND { \ 612#define TYPE_SCTP_PRIMITIVE_SEND { \
626 /* SCTP_STATE_EMPTY */ \ 613 /* SCTP_STATE_EMPTY */ \
627 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 614 TYPE_SCTP_FUNC(sctp_sf_bug), \
628 /* SCTP_STATE_CLOSED */ \ 615 /* SCTP_STATE_CLOSED */ \
629 {.fn = sctp_sf_error_closed, .name = "sctp_sf_error_closed"}, \ 616 TYPE_SCTP_FUNC(sctp_sf_error_closed), \
630 /* SCTP_STATE_COOKIE_WAIT */ \ 617 /* SCTP_STATE_COOKIE_WAIT */ \
631 {.fn = sctp_sf_do_prm_send, .name = "sctp_sf_do_prm_send"}, \ 618 TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \
632 /* SCTP_STATE_COOKIE_ECHOED */ \ 619 /* SCTP_STATE_COOKIE_ECHOED */ \
633 {.fn = sctp_sf_do_prm_send, .name = "sctp_sf_do_prm_send"}, \ 620 TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \
634 /* SCTP_STATE_ESTABLISHED */ \ 621 /* SCTP_STATE_ESTABLISHED */ \
635 {.fn = sctp_sf_do_prm_send, .name = "sctp_sf_do_prm_send"}, \ 622 TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \
636 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 623 /* SCTP_STATE_SHUTDOWN_PENDING */ \
637 {.fn = sctp_sf_error_shutdown, .name = "sctp_sf_error_shutdown"}, \ 624 TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
638 /* SCTP_STATE_SHUTDOWN_SENT */ \ 625 /* SCTP_STATE_SHUTDOWN_SENT */ \
639 {.fn = sctp_sf_error_shutdown, .name = "sctp_sf_error_shutdown"}, \ 626 TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
640 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 627 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
641 {.fn = sctp_sf_error_shutdown, .name = "sctp_sf_error_shutdown"}, \ 628 TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
642 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 629 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
643 {.fn = sctp_sf_error_shutdown, .name = "sctp_sf_error_shutdown"}, \ 630 TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
644} /* TYPE_SCTP_PRIMITIVE_SEND */ 631} /* TYPE_SCTP_PRIMITIVE_SEND */
645 632
646#define TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT { \ 633#define TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT { \
647 /* SCTP_STATE_EMPTY */ \ 634 /* SCTP_STATE_EMPTY */ \
648 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 635 TYPE_SCTP_FUNC(sctp_sf_bug), \
649 /* SCTP_STATE_CLOSED */ \ 636 /* SCTP_STATE_CLOSED */ \
650 {.fn = sctp_sf_error_closed, .name = "sctp_sf_error_closed"}, \ 637 TYPE_SCTP_FUNC(sctp_sf_error_closed), \
651 /* SCTP_STATE_COOKIE_WAIT */ \ 638 /* SCTP_STATE_COOKIE_WAIT */ \
652 {.fn = sctp_sf_do_prm_requestheartbeat, \ 639 TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \
653 .name = "sctp_sf_do_prm_requestheartbeat"}, \
654 /* SCTP_STATE_COOKIE_ECHOED */ \ 640 /* SCTP_STATE_COOKIE_ECHOED */ \
655 {.fn = sctp_sf_do_prm_requestheartbeat, \ 641 TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \
656 .name = "sctp_sf_do_prm_requestheartbeat"}, \
657 /* SCTP_STATE_ESTABLISHED */ \ 642 /* SCTP_STATE_ESTABLISHED */ \
658 {.fn = sctp_sf_do_prm_requestheartbeat, \ 643 TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \
659 .name = "sctp_sf_do_prm_requestheartbeat"}, \
660 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 644 /* SCTP_STATE_SHUTDOWN_PENDING */ \
661 {.fn = sctp_sf_do_prm_requestheartbeat, \ 645 TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \
662 .name = "sctp_sf_do_prm_requestheartbeat"}, \
663 /* SCTP_STATE_SHUTDOWN_SENT */ \ 646 /* SCTP_STATE_SHUTDOWN_SENT */ \
664 {.fn = sctp_sf_do_prm_requestheartbeat, \ 647 TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \
665 .name = "sctp_sf_do_prm_requestheartbeat"}, \
666 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 648 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
667 {.fn = sctp_sf_do_prm_requestheartbeat, \ 649 TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \
668 .name = "sctp_sf_do_prm_requestheartbeat"}, \
669 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 650 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
670 {.fn = sctp_sf_do_prm_requestheartbeat, \ 651 TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \
671 .name = "sctp_sf_do_prm_requestheartbeat"}, \
672} /* TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT */ 652} /* TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT */
673 653
674#define TYPE_SCTP_PRIMITIVE_ASCONF { \ 654#define TYPE_SCTP_PRIMITIVE_ASCONF { \
675 /* SCTP_STATE_EMPTY */ \ 655 /* SCTP_STATE_EMPTY */ \
676 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 656 TYPE_SCTP_FUNC(sctp_sf_bug), \
677 /* SCTP_STATE_CLOSED */ \ 657 /* SCTP_STATE_CLOSED */ \
678 {.fn = sctp_sf_error_closed, .name = "sctp_sf_error_closed"}, \ 658 TYPE_SCTP_FUNC(sctp_sf_error_closed), \
679 /* SCTP_STATE_COOKIE_WAIT */ \ 659 /* SCTP_STATE_COOKIE_WAIT */ \
680 {.fn = sctp_sf_error_closed, .name = "sctp_sf_error_closed"}, \ 660 TYPE_SCTP_FUNC(sctp_sf_error_closed), \
681 /* SCTP_STATE_COOKIE_ECHOED */ \ 661 /* SCTP_STATE_COOKIE_ECHOED */ \
682 {.fn = sctp_sf_error_closed, .name = "sctp_sf_error_closed"}, \ 662 TYPE_SCTP_FUNC(sctp_sf_error_closed), \
683 /* SCTP_STATE_ESTABLISHED */ \ 663 /* SCTP_STATE_ESTABLISHED */ \
684 {.fn = sctp_sf_do_prm_asconf, .name = "sctp_sf_do_prm_asconf"}, \ 664 TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \
685 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 665 /* SCTP_STATE_SHUTDOWN_PENDING */ \
686 {.fn = sctp_sf_error_shutdown, .name = "sctp_sf_error_shutdown"}, \ 666 TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
687 /* SCTP_STATE_SHUTDOWN_SENT */ \ 667 /* SCTP_STATE_SHUTDOWN_SENT */ \
688 {.fn = sctp_sf_error_shutdown, .name = "sctp_sf_error_shutdown"}, \ 668 TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
689 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 669 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
690 {.fn = sctp_sf_error_shutdown, .name = "sctp_sf_error_shutdown"}, \ 670 TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
691 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 671 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
692 {.fn = sctp_sf_error_shutdown, .name = "sctp_sf_error_shutdown"}, \ 672 TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
693} /* TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT */ 673} /* TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT */
694 674
695/* The primary index for this table is the primitive type. 675/* The primary index for this table is the primitive type.
@@ -706,47 +686,44 @@ static const sctp_sm_table_entry_t primitive_event_table[SCTP_NUM_PRIMITIVE_TYPE
706 686
707#define TYPE_SCTP_OTHER_NO_PENDING_TSN { \ 687#define TYPE_SCTP_OTHER_NO_PENDING_TSN { \
708 /* SCTP_STATE_EMPTY */ \ 688 /* SCTP_STATE_EMPTY */ \
709 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 689 TYPE_SCTP_FUNC(sctp_sf_bug), \
710 /* SCTP_STATE_CLOSED */ \ 690 /* SCTP_STATE_CLOSED */ \
711 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 691 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
712 /* SCTP_STATE_COOKIE_WAIT */ \ 692 /* SCTP_STATE_COOKIE_WAIT */ \
713 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 693 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
714 /* SCTP_STATE_COOKIE_ECHOED */ \ 694 /* SCTP_STATE_COOKIE_ECHOED */ \
715 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 695 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
716 /* SCTP_STATE_ESTABLISHED */ \ 696 /* SCTP_STATE_ESTABLISHED */ \
717 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 697 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
718 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 698 /* SCTP_STATE_SHUTDOWN_PENDING */ \
719 {.fn = sctp_sf_do_9_2_start_shutdown, \ 699 TYPE_SCTP_FUNC(sctp_sf_do_9_2_start_shutdown), \
720 .name = "sctp_do_9_2_start_shutdown"}, \
721 /* SCTP_STATE_SHUTDOWN_SENT */ \ 700 /* SCTP_STATE_SHUTDOWN_SENT */ \
722 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 701 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
723 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 702 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
724 {.fn = sctp_sf_do_9_2_shutdown_ack, \ 703 TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown_ack), \
725 .name = "sctp_sf_do_9_2_shutdown_ack"}, \
726 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 704 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
727 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 705 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
728} 706}
729 707
730#define TYPE_SCTP_OTHER_ICMP_PROTO_UNREACH { \ 708#define TYPE_SCTP_OTHER_ICMP_PROTO_UNREACH { \
731 /* SCTP_STATE_EMPTY */ \ 709 /* SCTP_STATE_EMPTY */ \
732 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 710 TYPE_SCTP_FUNC(sctp_sf_bug), \
733 /* SCTP_STATE_CLOSED */ \ 711 /* SCTP_STATE_CLOSED */ \
734 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 712 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
735 /* SCTP_STATE_COOKIE_WAIT */ \ 713 /* SCTP_STATE_COOKIE_WAIT */ \
736 {.fn = sctp_sf_cookie_wait_icmp_abort, \ 714 TYPE_SCTP_FUNC(sctp_sf_cookie_wait_icmp_abort), \
737 .name = "sctp_sf_cookie_wait_icmp_abort"}, \
738 /* SCTP_STATE_COOKIE_ECHOED */ \ 715 /* SCTP_STATE_COOKIE_ECHOED */ \
739 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 716 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
740 /* SCTP_STATE_ESTABLISHED */ \ 717 /* SCTP_STATE_ESTABLISHED */ \
741 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 718 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
742 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 719 /* SCTP_STATE_SHUTDOWN_PENDING */ \
743 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 720 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
744 /* SCTP_STATE_SHUTDOWN_SENT */ \ 721 /* SCTP_STATE_SHUTDOWN_SENT */ \
745 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 722 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
746 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 723 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
747 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 724 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
748 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 725 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
749 {.fn = sctp_sf_ignore_other, .name = "sctp_sf_ignore_other"}, \ 726 TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
750} 727}
751 728
752static const sctp_sm_table_entry_t other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES] = { 729static const sctp_sm_table_entry_t other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES] = {
@@ -756,215 +733,212 @@ static const sctp_sm_table_entry_t other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_
756 733
757#define TYPE_SCTP_EVENT_TIMEOUT_NONE { \ 734#define TYPE_SCTP_EVENT_TIMEOUT_NONE { \
758 /* SCTP_STATE_EMPTY */ \ 735 /* SCTP_STATE_EMPTY */ \
759 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 736 TYPE_SCTP_FUNC(sctp_sf_bug), \
760 /* SCTP_STATE_CLOSED */ \ 737 /* SCTP_STATE_CLOSED */ \
761 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 738 TYPE_SCTP_FUNC(sctp_sf_bug), \
762 /* SCTP_STATE_COOKIE_WAIT */ \ 739 /* SCTP_STATE_COOKIE_WAIT */ \
763 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 740 TYPE_SCTP_FUNC(sctp_sf_bug), \
764 /* SCTP_STATE_COOKIE_ECHOED */ \ 741 /* SCTP_STATE_COOKIE_ECHOED */ \
765 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 742 TYPE_SCTP_FUNC(sctp_sf_bug), \
766 /* SCTP_STATE_ESTABLISHED */ \ 743 /* SCTP_STATE_ESTABLISHED */ \
767 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 744 TYPE_SCTP_FUNC(sctp_sf_bug), \
768 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 745 /* SCTP_STATE_SHUTDOWN_PENDING */ \
769 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 746 TYPE_SCTP_FUNC(sctp_sf_bug), \
770 /* SCTP_STATE_SHUTDOWN_SENT */ \ 747 /* SCTP_STATE_SHUTDOWN_SENT */ \
771 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 748 TYPE_SCTP_FUNC(sctp_sf_bug), \
772 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 749 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
773 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 750 TYPE_SCTP_FUNC(sctp_sf_bug), \
774 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 751 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
775 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 752 TYPE_SCTP_FUNC(sctp_sf_bug), \
776} 753}
777 754
778#define TYPE_SCTP_EVENT_TIMEOUT_T1_COOKIE { \ 755#define TYPE_SCTP_EVENT_TIMEOUT_T1_COOKIE { \
779 /* SCTP_STATE_EMPTY */ \ 756 /* SCTP_STATE_EMPTY */ \
780 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 757 TYPE_SCTP_FUNC(sctp_sf_bug), \
781 /* SCTP_STATE_CLOSED */ \ 758 /* SCTP_STATE_CLOSED */ \
782 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 759 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
783 /* SCTP_STATE_COOKIE_WAIT */ \ 760 /* SCTP_STATE_COOKIE_WAIT */ \
784 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 761 TYPE_SCTP_FUNC(sctp_sf_bug), \
785 /* SCTP_STATE_COOKIE_ECHOED */ \ 762 /* SCTP_STATE_COOKIE_ECHOED */ \
786 {.fn = sctp_sf_t1_cookie_timer_expire, \ 763 TYPE_SCTP_FUNC(sctp_sf_t1_cookie_timer_expire), \
787 .name = "sctp_sf_t1_cookie_timer_expire"}, \
788 /* SCTP_STATE_ESTABLISHED */ \ 764 /* SCTP_STATE_ESTABLISHED */ \
789 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 765 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
790 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 766 /* SCTP_STATE_SHUTDOWN_PENDING */ \
791 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 767 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
792 /* SCTP_STATE_SHUTDOWN_SENT */ \ 768 /* SCTP_STATE_SHUTDOWN_SENT */ \
793 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 769 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
794 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 770 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
795 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 771 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
796 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 772 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
797 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 773 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
798} 774}
799 775
800#define TYPE_SCTP_EVENT_TIMEOUT_T1_INIT { \ 776#define TYPE_SCTP_EVENT_TIMEOUT_T1_INIT { \
801 /* SCTP_STATE_EMPTY */ \ 777 /* SCTP_STATE_EMPTY */ \
802 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 778 TYPE_SCTP_FUNC(sctp_sf_bug), \
803 /* SCTP_STATE_CLOSED */ \ 779 /* SCTP_STATE_CLOSED */ \
804 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 780 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
805 /* SCTP_STATE_COOKIE_WAIT */ \ 781 /* SCTP_STATE_COOKIE_WAIT */ \
806 {.fn = sctp_sf_t1_init_timer_expire, \ 782 TYPE_SCTP_FUNC(sctp_sf_t1_init_timer_expire), \
807 .name = "sctp_sf_t1_init_timer_expire"}, \
808 /* SCTP_STATE_COOKIE_ECHOED */ \ 783 /* SCTP_STATE_COOKIE_ECHOED */ \
809 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 784 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
810 /* SCTP_STATE_ESTABLISHED */ \ 785 /* SCTP_STATE_ESTABLISHED */ \
811 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 786 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
812 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 787 /* SCTP_STATE_SHUTDOWN_PENDING */ \
813 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 788 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
814 /* SCTP_STATE_SHUTDOWN_SENT */ \ 789 /* SCTP_STATE_SHUTDOWN_SENT */ \
815 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 790 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
816 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 791 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
817 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 792 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
818 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 793 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
819 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 794 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
820} 795}
821 796
822#define TYPE_SCTP_EVENT_TIMEOUT_T2_SHUTDOWN { \ 797#define TYPE_SCTP_EVENT_TIMEOUT_T2_SHUTDOWN { \
823 /* SCTP_STATE_EMPTY */ \ 798 /* SCTP_STATE_EMPTY */ \
824 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 799 TYPE_SCTP_FUNC(sctp_sf_bug), \
825 /* SCTP_STATE_CLOSED */ \ 800 /* SCTP_STATE_CLOSED */ \
826 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 801 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
827 /* SCTP_STATE_COOKIE_WAIT */ \ 802 /* SCTP_STATE_COOKIE_WAIT */ \
828 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 803 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
829 /* SCTP_STATE_COOKIE_ECHOED */ \ 804 /* SCTP_STATE_COOKIE_ECHOED */ \
830 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 805 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
831 /* SCTP_STATE_ESTABLISHED */ \ 806 /* SCTP_STATE_ESTABLISHED */ \
832 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 807 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
833 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 808 /* SCTP_STATE_SHUTDOWN_PENDING */ \
834 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 809 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
835 /* SCTP_STATE_SHUTDOWN_SENT */ \ 810 /* SCTP_STATE_SHUTDOWN_SENT */ \
836 {.fn = sctp_sf_t2_timer_expire, .name = "sctp_sf_t2_timer_expire"}, \ 811 TYPE_SCTP_FUNC(sctp_sf_t2_timer_expire), \
837 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 812 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
838 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 813 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
839 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 814 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
840 {.fn = sctp_sf_t2_timer_expire, .name = "sctp_sf_t2_timer_expire"}, \ 815 TYPE_SCTP_FUNC(sctp_sf_t2_timer_expire), \
841} 816}
842 817
843#define TYPE_SCTP_EVENT_TIMEOUT_T3_RTX { \ 818#define TYPE_SCTP_EVENT_TIMEOUT_T3_RTX { \
844 /* SCTP_STATE_EMPTY */ \ 819 /* SCTP_STATE_EMPTY */ \
845 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 820 TYPE_SCTP_FUNC(sctp_sf_bug), \
846 /* SCTP_STATE_CLOSED */ \ 821 /* SCTP_STATE_CLOSED */ \
847 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 822 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
848 /* SCTP_STATE_COOKIE_WAIT */ \ 823 /* SCTP_STATE_COOKIE_WAIT */ \
849 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 824 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
850 /* SCTP_STATE_COOKIE_ECHOED */ \ 825 /* SCTP_STATE_COOKIE_ECHOED */ \
851 {.fn = sctp_sf_do_6_3_3_rtx, .name = "sctp_sf_do_6_3_3_rtx"}, \ 826 TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \
852 /* SCTP_STATE_ESTABLISHED */ \ 827 /* SCTP_STATE_ESTABLISHED */ \
853 {.fn = sctp_sf_do_6_3_3_rtx, .name = "sctp_sf_do_6_3_3_rtx"}, \ 828 TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \
854 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 829 /* SCTP_STATE_SHUTDOWN_PENDING */ \
855 {.fn = sctp_sf_do_6_3_3_rtx, .name = "sctp_sf_do_6_3_3_rtx"}, \ 830 TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \
856 /* SCTP_STATE_SHUTDOWN_SENT */ \ 831 /* SCTP_STATE_SHUTDOWN_SENT */ \
857 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 832 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
858 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 833 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
859 {.fn = sctp_sf_do_6_3_3_rtx, .name = "sctp_sf_do_6_3_3_rtx"}, \ 834 TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \
860 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 835 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
861 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 836 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
862} 837}
863 838
864#define TYPE_SCTP_EVENT_TIMEOUT_T4_RTO { \ 839#define TYPE_SCTP_EVENT_TIMEOUT_T4_RTO { \
865 /* SCTP_STATE_EMPTY */ \ 840 /* SCTP_STATE_EMPTY */ \
866 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 841 TYPE_SCTP_FUNC(sctp_sf_bug), \
867 /* SCTP_STATE_CLOSED */ \ 842 /* SCTP_STATE_CLOSED */ \
868 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 843 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
869 /* SCTP_STATE_COOKIE_WAIT */ \ 844 /* SCTP_STATE_COOKIE_WAIT */ \
870 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 845 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
871 /* SCTP_STATE_COOKIE_ECHOED */ \ 846 /* SCTP_STATE_COOKIE_ECHOED */ \
872 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 847 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
873 /* SCTP_STATE_ESTABLISHED */ \ 848 /* SCTP_STATE_ESTABLISHED */ \
874 {.fn = sctp_sf_t4_timer_expire, .name = "sctp_sf_t4_timer_expire"}, \ 849 TYPE_SCTP_FUNC(sctp_sf_t4_timer_expire), \
875 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 850 /* SCTP_STATE_SHUTDOWN_PENDING */ \
876 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 851 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
877 /* SCTP_STATE_SHUTDOWN_SENT */ \ 852 /* SCTP_STATE_SHUTDOWN_SENT */ \
878 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 853 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
879 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 854 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
880 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 855 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
881 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 856 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
882 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 857 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
883} 858}
884 859
885#define TYPE_SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD { \ 860#define TYPE_SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD { \
886 /* SCTP_STATE_EMPTY */ \ 861 /* SCTP_STATE_EMPTY */ \
887 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 862 TYPE_SCTP_FUNC(sctp_sf_bug), \
888 /* SCTP_STATE_CLOSED */ \ 863 /* SCTP_STATE_CLOSED */ \
889 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 864 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
890 /* SCTP_STATE_COOKIE_WAIT */ \ 865 /* SCTP_STATE_COOKIE_WAIT */ \
891 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 866 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
892 /* SCTP_STATE_COOKIE_ECHOED */ \ 867 /* SCTP_STATE_COOKIE_ECHOED */ \
893 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 868 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
894 /* SCTP_STATE_ESTABLISHED */ \ 869 /* SCTP_STATE_ESTABLISHED */ \
895 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 870 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
896 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 871 /* SCTP_STATE_SHUTDOWN_PENDING */ \
897 {.fn = sctp_sf_t5_timer_expire, .name = "sctp_sf_t5_timer_expire"}, \ 872 TYPE_SCTP_FUNC(sctp_sf_t5_timer_expire), \
898 /* SCTP_STATE_SHUTDOWN_SENT */ \ 873 /* SCTP_STATE_SHUTDOWN_SENT */ \
899 {.fn = sctp_sf_t5_timer_expire, .name = "sctp_sf_t5_timer_expire"}, \ 874 TYPE_SCTP_FUNC(sctp_sf_t5_timer_expire), \
900 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 875 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
901 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 876 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
902 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 877 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
903 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 878 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
904} 879}
905 880
906#define TYPE_SCTP_EVENT_TIMEOUT_HEARTBEAT { \ 881#define TYPE_SCTP_EVENT_TIMEOUT_HEARTBEAT { \
907 /* SCTP_STATE_EMPTY */ \ 882 /* SCTP_STATE_EMPTY */ \
908 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 883 TYPE_SCTP_FUNC(sctp_sf_bug), \
909 /* SCTP_STATE_CLOSED */ \ 884 /* SCTP_STATE_CLOSED */ \
910 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 885 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
911 /* SCTP_STATE_COOKIE_WAIT */ \ 886 /* SCTP_STATE_COOKIE_WAIT */ \
912 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 887 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
913 /* SCTP_STATE_COOKIE_ECHOED */ \ 888 /* SCTP_STATE_COOKIE_ECHOED */ \
914 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 889 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
915 /* SCTP_STATE_ESTABLISHED */ \ 890 /* SCTP_STATE_ESTABLISHED */ \
916 {.fn = sctp_sf_sendbeat_8_3, .name = "sctp_sf_sendbeat_8_3"}, \ 891 TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \
917 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 892 /* SCTP_STATE_SHUTDOWN_PENDING */ \
918 {.fn = sctp_sf_sendbeat_8_3, .name = "sctp_sf_sendbeat_8_3"}, \ 893 TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \
919 /* SCTP_STATE_SHUTDOWN_SENT */ \ 894 /* SCTP_STATE_SHUTDOWN_SENT */ \
920 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 895 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
921 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 896 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
922 {.fn = sctp_sf_sendbeat_8_3, .name = "sctp_sf_sendbeat_8_3"}, \ 897 TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \
923 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 898 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
924 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 899 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
925} 900}
926 901
927#define TYPE_SCTP_EVENT_TIMEOUT_SACK { \ 902#define TYPE_SCTP_EVENT_TIMEOUT_SACK { \
928 /* SCTP_STATE_EMPTY */ \ 903 /* SCTP_STATE_EMPTY */ \
929 {.fn = sctp_sf_bug, .name = "sctp_sf_bug"}, \ 904 TYPE_SCTP_FUNC(sctp_sf_bug), \
930 /* SCTP_STATE_CLOSED */ \ 905 /* SCTP_STATE_CLOSED */ \
931 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 906 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
932 /* SCTP_STATE_COOKIE_WAIT */ \ 907 /* SCTP_STATE_COOKIE_WAIT */ \
933 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 908 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
934 /* SCTP_STATE_COOKIE_ECHOED */ \ 909 /* SCTP_STATE_COOKIE_ECHOED */ \
935 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 910 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
936 /* SCTP_STATE_ESTABLISHED */ \ 911 /* SCTP_STATE_ESTABLISHED */ \
937 {.fn = sctp_sf_do_6_2_sack, .name = "sctp_sf_do_6_2_sack"}, \ 912 TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \
938 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 913 /* SCTP_STATE_SHUTDOWN_PENDING */ \
939 {.fn = sctp_sf_do_6_2_sack, .name = "sctp_sf_do_6_2_sack"}, \ 914 TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \
940 /* SCTP_STATE_SHUTDOWN_SENT */ \ 915 /* SCTP_STATE_SHUTDOWN_SENT */ \
941 {.fn = sctp_sf_do_6_2_sack, .name = "sctp_sf_do_6_2_sack"}, \ 916 TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \
942 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 917 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
943 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 918 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
944 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 919 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
945 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 920 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
946} 921}
947 922
948#define TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE { \ 923#define TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE { \
949 /* SCTP_STATE_EMPTY */ \ 924 /* SCTP_STATE_EMPTY */ \
950 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 925 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
951 /* SCTP_STATE_CLOSED */ \ 926 /* SCTP_STATE_CLOSED */ \
952 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 927 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
953 /* SCTP_STATE_COOKIE_WAIT */ \ 928 /* SCTP_STATE_COOKIE_WAIT */ \
954 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 929 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
955 /* SCTP_STATE_COOKIE_ECHOED */ \ 930 /* SCTP_STATE_COOKIE_ECHOED */ \
956 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 931 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
957 /* SCTP_STATE_ESTABLISHED */ \ 932 /* SCTP_STATE_ESTABLISHED */ \
958 {.fn = sctp_sf_autoclose_timer_expire, \ 933 TYPE_SCTP_FUNC(sctp_sf_autoclose_timer_expire), \
959 .name = "sctp_sf_autoclose_timer_expire"}, \
960 /* SCTP_STATE_SHUTDOWN_PENDING */ \ 934 /* SCTP_STATE_SHUTDOWN_PENDING */ \
961 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 935 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
962 /* SCTP_STATE_SHUTDOWN_SENT */ \ 936 /* SCTP_STATE_SHUTDOWN_SENT */ \
963 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 937 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
964 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ 938 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
965 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 939 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
966 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ 940 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
967 {.fn = sctp_sf_timer_ignore, .name = "sctp_sf_timer_ignore"}, \ 941 TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
968} 942}
969 943
970static const sctp_sm_table_entry_t timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES] = { 944static const sctp_sm_table_entry_t timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES] = {