linux/net/sctp/sm_statetable.c

// SPDX-License-Identifier: GPL-2.0-or-later
/* SCTP kernel implementation
 * (C) Copyright IBM Corp. 2001, 2004
 * Copyright (c) 1999-2000 Cisco, Inc.
 * Copyright (c) 1999-2001 Motorola, Inc.
 * Copyright (c) 2001 Intel Corp.
 * Copyright (c) 2001 Nokia, Inc.
 *
 * This file is part of the SCTP kernel implementation
 *
 * These are the state tables for the SCTP state machine.
 *
 * Please send any bug reports or fixes you make to the
 * email address(es):
 *    lksctp developers <[email protected]>
 *
 * Written or modified by:
 *    La Monte H.P. Yarroll <[email protected]>
 *    Karl Knutson          <[email protected]>
 *    Jon Grimm             <[email protected]>
 *    Hui Huang		    <[email protected]>
 *    Daisy Chang	    <[email protected]>
 *    Ardelle Fan	    <[email protected]>
 *    Sridhar Samudrala	    <[email protected]>
 */

#define pr_fmt(fmt)

#include <linux/skbuff.h>
#include <net/sctp/sctp.h>
#include <net/sctp/sm.h>

static const struct sctp_sm_table_entry
primitive_event_table[SCTP_NUM_PRIMITIVE_TYPES][SCTP_STATE_NUM_STATES];
static const struct sctp_sm_table_entry
other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES];
static const struct sctp_sm_table_entry
timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES];

static const struct sctp_sm_table_entry *sctp_chunk_event_lookup(
						struct net *net,
						enum sctp_cid cid,
						enum sctp_state state);


static const struct sctp_sm_table_entry bug =;

#define DO_LOOKUP(_max, _type, _table)

const struct sctp_sm_table_entry *sctp_sm_lookup_event(
					struct net *net,
					enum sctp_event_type event_type,
					enum sctp_state state,
					union sctp_subtype event_subtype)
{}

#define TYPE_SCTP_FUNC(func)

#define TYPE_SCTP_DATA

#define TYPE_SCTP_INIT

#define TYPE_SCTP_INIT_ACK

#define TYPE_SCTP_SACK

#define TYPE_SCTP_HEARTBEAT

#define TYPE_SCTP_HEARTBEAT_ACK

#define TYPE_SCTP_ABORT

#define TYPE_SCTP_SHUTDOWN

#define TYPE_SCTP_SHUTDOWN_ACK

#define TYPE_SCTP_ERROR

#define TYPE_SCTP_COOKIE_ECHO

#define TYPE_SCTP_COOKIE_ACK

#define TYPE_SCTP_ECN_ECNE

#define TYPE_SCTP_ECN_CWR

#define TYPE_SCTP_SHUTDOWN_COMPLETE

/* The primary index for this table is the chunk type.
 * The secondary index for this table is the state.
 *
 * For base protocol (RFC 2960).
 */
static const struct sctp_sm_table_entry
chunk_event_table[SCTP_NUM_BASE_CHUNK_TYPES][SCTP_STATE_NUM_STATES] =; /* state_fn_t chunk_event_table[][] */

#define TYPE_SCTP_ASCONF

#define TYPE_SCTP_ASCONF_ACK

/* The primary index for this table is the chunk type.
 * The secondary index for this table is the state.
 */
static const struct sctp_sm_table_entry
addip_chunk_event_table[SCTP_NUM_ADDIP_CHUNK_TYPES][SCTP_STATE_NUM_STATES] =; /*state_fn_t addip_chunk_event_table[][] */

#define TYPE_SCTP_FWD_TSN

/* The primary index for this table is the chunk type.
 * The secondary index for this table is the state.
 */
static const struct sctp_sm_table_entry
prsctp_chunk_event_table[SCTP_NUM_PRSCTP_CHUNK_TYPES][SCTP_STATE_NUM_STATES] =; /*state_fn_t prsctp_chunk_event_table[][] */

#define TYPE_SCTP_RECONF

/* The primary index for this table is the chunk type.
 * The secondary index for this table is the state.
 */
static const struct sctp_sm_table_entry
reconf_chunk_event_table[SCTP_NUM_RECONF_CHUNK_TYPES][SCTP_STATE_NUM_STATES] =; /*state_fn_t reconf_chunk_event_table[][] */

#define TYPE_SCTP_AUTH

/* The primary index for this table is the chunk type.
 * The secondary index for this table is the state.
 */
static const struct sctp_sm_table_entry
auth_chunk_event_table[SCTP_NUM_AUTH_CHUNK_TYPES][SCTP_STATE_NUM_STATES] =; /*state_fn_t auth_chunk_event_table[][] */

static const struct sctp_sm_table_entry
pad_chunk_event_table[SCTP_STATE_NUM_STATES] =;	/* chunk pad */

static const struct sctp_sm_table_entry
chunk_event_table_unknown[SCTP_STATE_NUM_STATES] =;	/* chunk unknown */


#define TYPE_SCTP_PRIMITIVE_ASSOCIATE

#define TYPE_SCTP_PRIMITIVE_SHUTDOWN

#define TYPE_SCTP_PRIMITIVE_ABORT

#define TYPE_SCTP_PRIMITIVE_SEND

#define TYPE_SCTP_PRIMITIVE_REQUESTHEARTBEAT

#define TYPE_SCTP_PRIMITIVE_ASCONF

#define TYPE_SCTP_PRIMITIVE_RECONF

/* The primary index for this table is the primitive type.
 * The secondary index for this table is the state.
 */
static const struct sctp_sm_table_entry
primitive_event_table[SCTP_NUM_PRIMITIVE_TYPES][SCTP_STATE_NUM_STATES] =;

#define TYPE_SCTP_OTHER_NO_PENDING_TSN

#define TYPE_SCTP_OTHER_ICMP_PROTO_UNREACH

static const struct sctp_sm_table_entry
other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES] =;

#define TYPE_SCTP_EVENT_TIMEOUT_NONE

#define TYPE_SCTP_EVENT_TIMEOUT_T1_COOKIE

#define TYPE_SCTP_EVENT_TIMEOUT_T1_INIT

#define TYPE_SCTP_EVENT_TIMEOUT_T2_SHUTDOWN

#define TYPE_SCTP_EVENT_TIMEOUT_T3_RTX

#define TYPE_SCTP_EVENT_TIMEOUT_T4_RTO

#define TYPE_SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD

#define TYPE_SCTP_EVENT_TIMEOUT_HEARTBEAT

#define TYPE_SCTP_EVENT_TIMEOUT_SACK

#define TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE

#define TYPE_SCTP_EVENT_TIMEOUT_RECONF

#define TYPE_SCTP_EVENT_TIMEOUT_PROBE

static const struct sctp_sm_table_entry
timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES] =;

static const struct sctp_sm_table_entry *sctp_chunk_event_lookup(
						struct net *net,
						enum sctp_cid cid,
						enum sctp_state state)
{}