// 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. * * This file is part of the SCTP kernel implementation * * This file converts numerical ID value to alphabetical names for SCTP * terms such as chunk type, parameter time, event type, etc. * * 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]> * Xingang Guo <[email protected]> * Jon Grimm <[email protected]> * Daisy Chang <[email protected]> * Sridhar Samudrala <[email protected]> */ #include <net/sctp/sctp.h> /* These are printable forms of Chunk ID's from section 3.1. */ static const char *const sctp_cid_tbl[SCTP_NUM_BASE_CHUNK_TYPES] = …; /* Lookup "chunk type" debug name. */ const char *sctp_cname(const union sctp_subtype cid) { … } /* These are printable forms of the states. */ const char *const sctp_state_tbl[SCTP_STATE_NUM_STATES] = …; /* Events that could change the state of an association. */ const char *const sctp_evttype_tbl[] = …; /* Return value of a state function */ const char *const sctp_status_tbl[] = …; /* Printable forms of primitives */ static const char *const sctp_primitive_tbl[SCTP_NUM_PRIMITIVE_TYPES] = …; /* Lookup primitive debug name. */ const char *sctp_pname(const union sctp_subtype id) { … } static const char *const sctp_other_tbl[] = …; /* Lookup "other" debug name. */ const char *sctp_oname(const union sctp_subtype id) { … } static const char *const sctp_timer_tbl[] = …; /* Lookup timer debug name. */ const char *sctp_tname(const union sctp_subtype id) { … }