Vlad Yasevich | 60c778b | 2008-01-11 09:57:09 -0500 | [diff] [blame] | 1 | /* SCTP kernel implementation |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | * |
Vlad Yasevich | 60c778b | 2008-01-11 09:57:09 -0500 | [diff] [blame] | 8 | * This file is part of the SCTP kernel implementation |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | * |
| 10 | * These are the state tables for the SCTP state machine. |
| 11 | * |
Vlad Yasevich | 60c778b | 2008-01-11 09:57:09 -0500 | [diff] [blame] | 12 | * This SCTP implementation is free software; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | * |
Vlad Yasevich | 60c778b | 2008-01-11 09:57:09 -0500 | [diff] [blame] | 18 | * This SCTP implementation is distributed in the hope that it |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Joe Perches | 145ce50 | 2010-08-24 13:21:08 +0000 | [diff] [blame] | 49 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
| 50 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | #include <linux/skbuff.h> |
| 52 | #include <net/sctp/sctp.h> |
| 53 | #include <net/sctp/sm.h> |
| 54 | |
| 55 | static const sctp_sm_table_entry_t |
| 56 | primitive_event_table[SCTP_NUM_PRIMITIVE_TYPES][SCTP_STATE_NUM_STATES]; |
| 57 | static const sctp_sm_table_entry_t |
| 58 | other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES]; |
| 59 | static const sctp_sm_table_entry_t |
| 60 | timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES]; |
| 61 | |
| 62 | static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(sctp_cid_t cid, |
| 63 | sctp_state_t state); |
| 64 | |
| 65 | |
| 66 | static const sctp_sm_table_entry_t bug = { |
| 67 | .fn = sctp_sf_bug, |
| 68 | .name = "sctp_sf_bug" |
| 69 | }; |
| 70 | |
Joe Perches | 145ce50 | 2010-08-24 13:21:08 +0000 | [diff] [blame] | 71 | #define DO_LOOKUP(_max, _type, _table) \ |
| 72 | ({ \ |
| 73 | const sctp_sm_table_entry_t *rtn; \ |
| 74 | \ |
| 75 | if ((event_subtype._type > (_max))) { \ |
| 76 | pr_warn("table %p possible attack: event %d exceeds max %d\n", \ |
| 77 | _table, event_subtype._type, _max); \ |
| 78 | rtn = &bug; \ |
| 79 | } else \ |
| 80 | rtn = &_table[event_subtype._type][(int)state]; \ |
| 81 | \ |
| 82 | rtn; \ |
| 83 | }) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 84 | |
| 85 | const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type, |
| 86 | sctp_state_t state, |
| 87 | sctp_subtype_t event_subtype) |
| 88 | { |
| 89 | switch (event_type) { |
| 90 | case SCTP_EVENT_T_CHUNK: |
| 91 | return sctp_chunk_event_lookup(event_subtype.chunk, state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | case SCTP_EVENT_T_TIMEOUT: |
Joe Perches | 145ce50 | 2010-08-24 13:21:08 +0000 | [diff] [blame] | 93 | return DO_LOOKUP(SCTP_EVENT_TIMEOUT_MAX, timeout, |
| 94 | timeout_event_table); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | case SCTP_EVENT_T_OTHER: |
Joe Perches | 145ce50 | 2010-08-24 13:21:08 +0000 | [diff] [blame] | 96 | return DO_LOOKUP(SCTP_EVENT_OTHER_MAX, other, |
| 97 | other_event_table); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 98 | case SCTP_EVENT_T_PRIMITIVE: |
Joe Perches | 145ce50 | 2010-08-24 13:21:08 +0000 | [diff] [blame] | 99 | return DO_LOOKUP(SCTP_EVENT_PRIMITIVE_MAX, primitive, |
| 100 | primitive_event_table); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 111 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 112 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 113 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 114 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
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_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 117 | TYPE_SCTP_FUNC(sctp_sf_eat_data_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 118 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
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_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 121 | TYPE_SCTP_FUNC(sctp_sf_eat_data_fast_4_4), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 123 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 124 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
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 | } /* TYPE_SCTP_DATA */ |
| 127 | |
| 128 | #define TYPE_SCTP_INIT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 129 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 130 | TYPE_SCTP_FUNC(sctp_sf_do_5_1B_init), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 132 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_1_siminit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 133 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 134 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_1_siminit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 135 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 136 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 137 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 138 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 139 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
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_RECEIVED */ \ |
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_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 144 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_reshutack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 145 | } /* TYPE_SCTP_INIT */ |
| 146 | |
| 147 | #define TYPE_SCTP_INIT_ACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 148 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | 610ab73 | 2007-01-15 19:18:30 -0800 | [diff] [blame] | 149 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_3_initack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 150 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 151 | TYPE_SCTP_FUNC(sctp_sf_do_5_1C_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 152 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 153 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 154 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 155 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 156 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 157 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 158 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
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_SHUTDOWN_RECEIVED */ \ |
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_ACK_SENT */ \ |
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 | } /* TYPE_SCTP_INIT_ACK */ |
| 165 | |
| 166 | #define TYPE_SCTP_SACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 167 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 168 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 169 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 170 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 171 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 172 | TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 173 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 174 | TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 175 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 176 | TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 177 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
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_SHUTDOWN_RECEIVED */ \ |
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_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 182 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 183 | } /* TYPE_SCTP_SACK */ |
| 184 | |
| 185 | #define TYPE_SCTP_HEARTBEAT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 186 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 187 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 188 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 189 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 190 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 191 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 192 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 193 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 194 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 195 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 196 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 197 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 198 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 199 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 200 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
| 201 | /* This should not happen, but we are nice. */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 202 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 203 | } /* TYPE_SCTP_HEARTBEAT */ |
| 204 | |
| 205 | #define TYPE_SCTP_HEARTBEAT_ACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 206 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 207 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 208 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 209 | TYPE_SCTP_FUNC(sctp_sf_violation), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 210 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 211 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 212 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 213 | TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 214 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 215 | TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 216 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 217 | TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 218 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 219 | TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 220 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 221 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 222 | } /* TYPE_SCTP_HEARTBEAT_ACK */ |
| 223 | |
| 224 | #define TYPE_SCTP_ABORT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 225 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 226 | TYPE_SCTP_FUNC(sctp_sf_pdiscard), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 227 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 228 | TYPE_SCTP_FUNC(sctp_sf_cookie_wait_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 229 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 230 | TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 231 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 232 | TYPE_SCTP_FUNC(sctp_sf_do_9_1_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 233 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 234 | TYPE_SCTP_FUNC(sctp_sf_shutdown_pending_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 235 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 236 | TYPE_SCTP_FUNC(sctp_sf_shutdown_sent_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 237 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 238 | TYPE_SCTP_FUNC(sctp_sf_do_9_1_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 239 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 240 | TYPE_SCTP_FUNC(sctp_sf_shutdown_ack_sent_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 241 | } /* TYPE_SCTP_ABORT */ |
| 242 | |
| 243 | #define TYPE_SCTP_SHUTDOWN { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 244 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 245 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 246 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 247 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 248 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 249 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 250 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 251 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 252 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Wei Yongjun | cf896d5 | 2008-10-23 01:00:49 -0700 | [diff] [blame] | 253 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 254 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 255 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 256 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Wei Yongjun | 2e3f92d | 2008-10-23 01:01:18 -0700 | [diff] [blame] | 257 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_shut_ctsn), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 259 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 260 | } /* TYPE_SCTP_SHUTDOWN */ |
| 261 | |
| 262 | #define TYPE_SCTP_SHUTDOWN_ACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 263 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 264 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 265 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 266 | TYPE_SCTP_FUNC(sctp_sf_do_8_5_1_E_sa), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 267 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 268 | TYPE_SCTP_FUNC(sctp_sf_do_8_5_1_E_sa), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 269 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 270 | TYPE_SCTP_FUNC(sctp_sf_violation), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 271 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 272 | TYPE_SCTP_FUNC(sctp_sf_violation), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 273 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 274 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_final), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 275 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 276 | TYPE_SCTP_FUNC(sctp_sf_violation), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 277 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 278 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_final), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 279 | } /* TYPE_SCTP_SHUTDOWN_ACK */ |
| 280 | |
| 281 | #define TYPE_SCTP_ERROR { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 282 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 283 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 284 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 285 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 286 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 287 | TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_err), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 288 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 289 | TYPE_SCTP_FUNC(sctp_sf_operr_notify), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 290 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 291 | TYPE_SCTP_FUNC(sctp_sf_operr_notify), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 292 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 293 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 294 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 295 | TYPE_SCTP_FUNC(sctp_sf_operr_notify), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 296 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 297 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 298 | } /* TYPE_SCTP_ERROR */ |
| 299 | |
| 300 | #define TYPE_SCTP_COOKIE_ECHO { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 301 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 302 | TYPE_SCTP_FUNC(sctp_sf_do_5_1D_ce), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 303 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 304 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 305 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 306 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 307 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 308 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 309 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 310 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 311 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 312 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 313 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 314 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 315 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 316 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 317 | } /* TYPE_SCTP_COOKIE_ECHO */ |
| 318 | |
| 319 | #define TYPE_SCTP_COOKIE_ACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 320 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 321 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 322 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 323 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 324 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 325 | TYPE_SCTP_FUNC(sctp_sf_do_5_1E_ca), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 326 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 327 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 328 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 329 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 330 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 331 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 332 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 333 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 334 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 335 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 336 | } /* TYPE_SCTP_COOKIE_ACK */ |
| 337 | |
| 338 | #define TYPE_SCTP_ECN_ECNE { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 339 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 340 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 341 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 342 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 343 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 344 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 345 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 346 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 347 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 348 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 349 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 350 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 351 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 352 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 353 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 354 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 355 | } /* TYPE_SCTP_ECN_ECNE */ |
| 356 | |
| 357 | #define TYPE_SCTP_ECN_CWR { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 358 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 361 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 362 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 363 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 364 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 365 | TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 366 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 367 | TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 368 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 369 | TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 370 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 371 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 372 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 373 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 374 | } /* TYPE_SCTP_ECN_CWR */ |
| 375 | |
| 376 | #define TYPE_SCTP_SHUTDOWN_COMPLETE { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 377 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 378 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 379 | /* SCTP_STATE_COOKIE_WAIT */ \ |
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 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 382 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 383 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 384 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 385 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 386 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 387 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 388 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 389 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 390 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 391 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 392 | TYPE_SCTP_FUNC(sctp_sf_do_4_C), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 393 | } /* TYPE_SCTP_SHUTDOWN_COMPLETE */ |
| 394 | |
| 395 | /* The primary index for this table is the chunk type. |
| 396 | * The secondary index for this table is the state. |
| 397 | * |
| 398 | * For base protocol (RFC 2960). |
| 399 | */ |
| 400 | static const sctp_sm_table_entry_t chunk_event_table[SCTP_NUM_BASE_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = { |
| 401 | TYPE_SCTP_DATA, |
| 402 | TYPE_SCTP_INIT, |
| 403 | TYPE_SCTP_INIT_ACK, |
| 404 | TYPE_SCTP_SACK, |
| 405 | TYPE_SCTP_HEARTBEAT, |
| 406 | TYPE_SCTP_HEARTBEAT_ACK, |
| 407 | TYPE_SCTP_ABORT, |
| 408 | TYPE_SCTP_SHUTDOWN, |
| 409 | TYPE_SCTP_SHUTDOWN_ACK, |
| 410 | TYPE_SCTP_ERROR, |
| 411 | TYPE_SCTP_COOKIE_ECHO, |
| 412 | TYPE_SCTP_COOKIE_ACK, |
| 413 | TYPE_SCTP_ECN_ECNE, |
| 414 | TYPE_SCTP_ECN_CWR, |
| 415 | TYPE_SCTP_SHUTDOWN_COMPLETE, |
| 416 | }; /* state_fn_t chunk_event_table[][] */ |
| 417 | |
| 418 | #define TYPE_SCTP_ASCONF { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 419 | /* SCTP_STATE_CLOSED */ \ |
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_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 422 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 423 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 424 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 425 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 426 | TYPE_SCTP_FUNC(sctp_sf_do_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 427 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 428 | TYPE_SCTP_FUNC(sctp_sf_do_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 429 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 430 | TYPE_SCTP_FUNC(sctp_sf_do_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 431 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 432 | TYPE_SCTP_FUNC(sctp_sf_do_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 433 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 434 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 435 | } /* TYPE_SCTP_ASCONF */ |
| 436 | |
| 437 | #define TYPE_SCTP_ASCONF_ACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 438 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 439 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 440 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 441 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 442 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 443 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 444 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 445 | TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 446 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 447 | TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 448 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 449 | TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 450 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 451 | TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 452 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 453 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 454 | } /* TYPE_SCTP_ASCONF_ACK */ |
| 455 | |
| 456 | /* The primary index for this table is the chunk type. |
| 457 | * The secondary index for this table is the state. |
| 458 | */ |
| 459 | static const sctp_sm_table_entry_t addip_chunk_event_table[SCTP_NUM_ADDIP_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = { |
| 460 | TYPE_SCTP_ASCONF, |
| 461 | TYPE_SCTP_ASCONF_ACK, |
| 462 | }; /*state_fn_t addip_chunk_event_table[][] */ |
| 463 | |
| 464 | #define TYPE_SCTP_FWD_TSN { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 465 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 466 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 467 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 468 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 469 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 470 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 471 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 472 | TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 473 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 474 | TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 475 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 476 | TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn_fast), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 477 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 478 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 479 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 480 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 481 | } /* TYPE_SCTP_FWD_TSN */ |
| 482 | |
| 483 | /* The primary index for this table is the chunk type. |
| 484 | * The secondary index for this table is the state. |
| 485 | */ |
| 486 | static const sctp_sm_table_entry_t prsctp_chunk_event_table[SCTP_NUM_PRSCTP_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = { |
| 487 | TYPE_SCTP_FWD_TSN, |
| 488 | }; /*state_fn_t prsctp_chunk_event_table[][] */ |
| 489 | |
Vlad Yasevich | bbd0d59 | 2007-10-03 17:51:34 -0700 | [diff] [blame] | 490 | #define TYPE_SCTP_AUTH { \ |
Vlad Yasevich | bbd0d59 | 2007-10-03 17:51:34 -0700 | [diff] [blame] | 491 | /* SCTP_STATE_CLOSED */ \ |
| 492 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
| 493 | /* SCTP_STATE_COOKIE_WAIT */ \ |
| 494 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
| 495 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
| 496 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 497 | /* SCTP_STATE_ESTABLISHED */ \ |
| 498 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 499 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
| 500 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 501 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
| 502 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 503 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
| 504 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 505 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
| 506 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 507 | } /* TYPE_SCTP_AUTH */ |
| 508 | |
| 509 | /* The primary index for this table is the chunk type. |
| 510 | * The secondary index for this table is the state. |
| 511 | */ |
| 512 | static const sctp_sm_table_entry_t auth_chunk_event_table[SCTP_NUM_AUTH_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = { |
| 513 | TYPE_SCTP_AUTH, |
| 514 | }; /*state_fn_t auth_chunk_event_table[][] */ |
| 515 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 516 | static const sctp_sm_table_entry_t |
| 517 | chunk_event_table_unknown[SCTP_STATE_NUM_STATES] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 518 | /* SCTP_STATE_CLOSED */ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 519 | TYPE_SCTP_FUNC(sctp_sf_ootb), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 520 | /* SCTP_STATE_COOKIE_WAIT */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 521 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 522 | /* SCTP_STATE_COOKIE_ECHOED */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 523 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 524 | /* SCTP_STATE_ESTABLISHED */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 525 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 526 | /* SCTP_STATE_SHUTDOWN_PENDING */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 527 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 528 | /* SCTP_STATE_SHUTDOWN_SENT */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 529 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 530 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 531 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 532 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 533 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 534 | }; /* chunk unknown */ |
| 535 | |
| 536 | |
| 537 | #define TYPE_SCTP_PRIMITIVE_ASSOCIATE { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 538 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 539 | TYPE_SCTP_FUNC(sctp_sf_do_prm_asoc), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 540 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 541 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 542 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 543 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 544 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 545 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 546 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 547 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 548 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 549 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 550 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 551 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 552 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 553 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 554 | } /* TYPE_SCTP_PRIMITIVE_ASSOCIATE */ |
| 555 | |
| 556 | #define TYPE_SCTP_PRIMITIVE_SHUTDOWN { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 557 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 558 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 559 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 560 | TYPE_SCTP_FUNC(sctp_sf_cookie_wait_prm_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 561 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 562 | TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_prm_shutdown),\ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 563 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 564 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_prm_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 565 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 566 | TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 567 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 568 | TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 569 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 570 | TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 571 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 572 | TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 573 | } /* TYPE_SCTP_PRIMITIVE_SHUTDOWN */ |
| 574 | |
| 575 | #define TYPE_SCTP_PRIMITIVE_ABORT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 576 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 577 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 578 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 579 | TYPE_SCTP_FUNC(sctp_sf_cookie_wait_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 580 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 581 | TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 582 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 583 | TYPE_SCTP_FUNC(sctp_sf_do_9_1_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 584 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 585 | TYPE_SCTP_FUNC(sctp_sf_shutdown_pending_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 586 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 587 | TYPE_SCTP_FUNC(sctp_sf_shutdown_sent_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 588 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 589 | TYPE_SCTP_FUNC(sctp_sf_do_9_1_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 590 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 591 | TYPE_SCTP_FUNC(sctp_sf_shutdown_ack_sent_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 592 | } /* TYPE_SCTP_PRIMITIVE_ABORT */ |
| 593 | |
| 594 | #define TYPE_SCTP_PRIMITIVE_SEND { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 595 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 596 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 597 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 598 | TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 599 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 600 | TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 601 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 602 | TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 603 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 604 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 605 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 606 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 607 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 608 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 609 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 610 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 611 | } /* TYPE_SCTP_PRIMITIVE_SEND */ |
| 612 | |
| 613 | #define TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 614 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 615 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 616 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 617 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 618 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 619 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 620 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 621 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 622 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 623 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 624 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 625 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 626 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 627 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 628 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 629 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 630 | } /* TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT */ |
| 631 | |
| 632 | #define TYPE_SCTP_PRIMITIVE_ASCONF { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 633 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 634 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 635 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 636 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 637 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 638 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 639 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 640 | TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 641 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 642 | TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 643 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 644 | TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 645 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 646 | TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 647 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 648 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Wei Yongjun | 4553e88 | 2009-04-07 16:36:14 +0800 | [diff] [blame] | 649 | } /* TYPE_SCTP_PRIMITIVE_ASCONF */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 650 | |
| 651 | /* The primary index for this table is the primitive type. |
| 652 | * The secondary index for this table is the state. |
| 653 | */ |
| 654 | static const sctp_sm_table_entry_t primitive_event_table[SCTP_NUM_PRIMITIVE_TYPES][SCTP_STATE_NUM_STATES] = { |
| 655 | TYPE_SCTP_PRIMITIVE_ASSOCIATE, |
| 656 | TYPE_SCTP_PRIMITIVE_SHUTDOWN, |
| 657 | TYPE_SCTP_PRIMITIVE_ABORT, |
| 658 | TYPE_SCTP_PRIMITIVE_SEND, |
| 659 | TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT, |
| 660 | TYPE_SCTP_PRIMITIVE_ASCONF, |
| 661 | }; |
| 662 | |
| 663 | #define TYPE_SCTP_OTHER_NO_PENDING_TSN { \ |
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_ignore_other), \ |
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_ignore_other), \ |
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_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 670 | /* SCTP_STATE_ESTABLISHED */ \ |
Wei Yongjun | e1cdd55 | 2011-04-17 17:29:03 +0000 | [diff] [blame] | 671 | TYPE_SCTP_FUNC(sctp_sf_do_no_pending_tsn), \ |
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_9_2_start_shutdown), \ |
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_ignore_other), \ |
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_9_2_shutdown_ack), \ |
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_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 680 | } |
| 681 | |
| 682 | #define TYPE_SCTP_OTHER_ICMP_PROTO_UNREACH { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 683 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 684 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 685 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 686 | TYPE_SCTP_FUNC(sctp_sf_cookie_wait_icmp_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 687 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 688 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 689 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 690 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 691 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 692 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 693 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 694 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 695 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 696 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 697 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 698 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 699 | } |
| 700 | |
| 701 | static const sctp_sm_table_entry_t other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES] = { |
| 702 | TYPE_SCTP_OTHER_NO_PENDING_TSN, |
| 703 | TYPE_SCTP_OTHER_ICMP_PROTO_UNREACH, |
| 704 | }; |
| 705 | |
| 706 | #define TYPE_SCTP_EVENT_TIMEOUT_NONE { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 707 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 708 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 709 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 710 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 711 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 712 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 713 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 714 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 715 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 716 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 717 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 718 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 719 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 720 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 721 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 722 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 723 | } |
| 724 | |
| 725 | #define TYPE_SCTP_EVENT_TIMEOUT_T1_COOKIE { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 726 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 727 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 728 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 729 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 730 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 731 | TYPE_SCTP_FUNC(sctp_sf_t1_cookie_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 732 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 733 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 734 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 735 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 736 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 737 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 738 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 739 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 740 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 741 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 742 | } |
| 743 | |
| 744 | #define TYPE_SCTP_EVENT_TIMEOUT_T1_INIT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 745 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 746 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 747 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 748 | TYPE_SCTP_FUNC(sctp_sf_t1_init_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 749 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 750 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 751 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 752 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 753 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 754 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 755 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 756 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 757 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 758 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 759 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 760 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 761 | } |
| 762 | |
| 763 | #define TYPE_SCTP_EVENT_TIMEOUT_T2_SHUTDOWN { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 764 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 765 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 766 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 767 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 768 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 769 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 770 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 771 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 772 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 773 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 774 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 775 | TYPE_SCTP_FUNC(sctp_sf_t2_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 776 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 777 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 778 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 779 | TYPE_SCTP_FUNC(sctp_sf_t2_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 780 | } |
| 781 | |
| 782 | #define TYPE_SCTP_EVENT_TIMEOUT_T3_RTX { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 783 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 784 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 785 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 786 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 787 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 788 | TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 789 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 790 | TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 791 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 792 | TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 793 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 794 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 795 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 796 | TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 797 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 798 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 799 | } |
| 800 | |
| 801 | #define TYPE_SCTP_EVENT_TIMEOUT_T4_RTO { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 802 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 803 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 804 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 805 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 806 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 807 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 808 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 809 | TYPE_SCTP_FUNC(sctp_sf_t4_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 810 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 811 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 812 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 813 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 814 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 815 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 816 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 817 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 818 | } |
| 819 | |
| 820 | #define TYPE_SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 821 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 824 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 825 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 826 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 827 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 828 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 829 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Thomas Graf | f8d9605 | 2011-07-07 00:28:35 +0000 | [diff] [blame] | 830 | TYPE_SCTP_FUNC(sctp_sf_t5_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 831 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 832 | TYPE_SCTP_FUNC(sctp_sf_t5_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 833 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 834 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 835 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 836 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 837 | } |
| 838 | |
| 839 | #define TYPE_SCTP_EVENT_TIMEOUT_HEARTBEAT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 840 | /* SCTP_STATE_CLOSED */ \ |
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_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 843 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 844 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 845 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 846 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 847 | TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 848 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 849 | TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 850 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 851 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 852 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 853 | TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 854 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 855 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 856 | } |
| 857 | |
| 858 | #define TYPE_SCTP_EVENT_TIMEOUT_SACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 859 | /* SCTP_STATE_CLOSED */ \ |
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_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 862 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 863 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
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 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 866 | TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 867 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 868 | TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 869 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 870 | TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 871 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 872 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 873 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 874 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 875 | } |
| 876 | |
| 877 | #define TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 878 | /* SCTP_STATE_CLOSED */ \ |
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_COOKIE_WAIT */ \ |
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_COOKIE_ECHOED */ \ |
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_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 885 | TYPE_SCTP_FUNC(sctp_sf_autoclose_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 886 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 887 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 888 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 889 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 890 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 891 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 892 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 893 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 894 | } |
| 895 | |
| 896 | static const sctp_sm_table_entry_t timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES] = { |
| 897 | TYPE_SCTP_EVENT_TIMEOUT_NONE, |
| 898 | TYPE_SCTP_EVENT_TIMEOUT_T1_COOKIE, |
| 899 | TYPE_SCTP_EVENT_TIMEOUT_T1_INIT, |
| 900 | TYPE_SCTP_EVENT_TIMEOUT_T2_SHUTDOWN, |
| 901 | TYPE_SCTP_EVENT_TIMEOUT_T3_RTX, |
| 902 | TYPE_SCTP_EVENT_TIMEOUT_T4_RTO, |
| 903 | TYPE_SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD, |
| 904 | TYPE_SCTP_EVENT_TIMEOUT_HEARTBEAT, |
| 905 | TYPE_SCTP_EVENT_TIMEOUT_SACK, |
| 906 | TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE, |
| 907 | }; |
| 908 | |
YOSHIFUJI Hideaki | d808ad9 | 2007-02-09 23:25:18 +0900 | [diff] [blame] | 909 | 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] | 910 | sctp_state_t state) |
| 911 | { |
| 912 | if (state > SCTP_STATE_MAX) |
| 913 | return &bug; |
| 914 | |
Bill Nottingham | 75202e7 | 2007-05-31 21:33:35 -0700 | [diff] [blame] | 915 | if (cid <= SCTP_CID_BASE_MAX) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 916 | return &chunk_event_table[cid][state]; |
| 917 | |
| 918 | if (sctp_prsctp_enable) { |
| 919 | if (cid == SCTP_CID_FWD_TSN) |
| 920 | return &prsctp_chunk_event_table[0][state]; |
| 921 | } |
| 922 | |
| 923 | if (sctp_addip_enable) { |
| 924 | if (cid == SCTP_CID_ASCONF) |
| 925 | return &addip_chunk_event_table[0][state]; |
| 926 | |
| 927 | if (cid == SCTP_CID_ASCONF_ACK) |
| 928 | return &addip_chunk_event_table[1][state]; |
| 929 | } |
| 930 | |
Vlad Yasevich | bbd0d59 | 2007-10-03 17:51:34 -0700 | [diff] [blame] | 931 | if (sctp_auth_enable) { |
| 932 | if (cid == SCTP_CID_AUTH) |
| 933 | return &auth_chunk_event_table[0][state]; |
| 934 | } |
| 935 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 936 | return &chunk_event_table_unknown[state]; |
| 937 | } |