diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-12-10 02:49:31 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-12-10 02:49:31 +0000 |
commit | 96736e24dede972326210760990f74585739f919 (patch) | |
tree | 451e95a651248460b50b4a02eb155ba07ae0b03d /packet-fc.h | |
parent | 63b1e7c029e34764f99cfe5254c349a2d1b74d20 (diff) |
Move the handling of the Network_Header for full FC frames into the FC
dissector, and have the LLC dissector register itself as the dissector
for IP-over-FC frames, as the payload is just an LLC 802.2 header plus
payload for the protocol specified by that header.
In the dissector for IP-over-FC as a Wiretap link-layer type, have its
top-level item be a protocol item rather than a text item, and don't
register it as the dissector for IP-over-FC frames from the FC dissector
- it assumes what it's handed includes the Network_Header, but for full
FC frames, the FC dissector has already consumed the Network_Header.
Move the definitions of the value_string tables out of the header file;
most of them are used only in one file, so define them in that file, and
for "fc_fc4_val", define it in "packet-fc.c", make it not static, and
declare it in "packet-fc.h".
Use FALSE, rather than 0, as the last argument to
"proto_tree_add_item()" calls that add a big-endian value.
Fix one "proto_tree_add_uint()" call that was supposed to be a
"proto_tree_add_item()" call.
Use "%u", not "%d", to display unsigned values.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6773 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-fc.h')
-rw-r--r-- | packet-fc.h | 92 |
1 files changed, 21 insertions, 71 deletions
diff --git a/packet-fc.h b/packet-fc.h index abfadbb813..0887415fdc 100644 --- a/packet-fc.h +++ b/packet-fc.h @@ -2,7 +2,7 @@ * Basic Fibre Channel Header definitions * Copyright 2002 Dinesh G Dutt (ddutt@cisco.com) * - * $Id: packet-fc.h,v 1.1 2002/12/08 02:32:17 gerald Exp $ + * $Id: packet-fc.h,v 1.2 2002/12/10 02:49:31 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -33,43 +33,34 @@ #define FC_RCTL_VIDEO 0x40 #define FC_RCTL_BLS 0x80 #define FC_RCTL_LINK_CTL 0xC0 +/* XXX - is 0xF0 Extended Routing? It is in the FC-FS draft on the T11 + Web site. */ -/* TYPE (FC-4) Definitions */ +#define FC_TYPE_CMNSVC 0x0 /* Used in PRLI Svc Param Page */ -#define FC_TYPE_SCSI 0x8 -#define FC_TYPE_IP 0x5 -#define FC_TYPE_LLCSNAP 0x4 +/* TYPE definitions for Basic or Extended Link_Data */ #define FC_TYPE_ELS 0x1 + +/* TYPE definitions for FC-4 */ +#define FC_TYPE_LLCSNAP 0x4 +#define FC_TYPE_IP 0x5 +#define FC_TYPE_SCSI 0x8 #define FC_TYPE_FCCT 0x20 #define FC_TYPE_SWILS 0x22 #define FC_TYPE_AL 0x23 #define FC_TYPE_SNMP 0x24 -#define FC_TYPE_CMNSVC 0x0 /* Used in PRLI Svc Param Page */ -static const value_string fc_fc4_val[] = { - {FC_TYPE_SCSI , "FCP"}, - {FC_TYPE_IP , "IP/FC"}, - {FC_TYPE_LLCSNAP , "LLC_SNAP"}, - {FC_TYPE_ELS , "Ext Link Svc"}, - {FC_TYPE_FCCT , "FC_CT"}, - {FC_TYPE_SWILS , "SW_ILS"}, - {FC_TYPE_AL , "AL"}, - {FC_TYPE_SNMP , "SNMP"}, - {0, NULL}, -}; +extern const value_string fc_fc4_val[]; -static const value_string fc_prli_fc4_val[] = { - {FC_TYPE_SCSI , "FCP"}, - {FC_TYPE_IP , "IP/FC"}, - {FC_TYPE_LLCSNAP , "LLC_SNAP"}, - {FC_TYPE_ELS , "Ext Link Svc"}, - {FC_TYPE_FCCT , "FC_CT"}, - {FC_TYPE_SWILS , "SW_ILS"}, - {FC_TYPE_AL , "AL"}, - {FC_TYPE_SNMP , "SNMP"}, - {FC_TYPE_CMNSVC , "Common to all FC-4 Types"}, - {0, NULL}, -}; +/* DF_CTL bits */ +#define FC_DFCTL_DH 0x03 /* Device_Header type bits: */ +#define FC_DFCTL_DH_NONE 0x00 /* No Device_Header */ +#define FC_DFCTL_DH_16_BYTE 0x01 /* 16 Byte Device_Header */ +#define FC_DFCTL_DH_32_BYTE 0x02 /* 32 Byte Device_Header */ +#define FC_DFCTL_DH_64_BYTE 0x03 /* 64 Byte Device_Header */ +#define FC_DFCTL_AH 0x10 /* Association_Header bit */ +#define FC_DFCTL_NH 0x20 /* Association_Header bit */ +#define FC_DFCTL_SH 0x40 /* reserved for security header */ /* Derived Frame types (used for ULP demux) */ #define FC_FTYPE_UNDEF 0x0 @@ -84,20 +75,6 @@ static const value_string fc_prli_fc4_val[] = { #define FC_FTYPE_LINKCTL 0xA #define FC_FTYPE_SWILS_RSP 0xB -static const value_string fc_ftype_vals [] = { - {FC_FTYPE_UNDEF , "Unknown frame"}, - {FC_FTYPE_SWILS, "SW_ILS"}, - {FC_FTYPE_IP , "IP/FC"}, - {FC_FTYPE_SCSI , "FCP"}, - {FC_FTYPE_BLS , "Basic Link Svc"}, - {FC_FTYPE_ELS , "ELS"}, - {FC_FTYPE_FCCT , "FC_CT"}, - {FC_FTYPE_LINKDATA, "Link Data"}, - {FC_FTYPE_VDO, "Video Data"}, - {FC_FTYPE_LINKCTL, "Link Ctl"}, - {0, NULL}, -}; - /* Well-known Address Definitions (in Network order) */ #define FC_WKA_MULTICAST 0xFFFFF5 #define FC_WKA_CLKSYNC 0xFFFFF6 @@ -113,21 +90,6 @@ static const value_string fc_ftype_vals [] = { /* Well-known Address Definitions (in little endian) */ -static const value_string fc_wka_vals[] = { - {FC_WKA_MULTICAST, "Multicast Server"}, - {FC_WKA_CLKSYNC, "Clock Sync Server"}, - {FC_WKA_KEYDIST, "Key Distribution Server"}, - {FC_WKA_ALIAS, "Alias Server"}, - {FC_WKA_QOSF, "QoS Facilitator"}, - {FC_WKA_MGMT, "Management Server"}, - {FC_WKA_TIME, "Time Server"}, - {FC_WKA_DNS, "Directory Server"}, - {FC_WKA_FABRIC_CTRLR, "Fabric Ctlr"}, - {FC_WKA_FPORT, "F_Port Server"}, - {FC_WKA_BCAST, "Broadcast ID"}, - {0, NULL}, -}; - /* Information Categories for Link Data & Link Control Frames */ #define FC_IU_UNCATEGORIZED 0x0 #define FC_IU_SOLICITED_DATA 0x1 @@ -138,16 +100,4 @@ static const value_string fc_wka_vals[] = { #define FC_IU_UNSOLICITED_CMD 0x6 #define FC_IU_CMD_STATUS 0x7 -static const value_string fc_iu_val[] = { - {FC_IU_UNCATEGORIZED , "Uncategorized Data"}, - {FC_IU_SOLICITED_DATA , "Solicited Data"}, - {FC_IU_UNSOLICITED_CTL , "Unsolicited Control"}, - {FC_IU_SOLICITED_CTL , "Solicited Control"}, - {FC_IU_UNSOLICITED_DATA, "Solicited Data"}, - {FC_IU_DATA_DESCRIPTOR , "Data Descriptor"}, - {FC_IU_UNSOLICITED_CMD , "Unsolicited Command"}, - {FC_IU_CMD_STATUS , "Command Status"}, - {0, NULL}, -}; - -#endif +#endif /* __PACKET_FC_H_ */ |