Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* SCTP kernel reference Implementation |
| 2 | * (C) Copyright IBM Corp. 2001, 2004 |
| 3 | * Copyright (c) 1999-2000 Cisco, Inc. |
| 4 | * Copyright (c) 1999-2001 Motorola, Inc. |
| 5 | * Copyright (c) 2001 Intel Corp. |
| 6 | * Copyright (c) 2001 Nokia, Inc. |
| 7 | * |
| 8 | * This file is part of the SCTP kernel reference Implementation |
| 9 | * |
| 10 | * These are the state tables for the SCTP state machine. |
| 11 | * |
| 12 | * The SCTP reference implementation is free software; |
| 13 | * you can redistribute it and/or modify it under the terms of |
| 14 | * the GNU General Public License as published by |
| 15 | * the Free Software Foundation; either version 2, or (at your option) |
| 16 | * any later version. |
| 17 | * |
| 18 | * The SCTP reference implementation is distributed in the hope that it |
| 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
| 20 | * ************************ |
| 21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 22 | * See the GNU General Public License for more details. |
| 23 | * |
| 24 | * You should have received a copy of the GNU General Public License |
| 25 | * along with GNU CC; see the file COPYING. If not, write to |
| 26 | * the Free Software Foundation, 59 Temple Place - Suite 330, |
| 27 | * Boston, MA 02111-1307, USA. |
| 28 | * |
| 29 | * Please send any bug reports or fixes you make to the |
| 30 | * email address(es): |
| 31 | * lksctp developers <lksctp-developers@lists.sourceforge.net> |
| 32 | * |
| 33 | * Or submit a bug report through the following website: |
| 34 | * http://www.sf.net/projects/lksctp |
| 35 | * |
| 36 | * Written or modified by: |
| 37 | * La Monte H.P. Yarroll <piggy@acm.org> |
| 38 | * Karl Knutson <karl@athena.chicago.il.us> |
| 39 | * Jon Grimm <jgrimm@us.ibm.com> |
| 40 | * Hui Huang <hui.huang@nokia.com> |
| 41 | * Daisy Chang <daisyc@us.ibm.com> |
| 42 | * Ardelle Fan <ardelle.fan@intel.com> |
| 43 | * Sridhar Samudrala <sri@us.ibm.com> |
| 44 | * |
| 45 | * Any bugs reported given to us we will try to fix... any fixes shared will |
| 46 | * be incorporated into the next SCTP release. |
| 47 | */ |
| 48 | |
| 49 | #include <linux/skbuff.h> |
| 50 | #include <net/sctp/sctp.h> |
| 51 | #include <net/sctp/sm.h> |
| 52 | |
| 53 | static const sctp_sm_table_entry_t |
| 54 | primitive_event_table[SCTP_NUM_PRIMITIVE_TYPES][SCTP_STATE_NUM_STATES]; |
| 55 | static const sctp_sm_table_entry_t |
| 56 | other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES]; |
| 57 | static const sctp_sm_table_entry_t |
| 58 | timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES]; |
| 59 | |
| 60 | static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(sctp_cid_t cid, |
| 61 | sctp_state_t state); |
| 62 | |
| 63 | |
| 64 | static const sctp_sm_table_entry_t bug = { |
| 65 | .fn = sctp_sf_bug, |
| 66 | .name = "sctp_sf_bug" |
| 67 | }; |
| 68 | |
| 69 | #define DO_LOOKUP(_max, _type, _table) \ |
| 70 | if ((event_subtype._type > (_max))) { \ |
| 71 | printk(KERN_WARNING \ |
| 72 | "sctp table %p possible attack:" \ |
| 73 | " event %d exceeds max %d\n", \ |
| 74 | _table, event_subtype._type, _max); \ |
| 75 | return &bug; \ |
| 76 | } \ |
| 77 | return &_table[event_subtype._type][(int)state]; |
| 78 | |
| 79 | const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type, |
| 80 | sctp_state_t state, |
| 81 | sctp_subtype_t event_subtype) |
| 82 | { |
| 83 | switch (event_type) { |
| 84 | case SCTP_EVENT_T_CHUNK: |
| 85 | return sctp_chunk_event_lookup(event_subtype.chunk, state); |
| 86 | break; |
| 87 | case SCTP_EVENT_T_TIMEOUT: |
| 88 | DO_LOOKUP(SCTP_EVENT_TIMEOUT_MAX, timeout, |
| 89 | timeout_event_table); |
| 90 | break; |
| 91 | |
| 92 | case SCTP_EVENT_T_OTHER: |
| 93 | DO_LOOKUP(SCTP_EVENT_OTHER_MAX, other, other_event_table); |
| 94 | break; |
| 95 | |
| 96 | case SCTP_EVENT_T_PRIMITIVE: |
| 97 | DO_LOOKUP(SCTP_EVENT_PRIMITIVE_MAX, primitive, |
| 98 | primitive_event_table); |
| 99 | break; |
| 100 | |
| 101 | default: |
| 102 | /* Yikes! We got an illegal event type. */ |
| 103 | return &bug; |
Stephen Hemminger | 3ff50b7 | 2007-04-20 17:09:22 -0700 | [diff] [blame] | 104 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | } |
| 106 | |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 107 | #define TYPE_SCTP_FUNC(func) {.fn = func, .name = #func} |
| 108 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 109 | #define TYPE_SCTP_DATA { \ |
| 110 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 111 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 112 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 113 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 114 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 115 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 117 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 118 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 119 | TYPE_SCTP_FUNC(sctp_sf_eat_data_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 120 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 121 | TYPE_SCTP_FUNC(sctp_sf_eat_data_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 123 | TYPE_SCTP_FUNC(sctp_sf_eat_data_fast_4_4), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 124 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 125 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 127 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 128 | } /* TYPE_SCTP_DATA */ |
| 129 | |
| 130 | #define TYPE_SCTP_INIT { \ |
| 131 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 132 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 133 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 134 | TYPE_SCTP_FUNC(sctp_sf_do_5_1B_init), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 135 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 136 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_1_siminit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 137 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 138 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_1_siminit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 139 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 140 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 141 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 142 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 143 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 144 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 145 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 146 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 147 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 148 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_reshutack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 149 | } /* TYPE_SCTP_INIT */ |
| 150 | |
| 151 | #define TYPE_SCTP_INIT_ACK { \ |
| 152 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 153 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 154 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | 610ab73 | 2007-01-15 19:18:30 -0800 | [diff] [blame] | 155 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_3_initack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 156 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 157 | TYPE_SCTP_FUNC(sctp_sf_do_5_1C_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 158 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 159 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 160 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 161 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 163 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 164 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 165 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 166 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 167 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 168 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 169 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 170 | } /* TYPE_SCTP_INIT_ACK */ |
| 171 | |
| 172 | #define TYPE_SCTP_SACK { \ |
| 173 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 174 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 175 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 176 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 177 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 178 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 179 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 180 | TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 181 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 182 | TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 183 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 184 | TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 185 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 186 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 187 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 188 | TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 190 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 191 | } /* TYPE_SCTP_SACK */ |
| 192 | |
| 193 | #define TYPE_SCTP_HEARTBEAT { \ |
| 194 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 195 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 196 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 197 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 198 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 199 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 200 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 201 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 202 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 203 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 204 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 205 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 206 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 207 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 208 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 209 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 210 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
| 211 | /* This should not happen, but we are nice. */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 212 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 213 | } /* TYPE_SCTP_HEARTBEAT */ |
| 214 | |
| 215 | #define TYPE_SCTP_HEARTBEAT_ACK { \ |
| 216 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 217 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 218 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 219 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 220 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 221 | TYPE_SCTP_FUNC(sctp_sf_violation), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 222 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 223 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 224 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 225 | TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 226 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 227 | TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 228 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 229 | TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 230 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 231 | TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 232 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 233 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 234 | } /* TYPE_SCTP_HEARTBEAT_ACK */ |
| 235 | |
| 236 | #define TYPE_SCTP_ABORT { \ |
| 237 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 238 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 239 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 240 | TYPE_SCTP_FUNC(sctp_sf_pdiscard), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 241 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 242 | TYPE_SCTP_FUNC(sctp_sf_cookie_wait_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 243 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 244 | TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 245 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 246 | TYPE_SCTP_FUNC(sctp_sf_do_9_1_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 247 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 248 | TYPE_SCTP_FUNC(sctp_sf_shutdown_pending_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 249 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 250 | TYPE_SCTP_FUNC(sctp_sf_shutdown_sent_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 251 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 252 | TYPE_SCTP_FUNC(sctp_sf_do_9_1_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 253 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 254 | TYPE_SCTP_FUNC(sctp_sf_shutdown_ack_sent_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 255 | } /* TYPE_SCTP_ABORT */ |
| 256 | |
| 257 | #define TYPE_SCTP_SHUTDOWN { \ |
| 258 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 259 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 260 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 261 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 262 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 263 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 264 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 265 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 266 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 267 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 268 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 269 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 270 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 271 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 272 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 273 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 274 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 275 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 276 | } /* TYPE_SCTP_SHUTDOWN */ |
| 277 | |
| 278 | #define TYPE_SCTP_SHUTDOWN_ACK { \ |
| 279 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 280 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 281 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 282 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 283 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 284 | TYPE_SCTP_FUNC(sctp_sf_do_8_5_1_E_sa), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 285 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 286 | TYPE_SCTP_FUNC(sctp_sf_do_8_5_1_E_sa), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 287 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 288 | TYPE_SCTP_FUNC(sctp_sf_violation), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 289 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 290 | TYPE_SCTP_FUNC(sctp_sf_violation), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 291 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 292 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_final), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 293 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 294 | TYPE_SCTP_FUNC(sctp_sf_violation), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 295 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 296 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_final), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 297 | } /* TYPE_SCTP_SHUTDOWN_ACK */ |
| 298 | |
| 299 | #define TYPE_SCTP_ERROR { \ |
| 300 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 301 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 302 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 303 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 304 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 305 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 306 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 307 | TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_err), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 308 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 309 | TYPE_SCTP_FUNC(sctp_sf_operr_notify), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 310 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 311 | TYPE_SCTP_FUNC(sctp_sf_operr_notify), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 312 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 313 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 314 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 315 | TYPE_SCTP_FUNC(sctp_sf_operr_notify), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 316 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 317 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 318 | } /* TYPE_SCTP_ERROR */ |
| 319 | |
| 320 | #define TYPE_SCTP_COOKIE_ECHO { \ |
| 321 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 322 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 323 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 324 | TYPE_SCTP_FUNC(sctp_sf_do_5_1D_ce), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 325 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 326 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 327 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 328 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 329 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 330 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 331 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 332 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 333 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 334 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 335 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 336 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 337 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 338 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 339 | } /* TYPE_SCTP_COOKIE_ECHO */ |
| 340 | |
| 341 | #define TYPE_SCTP_COOKIE_ACK { \ |
| 342 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 343 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 344 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 345 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 346 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 347 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 348 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 349 | TYPE_SCTP_FUNC(sctp_sf_do_5_1E_ca), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 350 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 351 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 352 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 353 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 354 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 355 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 356 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 357 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 358 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 359 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 360 | } /* TYPE_SCTP_COOKIE_ACK */ |
| 361 | |
| 362 | #define TYPE_SCTP_ECN_ECNE { \ |
| 363 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 364 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 365 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 366 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 367 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 368 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 369 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 370 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 371 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 372 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 373 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 374 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 375 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 376 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 377 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 378 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 379 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 380 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 381 | } /* TYPE_SCTP_ECN_ECNE */ |
| 382 | |
| 383 | #define TYPE_SCTP_ECN_CWR { \ |
| 384 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 385 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 386 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 387 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 388 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 389 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 390 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 391 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 392 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 393 | TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 394 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 395 | TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 396 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 397 | TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 398 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 399 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 400 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 401 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 402 | } /* TYPE_SCTP_ECN_CWR */ |
| 403 | |
| 404 | #define TYPE_SCTP_SHUTDOWN_COMPLETE { \ |
| 405 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 406 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 407 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 408 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 409 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 410 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 411 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 412 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 413 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 414 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 415 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 416 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 417 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 418 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 419 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 420 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 421 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 422 | TYPE_SCTP_FUNC(sctp_sf_do_4_C), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 423 | } /* TYPE_SCTP_SHUTDOWN_COMPLETE */ |
| 424 | |
| 425 | /* The primary index for this table is the chunk type. |
| 426 | * The secondary index for this table is the state. |
| 427 | * |
| 428 | * For base protocol (RFC 2960). |
| 429 | */ |
| 430 | static const sctp_sm_table_entry_t chunk_event_table[SCTP_NUM_BASE_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = { |
| 431 | TYPE_SCTP_DATA, |
| 432 | TYPE_SCTP_INIT, |
| 433 | TYPE_SCTP_INIT_ACK, |
| 434 | TYPE_SCTP_SACK, |
| 435 | TYPE_SCTP_HEARTBEAT, |
| 436 | TYPE_SCTP_HEARTBEAT_ACK, |
| 437 | TYPE_SCTP_ABORT, |
| 438 | TYPE_SCTP_SHUTDOWN, |
| 439 | TYPE_SCTP_SHUTDOWN_ACK, |
| 440 | TYPE_SCTP_ERROR, |
| 441 | TYPE_SCTP_COOKIE_ECHO, |
| 442 | TYPE_SCTP_COOKIE_ACK, |
| 443 | TYPE_SCTP_ECN_ECNE, |
| 444 | TYPE_SCTP_ECN_CWR, |
| 445 | TYPE_SCTP_SHUTDOWN_COMPLETE, |
| 446 | }; /* state_fn_t chunk_event_table[][] */ |
| 447 | |
| 448 | #define TYPE_SCTP_ASCONF { \ |
| 449 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 450 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 451 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 452 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 453 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 454 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 455 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 456 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 457 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 458 | TYPE_SCTP_FUNC(sctp_sf_do_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 459 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 460 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 461 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 462 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 463 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 464 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 465 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 466 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 467 | } /* TYPE_SCTP_ASCONF */ |
| 468 | |
| 469 | #define TYPE_SCTP_ASCONF_ACK { \ |
| 470 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 471 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 472 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 473 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 474 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 475 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 476 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 477 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 478 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 479 | TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 480 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 481 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 482 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 483 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 484 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 485 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 486 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 487 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 488 | } /* TYPE_SCTP_ASCONF_ACK */ |
| 489 | |
| 490 | /* The primary index for this table is the chunk type. |
| 491 | * The secondary index for this table is the state. |
| 492 | */ |
| 493 | static const sctp_sm_table_entry_t addip_chunk_event_table[SCTP_NUM_ADDIP_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = { |
| 494 | TYPE_SCTP_ASCONF, |
| 495 | TYPE_SCTP_ASCONF_ACK, |
| 496 | }; /*state_fn_t addip_chunk_event_table[][] */ |
| 497 | |
| 498 | #define TYPE_SCTP_FWD_TSN { \ |
| 499 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 500 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 501 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 502 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 503 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 504 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 505 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 506 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 507 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 508 | TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 509 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 510 | TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 511 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 512 | TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn_fast), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 513 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 514 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 515 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 516 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 517 | } /* TYPE_SCTP_FWD_TSN */ |
| 518 | |
| 519 | /* The primary index for this table is the chunk type. |
| 520 | * The secondary index for this table is the state. |
| 521 | */ |
| 522 | static const sctp_sm_table_entry_t prsctp_chunk_event_table[SCTP_NUM_PRSCTP_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = { |
| 523 | TYPE_SCTP_FWD_TSN, |
| 524 | }; /*state_fn_t prsctp_chunk_event_table[][] */ |
| 525 | |
Vlad Yasevich | bbd0d59 | 2007-10-03 17:51:34 -0700 | [diff] [blame] | 526 | #define TYPE_SCTP_AUTH { \ |
| 527 | /* SCTP_STATE_EMPTY */ \ |
| 528 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
| 529 | /* SCTP_STATE_CLOSED */ \ |
| 530 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
| 531 | /* SCTP_STATE_COOKIE_WAIT */ \ |
| 532 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
| 533 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
| 534 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 535 | /* SCTP_STATE_ESTABLISHED */ \ |
| 536 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 537 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
| 538 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 539 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
| 540 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 541 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
| 542 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 543 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
| 544 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 545 | } /* TYPE_SCTP_AUTH */ |
| 546 | |
| 547 | /* The primary index for this table is the chunk type. |
| 548 | * The secondary index for this table is the state. |
| 549 | */ |
| 550 | static const sctp_sm_table_entry_t auth_chunk_event_table[SCTP_NUM_AUTH_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = { |
| 551 | TYPE_SCTP_AUTH, |
| 552 | }; /*state_fn_t auth_chunk_event_table[][] */ |
| 553 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 554 | static const sctp_sm_table_entry_t |
| 555 | chunk_event_table_unknown[SCTP_STATE_NUM_STATES] = { |
| 556 | /* SCTP_STATE_EMPTY */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 557 | TYPE_SCTP_FUNC(sctp_sf_ootb), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 558 | /* SCTP_STATE_CLOSED */ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 559 | TYPE_SCTP_FUNC(sctp_sf_ootb), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 560 | /* SCTP_STATE_COOKIE_WAIT */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 561 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 562 | /* SCTP_STATE_COOKIE_ECHOED */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 563 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 564 | /* SCTP_STATE_ESTABLISHED */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 565 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 566 | /* SCTP_STATE_SHUTDOWN_PENDING */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 567 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 568 | /* SCTP_STATE_SHUTDOWN_SENT */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 569 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 570 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 571 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 572 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 573 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 574 | }; /* chunk unknown */ |
| 575 | |
| 576 | |
| 577 | #define TYPE_SCTP_PRIMITIVE_ASSOCIATE { \ |
| 578 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 579 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 580 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 581 | TYPE_SCTP_FUNC(sctp_sf_do_prm_asoc), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 582 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 583 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 584 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 585 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 586 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 587 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 588 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 589 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 590 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 591 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 592 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 593 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 594 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 595 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 596 | } /* TYPE_SCTP_PRIMITIVE_ASSOCIATE */ |
| 597 | |
| 598 | #define TYPE_SCTP_PRIMITIVE_SHUTDOWN { \ |
| 599 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 600 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 601 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 602 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 603 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 604 | TYPE_SCTP_FUNC(sctp_sf_cookie_wait_prm_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 605 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 606 | TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_prm_shutdown),\ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 607 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 608 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_prm_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 609 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 610 | TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 611 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 612 | TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 613 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 614 | TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 615 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 616 | TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 617 | } /* TYPE_SCTP_PRIMITIVE_SHUTDOWN */ |
| 618 | |
| 619 | #define TYPE_SCTP_PRIMITIVE_ABORT { \ |
| 620 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 621 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 622 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 623 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 624 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 625 | TYPE_SCTP_FUNC(sctp_sf_cookie_wait_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 626 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 627 | TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 628 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 629 | TYPE_SCTP_FUNC(sctp_sf_do_9_1_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 630 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 631 | TYPE_SCTP_FUNC(sctp_sf_shutdown_pending_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 632 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 633 | TYPE_SCTP_FUNC(sctp_sf_shutdown_sent_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 634 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 635 | TYPE_SCTP_FUNC(sctp_sf_do_9_1_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 636 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 637 | TYPE_SCTP_FUNC(sctp_sf_shutdown_ack_sent_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 638 | } /* TYPE_SCTP_PRIMITIVE_ABORT */ |
| 639 | |
| 640 | #define TYPE_SCTP_PRIMITIVE_SEND { \ |
| 641 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 642 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 643 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 644 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 645 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 646 | TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 647 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 648 | TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 649 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 650 | TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 651 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 652 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 653 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 654 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 655 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 656 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 657 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 658 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 659 | } /* TYPE_SCTP_PRIMITIVE_SEND */ |
| 660 | |
| 661 | #define TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT { \ |
| 662 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 663 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 664 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 665 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 666 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 667 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 668 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 669 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 670 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 671 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 672 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 673 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 674 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 675 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 676 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 677 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 678 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 679 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 680 | } /* TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT */ |
| 681 | |
| 682 | #define TYPE_SCTP_PRIMITIVE_ASCONF { \ |
| 683 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 684 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 685 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 686 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 687 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 688 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 689 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 690 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 691 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 692 | TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 693 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 694 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 695 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 696 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 697 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 698 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 699 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 700 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 701 | } /* TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT */ |
| 702 | |
| 703 | /* The primary index for this table is the primitive type. |
| 704 | * The secondary index for this table is the state. |
| 705 | */ |
| 706 | static const sctp_sm_table_entry_t primitive_event_table[SCTP_NUM_PRIMITIVE_TYPES][SCTP_STATE_NUM_STATES] = { |
| 707 | TYPE_SCTP_PRIMITIVE_ASSOCIATE, |
| 708 | TYPE_SCTP_PRIMITIVE_SHUTDOWN, |
| 709 | TYPE_SCTP_PRIMITIVE_ABORT, |
| 710 | TYPE_SCTP_PRIMITIVE_SEND, |
| 711 | TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT, |
| 712 | TYPE_SCTP_PRIMITIVE_ASCONF, |
| 713 | }; |
| 714 | |
| 715 | #define TYPE_SCTP_OTHER_NO_PENDING_TSN { \ |
| 716 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 717 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 718 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 719 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 720 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 721 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 722 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 723 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 724 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 725 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 726 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 727 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_start_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 728 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 729 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 730 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 731 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 732 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 733 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 734 | } |
| 735 | |
| 736 | #define TYPE_SCTP_OTHER_ICMP_PROTO_UNREACH { \ |
| 737 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 738 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 739 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 740 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 741 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 742 | TYPE_SCTP_FUNC(sctp_sf_cookie_wait_icmp_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 743 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 744 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 745 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 746 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 747 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 748 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 749 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 750 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 751 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 752 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 753 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 754 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 755 | } |
| 756 | |
| 757 | static const sctp_sm_table_entry_t other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES] = { |
| 758 | TYPE_SCTP_OTHER_NO_PENDING_TSN, |
| 759 | TYPE_SCTP_OTHER_ICMP_PROTO_UNREACH, |
| 760 | }; |
| 761 | |
| 762 | #define TYPE_SCTP_EVENT_TIMEOUT_NONE { \ |
| 763 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 764 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 765 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 766 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 767 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 768 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 769 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 770 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 771 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 772 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 773 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 774 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 775 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 776 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 777 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 778 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 779 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 780 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 781 | } |
| 782 | |
| 783 | #define TYPE_SCTP_EVENT_TIMEOUT_T1_COOKIE { \ |
| 784 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 785 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 786 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 787 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 788 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 789 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 790 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 791 | TYPE_SCTP_FUNC(sctp_sf_t1_cookie_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 792 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 793 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 794 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 795 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 796 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 797 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 798 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 799 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 800 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 801 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 802 | } |
| 803 | |
| 804 | #define TYPE_SCTP_EVENT_TIMEOUT_T1_INIT { \ |
| 805 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 806 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 807 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 808 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 809 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 810 | TYPE_SCTP_FUNC(sctp_sf_t1_init_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 811 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 812 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 813 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 814 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 815 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 816 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 817 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 818 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 819 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 820 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 821 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 822 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 823 | } |
| 824 | |
| 825 | #define TYPE_SCTP_EVENT_TIMEOUT_T2_SHUTDOWN { \ |
| 826 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 827 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 828 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 829 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 830 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 831 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 832 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 833 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 834 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 835 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 836 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 837 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 838 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 839 | TYPE_SCTP_FUNC(sctp_sf_t2_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 840 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 841 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 842 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 843 | TYPE_SCTP_FUNC(sctp_sf_t2_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 844 | } |
| 845 | |
| 846 | #define TYPE_SCTP_EVENT_TIMEOUT_T3_RTX { \ |
| 847 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 848 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 849 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 850 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 851 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 852 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 853 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 854 | TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 855 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 856 | TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 857 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 858 | TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 859 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 860 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 861 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 862 | TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 863 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 864 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 865 | } |
| 866 | |
| 867 | #define TYPE_SCTP_EVENT_TIMEOUT_T4_RTO { \ |
| 868 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 869 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 870 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 871 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 872 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 873 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 874 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 875 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 876 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 877 | TYPE_SCTP_FUNC(sctp_sf_t4_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 878 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 879 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 880 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 881 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 882 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 883 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 884 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 885 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 886 | } |
| 887 | |
| 888 | #define TYPE_SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD { \ |
| 889 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 890 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 891 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 892 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 893 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 894 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 895 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 896 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 897 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 898 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 899 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 900 | TYPE_SCTP_FUNC(sctp_sf_t5_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 901 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 902 | TYPE_SCTP_FUNC(sctp_sf_t5_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 903 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 904 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 905 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 906 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 907 | } |
| 908 | |
| 909 | #define TYPE_SCTP_EVENT_TIMEOUT_HEARTBEAT { \ |
| 910 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 911 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 912 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 913 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 914 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 915 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 916 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 917 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 918 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 919 | TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 920 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 921 | TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 922 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 923 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 924 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 925 | TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 926 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 927 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 928 | } |
| 929 | |
| 930 | #define TYPE_SCTP_EVENT_TIMEOUT_SACK { \ |
| 931 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 932 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 933 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 934 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 935 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 936 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 937 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 938 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 939 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 940 | TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 941 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 942 | TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 943 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 944 | TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 945 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 946 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 947 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 948 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 949 | } |
| 950 | |
| 951 | #define TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE { \ |
| 952 | /* SCTP_STATE_EMPTY */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 953 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 954 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 955 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 956 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 957 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 958 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 959 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 960 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 961 | TYPE_SCTP_FUNC(sctp_sf_autoclose_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 962 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 963 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 964 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 965 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 966 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 967 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 968 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 969 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 970 | } |
| 971 | |
| 972 | static const sctp_sm_table_entry_t timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES] = { |
| 973 | TYPE_SCTP_EVENT_TIMEOUT_NONE, |
| 974 | TYPE_SCTP_EVENT_TIMEOUT_T1_COOKIE, |
| 975 | TYPE_SCTP_EVENT_TIMEOUT_T1_INIT, |
| 976 | TYPE_SCTP_EVENT_TIMEOUT_T2_SHUTDOWN, |
| 977 | TYPE_SCTP_EVENT_TIMEOUT_T3_RTX, |
| 978 | TYPE_SCTP_EVENT_TIMEOUT_T4_RTO, |
| 979 | TYPE_SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD, |
| 980 | TYPE_SCTP_EVENT_TIMEOUT_HEARTBEAT, |
| 981 | TYPE_SCTP_EVENT_TIMEOUT_SACK, |
| 982 | TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE, |
| 983 | }; |
| 984 | |
YOSHIFUJI Hideaki | d808ad9 | 2007-02-09 23:25:18 +0900 | [diff] [blame] | 985 | static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(sctp_cid_t cid, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 986 | sctp_state_t state) |
| 987 | { |
| 988 | if (state > SCTP_STATE_MAX) |
| 989 | return &bug; |
| 990 | |
Bill Nottingham | 75202e7 | 2007-05-31 21:33:35 -0700 | [diff] [blame] | 991 | if (cid <= SCTP_CID_BASE_MAX) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 992 | return &chunk_event_table[cid][state]; |
| 993 | |
| 994 | if (sctp_prsctp_enable) { |
| 995 | if (cid == SCTP_CID_FWD_TSN) |
| 996 | return &prsctp_chunk_event_table[0][state]; |
| 997 | } |
| 998 | |
| 999 | if (sctp_addip_enable) { |
| 1000 | if (cid == SCTP_CID_ASCONF) |
| 1001 | return &addip_chunk_event_table[0][state]; |
| 1002 | |
| 1003 | if (cid == SCTP_CID_ASCONF_ACK) |
| 1004 | return &addip_chunk_event_table[1][state]; |
| 1005 | } |
| 1006 | |
Vlad Yasevich | bbd0d59 | 2007-10-03 17:51:34 -0700 | [diff] [blame] | 1007 | if (sctp_auth_enable) { |
| 1008 | if (cid == SCTP_CID_AUTH) |
| 1009 | return &auth_chunk_event_table[0][state]; |
| 1010 | } |
| 1011 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1012 | return &chunk_event_table_unknown[state]; |
| 1013 | } |