aboutsummaryrefslogtreecommitdiffstats
path: root/packet-fcswils.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-06-30 21:50:18 +0000
committerGuy Harris <guy@alum.mit.edu>2003-06-30 21:50:18 +0000
commit862a1f0e4cda355e89ece1d6161464e257d1d31b (patch)
treead7478cb57150e37c0832eb4c6264cff7b8c90cf /packet-fcswils.c
parent3fd9b8f6f4ac1dca62c5a672dc7f7a369e64f1e7 (diff)
downloadwireshark-862a1f0e4cda355e89ece1d6161464e257d1d31b.tar.gz
wireshark-862a1f0e4cda355e89ece1d6161464e257d1d31b.tar.bz2
wireshark-862a1f0e4cda355e89ece1d6161464e257d1d31b.zip
Move definitions of value_string tables out of header files and into
source files, so that they're not defined in every file that includes the header file, regardless of whether the file uses the table (in which case it should be defined in one file, and externally referenced in other files) or not (in which case it should't be defined in that file at all). Get rid of a boilerplate comment paragraph that doesn't apply. svn path=/trunk/; revision=7952
Diffstat (limited to 'packet-fcswils.c')
-rw-r--r--packet-fcswils.c219
1 files changed, 212 insertions, 7 deletions
diff --git a/packet-fcswils.c b/packet-fcswils.c
index 71c7ccfa93..cdf5e35c5a 100644
--- a/packet-fcswils.c
+++ b/packet-fcswils.c
@@ -2,17 +2,11 @@
* Routines for FC Inter-switch link services
* Copyright 2001, Dinesh G Dutt <ddutt@cisco.com>
*
- * $Id: packet-fcswils.c,v 1.3 2003/03/05 07:41:23 guy Exp $
+ * $Id: packet-fcswils.c,v 1.4 2003/06/30 21:50:17 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
- * Copied from WHATEVER_FILE_YOU_USED (where "WHATEVER_FILE_YOU_USED"
- * is a dissector file; if you just copied this from README.developer,
- * don't bother with the "Copied from" - you don't even need to put
- * in a "Copied from" if you copied an existing dissector, especially
- * if the bulk of the code in the new dissector is your code)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -184,6 +178,217 @@ static gint ett_fcswils_ufc = -1;
static gint ett_fcswils_esc = -1;
static gint ett_fcswils_esc_pdesc = -1;
+/* Used in filters */
+static const value_string fc_swils_opcode_key_val[] = {
+ {FC_SWILS_SWRJT , "SW_RJT"},
+ {FC_SWILS_SWACC , "SW_ACC"},
+ {FC_SWILS_ELP , "ELP"},
+ {FC_SWILS_EFP , "EFP"},
+ {FC_SWILS_DIA , "DIA"},
+ {FC_SWILS_RDI , "RDI"},
+ {FC_SWILS_HLO , "HLO"},
+ {FC_SWILS_LSU , "LSU"},
+ {FC_SWILS_LSA , "LSA"},
+ {FC_SWILS_BF , "BF"},
+ {FC_SWILS_RCF , "RCF"},
+ {FC_SWILS_RSCN , "SW_RSCN"},
+ {FC_SWILS_DRLIR , "DRLIR"},
+ {FC_SWILS_DSCN , "DSCN"},
+ {FC_SWILS_LOOPD , "LOOPD"},
+ {FC_SWILS_MR , "MR"},
+ {FC_SWILS_ACA , "ACA"},
+ {FC_SWILS_RCA , "RCA"},
+ {FC_SWILS_SFC , "SFC"},
+ {FC_SWILS_UFC , "UFC"},
+ {FC_SWILS_ESC , "ESC"},
+ {0, NULL},
+};
+
+/* Used in Info field */
+static const value_string fc_swils_opcode_val[] = {
+ {FC_SWILS_SWRJT , "SW_RJT"},
+ {FC_SWILS_SWACC , "SW_ACC"},
+ {FC_SWILS_ELP , "ELP"},
+ {FC_SWILS_EFP , "EFP"},
+ {FC_SWILS_DIA , "Domain ID Assigned"},
+ {FC_SWILS_RDI , "Request Domain ID"},
+ {FC_SWILS_HLO , "Hello"},
+ {FC_SWILS_LSU , "Link State Update"},
+ {FC_SWILS_LSA , "Link State Ack"},
+ {FC_SWILS_BF , "Build Fabric"},
+ {FC_SWILS_RCF , "Reconfigure Fabric"},
+ {FC_SWILS_RSCN , "Interswitch RSCN"},
+ {FC_SWILS_DRLIR , "DRLIR"},
+ {FC_SWILS_DSCN , "SW_RSCN"},
+ {FC_SWILS_LOOPD , "LOOPD"},
+ {FC_SWILS_MR , "Merge Req"},
+ {FC_SWILS_ACA , "Acquire Change Auth"},
+ {FC_SWILS_RCA , "Release Change Auth"},
+ {FC_SWILS_SFC , "Stage Fabric Conf"},
+ {FC_SWILS_UFC , "Update Fabric Conf"},
+ {FC_SWILS_ESC , "ESC"},
+ {0, NULL},
+};
+
+static const value_string fc_swils_rjt_val [] = {
+ {FC_SWILS_RJT_INVCODE , "Invalid Cmd Code"},
+ {FC_SWILS_RJT_INVVER , "Invalid Revision"},
+ {FC_SWILS_RJT_LOGERR , "Logical Error"},
+ {FC_SWILS_RJT_INVSIZE , "Invalid Size"},
+ {FC_SWILS_RJT_LOGBSY , "Logical Busy"},
+ {FC_SWILS_RJT_PROTERR , "Protocol Error"},
+ {FC_SWILS_RJT_GENFAIL , "Unable to Perform"},
+ {FC_SWILS_RJT_CMDNOTSUPP, "Unsupported Cmd"},
+ {FC_SWILS_RJT_VENDUNIQ , "Vendor Unique Err"},
+ {0, NULL},
+};
+
+static const value_string fc_swils_deterr_val [] = {
+ {FC_SWILS_RJT_NODET , "No Additional Details"},
+ {FC_SWILS_RJT_CLSF_ERR , "Class F Svc Param Err"},
+ {FC_SWILS_RJT_CLSN_ERR , "Class N Svc Param Err"},
+ {FC_SWILS_RJT_INVFC_CODE , "Unknown Flow Ctrl Code"},
+ {FC_SWILS_RJT_INVFC_PARM , "Invalid Flow Ctrl Parm"},
+ {FC_SWILS_RJT_INV_PNAME , "Invalid Port Name"},
+ {FC_SWILS_RJT_INV_SNAME , "Invalid Switch Name"},
+ {FC_SWILS_RJT_TOV_MSMTCH , "R_A_/E_D_TOV Mismatch"},
+ {FC_SWILS_RJT_INV_DIDLST, "Invalid Domain ID List"},
+ {FC_SWILS_RJT_CMD_INPROG , "Cmd Already in Progress"},
+ {FC_SWILS_RJT_OORSRC , "Insufficient Resources"},
+ {FC_SWILS_RJT_NO_DID , "Domain ID Unavailable"},
+ {FC_SWILS_RJT_INV_DID, "Invalid Domain ID"},
+ {FC_SWILS_RJT_NO_REQ , "Request Not Supported"},
+ {FC_SWILS_RJT_NOLNK_PARM , "Link Parm Not Estd."},
+ {FC_SWILS_RJT_NO_REQDID , "Group of Domain IDs Unavail"},
+ {FC_SWILS_RJT_EP_ISOL , "E_Port Isolated"},
+ {0, NULL}
+};
+
+static const value_string fcswils_elp_fc_val[] = {
+ {FC_SWILS_ELP_FC_VENDOR, "Vendor Unique"},
+ {FC_SWILS_ELP_FC_RRDY, "R_RDY Flow Ctrl"},
+ {0, NULL},
+};
+
+static const value_string fcswils_rectype_val[] = {
+ {FC_SWILS_LRECTYPE_DOMAIN, "Domain ID List Rec"},
+ {FC_SWILS_LRECTYPE_MCAST, "Multicast ID List Rec"},
+ {0, NULL},
+};
+
+static const value_string fc_swils_link_type_val[] = {
+ {0x01, "P2P Link"},
+ {0xF0, "Vendor Specific"},
+ {0xF1, "Vendor Specific"},
+ {0xF2, "Vendor Specific"},
+ {0xF3, "Vendor Specific"},
+ {0xF4, "Vendor Specific"},
+ {0xF5, "Vendor Specific"},
+ {0xF6, "Vendor Specific"},
+ {0xF7, "Vendor Specific"},
+ {0xF8, "Vendor Specific"},
+ {0xF9, "Vendor Specific"},
+ {0xFA, "Vendor Specific"},
+ {0xFB, "Vendor Specific"},
+ {0xFC, "Vendor Specific"},
+ {0xFD, "Vendor Specific"},
+ {0xFE, "Vendor Specific"},
+ {0xFF, "Vendor Specific"},
+ {0, NULL},
+};
+
+static const value_string fc_swils_fspf_linkrec_val[] = {
+ {FC_SWILS_LSR_SLR, "Switch Link Record"},
+ {FC_SWILS_LSR_ARS, "AR Summary Record"},
+ {0, NULL},
+};
+
+static const value_string fc_swils_fspf_lsrflags_val[] = {
+ {0x0, "LSR is for a Topology Update"},
+ {0x1, "LSR is for Initial DB Sync | Not the last seq in DB sync"},
+ {0x2, "Last Seq in DB Sync. LSU has no LSRs"},
+ {0x3, "LSR is for Initial DB Sync | Last Seq in DB Sync"},
+ {0, NULL},
+};
+
+static const value_string fc_swils_rscn_portstate_val[] = {
+ {0, "No Additional Info"},
+ {1, "Port is online"},
+ {2, "Port is offline"},
+ {0, NULL},
+};
+
+static const value_string fc_swils_rscn_addrfmt_val[] = {
+ {0, "Port Addr Format"},
+ {1, "Area Addr Format"},
+ {2, "Domain Addr Format"},
+ {3, "Fabric Addr Format"},
+};
+
+static const value_string fc_swils_rscn_detectfn_val[] = {
+ {1, "Fabric Detected"},
+ {2, "N_Port Detected"},
+ {0, NULL},
+};
+
+static const value_string fc_swils_esc_protocol_val[] = {
+ {0, "Reserved"},
+ {1, "FSPF-Backbone Protocol"},
+ {2, "FSPF Protocol"},
+ {0, NULL},
+};
+
+static const value_string fc_swils_zoneobj_type_val[] = {
+ {0, "Reserved"},
+ {FC_SWILS_ZONEOBJ_ZONESET , "Zone Set"},
+ {FC_SWILS_ZONEOBJ_ZONE , "Zone"},
+ {FC_SWILS_ZONEOBJ_ZONEALIAS, "Zone Alias"},
+ {0, NULL},
+};
+
+const value_string fc_swils_zonembr_type_val[] = {
+ {0, "Reserved"},
+ {FC_SWILS_ZONEMBR_WWN, "WWN"},
+ {FC_SWILS_ZONEMBR_DP, "Domain/Physical Port (0x00ddpppp)"},
+ {FC_SWILS_ZONEMBR_FCID, "FC Address"},
+ {FC_SWILS_ZONEMBR_ALIAS, "Zone Alias"},
+ {FC_SWILS_ZONEMBR_WWN_LUN, "WWN+LUN"},
+ {FC_SWILS_ZONEMBR_DP_LUN, "Domain/Physical Port+LUN"},
+ {FC_SWILS_ZONEMBR_FCID_LUN, "FCID+LUN"},
+ {0, NULL},
+};
+
+static const value_string fc_swils_mr_rsp_val[] = {
+ {0, "Successful"},
+ {1, "Fabric Busy"},
+ {2, "Failed"},
+ {0, NULL},
+};
+
+static const value_string fc_swils_mr_reason_val[] = {
+ {0x0, "No Reason"},
+ {0x1, "Invalid Data Length"},
+ {0x2, "Unsupported Command"},
+ {0x3, "Reserved"},
+ {0x4, "Not Authorized"},
+ {0x5, "Invalid Request"},
+ {0x6, "Fabric Changing"},
+ {0x7, "Update Not Staged"},
+ {0x8, "Invalid Zone Set Format"},
+ {0x9, "Invalid Data"},
+ {0xA, "Cannot Merge"},
+ {0, NULL},
+};
+
+static const value_string fc_swils_sfc_op_val[] = {
+ {0, "Reserved"},
+ {1, "Reserved"},
+ {2, "Reserved"},
+ {3, "Activate Zone Set"},
+ {4, "Deactivate Zone Set"},
+ {0, NULL},
+};
+
typedef struct _zonename {
guint32 namelen:8,
rsvd:24;