linux/net/sctp/debug.c
<<
val.32/spa v .32/form v .32a val.3 href="../linux+v3.6.9/net/sctp/debug.c"> val.32img src="../.static/gfx/right.png" alt=">>"> v2/spa v v2spa class="lxr_search"> val ="+search" method="post" onsubmit="return do_search(this);"> val.32input typ> hidden" nam> navtarget" tion> "> val.32input typ> text" nam> search" id search"> val.32butt/optyp> submit">Search val.3Prefsv .32/a> v2/spa val.3 32/div val.3 32form ac > ="ajax+*" method="post" onsubmit="return false;"> v2input typ> hidden" nam> ajax_lookup" id ajax_lookup" tion> "> al.3 32/form v al.3 32div class="headingbott/m">
v 2div id file_contents"
 L1">3 312/a>2spa  class="comment">/* SCTP kernel implementa >
 2/spa  v
 L2">3 322/a>2spa  class="comment"> * (C) Copyright IBM Corp. 2001, 20042/spa  v
 L3">3 332/a>2spa  class="comment"> * Copyright (c) 1999-2000 Cisco, Inc.2/spa  v
 L4">3 342/a>2spa  class="comment"> * Copyright (c) 1999-2001 Motorola, Inc.2/spa  v
 L5">3 352/a>2spa  class="comment"> * Copyright (c) 2001 Intel Corp.2/spa  v
 L6">3 362/a>2spa  class="comment"> *2/spa  v
 L7">3 372/a>2spa  class="comment"> * This file is part of the SCTP kernel implementa >
 2/spa  v
 L8">3 382/a>2spa  class="comment"> *2/spa  v
 L9">3 392/a>2spa  class="comment"> * This file converts numerical ID tion> to alphabetical nam>s for SCTP2/spa  v
 L10">3 9"
	a>2spa  class="comment"> * terms such as chunk typ>, param>ter tim>, event typ>, etc.2/spa  v
 L11">3 112/a>2spa  class="comment"> *2/spa  v
 L12">3 122/a>2spa  class="comment"> * This SCTP implementa >
  is free software;2/spa  v
 L13">3 132/a>2spa  class="comment"> * you ca  redistribute it and/or modify it under the terms of2/spa  v
 L14">3 142/a>2spa  class="comment"> * the GNU General Public License as published by2/spa  v
 L15">3 152/a>2spa  class="comment"> * the Free Software Founda >
 ; either vers>
  2, or (at your 	  >
 )2/spa  v
 L16">3 162/a>2spa  class="comment"> * any later vers>
 .2/spa  v
 L17">3 172/a>2spa  class="comment"> *2/spa  v
 L18">3 182/a>2spa  class="comment"> * This SCTP implementa >
  is distributed in the hope that it2/spa  v
 L19">3 192/a>2spa  class="comment"> * will be useful, but WITHOUT ANY WARRANTY; without even the implied2/spa  v
 L20">3 2"
	a>2spa  class="comment"> *                 ************************2/spa  v
 L21">3 212/a>2spa  class="comment"> * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.2/spa  v
 L22">3 222/a>2spa  class="comment"> * See the GNU General Public License for more details.2/spa  v
 L23">3 232/a>2spa  class="comment"> *2/spa  v
 L24">3 242/a>2spa  class="comment"> * You should have received a copy of the GNU General Public License2/spa  v
 L25">3 252/a>2spa  class="comment"> * along with GNU CC; see the file ,dPYENW.  If not, writ> to2/spa  v
 L26">3 262/a>2spa  class="comment"> * the Free Software Founda >
 , 59 Temple Place - Suit> 330,2/spa  v
 L27">3 272/a>2spa  class="comment"> * Bost
 , MA 02111-1307, USA.2/spa  v
 L28">3 282/a>2spa  class="comment"> *2/spa  v
 L29">3 292/a>2spa  class="comment"> * Please send any bug reports or fix>s you mak> to the2/spa  v
 L30">3 3"
	a>2spa  class="comment"> * email address(es):2/spa  v
 L31">3 312/a>2spa  class="comment"> *    lksctp developers <lksctp-developers@lists.sourceforge.net>2/spa  v
 L32">3 322/a>2spa  class="comment"> *2/spa  v
 L33">3 332/a>2spa  class="comment"> * Or submit a bug report through the following websit>:2/spa  v
 L34">3 342/a>2spa  class="comment"> * .3 http://www.sf.net/projects/lksctp2/spa  v
 L35">3 352/a>2spa  class="comment"> *2/spa  v
 L36">3 362/a>2spa  class="comment"> * Written or modified by:2/spa  v
 L37">3 372/a>2spa  class="comment"> *    La Monte H.P. Yarroll <piggy@acm.org>2/spa  v
 L38">3 382/a>2spa  class="comment"> *    Karl Knuts
           <karl@athena.chicago.il.us>2/spa  v
 L39">3 392/a>2spa  class="comment"> *    Xingang Guo           <xingang.guo@intel.com>2/spa  v
 L40">3 4"
	a>2spa  class="comment"> *    J
  Grimm             <jgrimm@us.ibm.com>2/spa  v
 L41">3 412/a>2spa  class="comment"> *    Daisy Chang           <daisyc@us.ibm.com>2/spa  v
 L42">3 422/a>2spa  class="comment"> *    Sridhar Samudrala     <sri@us.ibm.com>2/spa  v
 L43">3 432/a>2spa  class="comment"> *2/spa  v
 L44">3 442/a>2spa  class="comment"> * Any bugs reported given to us we will try to fix... any fix>s shared will2/spa  v
 L45">3 452/a>2spa  class="comment"> * be incorporated into the next SCTP release.2/spa  v
 L46">3 462/a>2spa  class="comment"> */2/spa  v
 L47">3 472/a>v
 L48">3 482/a>#include <net/sctp/sctp.h2/a>>v
 L49">3 492/a>v
 L50">3 502/a>#if32a href="+code=SCTP_DEBUG" class="sref">SCTP_DEBUG2/a>v
 L51">3 512/a>int32a href="+code=sctp_debug_flag" class="sref">sctp_debug_flag2/a> = 1;        2spa  class="comment">/* Initially enable DEBUG */2/spa  v
 L52">3 522/a>#endif3 2spa  class="comment">/* SCTP_DEBUG */2/spa  v
 L53">3 532/a>v
 L54">3 542/a>2spa  class="comment">/* These are printable forms of Chunk ID's from sec >
  3.1.  */2/spa  v
 L55">3 552/a>static const char *const 2a href="+code=sctp_cid_tbl" class="sref">sctp_cid_tbl2/a>[2a href="+code=SCTP_NUM_BASE_CHUNK_TYPES" class="sref">SCTP_NUM_BASE_CHUNK_TYPES2/a>] = {v
 L56">3 562/a>        2spa  class="string">"DATA"2/spa  ,v
 L57">3 572/a>        2spa  class="string">"INIT"2/spa  ,v
 L58">3 582/a>        2spa  class="string">"INIT_ACK"2/spa  ,v
 L59">3 592/a>        2spa  class="string">"SACK"2/spa  ,v
 L60">3 602/a>        2spa  class="string">"HEARTBEAT"2/spa  ,v
 L61">3 612/a>        2spa  class="string">"HEARTBEAT_ACK"2/spa  ,v
 L62">3 622/a>        2spa  class="string">"ABORT"2/spa  ,v
 L63">3 632/a>        2spa  class="string">"SHUTDOWN"2/spa  ,v
 L64">3 642/a>        2spa  class="string">"SHUTDOWN_ACK"2/spa  ,v
 L65">3 652/a>        2spa  class="string">"ERROR"2/spa  ,v
 L66">3 662/a>        2spa  class="string">"COOKIE_ECHO"2/spa  ,v
 L67">3 672/a>        2spa  class="string">"COOKIE_ACK"2/spa  ,v
 L68">3 682/a>        2spa  class="string">"ECN_ECNE"2/spa  ,v
 L69">3 692/a>        2spa  class="string">"ECN_CWR"2/spa  ,v
 L70">3 702/a>        2spa  class="string">"SHUTDOWN_COMPLETE"2/spa  ,v
 L71">3 712/a>};v
 L72">3 722/a>v
 L73">3 732/a>2spa  class="comment">/* Lookup "chunk typ>" debug nam>. */2/spa  v
 L74">3 742/a>const char *2a href="+code=sctp_cnam>" class="sref">sctp_cnam>2/a>(const 2a href="+code=sctp_subtyp>_t" class="sref">sctp_subtyp>_t2/a> 2a href="+code=cid" class="sref">cid2/a>)v
 L75">3 752/a>{v
 L76">3 762/a>        if3(2a href="+code=cid" class="sref">cid2/a>.2a href="+code=chunk" class="sref">chunk2/a> <=32a href="+code=SCTP_CID_BASE_MAX" class="sref">SCTP_CID_BASE_MAX2/a>)v
 L77">3 772/a>                return 2a href="+code=sctp_cid_tbl" class="sref">sctp_cid_tbl2/a>[2a href="+code=cid" class="sref">cid2/a>.2a href="+code=chunk" class="sref">chunk2/a>];v
 L78">3 782/a>v
 L79">3 792/a>        switch3(2a href="+code=cid" class="sref">cid2/a>.2a href="+code=chunk" class="sref">chunk2/a>) {v
 L80">3 802/a>        case 2a href="+code=SCTP_CID_ASCONF" class="sref">SCTP_CID_ASCONF2/a>:v
 L81">3 812/a>                return 2spa  class="string">"ASCONF"2/spa  ;v
 L82">3 822/a>v
 L83">3 832/a>        case 2a href="+code=SCTP_CID_ASCONF_ACK" class="sref">SCTP_CID_ASCONF_ACK2/a>:v
 L84">3 842/a>                return 2spa  class="string">"ASCONF_ACK"2/spa  ;v
 L85">3 852/a>v
 L86">3 862/a>        case 2a href="+code=SCTP_CID_FWD_TSN" class="sref">SCTP_CID_FWD_TSN2/a>:v
 L87">3 872/a>                return 2spa  class="string">"FWD_TSN"2/spa  ;v
 L88">3 882/a>v
 L89">3 892/a>        case 2a href="+code=SCTP_CID_AUTH" class="sref">SCTP_CID_AUTH2/a>:v
 L90">3 902/a>                return 2spa  class="string">"AUTH"2/spa  ;v
 L91">3 912/a>v
 L92">3 922/a>        default:v
 L93">3 932/a>                break;v
 L94">3 942/a>        }v
 L95">3 952/a>v
 L96">3 962/a>        return 2spa  class="string">"unknown chunk"2/spa  ;v
 L97">3 972/a>}v
 L98">3 982/a>v
 L99">3 992/a>2spa  class="comment">/* These are printable forms of the states.  */2/spa  v
 L100">31002/a>const char *const 2a href="+code=sctp_state_tbl" class="sref">sctp_state_tbl2/a>[2a href="+code=SCTP_STATE_NUM_STATES" class="sref">SCTP_STATE_NUM_STATES2/a>] = {v
 L101">31012/a>        2spa  class="string">"STATE_CLOSED"2/spa  ,v
 L102">31022/a>        2spa  class="string">"STATE_COOKIE_WAIT"2/spa  ,v
 L103">31032/a>        2spa  class="string">"STATE_COOKIE_ECHOED"2/spa  ,v
 L104">31042/a>        2spa  class="string">"STATE_ESTABLISHED"2/spa  ,v
 L105">31052/a>        2spa  class="string">"STATE_SHUTDOWN_PENDING"2/spa  ,v
 L106">31062/a>        2spa  class="string">"STATE_SHUTDOWN_SENT"2/spa  ,v
 L107">31072/a>        2spa  class="string">"STATE_SHUTDOWN_RECEIVED"2/spa  ,v
 L108">31082/a>        2spa  class="string">"STATE_SHUTDOWN_ACK_SENT"2/spa  ,v
 L109">31092/a>};v
 L110">319"
	a>v
 L111">31112/a>2spa  class="comment">/* Events that could change the state of a  associa >
 .  */2/spa  v
 L112">31122/a>const char *const 2a href="+code=sctp_evttyp>_tbl" class="sref">sctp_evttyp>_tbl2/a>[] = {v
 L113">31132/a>        2spa  class="string">"EVENT_T_unknown"2/spa  ,v
 L114">31142/a>        2spa  class="string">"EVENT_T_CHUNK"2/spa  ,v
 L115">31152/a>        2spa  class="string">"EVENT_T_TIMEOUT"2/spa  ,v
 L116">31162/a>        2spa  class="string">"EVENT_T_OTHER"2/spa  ,v
 L117">31172/a>        2spa  class="string">"EVENT_T_PRIMITIVE"2/spa  v
 L118">31182/a>};v
 L119">31192/a>v
 L120">312"
	a>2spa  class="comment">/* Return tion> of a state func >
  */2/spa  v
 L121">31212/a>const char *const 2a href="+code=sctp_status_tbl" class="sref">sctp_status_tbl2/a>[] = {v
 L122">31222/a>        2spa  class="string">"DISPOSITION_DISCARD"2/spa  ,v
 L123">31232/a>        2spa  class="string">"DISPOSITION_CONSUME"2/spa  ,v
 L124">31242/a>        2spa  class="string">"DISPOSITION_NOMEM"2/spa  ,v
 L125">31252/a>        2spa  class="string">"DISPOSITION_DELETE_TCB"2/spa  ,v
 L126">31262/a>        2spa  class="string">"DISPOSITION_ABORT"2/spa  ,v
 L127">31272/a>        2spa  class="string">"DISPOSITION_VIOLATION"2/spa  ,v
 L128">31282/a>        2spa  class="string">"DISPOSITION_NOT_IMPL"2/spa  ,v
 L129">31292/a>        2spa  class="string">"DISPOSITION_ERROR"2/spa  ,v
 L130">31302/a>        2spa  class="string">"DISPOSITION_BUG"2/spa  v
 L131">31312/a>};v
 L132">31322/a>v
 L133">31332/a>2spa  class="comment">/* Printable forms of primitives */2/spa  v
 L134">31342/a>static const char *const 2a href="+code=sctp_primitive_tbl" class="sref">sctp_primitive_tbl2/a>[2a href="+code=SCTP_NUM_PRIMITIVE_TYPES" class="sref">SCTP_NUM_PRIMITIVE_TYPES2/a>] = {v
 L135">31352/a>        2spa  class="string">"PRIMITIVE_ASSOCIATE"2/spa  ,v
 L136">31362/a>        2spa  class="string">"PRIMITIVE_SHUTDOWN"2/spa  ,v
 L137">31372/a>        2spa  class="string">"PRIMITIVE_ABORT"2/spa  ,v
 L138">31382/a>        2spa  class="string">"PRIMITIVE_SEND"2/spa  ,v
 L139">31392/a>        2spa  class="string">"PRIMITIVE_REQUESTHEARTBEAT"2/spa  ,v
 L140">31402/a>        2spa  class="string">"PRIMITIVE_ASCONF"2/spa  ,v
 L141">31412/a>};v
 L142">31422/a>v
 L143">31432/a>2spa  class="comment">/* Lookup primitive debug nam>. */2/spa  v
 L144">31442/a>const char *2a href="+code=sctp_pnam>" class="sref">sctp_pnam>2/a>(const 2a href="+code=sctp_subtyp>_t" class="sref">sctp_subtyp>_t2/a> 2a href="+code=id" class="sref">id2/a>)v
 L145">31452/a>{v
 L146">31462/a>        if3(2a href="+code=id" class="sref">id2/a>.2a href="+code=primitive" class="sref">primitive2/a> <=32a href="+code=SCTP_EVENT_PRIMITIVE_MAX" class="sref">SCTP_EVENT_PRIMITIVE_MAX2/a>)v
 L147">31472/a>                return 2a href="+code=sctp_primitive_tbl" class="sref">sctp_primitive_tbl2/a>[2a href="+code=id" class="sref">id2/a>.2a href="+code=primitive" class="sref">primitive2/a>];v
 L148">31482/a>        return 2spa  class="string">"unknown_primitive"2/spa  ;v
 L149">31492/a>}v
 L150">315"
	a>v
 L151">31512/a>static const char *const 2a href="+code=sctp_other_tbl" class="sref">sctp_other_tbl2/a>[] = {v
 L152">31522/a>        2spa  class="string">"NO_PENDING_TSN"2/spa  ,v
 L153">31532/a>        2spa  class="string">"ICMP_PROTO_UNREACH"2/spa  ,v
 L154">31542/a>};v
 L155">31552/a>v
 L156">31562/a>2spa  class="comment">/* Lookup "other" debug nam>. */2/spa  v
 L157">31572/a>const char *2a href="+code=sctp_onam>" class="sref">sctp_onam>2/a>(const 2a href="+code=sctp_subtyp>_t" class="sref">sctp_subtyp>_t2/a> 2a href="+code=id" class="sref">id2/a>)v
 L158">31582/a>{v
 L159">31592/a>        if3(2a href="+code=id" class="sref">id2/a>.2a href="+code=other" class="sref">other2/a> <=32a href="+code=SCTP_EVENT_OTHER_MAX" class="sref">SCTP_EVENT_OTHER_MAX2/a>)v
 L160">31602/a>                return 2a href="+code=sctp_other_tbl" class="sref">sctp_other_tbl2/a>[2a href="+code=id" class="sref">id2/a>.2a href="+code=other" class="sref">other2/a>];v
 L161">31612/a>        return 2spa  class="string">"unknown 'other' event"2/spa  ;v
 L162">31622/a>}v
 L163">31632/a>v
 L164">31642/a>static const char *const 2a href="+code=sctp_tim>r_tbl" class="sref">sctp_tim>r_tbl2/a>[] = {v
 L165">31652/a>        2spa  class="string">"TIMEOUT_NONE"2/spa  ,v
 L166">31662/a>        2spa  class="string">"TIMEOUT_T1_COOKIE"2/spa  ,v
 L167">31672/a>        2spa  class="string">"TIMEOUT_T1_INIT"2/spa  ,v
 L168">31682/a>        2spa  class="string">"TIMEOUT_T2_SHUTDOWN"2/spa  ,v
 L169">31692/a>        2spa  class="string">"TIMEOUT_T3_RTX"2/spa  ,v
 L170">31702/a>        2spa  class="string">"TIMEOUT_T4_RTO"2/spa  ,v
 L171">31712/a>        2spa  class="string">"TIMEOUT_T5_SHUTDOWN_GUARD"2/spa  ,v
 L172">31722/a>        2spa  class="string">"TIMEOUT_HEARTBEAT"2/spa  ,v
 L173">31732/a>        2spa  class="string">"TIMEOUT_SACK"2/spa  ,v
 L174">31742/a>        2spa  class="string">"TIMEOUT_AUTOCLOSE"2/spa  ,v
 L175">31752/a>};v
 L176">31762/a>v
 L177">31772/a>2spa  class="comment">/* Lookup tim>r debug nam>. */2/spa  v
 L178">31782/a>const char *2a href="+code=sctp_tnam>" class="sref">sctp_tnam>2/a>(const 2a href="+code=sctp_subtyp>_t" class="sref">sctp_subtyp>_t2/a> 2a href="+code=id" class="sref">id2/a>)v
 L179">31792/a>{v
 L180">31802/a>        if3(2a href="+code=id" class="sref">id2/a>.2a href="+code=tim>out" class="sref">tim>out2/a> <=32a href="+code=SCTP_EVENT_TIMEOUT_MAX" class="sref">SCTP_EVENT_TIMEOUT_MAX2/a>)v
 L181">31812/a>                return 2a href="+code=sctp_tim>r_tbl" class="sref">sctp_tim>r_tbl2/a>[2a href="+code=id" class="sref">id2/a>.2a href="+code=tim>out" class="sref">tim>out2/a>];v
 L182">31822/a>        return 2spa  class="string">"unknown_tim>r"2/spa  ;v
 L183">31832/a>}v
 L184">31842/a>
The original LXR software by the LXR community2/a>, this experimental vers> by lxr@linux.no2/a>. 2/div v2div class="subfooter"> lxr.linux.no kindly hosted by Redpill Linpro AS2/a>, provider of Linux consulting and opera > s servic>s since 1995. 2/div v 2/body v2/html v