18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
28c2ecf20Sopenharmony_ci/* SCTP kernel implementation
38c2ecf20Sopenharmony_ci * (C) Copyright IBM Corp. 2001, 2004
48c2ecf20Sopenharmony_ci * Copyright (c) 1999-2000 Cisco, Inc.
58c2ecf20Sopenharmony_ci * Copyright (c) 1999-2001 Motorola, Inc.
68c2ecf20Sopenharmony_ci * Copyright (c) 2001 Intel Corp.
78c2ecf20Sopenharmony_ci * Copyright (c) 2001 Nokia, Inc.
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * This file is part of the SCTP kernel implementation
108c2ecf20Sopenharmony_ci *
118c2ecf20Sopenharmony_ci * These are the state tables for the SCTP state machine.
128c2ecf20Sopenharmony_ci *
138c2ecf20Sopenharmony_ci * Please send any bug reports or fixes you make to the
148c2ecf20Sopenharmony_ci * email address(es):
158c2ecf20Sopenharmony_ci *    lksctp developers <linux-sctp@vger.kernel.org>
168c2ecf20Sopenharmony_ci *
178c2ecf20Sopenharmony_ci * Written or modified by:
188c2ecf20Sopenharmony_ci *    La Monte H.P. Yarroll <piggy@acm.org>
198c2ecf20Sopenharmony_ci *    Karl Knutson          <karl@athena.chicago.il.us>
208c2ecf20Sopenharmony_ci *    Jon Grimm             <jgrimm@us.ibm.com>
218c2ecf20Sopenharmony_ci *    Hui Huang		    <hui.huang@nokia.com>
228c2ecf20Sopenharmony_ci *    Daisy Chang	    <daisyc@us.ibm.com>
238c2ecf20Sopenharmony_ci *    Ardelle Fan	    <ardelle.fan@intel.com>
248c2ecf20Sopenharmony_ci *    Sridhar Samudrala	    <sri@us.ibm.com>
258c2ecf20Sopenharmony_ci */
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci#include <linux/skbuff.h>
308c2ecf20Sopenharmony_ci#include <net/sctp/sctp.h>
318c2ecf20Sopenharmony_ci#include <net/sctp/sm.h>
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry
348c2ecf20Sopenharmony_ciprimitive_event_table[SCTP_NUM_PRIMITIVE_TYPES][SCTP_STATE_NUM_STATES];
358c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry
368c2ecf20Sopenharmony_ciother_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES];
378c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry
388c2ecf20Sopenharmony_citimeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES];
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry *sctp_chunk_event_lookup(
418c2ecf20Sopenharmony_ci						struct net *net,
428c2ecf20Sopenharmony_ci						enum sctp_cid cid,
438c2ecf20Sopenharmony_ci						enum sctp_state state);
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry bug = {
478c2ecf20Sopenharmony_ci	.fn = sctp_sf_bug,
488c2ecf20Sopenharmony_ci	.name = "sctp_sf_bug"
498c2ecf20Sopenharmony_ci};
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci#define DO_LOOKUP(_max, _type, _table)					\
528c2ecf20Sopenharmony_ci({									\
538c2ecf20Sopenharmony_ci	const struct sctp_sm_table_entry *rtn;				\
548c2ecf20Sopenharmony_ci									\
558c2ecf20Sopenharmony_ci	if ((event_subtype._type > (_max))) {				\
568c2ecf20Sopenharmony_ci		pr_warn("table %p possible attack: event %d exceeds max %d\n", \
578c2ecf20Sopenharmony_ci			_table, event_subtype._type, _max);		\
588c2ecf20Sopenharmony_ci		rtn = &bug;						\
598c2ecf20Sopenharmony_ci	} else								\
608c2ecf20Sopenharmony_ci		rtn = &_table[event_subtype._type][(int)state];		\
618c2ecf20Sopenharmony_ci									\
628c2ecf20Sopenharmony_ci	rtn;								\
638c2ecf20Sopenharmony_ci})
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ciconst struct sctp_sm_table_entry *sctp_sm_lookup_event(
668c2ecf20Sopenharmony_ci					struct net *net,
678c2ecf20Sopenharmony_ci					enum sctp_event_type event_type,
688c2ecf20Sopenharmony_ci					enum sctp_state state,
698c2ecf20Sopenharmony_ci					union sctp_subtype event_subtype)
708c2ecf20Sopenharmony_ci{
718c2ecf20Sopenharmony_ci	switch (event_type) {
728c2ecf20Sopenharmony_ci	case SCTP_EVENT_T_CHUNK:
738c2ecf20Sopenharmony_ci		return sctp_chunk_event_lookup(net, event_subtype.chunk, state);
748c2ecf20Sopenharmony_ci	case SCTP_EVENT_T_TIMEOUT:
758c2ecf20Sopenharmony_ci		return DO_LOOKUP(SCTP_EVENT_TIMEOUT_MAX, timeout,
768c2ecf20Sopenharmony_ci				 timeout_event_table);
778c2ecf20Sopenharmony_ci	case SCTP_EVENT_T_OTHER:
788c2ecf20Sopenharmony_ci		return DO_LOOKUP(SCTP_EVENT_OTHER_MAX, other,
798c2ecf20Sopenharmony_ci				 other_event_table);
808c2ecf20Sopenharmony_ci	case SCTP_EVENT_T_PRIMITIVE:
818c2ecf20Sopenharmony_ci		return DO_LOOKUP(SCTP_EVENT_PRIMITIVE_MAX, primitive,
828c2ecf20Sopenharmony_ci				 primitive_event_table);
838c2ecf20Sopenharmony_ci	default:
848c2ecf20Sopenharmony_ci		/* Yikes!  We got an illegal event type.  */
858c2ecf20Sopenharmony_ci		return &bug;
868c2ecf20Sopenharmony_ci	}
878c2ecf20Sopenharmony_ci}
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci#define TYPE_SCTP_FUNC(func) {.fn = func, .name = #func}
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci#define TYPE_SCTP_DATA { \
928c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
938c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ootb), \
948c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
958c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
968c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
978c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
988c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
998c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_data_6_2), \
1008c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
1018c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_data_6_2), \
1028c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
1038c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_data_fast_4_4), \
1048c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
1058c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1068c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
1078c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1088c2ecf20Sopenharmony_ci} /* TYPE_SCTP_DATA */
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci#define TYPE_SCTP_INIT { \
1118c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
1128c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_1B_init), \
1138c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
1148c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_1_siminit), \
1158c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
1168c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_1_siminit), \
1178c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
1188c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \
1198c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
1208c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \
1218c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
1228c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \
1238c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
1248c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_2_dupinit), \
1258c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
1268c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_2_reshutack), \
1278c2ecf20Sopenharmony_ci} /* TYPE_SCTP_INIT */
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ci#define TYPE_SCTP_INIT_ACK { \
1308c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
1318c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_3_initack), \
1328c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
1338c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_1C_ack), \
1348c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
1358c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1368c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
1378c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1388c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
1398c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1408c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
1418c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1428c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
1438c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1448c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
1458c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1468c2ecf20Sopenharmony_ci} /* TYPE_SCTP_INIT_ACK */
1478c2ecf20Sopenharmony_ci
1488c2ecf20Sopenharmony_ci#define TYPE_SCTP_SACK { \
1498c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
1508c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ootb), \
1518c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
1528c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1538c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
1548c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \
1558c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
1568c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \
1578c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
1588c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \
1598c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
1608c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1618c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
1628c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_sack_6_2), \
1638c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
1648c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1658c2ecf20Sopenharmony_ci} /* TYPE_SCTP_SACK */
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_ci#define TYPE_SCTP_HEARTBEAT { \
1688c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
1698c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ootb), \
1708c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
1718c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1728c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
1738c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \
1748c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
1758c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \
1768c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
1778c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \
1788c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
1798c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \
1808c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
1818c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \
1828c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
1838c2ecf20Sopenharmony_ci	/* This should not happen, but we are nice.  */ \
1848c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_beat_8_3), \
1858c2ecf20Sopenharmony_ci} /* TYPE_SCTP_HEARTBEAT */
1868c2ecf20Sopenharmony_ci
1878c2ecf20Sopenharmony_ci#define TYPE_SCTP_HEARTBEAT_ACK { \
1888c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
1898c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ootb), \
1908c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
1918c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_violation), \
1928c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
1938c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
1948c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
1958c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \
1968c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
1978c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \
1988c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
1998c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \
2008c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
2018c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_backbeat_8_3), \
2028c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
2038c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
2048c2ecf20Sopenharmony_ci} /* TYPE_SCTP_HEARTBEAT_ACK */
2058c2ecf20Sopenharmony_ci
2068c2ecf20Sopenharmony_ci#define TYPE_SCTP_ABORT { \
2078c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
2088c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_pdiscard), \
2098c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
2108c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_cookie_wait_abort), \
2118c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
2128c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_abort), \
2138c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
2148c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_1_abort), \
2158c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
2168c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_shutdown_pending_abort), \
2178c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
2188c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_shutdown_sent_abort), \
2198c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
2208c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_1_abort), \
2218c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
2228c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_shutdown_ack_sent_abort), \
2238c2ecf20Sopenharmony_ci} /* TYPE_SCTP_ABORT */
2248c2ecf20Sopenharmony_ci
2258c2ecf20Sopenharmony_ci#define TYPE_SCTP_SHUTDOWN { \
2268c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
2278c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ootb), \
2288c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
2298c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
2308c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
2318c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
2328c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
2338c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown), \
2348c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
2358c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown), \
2368c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
2378c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown_ack), \
2388c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
2398c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_2_shut_ctsn), \
2408c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
2418c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
2428c2ecf20Sopenharmony_ci} /* TYPE_SCTP_SHUTDOWN */
2438c2ecf20Sopenharmony_ci
2448c2ecf20Sopenharmony_ci#define TYPE_SCTP_SHUTDOWN_ACK { \
2458c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
2468c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ootb), \
2478c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
2488c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_8_5_1_E_sa), \
2498c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
2508c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_8_5_1_E_sa), \
2518c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
2528c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_violation), \
2538c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
2548c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_violation), \
2558c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
2568c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_2_final), \
2578c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
2588c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_violation), \
2598c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
2608c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_2_final), \
2618c2ecf20Sopenharmony_ci} /* TYPE_SCTP_SHUTDOWN_ACK */
2628c2ecf20Sopenharmony_ci
2638c2ecf20Sopenharmony_ci#define TYPE_SCTP_ERROR { \
2648c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
2658c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ootb), \
2668c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
2678c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
2688c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
2698c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_err), \
2708c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
2718c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_operr_notify), \
2728c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
2738c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_operr_notify), \
2748c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
2758c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
2768c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
2778c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_operr_notify), \
2788c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
2798c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
2808c2ecf20Sopenharmony_ci} /* TYPE_SCTP_ERROR */
2818c2ecf20Sopenharmony_ci
2828c2ecf20Sopenharmony_ci#define TYPE_SCTP_COOKIE_ECHO { \
2838c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
2848c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_1D_ce), \
2858c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
2868c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
2878c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
2888c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
2898c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
2908c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
2918c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
2928c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
2938c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
2948c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
2958c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
2968c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
2978c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
2988c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_2_4_dupcook), \
2998c2ecf20Sopenharmony_ci} /* TYPE_SCTP_COOKIE_ECHO */
3008c2ecf20Sopenharmony_ci
3018c2ecf20Sopenharmony_ci#define TYPE_SCTP_COOKIE_ACK { \
3028c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
3038c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3048c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
3058c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3068c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
3078c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_5_1E_ca), \
3088c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
3098c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3108c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
3118c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3128c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
3138c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3148c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
3158c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3168c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
3178c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3188c2ecf20Sopenharmony_ci} /* TYPE_SCTP_COOKIE_ACK */
3198c2ecf20Sopenharmony_ci
3208c2ecf20Sopenharmony_ci#define TYPE_SCTP_ECN_ECNE { \
3218c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
3228c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3238c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
3248c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3258c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
3268c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_ecne), \
3278c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
3288c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_ecne), \
3298c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
3308c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_ecne), \
3318c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
3328c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_ecne), \
3338c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
3348c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_ecne), \
3358c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
3368c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3378c2ecf20Sopenharmony_ci} /* TYPE_SCTP_ECN_ECNE */
3388c2ecf20Sopenharmony_ci
3398c2ecf20Sopenharmony_ci#define TYPE_SCTP_ECN_CWR { \
3408c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
3418c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3428c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
3438c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3448c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
3458c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3468c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
3478c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \
3488c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
3498c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \
3508c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
3518c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_ecn_cwr), \
3528c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
3538c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3548c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
3558c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3568c2ecf20Sopenharmony_ci} /* TYPE_SCTP_ECN_CWR */
3578c2ecf20Sopenharmony_ci
3588c2ecf20Sopenharmony_ci#define TYPE_SCTP_SHUTDOWN_COMPLETE { \
3598c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
3608c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3618c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
3628c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3638c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
3648c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3658c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
3668c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3678c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
3688c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3698c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
3708c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3718c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
3728c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
3738c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
3748c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_4_C), \
3758c2ecf20Sopenharmony_ci} /* TYPE_SCTP_SHUTDOWN_COMPLETE */
3768c2ecf20Sopenharmony_ci
3778c2ecf20Sopenharmony_ci/* The primary index for this table is the chunk type.
3788c2ecf20Sopenharmony_ci * The secondary index for this table is the state.
3798c2ecf20Sopenharmony_ci *
3808c2ecf20Sopenharmony_ci * For base protocol (RFC 2960).
3818c2ecf20Sopenharmony_ci */
3828c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry
3838c2ecf20Sopenharmony_cichunk_event_table[SCTP_NUM_BASE_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = {
3848c2ecf20Sopenharmony_ci	TYPE_SCTP_DATA,
3858c2ecf20Sopenharmony_ci	TYPE_SCTP_INIT,
3868c2ecf20Sopenharmony_ci	TYPE_SCTP_INIT_ACK,
3878c2ecf20Sopenharmony_ci	TYPE_SCTP_SACK,
3888c2ecf20Sopenharmony_ci	TYPE_SCTP_HEARTBEAT,
3898c2ecf20Sopenharmony_ci	TYPE_SCTP_HEARTBEAT_ACK,
3908c2ecf20Sopenharmony_ci	TYPE_SCTP_ABORT,
3918c2ecf20Sopenharmony_ci	TYPE_SCTP_SHUTDOWN,
3928c2ecf20Sopenharmony_ci	TYPE_SCTP_SHUTDOWN_ACK,
3938c2ecf20Sopenharmony_ci	TYPE_SCTP_ERROR,
3948c2ecf20Sopenharmony_ci	TYPE_SCTP_COOKIE_ECHO,
3958c2ecf20Sopenharmony_ci	TYPE_SCTP_COOKIE_ACK,
3968c2ecf20Sopenharmony_ci	TYPE_SCTP_ECN_ECNE,
3978c2ecf20Sopenharmony_ci	TYPE_SCTP_ECN_CWR,
3988c2ecf20Sopenharmony_ci	TYPE_SCTP_SHUTDOWN_COMPLETE,
3998c2ecf20Sopenharmony_ci}; /* state_fn_t chunk_event_table[][] */
4008c2ecf20Sopenharmony_ci
4018c2ecf20Sopenharmony_ci#define TYPE_SCTP_ASCONF { \
4028c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
4038c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4048c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
4058c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4068c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
4078c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4088c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
4098c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_asconf), \
4108c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
4118c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_asconf), \
4128c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
4138c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_asconf), \
4148c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
4158c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_asconf), \
4168c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
4178c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4188c2ecf20Sopenharmony_ci} /* TYPE_SCTP_ASCONF */
4198c2ecf20Sopenharmony_ci
4208c2ecf20Sopenharmony_ci#define TYPE_SCTP_ASCONF_ACK { \
4218c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
4228c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4238c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
4248c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4258c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
4268c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4278c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
4288c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \
4298c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
4308c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \
4318c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
4328c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \
4338c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
4348c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_asconf_ack), \
4358c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
4368c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4378c2ecf20Sopenharmony_ci} /* TYPE_SCTP_ASCONF_ACK */
4388c2ecf20Sopenharmony_ci
4398c2ecf20Sopenharmony_ci/* The primary index for this table is the chunk type.
4408c2ecf20Sopenharmony_ci * The secondary index for this table is the state.
4418c2ecf20Sopenharmony_ci */
4428c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry
4438c2ecf20Sopenharmony_ciaddip_chunk_event_table[SCTP_NUM_ADDIP_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = {
4448c2ecf20Sopenharmony_ci	TYPE_SCTP_ASCONF,
4458c2ecf20Sopenharmony_ci	TYPE_SCTP_ASCONF_ACK,
4468c2ecf20Sopenharmony_ci}; /*state_fn_t addip_chunk_event_table[][] */
4478c2ecf20Sopenharmony_ci
4488c2ecf20Sopenharmony_ci#define TYPE_SCTP_FWD_TSN { \
4498c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
4508c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ootb), \
4518c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
4528c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4538c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
4548c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4558c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
4568c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn), \
4578c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
4588c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn), \
4598c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
4608c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_fwd_tsn_fast), \
4618c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
4628c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4638c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
4648c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4658c2ecf20Sopenharmony_ci} /* TYPE_SCTP_FWD_TSN */
4668c2ecf20Sopenharmony_ci
4678c2ecf20Sopenharmony_ci/* The primary index for this table is the chunk type.
4688c2ecf20Sopenharmony_ci * The secondary index for this table is the state.
4698c2ecf20Sopenharmony_ci */
4708c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry
4718c2ecf20Sopenharmony_ciprsctp_chunk_event_table[SCTP_NUM_PRSCTP_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = {
4728c2ecf20Sopenharmony_ci	TYPE_SCTP_FWD_TSN,
4738c2ecf20Sopenharmony_ci}; /*state_fn_t prsctp_chunk_event_table[][] */
4748c2ecf20Sopenharmony_ci
4758c2ecf20Sopenharmony_ci#define TYPE_SCTP_RECONF { \
4768c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
4778c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4788c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
4798c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4808c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
4818c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4828c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
4838c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_reconf), \
4848c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
4858c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_reconf), \
4868c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
4878c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4888c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
4898c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4908c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
4918c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
4928c2ecf20Sopenharmony_ci} /* TYPE_SCTP_RECONF */
4938c2ecf20Sopenharmony_ci
4948c2ecf20Sopenharmony_ci/* The primary index for this table is the chunk type.
4958c2ecf20Sopenharmony_ci * The secondary index for this table is the state.
4968c2ecf20Sopenharmony_ci */
4978c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry
4988c2ecf20Sopenharmony_cireconf_chunk_event_table[SCTP_NUM_RECONF_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = {
4998c2ecf20Sopenharmony_ci	TYPE_SCTP_RECONF,
5008c2ecf20Sopenharmony_ci}; /*state_fn_t reconf_chunk_event_table[][] */
5018c2ecf20Sopenharmony_ci
5028c2ecf20Sopenharmony_ci#define TYPE_SCTP_AUTH { \
5038c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
5048c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ootb), \
5058c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
5068c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
5078c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
5088c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_auth), \
5098c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
5108c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_auth), \
5118c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
5128c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_auth), \
5138c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
5148c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_auth), \
5158c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
5168c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_auth), \
5178c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
5188c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_eat_auth), \
5198c2ecf20Sopenharmony_ci} /* TYPE_SCTP_AUTH */
5208c2ecf20Sopenharmony_ci
5218c2ecf20Sopenharmony_ci/* The primary index for this table is the chunk type.
5228c2ecf20Sopenharmony_ci * The secondary index for this table is the state.
5238c2ecf20Sopenharmony_ci */
5248c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry
5258c2ecf20Sopenharmony_ciauth_chunk_event_table[SCTP_NUM_AUTH_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = {
5268c2ecf20Sopenharmony_ci	TYPE_SCTP_AUTH,
5278c2ecf20Sopenharmony_ci}; /*state_fn_t auth_chunk_event_table[][] */
5288c2ecf20Sopenharmony_ci
5298c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry
5308c2ecf20Sopenharmony_cichunk_event_table_unknown[SCTP_STATE_NUM_STATES] = {
5318c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */
5328c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ootb),
5338c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */
5348c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
5358c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */
5368c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
5378c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */
5388c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
5398c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */
5408c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
5418c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */
5428c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
5438c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */
5448c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
5458c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */
5468c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_unk_chunk),
5478c2ecf20Sopenharmony_ci};	/* chunk unknown */
5488c2ecf20Sopenharmony_ci
5498c2ecf20Sopenharmony_ci
5508c2ecf20Sopenharmony_ci#define TYPE_SCTP_PRIMITIVE_ASSOCIATE  { \
5518c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
5528c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_asoc), \
5538c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
5548c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_not_impl), \
5558c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
5568c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_not_impl), \
5578c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
5588c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_not_impl), \
5598c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
5608c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_not_impl), \
5618c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
5628c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_not_impl), \
5638c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
5648c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_not_impl), \
5658c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
5668c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_not_impl), \
5678c2ecf20Sopenharmony_ci} /* TYPE_SCTP_PRIMITIVE_ASSOCIATE */
5688c2ecf20Sopenharmony_ci
5698c2ecf20Sopenharmony_ci#define TYPE_SCTP_PRIMITIVE_SHUTDOWN  { \
5708c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
5718c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_closed), \
5728c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
5738c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_cookie_wait_prm_shutdown), \
5748c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
5758c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_prm_shutdown),\
5768c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
5778c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_2_prm_shutdown), \
5788c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
5798c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \
5808c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
5818c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \
5828c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
5838c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \
5848c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
5858c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_primitive), \
5868c2ecf20Sopenharmony_ci} /* TYPE_SCTP_PRIMITIVE_SHUTDOWN */
5878c2ecf20Sopenharmony_ci
5888c2ecf20Sopenharmony_ci#define TYPE_SCTP_PRIMITIVE_ABORT  { \
5898c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
5908c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_closed), \
5918c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
5928c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_cookie_wait_prm_abort), \
5938c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
5948c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_cookie_echoed_prm_abort), \
5958c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
5968c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_1_prm_abort), \
5978c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
5988c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_shutdown_pending_prm_abort), \
5998c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
6008c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_shutdown_sent_prm_abort), \
6018c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
6028c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_1_prm_abort), \
6038c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
6048c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_shutdown_ack_sent_prm_abort), \
6058c2ecf20Sopenharmony_ci} /* TYPE_SCTP_PRIMITIVE_ABORT */
6068c2ecf20Sopenharmony_ci
6078c2ecf20Sopenharmony_ci#define TYPE_SCTP_PRIMITIVE_SEND  { \
6088c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
6098c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_closed), \
6108c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
6118c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \
6128c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
6138c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \
6148c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
6158c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_send), \
6168c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
6178c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
6188c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
6198c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
6208c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
6218c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
6228c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
6238c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
6248c2ecf20Sopenharmony_ci} /* TYPE_SCTP_PRIMITIVE_SEND */
6258c2ecf20Sopenharmony_ci
6268c2ecf20Sopenharmony_ci#define TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT  { \
6278c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
6288c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_closed), \
6298c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
6308c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat),          \
6318c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
6328c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat),          \
6338c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
6348c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat),          \
6358c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
6368c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat),          \
6378c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
6388c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat),          \
6398c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
6408c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat),          \
6418c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
6428c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_requestheartbeat),          \
6438c2ecf20Sopenharmony_ci} /* TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT */
6448c2ecf20Sopenharmony_ci
6458c2ecf20Sopenharmony_ci#define TYPE_SCTP_PRIMITIVE_ASCONF { \
6468c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
6478c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_closed), \
6488c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
6498c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_closed), \
6508c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
6518c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_closed), \
6528c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
6538c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \
6548c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
6558c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \
6568c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
6578c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \
6588c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
6598c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_asconf), \
6608c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
6618c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
6628c2ecf20Sopenharmony_ci} /* TYPE_SCTP_PRIMITIVE_ASCONF */
6638c2ecf20Sopenharmony_ci
6648c2ecf20Sopenharmony_ci#define TYPE_SCTP_PRIMITIVE_RECONF { \
6658c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
6668c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_closed), \
6678c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
6688c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_closed), \
6698c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
6708c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_closed), \
6718c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
6728c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_reconf), \
6738c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
6748c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_reconf), \
6758c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
6768c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_reconf), \
6778c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
6788c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_prm_reconf), \
6798c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
6808c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_error_shutdown), \
6818c2ecf20Sopenharmony_ci} /* TYPE_SCTP_PRIMITIVE_RECONF */
6828c2ecf20Sopenharmony_ci
6838c2ecf20Sopenharmony_ci/* The primary index for this table is the primitive type.
6848c2ecf20Sopenharmony_ci * The secondary index for this table is the state.
6858c2ecf20Sopenharmony_ci */
6868c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry
6878c2ecf20Sopenharmony_ciprimitive_event_table[SCTP_NUM_PRIMITIVE_TYPES][SCTP_STATE_NUM_STATES] = {
6888c2ecf20Sopenharmony_ci	TYPE_SCTP_PRIMITIVE_ASSOCIATE,
6898c2ecf20Sopenharmony_ci	TYPE_SCTP_PRIMITIVE_SHUTDOWN,
6908c2ecf20Sopenharmony_ci	TYPE_SCTP_PRIMITIVE_ABORT,
6918c2ecf20Sopenharmony_ci	TYPE_SCTP_PRIMITIVE_SEND,
6928c2ecf20Sopenharmony_ci	TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT,
6938c2ecf20Sopenharmony_ci	TYPE_SCTP_PRIMITIVE_ASCONF,
6948c2ecf20Sopenharmony_ci	TYPE_SCTP_PRIMITIVE_RECONF,
6958c2ecf20Sopenharmony_ci};
6968c2ecf20Sopenharmony_ci
6978c2ecf20Sopenharmony_ci#define TYPE_SCTP_OTHER_NO_PENDING_TSN  { \
6988c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
6998c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
7008c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
7018c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
7028c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
7038c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
7048c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
7058c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_no_pending_tsn), \
7068c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
7078c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_2_start_shutdown), \
7088c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
7098c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
7108c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
7118c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_9_2_shutdown_ack), \
7128c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
7138c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
7148c2ecf20Sopenharmony_ci}
7158c2ecf20Sopenharmony_ci
7168c2ecf20Sopenharmony_ci#define TYPE_SCTP_OTHER_ICMP_PROTO_UNREACH  { \
7178c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
7188c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
7198c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
7208c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_cookie_wait_icmp_abort), \
7218c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
7228c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
7238c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
7248c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
7258c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
7268c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
7278c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
7288c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
7298c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
7308c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
7318c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
7328c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_ignore_other), \
7338c2ecf20Sopenharmony_ci}
7348c2ecf20Sopenharmony_ci
7358c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry
7368c2ecf20Sopenharmony_ciother_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES] = {
7378c2ecf20Sopenharmony_ci	TYPE_SCTP_OTHER_NO_PENDING_TSN,
7388c2ecf20Sopenharmony_ci	TYPE_SCTP_OTHER_ICMP_PROTO_UNREACH,
7398c2ecf20Sopenharmony_ci};
7408c2ecf20Sopenharmony_ci
7418c2ecf20Sopenharmony_ci#define TYPE_SCTP_EVENT_TIMEOUT_NONE { \
7428c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
7438c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_bug), \
7448c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
7458c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_bug), \
7468c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
7478c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_bug), \
7488c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
7498c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_bug), \
7508c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
7518c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_bug), \
7528c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
7538c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_bug), \
7548c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
7558c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_bug), \
7568c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
7578c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_bug), \
7588c2ecf20Sopenharmony_ci}
7598c2ecf20Sopenharmony_ci
7608c2ecf20Sopenharmony_ci#define TYPE_SCTP_EVENT_TIMEOUT_T1_COOKIE { \
7618c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
7628c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7638c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
7648c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_bug), \
7658c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
7668c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_t1_cookie_timer_expire), \
7678c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
7688c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7698c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
7708c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7718c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
7728c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7738c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
7748c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7758c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
7768c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7778c2ecf20Sopenharmony_ci}
7788c2ecf20Sopenharmony_ci
7798c2ecf20Sopenharmony_ci#define TYPE_SCTP_EVENT_TIMEOUT_T1_INIT { \
7808c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
7818c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7828c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
7838c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_t1_init_timer_expire), \
7848c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
7858c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7868c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
7878c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7888c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
7898c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7908c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
7918c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7928c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
7938c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7948c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
7958c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
7968c2ecf20Sopenharmony_ci}
7978c2ecf20Sopenharmony_ci
7988c2ecf20Sopenharmony_ci#define TYPE_SCTP_EVENT_TIMEOUT_T2_SHUTDOWN { \
7998c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
8008c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8018c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
8028c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8038c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
8048c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8058c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
8068c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8078c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
8088c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8098c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
8108c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_t2_timer_expire), \
8118c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
8128c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8138c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
8148c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_t2_timer_expire), \
8158c2ecf20Sopenharmony_ci}
8168c2ecf20Sopenharmony_ci
8178c2ecf20Sopenharmony_ci#define TYPE_SCTP_EVENT_TIMEOUT_T3_RTX { \
8188c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
8198c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8208c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
8218c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8228c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
8238c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \
8248c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
8258c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \
8268c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
8278c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \
8288c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
8298c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8308c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
8318c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_6_3_3_rtx), \
8328c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
8338c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8348c2ecf20Sopenharmony_ci}
8358c2ecf20Sopenharmony_ci
8368c2ecf20Sopenharmony_ci#define TYPE_SCTP_EVENT_TIMEOUT_T4_RTO { \
8378c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
8388c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8398c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
8408c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8418c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
8428c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8438c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
8448c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_t4_timer_expire), \
8458c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
8468c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8478c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
8488c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8498c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
8508c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8518c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
8528c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8538c2ecf20Sopenharmony_ci}
8548c2ecf20Sopenharmony_ci
8558c2ecf20Sopenharmony_ci#define TYPE_SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD { \
8568c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
8578c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8588c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
8598c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8608c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
8618c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8628c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
8638c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8648c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
8658c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_t5_timer_expire), \
8668c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
8678c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_t5_timer_expire), \
8688c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
8698c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8708c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
8718c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8728c2ecf20Sopenharmony_ci}
8738c2ecf20Sopenharmony_ci
8748c2ecf20Sopenharmony_ci#define TYPE_SCTP_EVENT_TIMEOUT_HEARTBEAT { \
8758c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
8768c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8778c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
8788c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8798c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
8808c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8818c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
8828c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \
8838c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
8848c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \
8858c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
8868c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8878c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
8888c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_sendbeat_8_3), \
8898c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
8908c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8918c2ecf20Sopenharmony_ci}
8928c2ecf20Sopenharmony_ci
8938c2ecf20Sopenharmony_ci#define TYPE_SCTP_EVENT_TIMEOUT_SACK { \
8948c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
8958c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8968c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
8978c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
8988c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
8998c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9008c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
9018c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \
9028c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
9038c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \
9048c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
9058c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_do_6_2_sack), \
9068c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
9078c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9088c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
9098c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9108c2ecf20Sopenharmony_ci}
9118c2ecf20Sopenharmony_ci
9128c2ecf20Sopenharmony_ci#define TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE { \
9138c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
9148c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9158c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
9168c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9178c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
9188c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9198c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
9208c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_autoclose_timer_expire), \
9218c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
9228c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9238c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
9248c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9258c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
9268c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9278c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
9288c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9298c2ecf20Sopenharmony_ci}
9308c2ecf20Sopenharmony_ci
9318c2ecf20Sopenharmony_ci#define TYPE_SCTP_EVENT_TIMEOUT_RECONF { \
9328c2ecf20Sopenharmony_ci	/* SCTP_STATE_CLOSED */ \
9338c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9348c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_WAIT */ \
9358c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9368c2ecf20Sopenharmony_ci	/* SCTP_STATE_COOKIE_ECHOED */ \
9378c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9388c2ecf20Sopenharmony_ci	/* SCTP_STATE_ESTABLISHED */ \
9398c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_send_reconf), \
9408c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_PENDING */ \
9418c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9428c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_SENT */ \
9438c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9448c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_RECEIVED */ \
9458c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9468c2ecf20Sopenharmony_ci	/* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
9478c2ecf20Sopenharmony_ci	TYPE_SCTP_FUNC(sctp_sf_timer_ignore), \
9488c2ecf20Sopenharmony_ci}
9498c2ecf20Sopenharmony_ci
9508c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry
9518c2ecf20Sopenharmony_citimeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES] = {
9528c2ecf20Sopenharmony_ci	TYPE_SCTP_EVENT_TIMEOUT_NONE,
9538c2ecf20Sopenharmony_ci	TYPE_SCTP_EVENT_TIMEOUT_T1_COOKIE,
9548c2ecf20Sopenharmony_ci	TYPE_SCTP_EVENT_TIMEOUT_T1_INIT,
9558c2ecf20Sopenharmony_ci	TYPE_SCTP_EVENT_TIMEOUT_T2_SHUTDOWN,
9568c2ecf20Sopenharmony_ci	TYPE_SCTP_EVENT_TIMEOUT_T3_RTX,
9578c2ecf20Sopenharmony_ci	TYPE_SCTP_EVENT_TIMEOUT_T4_RTO,
9588c2ecf20Sopenharmony_ci	TYPE_SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD,
9598c2ecf20Sopenharmony_ci	TYPE_SCTP_EVENT_TIMEOUT_HEARTBEAT,
9608c2ecf20Sopenharmony_ci	TYPE_SCTP_EVENT_TIMEOUT_RECONF,
9618c2ecf20Sopenharmony_ci	TYPE_SCTP_EVENT_TIMEOUT_SACK,
9628c2ecf20Sopenharmony_ci	TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE,
9638c2ecf20Sopenharmony_ci};
9648c2ecf20Sopenharmony_ci
9658c2ecf20Sopenharmony_cistatic const struct sctp_sm_table_entry *sctp_chunk_event_lookup(
9668c2ecf20Sopenharmony_ci						struct net *net,
9678c2ecf20Sopenharmony_ci						enum sctp_cid cid,
9688c2ecf20Sopenharmony_ci						enum sctp_state state)
9698c2ecf20Sopenharmony_ci{
9708c2ecf20Sopenharmony_ci	if (state > SCTP_STATE_MAX)
9718c2ecf20Sopenharmony_ci		return &bug;
9728c2ecf20Sopenharmony_ci
9738c2ecf20Sopenharmony_ci	if (cid == SCTP_CID_I_DATA)
9748c2ecf20Sopenharmony_ci		cid = SCTP_CID_DATA;
9758c2ecf20Sopenharmony_ci
9768c2ecf20Sopenharmony_ci	if (cid <= SCTP_CID_BASE_MAX)
9778c2ecf20Sopenharmony_ci		return &chunk_event_table[cid][state];
9788c2ecf20Sopenharmony_ci
9798c2ecf20Sopenharmony_ci	switch ((u16)cid) {
9808c2ecf20Sopenharmony_ci	case SCTP_CID_FWD_TSN:
9818c2ecf20Sopenharmony_ci	case SCTP_CID_I_FWD_TSN:
9828c2ecf20Sopenharmony_ci		return &prsctp_chunk_event_table[0][state];
9838c2ecf20Sopenharmony_ci
9848c2ecf20Sopenharmony_ci	case SCTP_CID_ASCONF:
9858c2ecf20Sopenharmony_ci		return &addip_chunk_event_table[0][state];
9868c2ecf20Sopenharmony_ci
9878c2ecf20Sopenharmony_ci	case SCTP_CID_ASCONF_ACK:
9888c2ecf20Sopenharmony_ci		return &addip_chunk_event_table[1][state];
9898c2ecf20Sopenharmony_ci
9908c2ecf20Sopenharmony_ci	case SCTP_CID_RECONF:
9918c2ecf20Sopenharmony_ci		return &reconf_chunk_event_table[0][state];
9928c2ecf20Sopenharmony_ci
9938c2ecf20Sopenharmony_ci	case SCTP_CID_AUTH:
9948c2ecf20Sopenharmony_ci		return &auth_chunk_event_table[0][state];
9958c2ecf20Sopenharmony_ci	}
9968c2ecf20Sopenharmony_ci
9978c2ecf20Sopenharmony_ci	return &chunk_event_table_unknown[state];
9988c2ecf20Sopenharmony_ci}
999