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 |
Jeff Kirsher | 4b2f13a | 2013-12-06 06:28:48 -0800 | [diff] [blame] | 25 | * along with GNU CC; see the file COPYING. If not, see |
| 26 | * <http://www.gnu.org/licenses/>. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | * |
| 28 | * Please send any bug reports or fixes you make to the |
| 29 | * email address(es): |
Daniel Borkmann | 91705c6 | 2013-07-23 14:51:47 +0200 | [diff] [blame] | 30 | * lksctp developers <linux-sctp@vger.kernel.org> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | * Written or modified by: |
| 33 | * La Monte H.P. Yarroll <piggy@acm.org> |
| 34 | * Karl Knutson <karl@athena.chicago.il.us> |
| 35 | * Jon Grimm <jgrimm@us.ibm.com> |
| 36 | * Hui Huang <hui.huang@nokia.com> |
| 37 | * Daisy Chang <daisyc@us.ibm.com> |
| 38 | * Ardelle Fan <ardelle.fan@intel.com> |
| 39 | * Sridhar Samudrala <sri@us.ibm.com> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | */ |
| 41 | |
Joe Perches | 145ce50 | 2010-08-24 13:21:08 +0000 | [diff] [blame] | 42 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
| 43 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | #include <linux/skbuff.h> |
| 45 | #include <net/sctp/sctp.h> |
| 46 | #include <net/sctp/sm.h> |
| 47 | |
| 48 | static const sctp_sm_table_entry_t |
| 49 | primitive_event_table[SCTP_NUM_PRIMITIVE_TYPES][SCTP_STATE_NUM_STATES]; |
| 50 | static const sctp_sm_table_entry_t |
| 51 | other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES]; |
| 52 | static const sctp_sm_table_entry_t |
| 53 | timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES]; |
| 54 | |
Eric W. Biederman | 55e26eb | 2012-08-07 07:25:24 +0000 | [diff] [blame] | 55 | static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(struct net *net, |
| 56 | sctp_cid_t cid, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | sctp_state_t state); |
| 58 | |
| 59 | |
| 60 | static const sctp_sm_table_entry_t bug = { |
| 61 | .fn = sctp_sf_bug, |
| 62 | .name = "sctp_sf_bug" |
| 63 | }; |
| 64 | |
Joe Perches | 145ce50 | 2010-08-24 13:21:08 +0000 | [diff] [blame] | 65 | #define DO_LOOKUP(_max, _type, _table) \ |
| 66 | ({ \ |
| 67 | const sctp_sm_table_entry_t *rtn; \ |
| 68 | \ |
| 69 | if ((event_subtype._type > (_max))) { \ |
| 70 | pr_warn("table %p possible attack: event %d exceeds max %d\n", \ |
| 71 | _table, event_subtype._type, _max); \ |
wangweidong | f7010e6 | 2013-12-23 12:16:52 +0800 | [diff] [blame] | 72 | rtn = &bug; \ |
Joe Perches | 145ce50 | 2010-08-24 13:21:08 +0000 | [diff] [blame] | 73 | } else \ |
| 74 | rtn = &_table[event_subtype._type][(int)state]; \ |
| 75 | \ |
| 76 | rtn; \ |
| 77 | }) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 78 | |
Eric W. Biederman | 55e26eb | 2012-08-07 07:25:24 +0000 | [diff] [blame] | 79 | const sctp_sm_table_entry_t *sctp_sm_lookup_event(struct net *net, |
| 80 | sctp_event_t event_type, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 81 | sctp_state_t state, |
| 82 | sctp_subtype_t event_subtype) |
| 83 | { |
| 84 | switch (event_type) { |
| 85 | case SCTP_EVENT_T_CHUNK: |
Eric W. Biederman | 55e26eb | 2012-08-07 07:25:24 +0000 | [diff] [blame] | 86 | return sctp_chunk_event_lookup(net, event_subtype.chunk, state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 | case SCTP_EVENT_T_TIMEOUT: |
Joe Perches | 145ce50 | 2010-08-24 13:21:08 +0000 | [diff] [blame] | 88 | return DO_LOOKUP(SCTP_EVENT_TIMEOUT_MAX, timeout, |
| 89 | timeout_event_table); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 90 | case SCTP_EVENT_T_OTHER: |
Joe Perches | 145ce50 | 2010-08-24 13:21:08 +0000 | [diff] [blame] | 91 | return DO_LOOKUP(SCTP_EVENT_OTHER_MAX, other, |
| 92 | other_event_table); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 93 | case SCTP_EVENT_T_PRIMITIVE: |
Joe Perches | 145ce50 | 2010-08-24 13:21:08 +0000 | [diff] [blame] | 94 | return DO_LOOKUP(SCTP_EVENT_PRIMITIVE_MAX, primitive, |
| 95 | primitive_event_table); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 96 | default: |
| 97 | /* Yikes! We got an illegal event type. */ |
| 98 | return &bug; |
Stephen Hemminger | 3ff50b7 | 2007-04-20 17:09:22 -0700 | [diff] [blame] | 99 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 100 | } |
| 101 | |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 102 | #define TYPE_SCTP_FUNC(func) {.fn = func, .name = #func} |
| 103 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 104 | #define TYPE_SCTP_DATA { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 106 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 107 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 108 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 109 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 110 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 111 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 112 | TYPE_SCTP_FUNC(sctp_sf_eat_data_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 113 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 114 | TYPE_SCTP_FUNC(sctp_sf_eat_data_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 115 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 116 | TYPE_SCTP_FUNC(sctp_sf_eat_data_fast_4_4), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 117 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 118 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 119 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 120 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 121 | } /* TYPE_SCTP_DATA */ |
| 122 | |
| 123 | #define TYPE_SCTP_INIT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 124 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 125 | TYPE_SCTP_FUNC(sctp_sf_do_5_1B_init), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 127 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_1_siminit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 128 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 129 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_1_siminit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 130 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 131 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 132 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 133 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 134 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 135 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 136 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 137 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 138 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 139 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_reshutack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | } /* TYPE_SCTP_INIT */ |
| 141 | |
| 142 | #define TYPE_SCTP_INIT_ACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 143 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | 610ab73 | 2007-01-15 19:18:30 -0800 | [diff] [blame] | 144 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_3_initack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 145 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 146 | TYPE_SCTP_FUNC(sctp_sf_do_5_1C_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 147 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 148 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 149 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 150 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 151 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 152 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 153 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 154 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 155 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 156 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 157 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 158 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 159 | } /* TYPE_SCTP_INIT_ACK */ |
| 160 | |
| 161 | #define TYPE_SCTP_SACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 163 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 164 | /* SCTP_STATE_COOKIE_WAIT */ \ |
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_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 167 | TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 168 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 169 | TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 170 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 171 | TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 172 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 173 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 174 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 175 | TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 176 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 177 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 178 | } /* TYPE_SCTP_SACK */ |
| 179 | |
| 180 | #define TYPE_SCTP_HEARTBEAT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 181 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 182 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 183 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 184 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 185 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 186 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 187 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 188 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 190 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 191 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 192 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 193 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 194 | TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 195 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
| 196 | /* This should not happen, but we are nice. */ \ |
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 | } /* TYPE_SCTP_HEARTBEAT */ |
| 199 | |
| 200 | #define TYPE_SCTP_HEARTBEAT_ACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 201 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 202 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 203 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 204 | TYPE_SCTP_FUNC(sctp_sf_violation), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 205 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 206 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 207 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 208 | TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 209 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 210 | TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 211 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 212 | TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 213 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 214 | TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 215 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 216 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 217 | } /* TYPE_SCTP_HEARTBEAT_ACK */ |
| 218 | |
| 219 | #define TYPE_SCTP_ABORT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 220 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 221 | TYPE_SCTP_FUNC(sctp_sf_pdiscard), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 222 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 223 | TYPE_SCTP_FUNC(sctp_sf_cookie_wait_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 224 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 225 | TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 226 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 227 | TYPE_SCTP_FUNC(sctp_sf_do_9_1_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 228 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 229 | TYPE_SCTP_FUNC(sctp_sf_shutdown_pending_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 230 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 231 | TYPE_SCTP_FUNC(sctp_sf_shutdown_sent_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 232 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 233 | TYPE_SCTP_FUNC(sctp_sf_do_9_1_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 234 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 235 | TYPE_SCTP_FUNC(sctp_sf_shutdown_ack_sent_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 236 | } /* TYPE_SCTP_ABORT */ |
| 237 | |
| 238 | #define TYPE_SCTP_SHUTDOWN { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 239 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 240 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
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_discard_chunk), \ |
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_discard_chunk), \ |
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_2_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 247 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Wei Yongjun | cf896d5 | 2008-10-23 01:00:49 -0700 | [diff] [blame] | 248 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown), \ |
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_do_9_2_shutdown_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 251 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Wei Yongjun | 2e3f92d | 2008-10-23 01:01:18 -0700 | [diff] [blame] | 252 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_shut_ctsn), \ |
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_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 255 | } /* TYPE_SCTP_SHUTDOWN */ |
| 256 | |
| 257 | #define TYPE_SCTP_SHUTDOWN_ACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | /* SCTP_STATE_CLOSED */ \ |
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_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 261 | TYPE_SCTP_FUNC(sctp_sf_do_8_5_1_E_sa), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 262 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 263 | TYPE_SCTP_FUNC(sctp_sf_do_8_5_1_E_sa), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 264 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 265 | TYPE_SCTP_FUNC(sctp_sf_violation), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 266 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 267 | TYPE_SCTP_FUNC(sctp_sf_violation), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 268 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 269 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_final), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 270 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 271 | TYPE_SCTP_FUNC(sctp_sf_violation), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 272 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 273 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_final), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 274 | } /* TYPE_SCTP_SHUTDOWN_ACK */ |
| 275 | |
| 276 | #define TYPE_SCTP_ERROR { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 277 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 278 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 279 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 280 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 281 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 282 | TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_err), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 283 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 284 | TYPE_SCTP_FUNC(sctp_sf_operr_notify), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 285 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 286 | TYPE_SCTP_FUNC(sctp_sf_operr_notify), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 287 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 288 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 289 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 290 | TYPE_SCTP_FUNC(sctp_sf_operr_notify), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 291 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 292 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 293 | } /* TYPE_SCTP_ERROR */ |
| 294 | |
| 295 | #define TYPE_SCTP_COOKIE_ECHO { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 296 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 297 | TYPE_SCTP_FUNC(sctp_sf_do_5_1D_ce), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 298 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 299 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 300 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 301 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 302 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 303 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 304 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 305 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 306 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 307 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 308 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 309 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 310 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 311 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 312 | } /* TYPE_SCTP_COOKIE_ECHO */ |
| 313 | |
| 314 | #define TYPE_SCTP_COOKIE_ACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 315 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 316 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 317 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 318 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 319 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 320 | TYPE_SCTP_FUNC(sctp_sf_do_5_1E_ca), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 321 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 322 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 323 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 324 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 325 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 326 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 327 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 328 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 329 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 330 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 331 | } /* TYPE_SCTP_COOKIE_ACK */ |
| 332 | |
| 333 | #define TYPE_SCTP_ECN_ECNE { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 334 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 337 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 338 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 339 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 340 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 341 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 342 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 343 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 344 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 345 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 346 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 347 | TYPE_SCTP_FUNC(sctp_sf_do_ecne), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 348 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 349 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 350 | } /* TYPE_SCTP_ECN_ECNE */ |
| 351 | |
| 352 | #define TYPE_SCTP_ECN_CWR { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 353 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 356 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 357 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 358 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 359 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 360 | TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 361 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 362 | TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 363 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 364 | TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 365 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
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_SHUTDOWN_ACK_SENT */ \ |
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 | } /* TYPE_SCTP_ECN_CWR */ |
| 370 | |
| 371 | #define TYPE_SCTP_SHUTDOWN_COMPLETE { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 372 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 375 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 376 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 377 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 378 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 379 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 380 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 381 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 382 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 383 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 384 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 385 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 386 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 387 | TYPE_SCTP_FUNC(sctp_sf_do_4_C), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 388 | } /* TYPE_SCTP_SHUTDOWN_COMPLETE */ |
| 389 | |
| 390 | /* The primary index for this table is the chunk type. |
| 391 | * The secondary index for this table is the state. |
| 392 | * |
| 393 | * For base protocol (RFC 2960). |
| 394 | */ |
| 395 | static const sctp_sm_table_entry_t chunk_event_table[SCTP_NUM_BASE_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = { |
| 396 | TYPE_SCTP_DATA, |
| 397 | TYPE_SCTP_INIT, |
| 398 | TYPE_SCTP_INIT_ACK, |
| 399 | TYPE_SCTP_SACK, |
| 400 | TYPE_SCTP_HEARTBEAT, |
| 401 | TYPE_SCTP_HEARTBEAT_ACK, |
| 402 | TYPE_SCTP_ABORT, |
| 403 | TYPE_SCTP_SHUTDOWN, |
| 404 | TYPE_SCTP_SHUTDOWN_ACK, |
| 405 | TYPE_SCTP_ERROR, |
| 406 | TYPE_SCTP_COOKIE_ECHO, |
| 407 | TYPE_SCTP_COOKIE_ACK, |
| 408 | TYPE_SCTP_ECN_ECNE, |
| 409 | TYPE_SCTP_ECN_CWR, |
| 410 | TYPE_SCTP_SHUTDOWN_COMPLETE, |
| 411 | }; /* state_fn_t chunk_event_table[][] */ |
| 412 | |
| 413 | #define TYPE_SCTP_ASCONF { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 414 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 415 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 416 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 417 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 418 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 419 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 420 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 421 | TYPE_SCTP_FUNC(sctp_sf_do_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 422 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 423 | TYPE_SCTP_FUNC(sctp_sf_do_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 424 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 425 | TYPE_SCTP_FUNC(sctp_sf_do_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 426 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 427 | TYPE_SCTP_FUNC(sctp_sf_do_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 428 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 429 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 430 | } /* TYPE_SCTP_ASCONF */ |
| 431 | |
| 432 | #define TYPE_SCTP_ASCONF_ACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 433 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 436 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 437 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 438 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 439 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 440 | TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 441 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 442 | TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 443 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 444 | TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 445 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 446 | TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 447 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 448 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 449 | } /* TYPE_SCTP_ASCONF_ACK */ |
| 450 | |
| 451 | /* The primary index for this table is the chunk type. |
| 452 | * The secondary index for this table is the state. |
| 453 | */ |
| 454 | static const sctp_sm_table_entry_t addip_chunk_event_table[SCTP_NUM_ADDIP_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = { |
| 455 | TYPE_SCTP_ASCONF, |
| 456 | TYPE_SCTP_ASCONF_ACK, |
| 457 | }; /*state_fn_t addip_chunk_event_table[][] */ |
| 458 | |
| 459 | #define TYPE_SCTP_FWD_TSN { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 460 | /* SCTP_STATE_CLOSED */ \ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 461 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 462 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 463 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 464 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 465 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 466 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 467 | TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 468 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 469 | TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 470 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 471 | TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn_fast), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 472 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
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_SHUTDOWN_ACK_SENT */ \ |
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 | } /* TYPE_SCTP_FWD_TSN */ |
| 477 | |
| 478 | /* The primary index for this table is the chunk type. |
| 479 | * The secondary index for this table is the state. |
| 480 | */ |
| 481 | static const sctp_sm_table_entry_t prsctp_chunk_event_table[SCTP_NUM_PRSCTP_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = { |
| 482 | TYPE_SCTP_FWD_TSN, |
| 483 | }; /*state_fn_t prsctp_chunk_event_table[][] */ |
| 484 | |
Vlad Yasevich | bbd0d59 | 2007-10-03 17:51:34 -0700 | [diff] [blame] | 485 | #define TYPE_SCTP_AUTH { \ |
Vlad Yasevich | bbd0d59 | 2007-10-03 17:51:34 -0700 | [diff] [blame] | 486 | /* SCTP_STATE_CLOSED */ \ |
| 487 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
| 488 | /* SCTP_STATE_COOKIE_WAIT */ \ |
| 489 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ |
| 490 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
| 491 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 492 | /* SCTP_STATE_ESTABLISHED */ \ |
| 493 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 494 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
| 495 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 496 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
| 497 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 498 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
| 499 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 500 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
| 501 | TYPE_SCTP_FUNC(sctp_sf_eat_auth), \ |
| 502 | } /* TYPE_SCTP_AUTH */ |
| 503 | |
| 504 | /* The primary index for this table is the chunk type. |
| 505 | * The secondary index for this table is the state. |
| 506 | */ |
| 507 | static const sctp_sm_table_entry_t auth_chunk_event_table[SCTP_NUM_AUTH_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = { |
| 508 | TYPE_SCTP_AUTH, |
| 509 | }; /*state_fn_t auth_chunk_event_table[][] */ |
| 510 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 511 | static const sctp_sm_table_entry_t |
| 512 | chunk_event_table_unknown[SCTP_STATE_NUM_STATES] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 513 | /* SCTP_STATE_CLOSED */ |
Vlad Yasevich | ece25df | 2007-09-07 16:30:54 -0400 | [diff] [blame] | 514 | TYPE_SCTP_FUNC(sctp_sf_ootb), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 515 | /* SCTP_STATE_COOKIE_WAIT */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 516 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 517 | /* SCTP_STATE_COOKIE_ECHOED */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 518 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 519 | /* SCTP_STATE_ESTABLISHED */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 520 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 521 | /* SCTP_STATE_SHUTDOWN_PENDING */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 522 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 523 | /* SCTP_STATE_SHUTDOWN_SENT */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 524 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 525 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 526 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 527 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 528 | TYPE_SCTP_FUNC(sctp_sf_unk_chunk), |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 529 | }; /* chunk unknown */ |
| 530 | |
| 531 | |
| 532 | #define TYPE_SCTP_PRIMITIVE_ASSOCIATE { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 533 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 534 | TYPE_SCTP_FUNC(sctp_sf_do_prm_asoc), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 535 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 536 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 537 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 538 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 539 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 540 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 541 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 542 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 543 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 544 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 545 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 546 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 547 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 548 | TYPE_SCTP_FUNC(sctp_sf_not_impl), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 549 | } /* TYPE_SCTP_PRIMITIVE_ASSOCIATE */ |
| 550 | |
| 551 | #define TYPE_SCTP_PRIMITIVE_SHUTDOWN { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 552 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 553 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 554 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 555 | TYPE_SCTP_FUNC(sctp_sf_cookie_wait_prm_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 556 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 557 | TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_prm_shutdown),\ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 558 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 559 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_prm_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 560 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 561 | TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 562 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 563 | TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 564 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 565 | TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 566 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 567 | TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 568 | } /* TYPE_SCTP_PRIMITIVE_SHUTDOWN */ |
| 569 | |
| 570 | #define TYPE_SCTP_PRIMITIVE_ABORT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 571 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 572 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 573 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 574 | TYPE_SCTP_FUNC(sctp_sf_cookie_wait_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 575 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 576 | TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 577 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 578 | TYPE_SCTP_FUNC(sctp_sf_do_9_1_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 579 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 580 | TYPE_SCTP_FUNC(sctp_sf_shutdown_pending_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 581 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 582 | TYPE_SCTP_FUNC(sctp_sf_shutdown_sent_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 583 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 584 | TYPE_SCTP_FUNC(sctp_sf_do_9_1_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 585 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 586 | TYPE_SCTP_FUNC(sctp_sf_shutdown_ack_sent_prm_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 587 | } /* TYPE_SCTP_PRIMITIVE_ABORT */ |
| 588 | |
| 589 | #define TYPE_SCTP_PRIMITIVE_SEND { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 590 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 591 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 592 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 593 | TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 594 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 595 | TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 596 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 597 | TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 598 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 599 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 600 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 601 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 602 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 603 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 604 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 605 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 606 | } /* TYPE_SCTP_PRIMITIVE_SEND */ |
| 607 | |
| 608 | #define TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 609 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 610 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 611 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 612 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 613 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 614 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 615 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 616 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 617 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 618 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 619 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 620 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 621 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 622 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 623 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 624 | TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 625 | } /* TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT */ |
| 626 | |
| 627 | #define TYPE_SCTP_PRIMITIVE_ASCONF { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 628 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 629 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 630 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 631 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 632 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 633 | TYPE_SCTP_FUNC(sctp_sf_error_closed), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 634 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 635 | TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 636 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 637 | TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 638 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 639 | TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 640 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Vlad Yasevich | ba8a06d | 2007-12-20 14:11:11 -0800 | [diff] [blame] | 641 | TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 642 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 643 | TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \ |
Wei Yongjun | 4553e88 | 2009-04-07 16:36:14 +0800 | [diff] [blame] | 644 | } /* TYPE_SCTP_PRIMITIVE_ASCONF */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 645 | |
| 646 | /* The primary index for this table is the primitive type. |
| 647 | * The secondary index for this table is the state. |
| 648 | */ |
| 649 | static const sctp_sm_table_entry_t primitive_event_table[SCTP_NUM_PRIMITIVE_TYPES][SCTP_STATE_NUM_STATES] = { |
| 650 | TYPE_SCTP_PRIMITIVE_ASSOCIATE, |
| 651 | TYPE_SCTP_PRIMITIVE_SHUTDOWN, |
| 652 | TYPE_SCTP_PRIMITIVE_ABORT, |
| 653 | TYPE_SCTP_PRIMITIVE_SEND, |
| 654 | TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT, |
| 655 | TYPE_SCTP_PRIMITIVE_ASCONF, |
| 656 | }; |
| 657 | |
| 658 | #define TYPE_SCTP_OTHER_NO_PENDING_TSN { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 659 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 660 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 661 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 662 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 663 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 664 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 665 | /* SCTP_STATE_ESTABLISHED */ \ |
Wei Yongjun | e1cdd55 | 2011-04-17 17:29:03 +0000 | [diff] [blame] | 666 | TYPE_SCTP_FUNC(sctp_sf_do_no_pending_tsn), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 667 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 668 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_start_shutdown), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 669 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 670 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 671 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 672 | TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown_ack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 673 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 674 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 675 | } |
| 676 | |
| 677 | #define TYPE_SCTP_OTHER_ICMP_PROTO_UNREACH { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 678 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 681 | TYPE_SCTP_FUNC(sctp_sf_cookie_wait_icmp_abort), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 682 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 683 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 684 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 685 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 686 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 687 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 688 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 689 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 690 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 691 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 692 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 693 | TYPE_SCTP_FUNC(sctp_sf_ignore_other), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 694 | } |
| 695 | |
| 696 | static const sctp_sm_table_entry_t other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES] = { |
| 697 | TYPE_SCTP_OTHER_NO_PENDING_TSN, |
| 698 | TYPE_SCTP_OTHER_ICMP_PROTO_UNREACH, |
| 699 | }; |
| 700 | |
| 701 | #define TYPE_SCTP_EVENT_TIMEOUT_NONE { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 702 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 703 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 704 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 705 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 706 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 707 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 708 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 709 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 710 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 711 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 712 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 713 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 714 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 715 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 716 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
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 | } |
| 719 | |
| 720 | #define TYPE_SCTP_EVENT_TIMEOUT_T1_COOKIE { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 721 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 722 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 723 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 724 | TYPE_SCTP_FUNC(sctp_sf_bug), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 725 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 726 | TYPE_SCTP_FUNC(sctp_sf_t1_cookie_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 727 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 728 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 729 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 730 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 731 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 732 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 733 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 734 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 735 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 736 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 737 | } |
| 738 | |
| 739 | #define TYPE_SCTP_EVENT_TIMEOUT_T1_INIT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 740 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 743 | TYPE_SCTP_FUNC(sctp_sf_t1_init_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 744 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 745 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 746 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 747 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 748 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 749 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 750 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 751 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 752 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 753 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 754 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 755 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 756 | } |
| 757 | |
| 758 | #define TYPE_SCTP_EVENT_TIMEOUT_T2_SHUTDOWN { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 759 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 762 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 763 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 764 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 765 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 766 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 767 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 768 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 769 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 770 | TYPE_SCTP_FUNC(sctp_sf_t2_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 771 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 772 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 773 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 774 | TYPE_SCTP_FUNC(sctp_sf_t2_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 775 | } |
| 776 | |
| 777 | #define TYPE_SCTP_EVENT_TIMEOUT_T3_RTX { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 778 | /* SCTP_STATE_CLOSED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 779 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 780 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 781 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 782 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 783 | TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 784 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 785 | TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 786 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 787 | TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 788 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 789 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 790 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 791 | TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 792 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
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 | } |
| 795 | |
| 796 | #define TYPE_SCTP_EVENT_TIMEOUT_T4_RTO { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 797 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 800 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 801 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 802 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 803 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 804 | TYPE_SCTP_FUNC(sctp_sf_t4_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 805 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 806 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 807 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
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_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 810 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 811 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
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 | } |
| 814 | |
| 815 | #define TYPE_SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 816 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 819 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 820 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 821 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 822 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 823 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 824 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Thomas Graf | f8d9605 | 2011-07-07 00:28:35 +0000 | [diff] [blame] | 825 | TYPE_SCTP_FUNC(sctp_sf_t5_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 826 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 827 | TYPE_SCTP_FUNC(sctp_sf_t5_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 828 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
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_SHUTDOWN_ACK_SENT */ \ |
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 | } |
| 833 | |
| 834 | #define TYPE_SCTP_EVENT_TIMEOUT_HEARTBEAT { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 835 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 838 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 839 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 840 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 841 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 842 | TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 843 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 844 | TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 845 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 846 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 847 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 848 | TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 849 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
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 | } |
| 852 | |
| 853 | #define TYPE_SCTP_EVENT_TIMEOUT_SACK { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 854 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 857 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 858 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 859 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 860 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 861 | TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 862 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 863 | TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 864 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 865 | TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 866 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 867 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 868 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 869 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 870 | } |
| 871 | |
| 872 | #define TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE { \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 873 | /* SCTP_STATE_CLOSED */ \ |
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 | /* SCTP_STATE_COOKIE_WAIT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 876 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 877 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 878 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 879 | /* SCTP_STATE_ESTABLISHED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 880 | TYPE_SCTP_FUNC(sctp_sf_autoclose_timer_expire), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 881 | /* SCTP_STATE_SHUTDOWN_PENDING */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 882 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 883 | /* SCTP_STATE_SHUTDOWN_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 884 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 885 | /* SCTP_STATE_SHUTDOWN_RECEIVED */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 886 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 887 | /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \ |
Peter Zijlstra | 1ed176a | 2006-11-13 16:19:07 -0800 | [diff] [blame] | 888 | TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 889 | } |
| 890 | |
| 891 | static const sctp_sm_table_entry_t timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES] = { |
| 892 | TYPE_SCTP_EVENT_TIMEOUT_NONE, |
| 893 | TYPE_SCTP_EVENT_TIMEOUT_T1_COOKIE, |
| 894 | TYPE_SCTP_EVENT_TIMEOUT_T1_INIT, |
| 895 | TYPE_SCTP_EVENT_TIMEOUT_T2_SHUTDOWN, |
| 896 | TYPE_SCTP_EVENT_TIMEOUT_T3_RTX, |
| 897 | TYPE_SCTP_EVENT_TIMEOUT_T4_RTO, |
| 898 | TYPE_SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD, |
| 899 | TYPE_SCTP_EVENT_TIMEOUT_HEARTBEAT, |
| 900 | TYPE_SCTP_EVENT_TIMEOUT_SACK, |
| 901 | TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE, |
| 902 | }; |
| 903 | |
Eric W. Biederman | 55e26eb | 2012-08-07 07:25:24 +0000 | [diff] [blame] | 904 | static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(struct net *net, |
| 905 | sctp_cid_t cid, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 906 | sctp_state_t state) |
| 907 | { |
| 908 | if (state > SCTP_STATE_MAX) |
| 909 | return &bug; |
| 910 | |
Bill Nottingham | 75202e7 | 2007-05-31 21:33:35 -0700 | [diff] [blame] | 911 | if (cid <= SCTP_CID_BASE_MAX) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 912 | return &chunk_event_table[cid][state]; |
| 913 | |
Eric W. Biederman | e1fc3b1 | 2012-08-07 07:29:57 +0000 | [diff] [blame] | 914 | if (net->sctp.prsctp_enable) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 915 | if (cid == SCTP_CID_FWD_TSN) |
| 916 | return &prsctp_chunk_event_table[0][state]; |
| 917 | } |
| 918 | |
Eric W. Biederman | e1fc3b1 | 2012-08-07 07:29:57 +0000 | [diff] [blame] | 919 | if (net->sctp.addip_enable) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 920 | if (cid == SCTP_CID_ASCONF) |
| 921 | return &addip_chunk_event_table[0][state]; |
| 922 | |
| 923 | if (cid == SCTP_CID_ASCONF_ACK) |
| 924 | return &addip_chunk_event_table[1][state]; |
| 925 | } |
| 926 | |
Eric W. Biederman | e1fc3b1 | 2012-08-07 07:29:57 +0000 | [diff] [blame] | 927 | if (net->sctp.auth_enable) { |
Vlad Yasevich | bbd0d59 | 2007-10-03 17:51:34 -0700 | [diff] [blame] | 928 | if (cid == SCTP_CID_AUTH) |
| 929 | return &auth_chunk_event_table[0][state]; |
| 930 | } |
| 931 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 932 | return &chunk_event_table_unknown[state]; |
| 933 | } |