summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-fcp.c867
-rw-r--r--epan/dissectors/packet-fcsb3.c1284
-rw-r--r--epan/dissectors/packet-fcsp.c472
-rw-r--r--epan/dissectors/packet-fcswils.c1870
-rw-r--r--epan/dissectors/packet-fddi.c351
-rw-r--r--epan/dissectors/packet-fefd.c8
-rw-r--r--epan/dissectors/packet-fip.c520
-rw-r--r--epan/dissectors/packet-fix.c42
-rw-r--r--epan/dissectors/packet-fmp.c3269
-rw-r--r--epan/dissectors/packet-fr.c770
-rw-r--r--epan/dissectors/packet-frame.c163
-rw-r--r--epan/dissectors/packet-fw1.c12
12 files changed, 5226 insertions, 4402 deletions
diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c
index 99f31fbdd3..a08b5750d2 100644
--- a/epan/dissectors/packet-fcp.c
+++ b/epan/dissectors/packet-fcp.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include <stdlib.h>
-
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@ -49,26 +47,26 @@
#include "packet-fcels.h"
/* Initialize the protocol and registered fields */
-static int proto_fcp = -1;
-static int hf_fcp_multilun = -1;
-static int hf_fcp_singlelun = -1;
-static int hf_fcp_crn = -1;
-static int hf_fcp_taskattr = -1;
-static int hf_fcp_taskmgmt = -1;
+static int proto_fcp = -1;
+static int hf_fcp_multilun = -1;
+static int hf_fcp_singlelun = -1;
+static int hf_fcp_crn = -1;
+static int hf_fcp_taskattr = -1;
+static int hf_fcp_taskmgmt = -1;
static int hf_fcp_addlcdblen = -1;
-static int hf_fcp_rddata = -1;
-static int hf_fcp_wrdata = -1;
-static int hf_fcp_dl = -1;
-static int hf_fcp_bidir_dl = -1;
-static int hf_fcp_data_ro = -1;
-static int hf_fcp_burstlen = -1;
-static int hf_fcp_rspflags = -1;
-static int hf_fcp_retry_delay_timer = -1;
-static int hf_fcp_resid = -1;
+static int hf_fcp_rddata = -1;
+static int hf_fcp_wrdata = -1;
+static int hf_fcp_dl = -1;
+static int hf_fcp_bidir_dl = -1;
+static int hf_fcp_data_ro = -1;
+static int hf_fcp_burstlen = -1;
+static int hf_fcp_rspflags = -1;
+static int hf_fcp_retry_delay_timer = -1;
+static int hf_fcp_resid = -1;
static int hf_fcp_bidir_resid = -1;
-static int hf_fcp_snslen = -1;
-static int hf_fcp_rsplen = -1;
-static int hf_fcp_rspcode = -1;
+static int hf_fcp_snslen = -1;
+static int hf_fcp_rsplen = -1;
+static int hf_fcp_rspcode = -1;
static int hf_fcp_scsistatus = -1;
static int hf_fcp_type = -1;
static int hf_fcp_mgmt_flags_obsolete = -1;
@@ -180,75 +178,75 @@ static const true_false_string fcp_mgmt_flags_abort_task_set_tfs = {
};
static void
-dissect_task_mgmt_flags (packet_info *pinfo, proto_tree *parent_tree, tvbuff_t *tvb, int offset)
+dissect_task_mgmt_flags(packet_info *pinfo, proto_tree *parent_tree, tvbuff_t *tvb, int offset)
{
- proto_item *item = NULL;
- proto_tree *tree = NULL;
-
- guint8 flags;
-
- if(parent_tree) {
- item = proto_tree_add_item(parent_tree, hf_fcp_taskmgmt, tvb, offset, 1, ENC_LITTLE_ENDIAN);
- tree = proto_item_add_subtree(item, ett_fcp_taskmgmt);
- }
-
- flags = tvb_get_guint8 (tvb, offset);
-
- if (!flags)
- proto_item_append_text(item, " (No values set)");
-
- proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_obsolete, tvb, offset, 1, flags);
- if (flags&0x80){
- proto_item_append_text(item, " OBSOLETE");
- col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP OBSOLETE] ");
- }
- flags&=(~( 0x80 ));
-
- proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_clear_aca, tvb, offset, 1, flags);
- if (flags&0x40){
- proto_item_append_text(item, " CLEAR ACA");
- col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP CLEAR_ACA] ");
- }
- flags&=(~( 0x40 ));
-
- proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_target_reset, tvb, offset, 1, flags);
- if (flags&0x20){
- proto_item_append_text(item, " TARGET RESET");
- col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP TARGET_RESET] ");
- }
- flags&=(~( 0x20 ));
-
- proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_lu_reset, tvb, offset, 1, flags);
- if (flags&0x10){
- proto_item_append_text(item, " LU RESET");
- col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP LU_RESET] ");
- }
- flags&=(~( 0x10 ));
-
- proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_rsvd, tvb, offset, 1, flags);
- if (flags&0x08){
- proto_item_append_text(item, " RSVD");
- col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP RSVD] ");
- }
- flags&=(~( 0x08 ));
-
- proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_clear_task_set, tvb, offset, 1, flags);
- if (flags&0x04){
- proto_item_append_text(item, " CLEAR TASK SET");
- col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP CLEAR_TASK_SET] ");
- }
- flags&=(~( 0x04 ));
-
- proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_abort_task_set, tvb, offset, 1, flags);
- if (flags&0x02){
- proto_item_append_text(item, " ABORT TASK SET");
- col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP ABORT_TASK_SET] ");
- }
- flags&=(~( 0x02 ));
-
- if(flags){
- proto_item_append_text(item, " Unknown bitmap value 0x%x", flags);
- }
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+
+ guint8 flags;
+
+ if (parent_tree) {
+ item = proto_tree_add_item(parent_tree, hf_fcp_taskmgmt, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ tree = proto_item_add_subtree(item, ett_fcp_taskmgmt);
+ }
+
+ flags = tvb_get_guint8(tvb, offset);
+
+ if (!flags)
+ proto_item_append_text(item, " (No values set)");
+
+ proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_obsolete, tvb, offset, 1, flags);
+ if (flags & 0x80) {
+ proto_item_append_text(item, " OBSOLETE");
+ col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP OBSOLETE] ");
+ }
+ flags &= (~( 0x80 ));
+
+ proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_clear_aca, tvb, offset, 1, flags);
+ if (flags & 0x40) {
+ proto_item_append_text(item, " CLEAR ACA");
+ col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP CLEAR_ACA] ");
+ }
+ flags &= (~( 0x40 ));
+
+ proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_target_reset, tvb, offset, 1, flags);
+ if (flags & 0x20) {
+ proto_item_append_text(item, " TARGET RESET");
+ col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP TARGET_RESET] ");
+ }
+ flags &= (~( 0x20 ));
+
+ proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_lu_reset, tvb, offset, 1, flags);
+ if (flags & 0x10) {
+ proto_item_append_text(item, " LU RESET");
+ col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP LU_RESET] ");
+ }
+ flags &= (~( 0x10 ));
+
+ proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_rsvd, tvb, offset, 1, flags);
+ if (flags & 0x08) {
+ proto_item_append_text(item, " RSVD");
+ col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP RSVD] ");
+ }
+ flags &= (~( 0x08 ));
+
+ proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_clear_task_set, tvb, offset, 1, flags);
+ if (flags & 0x04) {
+ proto_item_append_text(item, " CLEAR TASK SET");
+ col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP CLEAR_TASK_SET] ");
+ }
+ flags &= (~( 0x04 ));
+
+ proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_abort_task_set, tvb, offset, 1, flags);
+ if (flags & 0x02) {
+ proto_item_append_text(item, " ABORT TASK SET");
+ col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP ABORT_TASK_SET] ");
+ }
+ flags &= (~( 0x02 ));
+
+ if (flags) {
+ proto_item_append_text(item, " Unknown bitmap value 0x%x", flags);
+ }
}
static const true_false_string fcp_rsp_flags_bidi_tfs = {
@@ -287,125 +285,125 @@ static const true_false_string fcp_rsp_flags_res_vld_tfs = {
static void
dissect_rsp_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
{
- proto_item *item = NULL;
- proto_tree *tree = NULL;
- gboolean bidi_resid_present=FALSE;
- guint8 flags;
-
- if(parent_tree) {
- item = proto_tree_add_item(parent_tree, hf_fcp_rspflags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
- tree = proto_item_add_subtree(item, ett_fcp_rsp_flags);
- }
-
- flags = tvb_get_guint8 (tvb, offset);
-
- if (!flags)
- proto_item_append_text(item, " (No values set)");
-
- /* BIDI RSP */
- proto_tree_add_boolean(tree, hf_fcp_rsp_flags_bidi, tvb, offset, 1, flags);
- if (flags&0x80){
- bidi_resid_present=TRUE;
- proto_item_append_text(item, " BIDI_RSP");
- if (flags & (~( 0x80 )))
- proto_item_append_text(item, ",");
- }
- flags&=(~( 0x80 ));
-
- /* these two bits are only defined if the bidi bit is set */
- if(bidi_resid_present){
- /* BIDI READ RESID UNDER */
- proto_tree_add_boolean(tree, hf_fcp_rsp_flags_bidi_rru, tvb, offset, 1, flags);
- if (flags&0x40){
- proto_item_append_text(item, " BIDI_RRU");
- if (flags & (~( 0x40 )))
- proto_item_append_text(item, ",");
- }
- flags&=(~( 0x40 ));
-
- /* BIDI READ RESID OVER */
- proto_tree_add_boolean(tree, hf_fcp_rsp_flags_bidi_rro, tvb, offset, 1, flags);
- if (flags&0x20){
- proto_item_append_text(item, " BIDI_RRO");
- if (flags & (~( 0x20 )))
- proto_item_append_text(item, ",");
- }
- flags&=(~( 0x20 ));
- }
-
- /* Conf Req */
- proto_tree_add_boolean(tree, hf_fcp_rsp_flags_conf_req, tvb, offset, 1, flags);
- if (flags&0x10){
- proto_item_append_text(item, " CONF REQ");
- if (flags & (~( 0x10 )))
- proto_item_append_text(item, ",");
- }
- flags&=(~( 0x10 ));
-
- /* Resid Under */
- proto_tree_add_boolean(tree, hf_fcp_rsp_flags_resid_under, tvb, offset, 1, flags);
- if (flags&0x08){
- proto_item_append_text(item, " RESID UNDER");
- if (flags & (~( 0x08 )))
- proto_item_append_text(item, ",");
- }
- flags&=(~( 0x08 ));
-
- /* Resid Over */
- proto_tree_add_boolean(tree, hf_fcp_rsp_flags_resid_over, tvb, offset, 1, flags);
- if (flags&0x04){
- proto_item_append_text(item, " RESID OVER");
- if (flags & (~( 0x04 )))
- proto_item_append_text(item, ",");
- }
- flags&=(~( 0x04 ));
-
- /* SNS len valid */
- proto_tree_add_boolean(tree, hf_fcp_rsp_flags_sns_vld, tvb, offset, 1, flags);
- if (flags&0x02){
- proto_item_append_text(item, " SNS VLD");
- if (flags & (~( 0x02 )))
- proto_item_append_text(item, ",");
- }
- flags&=(~( 0x02 ));
-
- /* rsp len valid */
- proto_tree_add_boolean(tree, hf_fcp_rsp_flags_res_vld, tvb, offset, 1, flags);
- if (flags&0x01){
- proto_item_append_text(item, " RES VLD");
- if (flags & (~( 0x01 )))
- proto_item_append_text(item, ",");
- }
- flags&=(~( 0x01 ));
-
- if(flags){
- proto_item_append_text(item, " Unknown bitmap value 0x%x", flags);
- }
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+ gboolean bidi_resid_present = FALSE;
+ guint8 flags;
+
+ if (parent_tree) {
+ item = proto_tree_add_item(parent_tree, hf_fcp_rspflags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ tree = proto_item_add_subtree(item, ett_fcp_rsp_flags);
+ }
+
+ flags = tvb_get_guint8(tvb, offset);
+
+ if (!flags)
+ proto_item_append_text(item, " (No values set)");
+
+ /* BIDI RSP */
+ proto_tree_add_boolean(tree, hf_fcp_rsp_flags_bidi, tvb, offset, 1, flags);
+ if (flags & 0x80) {
+ bidi_resid_present = TRUE;
+ proto_item_append_text(item, " BIDI_RSP");
+ if (flags & (~( 0x80 )))
+ proto_item_append_text(item, ",");
+ }
+ flags &= (~( 0x80 ));
+
+ /* these two bits are only defined if the bidi bit is set */
+ if (bidi_resid_present) {
+ /* BIDI READ RESID UNDER */
+ proto_tree_add_boolean(tree, hf_fcp_rsp_flags_bidi_rru, tvb, offset, 1, flags);
+ if (flags & 0x40) {
+ proto_item_append_text(item, " BIDI_RRU");
+ if (flags & (~( 0x40 )))
+ proto_item_append_text(item, ",");
+ }
+ flags &= (~( 0x40 ));
+
+ /* BIDI READ RESID OVER */
+ proto_tree_add_boolean(tree, hf_fcp_rsp_flags_bidi_rro, tvb, offset, 1, flags);
+ if (flags & 0x20) {
+ proto_item_append_text(item, " BIDI_RRO");
+ if (flags & (~( 0x20 )))
+ proto_item_append_text(item, ",");
+ }
+ flags &= (~( 0x20 ));
+ }
+
+ /* Conf Req */
+ proto_tree_add_boolean(tree, hf_fcp_rsp_flags_conf_req, tvb, offset, 1, flags);
+ if (flags & 0x10) {
+ proto_item_append_text(item, " CONF REQ");
+ if (flags & (~( 0x10 )))
+ proto_item_append_text(item, ",");
+ }
+ flags &= (~( 0x10 ));
+
+ /* Resid Under */
+ proto_tree_add_boolean(tree, hf_fcp_rsp_flags_resid_under, tvb, offset, 1, flags);
+ if (flags & 0x08) {
+ proto_item_append_text(item, " RESID UNDER");
+ if (flags & (~( 0x08 )))
+ proto_item_append_text(item, ",");
+ }
+ flags &= (~( 0x08 ));
+
+ /* Resid Over */
+ proto_tree_add_boolean(tree, hf_fcp_rsp_flags_resid_over, tvb, offset, 1, flags);
+ if (flags & 0x04) {
+ proto_item_append_text(item, " RESID OVER");
+ if (flags & (~( 0x04 )))
+ proto_item_append_text(item, ",");
+ }
+ flags &= (~( 0x04 ));
+
+ /* SNS len valid */
+ proto_tree_add_boolean(tree, hf_fcp_rsp_flags_sns_vld, tvb, offset, 1, flags);
+ if (flags & 0x02) {
+ proto_item_append_text(item, " SNS VLD");
+ if (flags & (~( 0x02 )))
+ proto_item_append_text(item, ",");
+ }
+ flags &= (~( 0x02 ));
+
+ /* rsp len valid */
+ proto_tree_add_boolean(tree, hf_fcp_rsp_flags_res_vld, tvb, offset, 1, flags);
+ if (flags & 0x01) {
+ proto_item_append_text(item, " RES VLD");
+ if (flags & (~( 0x01 )))
+ proto_item_append_text(item, ",");
+ }
+ flags &= (~( 0x01 ));
+
+ if (flags) {
+ proto_item_append_text(item, " Unknown bitmap value 0x%x", flags);
+ }
}
static void
dissect_fcp_cmnd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, proto_tree *tree, conversation_t *conversation, fc_hdr *fchdr, fcp_conv_data_t *fcp_conv_data)
{
- int offset = 0;
- int add_len = 0;
- guint8 flags, rwflags, lun0;
- guint16 lun=0xffff;
- tvbuff_t *cdb_tvb;
- int tvb_len, tvb_rlen;
- itl_nexus_t *itl=NULL;
- proto_item *hidden_item;
+ int offset = 0;
+ int add_len = 0;
+ guint8 flags, rwflags, lun0;
+ guint16 lun = 0xffff;
+ tvbuff_t *cdb_tvb;
+ int tvb_len, tvb_rlen;
+ itl_nexus_t *itl = NULL;
+ proto_item *hidden_item;
/* Determine the length of the FCP part of the packet */
- flags = tvb_get_guint8 (tvb, offset+10);
+ flags = tvb_get_guint8(tvb, offset+10);
if (flags) {
- add_len = tvb_get_guint8 (tvb, offset+11) & 0x7C;
+ add_len = tvb_get_guint8(tvb, offset+11) & 0x7C;
add_len = add_len >> 2;
}
hidden_item = proto_tree_add_uint(tree, hf_fcp_type, tvb, offset, 0, 0);
PROTO_ITEM_SET_HIDDEN(hidden_item);
- lun0 = tvb_get_guint8 (tvb, offset);
+ lun0 = tvb_get_guint8(tvb, offset);
/* Display single-level LUNs in decimal for clarity */
/* I'm taking a shortcut here by assuming that if the first byte of the
@@ -414,23 +412,23 @@ dissect_fcp_cmnd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, pro
*/
if (lun0) {
proto_tree_add_item(tree, hf_fcp_multilun, tvb, offset, 8, ENC_NA);
- lun=tvb_get_guint8(tvb, offset)&0x3f;
- lun<<=8;
- lun|=tvb_get_guint8(tvb, offset+1);
+ lun = tvb_get_guint8(tvb, offset) & 0x3f;
+ lun <<= 8;
+ lun |= tvb_get_guint8(tvb, offset+1);
} else {
proto_tree_add_item(tree, hf_fcp_singlelun, tvb, offset+1,
- 1, ENC_BIG_ENDIAN);
- lun=tvb_get_guint8(tvb, offset+1);
+ 1, ENC_BIG_ENDIAN);
+ lun = tvb_get_guint8(tvb, offset+1);
}
if (fchdr->itlq)
- fchdr->itlq->lun=lun;
+ fchdr->itlq->lun = lun;
- itl=(itl_nexus_t *)se_tree_lookup32(fcp_conv_data->luns, lun);
- if(!itl){
- itl=se_alloc(sizeof(itl_nexus_t));
- itl->cmdset=0xff;
- itl->conversation=conversation;
+ itl = (itl_nexus_t *)se_tree_lookup32(fcp_conv_data->luns, lun);
+ if (!itl) {
+ itl = se_alloc(sizeof(itl_nexus_t));
+ itl->cmdset = 0xff;
+ itl->conversation = conversation;
se_tree_insert32(fcp_conv_data->luns, lun, itl);
}
@@ -438,40 +436,40 @@ dissect_fcp_cmnd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, pro
proto_tree_add_item(tree, hf_fcp_taskattr, tvb, offset+9, 1, ENC_BIG_ENDIAN);
dissect_task_mgmt_flags(pinfo, tree, tvb, offset+10);
proto_tree_add_item(tree, hf_fcp_addlcdblen, tvb, offset+11, 1, ENC_BIG_ENDIAN);
- rwflags=tvb_get_guint8(tvb, offset+11);
- if(fchdr->itlq){
- if(rwflags&0x02){
- fchdr->itlq->task_flags|=SCSI_DATA_READ;
- }
- if(rwflags&0x01){
- fchdr->itlq->task_flags|=SCSI_DATA_WRITE;
- }
+ rwflags = tvb_get_guint8(tvb, offset+11);
+ if (fchdr->itlq) {
+ if (rwflags & 0x02) {
+ fchdr->itlq->task_flags |= SCSI_DATA_READ;
+ }
+ if (rwflags & 0x01) {
+ fchdr->itlq->task_flags |= SCSI_DATA_WRITE;
+ }
}
proto_tree_add_item(tree, hf_fcp_rddata, tvb, offset+11, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_fcp_wrdata, tvb, offset+11, 1, ENC_BIG_ENDIAN);
- tvb_len=tvb_length_remaining(tvb, offset+12);
- if(tvb_len>(16+add_len))
- tvb_len=16+add_len;
- tvb_rlen=tvb_reported_length_remaining(tvb, offset+12);
- if(tvb_rlen>(16+add_len))
- tvb_rlen=16+add_len;
- cdb_tvb=tvb_new_subset(tvb, offset+12, tvb_len, tvb_rlen);
+ tvb_len = tvb_length_remaining(tvb, offset+12);
+ if (tvb_len > (16 + add_len))
+ tvb_len = 16 + add_len;
+ tvb_rlen = tvb_reported_length_remaining(tvb, offset+12);
+ if (tvb_rlen > (16 + add_len))
+ tvb_rlen = 16 + add_len;
+ cdb_tvb = tvb_new_subset(tvb, offset+12, tvb_len, tvb_rlen);
dissect_scsi_cdb(cdb_tvb, pinfo, parent_tree, SCSI_DEV_UNKNOWN, fchdr->itlq, itl);
proto_tree_add_item(tree, hf_fcp_dl, tvb, offset+12+16+add_len,
- 4, ENC_BIG_ENDIAN);
- if(fchdr->itlq){
- fchdr->itlq->data_length=tvb_get_ntohl(tvb, offset+12+16+add_len);
+ 4, ENC_BIG_ENDIAN);
+ if (fchdr->itlq) {
+ fchdr->itlq->data_length = tvb_get_ntohl(tvb, offset+12+16+add_len);
}
- if( ((rwflags&0x03)==0x03)
- && tvb_length_remaining(tvb, offset+12+16+add_len+4)>=4){
- proto_tree_add_item(tree, hf_fcp_bidir_dl, tvb, offset+12+16+add_len+4,
- 4, ENC_BIG_ENDIAN);
- if(fchdr->itlq){
- fchdr->itlq->bidir_data_length=tvb_get_ntohl(tvb, offset+12+16+add_len+4);
- }
+ if ( ((rwflags & 0x03) == 0x03)
+ && tvb_length_remaining(tvb, offset+12+16+add_len+4) >= 4) {
+ proto_tree_add_item(tree, hf_fcp_bidir_dl, tvb, offset+12+16+add_len+4,
+ 4, ENC_BIG_ENDIAN);
+ if (fchdr->itlq) {
+ fchdr->itlq->bidir_data_length = tvb_get_ntohl(tvb, offset+12+16+add_len+4);
+ }
}
@@ -488,110 +486,110 @@ static void
dissect_fcp_rspinfo(tvbuff_t *tvb, proto_tree *tree, int offset)
{
/* 3 reserved bytes */
- offset+=3;
+ offset += 3;
/* rsp code */
proto_tree_add_item(tree, hf_fcp_rspcode, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ offset += 1;
/* 4 reserved bytes */
- offset+=4;
+ offset += 4;
}
static void
dissect_fcp_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, proto_tree *tree, conversation_t *conversation _U_, fc_hdr *fchdr, itl_nexus_t *itl)
{
- guint32 offset = 0;
- gint32 snslen = 0,
- rsplen = 0;
- guint8 flags;
- guint8 status;
+ guint32 offset = 0;
+ gint32 snslen = 0;
+ gint32 rsplen = 0;
+ guint8 flags;
+ guint8 status;
proto_item *hidden_item;
- status = tvb_get_guint8 (tvb, offset+11);
+ status = tvb_get_guint8(tvb, offset+11);
- if (check_col (pinfo->cinfo, COL_INFO)) {
- col_append_fstr (pinfo->cinfo, COL_INFO, ":%s",
- val_to_str (status, scsi_status_val, "0x%x"));
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, ":%s",
+ val_to_str(status, scsi_status_val, "0x%x"));
}
hidden_item = proto_tree_add_uint(tree, hf_fcp_type, tvb, offset, 0, 0);
PROTO_ITEM_SET_HIDDEN(hidden_item);
/* 8 reserved bytes */
- offset+=8;
+ offset += 8;
/* retry delay timer */
proto_tree_add_item(tree, hf_fcp_retry_delay_timer, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset+=2;
+ offset += 2;
/* flags */
- flags = tvb_get_guint8 (tvb, offset);
+ flags = tvb_get_guint8(tvb, offset);
dissect_rsp_flags(tree, tvb, offset);
- offset++;
+ offset += 1;
/* scsi status code */
proto_tree_add_item(tree, hf_fcp_scsistatus, tvb, offset, 1, ENC_BIG_ENDIAN);
dissect_scsi_rsp(tvb, pinfo, parent_tree, fchdr->itlq, itl, tvb_get_guint8(tvb, offset));
- offset++;
+ offset += 1;
/* residual count */
- if(flags & 0x0e){
+ if (flags & 0x0e) {
proto_tree_add_item(tree, hf_fcp_resid, tvb, offset, 4, ENC_BIG_ENDIAN);
}
- offset+=4;
+ offset += 4;
/* sense length */
if (flags & 0x2) {
- snslen=tvb_get_ntohl(tvb, offset);
+ snslen = tvb_get_ntohl(tvb, offset);
proto_tree_add_uint(tree, hf_fcp_snslen, tvb, offset, 4,
snslen);
}
- offset+=4;
+ offset += 4;
/* response length */
if (flags & 0x1) {
- rsplen=tvb_get_ntohl(tvb, offset);
+ rsplen = tvb_get_ntohl(tvb, offset);
proto_tree_add_uint(tree, hf_fcp_rsplen, tvb, offset, 4,
rsplen);
}
- offset+=4;
+ offset += 4;
/* rsp_info */
- if(rsplen){
+ if (rsplen) {
tvbuff_t *rspinfo_tvb;
- rspinfo_tvb=tvb_new_subset(tvb, offset, MIN(rsplen, tvb_length_remaining(tvb, offset)), rsplen);
+ rspinfo_tvb = tvb_new_subset(tvb, offset, MIN(rsplen, tvb_length_remaining(tvb, offset)), rsplen);
dissect_fcp_rspinfo(rspinfo_tvb, tree, 0);
- offset+=rsplen;
+ offset += rsplen;
}
/* sense info */
- if(snslen){
+ if (snslen) {
tvbuff_t *sns_tvb;
- sns_tvb=tvb_new_subset(tvb, offset, MIN(snslen, tvb_length_remaining(tvb, offset)), snslen);
- dissect_scsi_snsinfo (sns_tvb, pinfo, parent_tree, 0,
+ sns_tvb = tvb_new_subset(tvb, offset, MIN(snslen, tvb_length_remaining(tvb, offset)), snslen);
+ dissect_scsi_snsinfo(sns_tvb, pinfo, parent_tree, 0,
snslen,
fchdr->itlq, itl);
- offset+=snslen;
+ offset += snslen;
}
/* bidir read resid (only present for bidirectional responses) */
- if(flags&0x80){
- if(flags&0x60){
+ if (flags & 0x80) {
+ if (flags & 0x60) {
proto_tree_add_item(tree, hf_fcp_bidir_resid, tvb, offset, 4, ENC_BIG_ENDIAN);
}
- offset+=4;
+ offset += 4;
}
}
static void
dissect_fcp_xfer_rdy(tvbuff_t *tvb, proto_tree *tree)
{
- int offset = 0;
+ int offset = 0;
proto_item *hidden_item;
hidden_item = proto_tree_add_uint(tree, hf_fcp_type, tvb, offset, 0, 0);
@@ -650,15 +648,15 @@ dissect_fcp_els(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_item *ti=NULL;
- proto_tree *fcp_tree = NULL;
- fc_hdr *fchdr;
- guint8 r_ctl;
- fcp_conv_data_t *fcp_conv_data=NULL;
- itl_nexus_t *itl=NULL;
- gboolean els;
+ proto_item *ti = NULL;
+ proto_tree *fcp_tree = NULL;
+ fc_hdr *fchdr;
+ guint8 r_ctl;
+ fcp_conv_data_t *fcp_conv_data;
+ itl_nexus_t *itl = NULL;
+ gboolean els;
- fchdr=(fc_hdr *)pinfo->private_data;
+ fchdr = (fc_hdr *)pinfo->private_data;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FCP");
@@ -667,9 +665,9 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
els = (r_ctl & 0xf0) == FC_RCTL_LINK_DATA;
r_ctl &= 0xF;
- if (check_col (pinfo->cinfo, COL_INFO)) {
- col_add_str (pinfo->cinfo, COL_INFO,
- val_to_str (r_ctl, els ? fcp_els_iu_val : fcp_iu_val,
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_str(pinfo->cinfo, COL_INFO,
+ val_to_str(r_ctl, els ? fcp_els_iu_val : fcp_iu_val,
"0x%x"));
}
@@ -683,38 +681,38 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
- fcp_conv_data=conversation_get_proto_data(fchdr->conversation, proto_fcp);
- if(!fcp_conv_data){
- fcp_conv_data=se_alloc(sizeof(fcp_conv_data_t));
- fcp_conv_data->luns=se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "FCP Luns");
+ fcp_conv_data = conversation_get_proto_data(fchdr->conversation, proto_fcp);
+ if (!fcp_conv_data) {
+ fcp_conv_data = se_alloc(sizeof(fcp_conv_data_t));
+ fcp_conv_data->luns = se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "FCP Luns");
conversation_add_proto_data(fchdr->conversation, proto_fcp, fcp_conv_data);
}
- if((r_ctl!=FCP_IU_CMD) && (r_ctl!=FCP_IU_UNSOL_CTL)){
- itl=(itl_nexus_t *)se_tree_lookup32(fcp_conv_data->luns, fchdr->itlq->lun);
+ if ((r_ctl != FCP_IU_CMD) && (r_ctl != FCP_IU_UNSOL_CTL)) {
+ itl = (itl_nexus_t *)se_tree_lookup32(fcp_conv_data->luns, fchdr->itlq->lun);
}
/* put a request_in in all frames except the command frame */
- if((r_ctl!=FCP_IU_CMD) && (r_ctl!=FCP_IU_UNSOL_CTL) &&
- (fchdr->itlq->first_exchange_frame)){
+ if ((r_ctl != FCP_IU_CMD) && (r_ctl != FCP_IU_UNSOL_CTL) &&
+ (fchdr->itlq->first_exchange_frame)) {
proto_item *it;
- it=proto_tree_add_uint(fcp_tree, hf_fcp_singlelun, tvb, 0, 0, fchdr->itlq->lun);
+ it = proto_tree_add_uint(fcp_tree, hf_fcp_singlelun, tvb, 0, 0, fchdr->itlq->lun);
PROTO_ITEM_SET_GENERATED(it);
- it=proto_tree_add_uint(fcp_tree, hf_fcp_request_in, tvb, 0, 0, fchdr->itlq->first_exchange_frame);
+ it = proto_tree_add_uint(fcp_tree, hf_fcp_request_in, tvb, 0, 0, fchdr->itlq->first_exchange_frame);
PROTO_ITEM_SET_GENERATED(it);
/* only put the response time in the actual response frame */
- if(r_ctl==FCP_IU_RSP){
+ if (r_ctl == FCP_IU_RSP) {
nstime_t delta_ts;
nstime_delta(&delta_ts, &pinfo->fd->abs_ts, &fchdr->itlq->fc_time);
- it=proto_tree_add_time(ti, hf_fcp_time, tvb, 0, 0, &delta_ts);
+ it = proto_tree_add_time(ti, hf_fcp_time, tvb, 0, 0, &delta_ts);
PROTO_ITEM_SET_GENERATED(it);
}
}
/* put a response_in in all frames except the response frame */
- if((r_ctl!=FCP_IU_RSP) && (r_ctl!=FCP_IU_SOL_CTL) &&
- (fchdr->itlq->last_exchange_frame)){
+ if ((r_ctl != FCP_IU_RSP) && (r_ctl != FCP_IU_SOL_CTL) &&
+ (fchdr->itlq->last_exchange_frame)) {
proto_item *it;
- it=proto_tree_add_uint(fcp_tree, hf_fcp_response_in, tvb, 0, 0, fchdr->itlq->last_exchange_frame);
+ it = proto_tree_add_uint(fcp_tree, hf_fcp_response_in, tvb, 0, 0, fchdr->itlq->last_exchange_frame);
PROTO_ITEM_SET_GENERATED(it);
}
@@ -749,132 +747,233 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Register the protocol with Wireshark */
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
void
-proto_register_fcp (void)
+proto_register_fcp(void)
{
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{ &hf_fcp_type,
- {"Field to branch off to SCSI", "fcp.type", FT_UINT8, BASE_HEX, NULL,
- 0x0, NULL, HFILL}},
- {&hf_fcp_multilun,
- {"Multi-Level LUN", "fcp.multilun", FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL, HFILL}},
+ {"Field to branch off to SCSI", "fcp.type",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
+ { &hf_fcp_multilun,
+ {"Multi-Level LUN", "fcp.multilun",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_singlelun,
- {"LUN", "fcp.lun", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ {"LUN", "fcp.lun",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_crn,
- {"Command Ref Num", "fcp.crn", FT_UINT8, BASE_DEC, NULL, 0x0, NULL,
- HFILL}},
+ {"Command Ref Num", "fcp.crn",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_taskattr,
- {"Task Attribute", "fcp.taskattr", FT_UINT8, BASE_HEX,
- VALS (fcp_task_attr_val), 0x7, NULL, HFILL}},
+ {"Task Attribute", "fcp.taskattr",
+ FT_UINT8, BASE_HEX, VALS(fcp_task_attr_val), 0x7,
+ NULL, HFILL}},
+
{ &hf_fcp_taskmgmt,
- {"Task Management Flags", "fcp.taskmgmt", FT_UINT8, BASE_HEX, NULL,
- 0x0, NULL, HFILL}},
+ {"Task Management Flags", "fcp.taskmgmt",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_addlcdblen,
- {"Additional CDB Length", "fcp.addlcdblen", FT_UINT8, BASE_DEC, NULL,
- 0xFC, NULL, HFILL}},
+ {"Additional CDB Length", "fcp.addlcdblen",
+ FT_UINT8, BASE_DEC, NULL, 0xFC,
+ NULL, HFILL}},
+
{ &hf_fcp_rddata,
- {"RDDATA", "fcp.rddata", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL}},
+ {"RDDATA", "fcp.rddata",
+ FT_BOOLEAN, 8, NULL, 0x02,
+ NULL, HFILL}},
+
{ &hf_fcp_wrdata,
- {"WRDATA", "fcp.wrdata", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL}},
+ {"WRDATA", "fcp.wrdata",
+ FT_BOOLEAN, 8, NULL, 0x01,
+ NULL, HFILL}},
+
{ &hf_fcp_dl,
- {"FCP_DL", "fcp.dl", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ {"FCP_DL", "fcp.dl",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_bidir_dl,
- {"FCP_BIDIRECTIONAL_READ_DL", "fcp.bidir_dl", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ {"FCP_BIDIRECTIONAL_READ_DL", "fcp.bidir_dl",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_data_ro,
- {"FCP_DATA_RO", "fcp.data_ro", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
- HFILL}},
+ {"FCP_DATA_RO", "fcp.data_ro",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_burstlen,
- {"Burst Length", "fcp.burstlen", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
- HFILL}},
+ {"Burst Length", "fcp.burstlen",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_retry_delay_timer,
- {"Retry Delay Timer", "fcp.rsp.retry_delay_timer", FT_UINT16, BASE_DEC, NULL, 0x0, NULL,
- HFILL}},
+ {"Retry Delay Timer", "fcp.rsp.retry_delay_timer",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_rspflags,
- {"FCP_RSP Flags", "fcp.rspflags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL,
- HFILL}},
+ {"FCP_RSP Flags", "fcp.rspflags",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_resid,
- {"FCP_RESID", "fcp.resid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
- HFILL}},
+ {"FCP_RESID", "fcp.resid",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_bidir_resid,
- {"Bidirectional Read Resid", "fcp.bidir_resid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
- HFILL}},
+ {"Bidirectional Read Resid", "fcp.bidir_resid",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_snslen,
- {"FCP_SNS_LEN", "fcp.snslen", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
- HFILL}},
+ {"FCP_SNS_LEN", "fcp.snslen",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_rsplen,
- {"FCP_RSP_LEN", "fcp.rsplen", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
- HFILL}},
+ {"FCP_RSP_LEN", "fcp.rsplen",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_rspcode,
- {"RSP_CODE", "fcp.rspcode", FT_UINT8, BASE_HEX,
- VALS (fcp_rsp_code_val), 0x0, NULL, HFILL}},
+ {"RSP_CODE", "fcp.rspcode",
+ FT_UINT8, BASE_HEX, VALS(fcp_rsp_code_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_scsistatus,
- {"SCSI Status", "fcp.status", FT_UINT8, BASE_HEX,
- VALS (scsi_status_val), 0x0, NULL, HFILL}},
- { &hf_fcp_mgmt_flags_obsolete,
- { "Obsolete", "fcp.mgmt.flags.obsolete", FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_obsolete_tfs), 0x80, NULL, HFILL }},
- { &hf_fcp_mgmt_flags_clear_aca,
- { "Clear ACA", "fcp.mgmt.flags.clear_aca", FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_clear_aca_tfs), 0x40, NULL, HFILL }},
- { &hf_fcp_mgmt_flags_target_reset,
- { "Target Reset", "fcp.mgmt.flags.target_reset", FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_target_reset_tfs), 0x20, NULL, HFILL }},
- { &hf_fcp_mgmt_flags_lu_reset,
- { "LU Reset", "fcp.mgmt.flags.lu_reset", FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_lu_reset_tfs), 0x10, NULL, HFILL }},
- { &hf_fcp_mgmt_flags_rsvd,
- { "Rsvd", "fcp.mgmt.flags.rsvd", FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_rsvd_tfs), 0x08, NULL, HFILL }},
- { &hf_fcp_mgmt_flags_clear_task_set,
- { "Clear Task Set", "fcp.mgmt.flags.clear_task_set", FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_clear_task_set_tfs), 0x04, NULL, HFILL }},
- { &hf_fcp_mgmt_flags_abort_task_set,
- { "Abort Task Set", "fcp.mgmt.flags.abort_task_set", FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_abort_task_set_tfs), 0x02, NULL, HFILL }},
- { &hf_fcp_rsp_flags_bidi,
- { "Bidi Rsp", "fcp.rsp.flags.bidi", FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_bidi_tfs), 0x80, NULL, HFILL }},
- { &hf_fcp_rsp_flags_bidi_rru,
- { "Bidi Read Resid Under", "fcp.rsp.flags.bidi_rru", FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_bidi_rru_tfs), 0x40, NULL, HFILL }},
- { &hf_fcp_rsp_flags_bidi_rro,
- { "Bidi Read Resid Over", "fcp.rsp.flags.bidi_rro", FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_bidi_rro_tfs), 0x20, NULL, HFILL }},
- { &hf_fcp_rsp_flags_conf_req,
- { "Conf Req", "fcp.rsp.flags.conf_req", FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_conf_req_tfs), 0x10, NULL, HFILL }},
- { &hf_fcp_rsp_flags_resid_under,
- { "Resid Under", "fcp.rsp.flags.resid_under", FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_resid_under_tfs), 0x08, NULL, HFILL }},
- { &hf_fcp_rsp_flags_resid_over,
- { "Resid Over", "fcp.rsp.flags.resid_over", FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_resid_over_tfs), 0x04, NULL, HFILL }},
- { &hf_fcp_rsp_flags_sns_vld,
- { "SNS Vld", "fcp.rsp.flags.sns_vld", FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_sns_vld_tfs), 0x02, NULL, HFILL }},
- { &hf_fcp_rsp_flags_res_vld,
- { "RES Vld", "fcp.rsp.flags.res_vld", FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_res_vld_tfs), 0x01, NULL, HFILL }},
+ {"SCSI Status", "fcp.status",
+ FT_UINT8, BASE_HEX, VALS(scsi_status_val), 0x0,
+ NULL, HFILL}},
+
+ { &hf_fcp_mgmt_flags_obsolete,
+ { "Obsolete", "fcp.mgmt.flags.obsolete",
+ FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_obsolete_tfs), 0x80,
+ NULL, HFILL }},
+
+ { &hf_fcp_mgmt_flags_clear_aca,
+ { "Clear ACA", "fcp.mgmt.flags.clear_aca",
+ FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_clear_aca_tfs), 0x40,
+ NULL, HFILL }},
+
+ { &hf_fcp_mgmt_flags_target_reset,
+ { "Target Reset", "fcp.mgmt.flags.target_reset",
+ FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_target_reset_tfs), 0x20,
+ NULL, HFILL }},
+
+ { &hf_fcp_mgmt_flags_lu_reset,
+ { "LU Reset", "fcp.mgmt.flags.lu_reset",
+ FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_lu_reset_tfs), 0x10,
+ NULL, HFILL }},
+
+ { &hf_fcp_mgmt_flags_rsvd,
+ { "Rsvd", "fcp.mgmt.flags.rsvd",
+ FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_rsvd_tfs), 0x08,
+ NULL, HFILL }},
+
+ { &hf_fcp_mgmt_flags_clear_task_set,
+ { "Clear Task Set", "fcp.mgmt.flags.clear_task_set",
+ FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_clear_task_set_tfs), 0x04,
+ NULL, HFILL }},
+
+ { &hf_fcp_mgmt_flags_abort_task_set,
+ { "Abort Task Set", "fcp.mgmt.flags.abort_task_set",
+ FT_BOOLEAN, 8, TFS(&fcp_mgmt_flags_abort_task_set_tfs), 0x02,
+ NULL, HFILL }},
+
+ { &hf_fcp_rsp_flags_bidi,
+ { "Bidi Rsp", "fcp.rsp.flags.bidi",
+ FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_bidi_tfs), 0x80,
+ NULL, HFILL }},
+
+ { &hf_fcp_rsp_flags_bidi_rru,
+ { "Bidi Read Resid Under", "fcp.rsp.flags.bidi_rru",
+ FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_bidi_rru_tfs), 0x40,
+ NULL, HFILL }},
+
+ { &hf_fcp_rsp_flags_bidi_rro,
+ { "Bidi Read Resid Over", "fcp.rsp.flags.bidi_rro",
+ FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_bidi_rro_tfs), 0x20,
+ NULL, HFILL }},
+
+ { &hf_fcp_rsp_flags_conf_req,
+ { "Conf Req", "fcp.rsp.flags.conf_req",
+ FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_conf_req_tfs), 0x10,
+ NULL, HFILL }},
+
+ { &hf_fcp_rsp_flags_resid_under,
+ { "Resid Under", "fcp.rsp.flags.resid_under",
+ FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_resid_under_tfs), 0x08,
+ NULL, HFILL }},
+
+ { &hf_fcp_rsp_flags_resid_over,
+ { "Resid Over", "fcp.rsp.flags.resid_over",
+ FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_resid_over_tfs), 0x04,
+ NULL, HFILL }},
+
+ { &hf_fcp_rsp_flags_sns_vld,
+ { "SNS Vld", "fcp.rsp.flags.sns_vld",
+ FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_sns_vld_tfs), 0x02,
+ NULL, HFILL }},
+
+ { &hf_fcp_rsp_flags_res_vld,
+ { "RES Vld", "fcp.rsp.flags.res_vld",
+ FT_BOOLEAN, 8, TFS(&fcp_rsp_flags_res_vld_tfs), 0x01,
+ NULL, HFILL }},
+
{ &hf_fcp_request_in,
- { "Request In", "fcp.request_in", FT_FRAMENUM, BASE_NONE, NULL,
- 0, "The frame number for the request", HFILL }},
+ { "Request In", "fcp.request_in",
+ FT_FRAMENUM, BASE_NONE, NULL, 0,
+ "The frame number for the request", HFILL }},
+
{ &hf_fcp_response_in,
- { "Response In", "fcp.response_in", FT_FRAMENUM, BASE_NONE, NULL,
- 0, "The frame number of the response", HFILL }},
+ { "Response In", "fcp.response_in",
+ FT_FRAMENUM, BASE_NONE, NULL, 0,
+ "The frame number of the response", HFILL }},
+
{ &hf_fcp_time,
- { "Time from FCP_CMND", "fcp.time", FT_RELATIVE_TIME, BASE_NONE, NULL,
- 0, "Time since the FCP_CMND frame", HFILL }},
+ { "Time from FCP_CMND", "fcp.time",
+ FT_RELATIVE_TIME, BASE_NONE, NULL, 0,
+ "Time since the FCP_CMND frame", HFILL }},
+
{ &hf_fcp_srr_op,
- {"Opcode", "fcp.els.op", FT_UINT8, BASE_HEX, NULL, 0x0, NULL,
- HFILL}},
+ {"Opcode", "fcp.els.op",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_srr_ox_id,
- {"OX_ID", "fcp.els.srr.ox_id", FT_UINT16, BASE_HEX, NULL, 0x0, NULL,
- HFILL}},
+ {"OX_ID", "fcp.els.srr.ox_id",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_srr_rx_id,
- {"RX_ID", "fcp.els.srr.rx_id", FT_UINT16, BASE_HEX, NULL, 0x0, NULL,
- HFILL}},
+ {"RX_ID", "fcp.els.srr.rx_id",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_fcp_srr_r_ctl,
- {"R_CTL", "fcp.els.srr.r_ctl", FT_UINT8, BASE_HEX, NULL, 0x0, NULL,
- HFILL}},
+ {"R_CTL", "fcp.els.srr.r_ctl",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
};
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_fcp,
- &ett_fcp_taskmgmt,
- &ett_fcp_rsp_flags,
+ &ett_fcp_taskmgmt,
+ &ett_fcp_rsp_flags,
};
/* Register the protocol name and description */
@@ -884,21 +983,17 @@ proto_register_fcp (void)
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_fcp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- fcp_dissector = register_dissector_table ("fcp.type", "FCP Type", FT_UINT8,
+ fcp_dissector = register_dissector_table("fcp.type", "FCP Type", FT_UINT8,
BASE_HEX);
}
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
-proto_reg_handoff_fcp (void)
+proto_reg_handoff_fcp(void)
{
dissector_handle_t fcp_handle;
- fcp_handle = create_dissector_handle (dissect_fcp, proto_fcp);
+ fcp_handle = create_dissector_handle(dissect_fcp, proto_fcp);
dissector_add_uint("fc.ftype", FC_FTYPE_SCSI, fcp_handle);
- data_handle = find_dissector ("data");
+ data_handle = find_dissector("data");
}
diff --git a/epan/dissectors/packet-fcsb3.c b/epan/dissectors/packet-fcsb3.c
index ef8130db8a..76799c27fc 100644
--- a/epan/dissectors/packet-fcsb3.c
+++ b/epan/dissectors/packet-fcsb3.c
@@ -9,12 +9,6 @@
* By Gerald Combs <gerald@wireshark.org>
* 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
* as published by the Free Software Foundation; either version 2
@@ -34,8 +28,6 @@
# include "config.h"
#endif
-#include <stdlib.h>
-
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@ -54,33 +46,33 @@
#include "packet-fcsb3.h"
/* Initialize the protocol and registered fields */
-static int proto_fc_sbccs = -1;
-static int hf_sbccs_chid = -1;
-static int hf_sbccs_cuid = -1;
-static int hf_sbccs_devaddr = -1;
-static int hf_sbccs_ccw = -1;
-static int hf_sbccs_token = -1;
-static int hf_sbccs_dib_iucnt = -1;
-static int hf_sbccs_dib_datacnt = -1;
-static int hf_sbccs_dib_ccw_cmd = -1;
-static int hf_sbccs_dib_ccw_cnt = -1;
-static int hf_sbccs_dib_residualcnt = -1;
-static int hf_sbccs_dib_qtuf = -1;
-static int hf_sbccs_dib_qtu = -1;
-static int hf_sbccs_dib_dtuf = -1;
-static int hf_sbccs_dib_dtu = -1;
-static int hf_sbccs_dib_ctlfn = -1;
-static int hf_sbccs_lrc = -1;
-static int hf_sbccs_dib_iupacing = -1;
-static int hf_sbccs_dev_xcp_code = -1;
-static int hf_sbccs_prg_pth_errcode = -1;
-static int hf_sbccs_prg_rsp_errcode = -1;
-static int hf_sbccs_dib_ctccntr = -1;
-static int hf_sbccs_dib_lprcode = -1;
+static int proto_fc_sbccs = -1;
+static int hf_sbccs_chid = -1;
+static int hf_sbccs_cuid = -1;
+static int hf_sbccs_devaddr = -1;
+static int hf_sbccs_ccw = -1;
+static int hf_sbccs_token = -1;
+static int hf_sbccs_dib_iucnt = -1;
+static int hf_sbccs_dib_datacnt = -1;
+static int hf_sbccs_dib_ccw_cmd = -1;
+static int hf_sbccs_dib_ccw_cnt = -1;
+static int hf_sbccs_dib_residualcnt = -1;
+static int hf_sbccs_dib_qtuf = -1;
+static int hf_sbccs_dib_qtu = -1;
+static int hf_sbccs_dib_dtuf = -1;
+static int hf_sbccs_dib_dtu = -1;
+static int hf_sbccs_dib_ctlfn = -1;
+static int hf_sbccs_lrc = -1;
+static int hf_sbccs_dib_iupacing = -1;
+static int hf_sbccs_dev_xcp_code = -1;
+static int hf_sbccs_prg_pth_errcode = -1;
+static int hf_sbccs_prg_rsp_errcode = -1;
+static int hf_sbccs_dib_ctccntr = -1;
+static int hf_sbccs_dib_lprcode = -1;
static int hf_sbccs_dib_tin_imgid_cnt = -1;
-static int hf_sbccs_dib_lrjcode = -1;
-static int hf_sbccs_dib_ioprio = -1;
-static int hf_sbccs_dib_linkctlfn = -1;
+static int hf_sbccs_dib_lrjcode = -1;
+static int hf_sbccs_dib_ioprio = -1;
+static int hf_sbccs_dib_linkctlfn = -1;
static int hf_sbccs_iui = -1;
static int hf_sbccs_iui_as = -1;
static int hf_sbccs_iui_es = -1;
@@ -155,16 +147,16 @@ static const value_string fc_sbccs_iu_val[] = {
};
static const value_string fc_sbccs_dib_cmd_val[] = {
- {0, "Reserved"},
- {1, "Write"},
- {2, "Read"},
- {3, "Control"},
- {4, "Sense"},
- {5, "Write (Modifier)"},
- {6, "Read (Modifier)"},
- {7, "Control (Modifier)"},
- {8, "Reserved"},
- {9, "Write (Modifier)"},
+ { 0, "Reserved"},
+ { 1, "Write"},
+ { 2, "Read"},
+ { 3, "Control"},
+ { 4, "Sense"},
+ { 5, "Write (Modifier)"},
+ { 6, "Read (Modifier)"},
+ { 7, "Control (Modifier)"},
+ { 8, "Reserved"},
+ { 9, "Write (Modifier)"},
{10, "Read (Modifier)"},
{11, "Control (Modifier)"},
{12, "Read Backward"},
@@ -196,16 +188,16 @@ static const value_string fc_sbccs_dib_dev_xcpcode_val[] = {
};
static const value_string fc_sbccs_dib_purge_path_err_val[] = {
- {0, "Error Code Xfer Not Supported"},
- {1, "SB-3 Protocol Timeout"},
- {2, "SB-3 Link Failure"},
- {3, "Reserved"},
- {4, "SB-3 Offline Condition"},
- {5, "FC-PH Link Failure"},
- {6, "SB-3 Length Error"},
- {7, "LRC Error"},
- {8, "SB-3 CRC Error"},
- {9, "IU Count Error"},
+ { 0, "Error Code Xfer Not Supported"},
+ { 1, "SB-3 Protocol Timeout"},
+ { 2, "SB-3 Link Failure"},
+ { 3, "Reserved"},
+ { 4, "SB-3 Offline Condition"},
+ { 5, "FC-PH Link Failure"},
+ { 6, "SB-3 Length Error"},
+ { 7, "LRC Error"},
+ { 8, "SB-3 CRC Error"},
+ { 9, "IU Count Error"},
{10, "SB-3 Link Level Protocol Error"},
{11, "SB-3 Device Level Protocol Error"},
{12, "Receive ABTS"},
@@ -216,16 +208,16 @@ static const value_string fc_sbccs_dib_purge_path_err_val[] = {
};
static const value_string fc_sbccs_dib_purge_path_rsp_err_val[] = {
- {0, "No Errors"},
- {1, "SB-3 Protocol Timeout"},
- {2, "SB-3 Link Failure"},
- {3, "Logical Path Timeout Error"},
- {4, "SB-3 Offline Condition"},
- {5, "FC-PH Link Failure"},
- {6, "SB-3 Length Error"},
- {7, "LRC Error"},
- {8, "SB-3 CRC Error"},
- {9, "IU Count Error"},
+ { 0, "No Errors"},
+ { 1, "SB-3 Protocol Timeout"},
+ { 2, "SB-3 Link Failure"},
+ { 3, "Logical Path Timeout Error"},
+ { 4, "SB-3 Offline Condition"},
+ { 5, "FC-PH Link Failure"},
+ { 6, "SB-3 Length Error"},
+ { 7, "LRC Error"},
+ { 8, "SB-3 CRC Error"},
+ { 9, "IU Count Error"},
{10, "SB-3 Link Level Protocol Error"},
{11, "SB-3 Device Level Protocol Error"},
{12, "Receive ABTS"},
@@ -237,14 +229,14 @@ static const value_string fc_sbccs_dib_purge_path_rsp_err_val[] = {
};
static const value_string fc_sbccs_dib_link_ctl_fn_val[] = {
- {FC_SBCCS_LINK_CTL_FN_ELP, "ELP"},
- {FC_SBCCS_LINK_CTL_FN_RLP, "RLP"},
- {FC_SBCCS_LINK_CTL_FN_TIN, "TIN"},
- {FC_SBCCS_LINK_CTL_FN_LPE, "LPE"},
- {FC_SBCCS_LINK_CTL_FN_LPR, "LPR"},
- {FC_SBCCS_LINK_CTL_FN_TIR, "TIR"},
- {FC_SBCCS_LINK_CTL_FN_LRJ, "LRJ"},
- {FC_SBCCS_LINK_CTL_FN_LBY, "LBY"},
+ {FC_SBCCS_LINK_CTL_FN_ELP, "ELP"},
+ {FC_SBCCS_LINK_CTL_FN_RLP, "RLP"},
+ {FC_SBCCS_LINK_CTL_FN_TIN, "TIN"},
+ {FC_SBCCS_LINK_CTL_FN_LPE, "LPE"},
+ {FC_SBCCS_LINK_CTL_FN_LPR, "LPR"},
+ {FC_SBCCS_LINK_CTL_FN_TIR, "TIR"},
+ {FC_SBCCS_LINK_CTL_FN_LRJ, "LRJ"},
+ {FC_SBCCS_LINK_CTL_FN_LBY, "LBY"},
{FC_SBCCS_LINK_CTL_FN_LACK, "LACK"},
{0, NULL},
};
@@ -265,475 +257,475 @@ static const value_string fc_sbccs_dib_lrj_errcode_val[] = {
};
static const true_false_string tfs_sbccs_iui_as = {
- "AS is set",
- "as is NOT set"
+ "AS is set",
+ "as is NOT set"
};
static const true_false_string tfs_sbccs_iui_es = {
- "ES is set",
- "es is NOT set"
+ "ES is set",
+ "es is NOT set"
};
static void
dissect_iui_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags)
{
- proto_item *item=NULL;
- proto_tree *tree=NULL;
-
- if(parent_tree){
- item=proto_tree_add_uint(parent_tree, hf_sbccs_iui,
- tvb, offset, 1, flags);
- tree=proto_item_add_subtree(item, ett_sbccs_iui);
- }
-
- proto_tree_add_boolean(tree, hf_sbccs_iui_as, tvb, offset, 1, flags);
- if (flags&0x10){
- proto_item_append_text(item, " AS");
- }
- flags&=(~( 0x10 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_iui_es, tvb, offset, 1, flags);
- if (flags&0x08){
- proto_item_append_text(item, " ES");
- }
- flags&=(~( 0x08 ));
-
- proto_tree_add_item (tree, hf_sbccs_iui_val, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_item_append_text(item, "%s", val_to_str (flags & 0x7, fc_sbccs_iu_val, "0x%x"));
- flags&=(~( 0x07 ));
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+
+ if (parent_tree) {
+ item=proto_tree_add_uint(parent_tree, hf_sbccs_iui,
+ tvb, offset, 1, flags);
+ tree=proto_item_add_subtree(item, ett_sbccs_iui);
+ }
+
+ proto_tree_add_boolean(tree, hf_sbccs_iui_as, tvb, offset, 1, flags);
+ if (flags & 0x10) {
+ proto_item_append_text(item, " AS");
+ }
+ flags &= (~( 0x10 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_iui_es, tvb, offset, 1, flags);
+ if (flags & 0x08) {
+ proto_item_append_text(item, " ES");
+ }
+ flags &= (~( 0x08 ));
+
+ proto_tree_add_item (tree, hf_sbccs_iui_val, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_item_append_text(item, "%s", val_to_str (flags & 0x7, fc_sbccs_iu_val, "0x%x"));
+ flags &= (~( 0x07 ));
}
static const true_false_string tfs_sbccs_linkctlinfo_ctcconn = {
- "CTC Conn supported",
- "Ctc conn NOT supported"
+ "CTC Conn supported",
+ "Ctc conn NOT supported"
};
static const true_false_string tfs_sbccs_linkctlinfo_ecrcg = {
- "Enhanced CRC Generation supported",
- "Enhanced crc generation NOT supported"
+ "Enhanced CRC Generation supported",
+ "Enhanced crc generation NOT supported"
};
static void
dissect_linkctlinfo (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags)
{
- proto_item *item=NULL;
- proto_tree *tree=NULL;
-
- if(parent_tree){
- item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_linkctlinfo,
- tvb, offset, 2, flags);
- tree=proto_item_add_subtree(item, ett_sbccs_dib_linkctlinfo);
- }
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_linkctlinfo_ctcconn, tvb, offset, 2, flags);
- if (flags&0x80){
- proto_item_append_text(item, " CTC Conn");
- }
- flags&=(~( 0x80 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_linkctlinfo_ecrcg, tvb, offset, 2, flags);
- if (flags&0x01){
- proto_item_append_text(item, " Enhanced CRC Gen");
- }
- flags&=(~( 0x01 ));
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+
+ if (parent_tree) {
+ item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_linkctlinfo,
+ tvb, offset, 2, flags);
+ tree=proto_item_add_subtree(item, ett_sbccs_dib_linkctlinfo);
+ }
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_linkctlinfo_ctcconn, tvb, offset, 2, flags);
+ if (flags & 0x80) {
+ proto_item_append_text(item, " CTC Conn");
+ }
+ flags &= (~( 0x80 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_linkctlinfo_ecrcg, tvb, offset, 2, flags);
+ if (flags & 0x01) {
+ proto_item_append_text(item, " Enhanced CRC Gen");
+ }
+ flags &= (~( 0x01 ));
}
static const true_false_string tfs_sbccs_dhflags_end = {
- "END bit is set",
- "end bit is NOT set"
+ "END bit is set",
+ "end bit is NOT set"
};
static const true_false_string tfs_sbccs_dhflags_chaining = {
- "CHAINING bit is set",
- "chaining bit is NOT set"
+ "CHAINING bit is set",
+ "chaining bit is NOT set"
};
static const true_false_string tfs_sbccs_dhflags_earlyend = {
- "EARLYEND bit is set",
- "earlyend bit is NOT set"
+ "EARLYEND bit is set",
+ "earlyend bit is NOT set"
};
static const true_false_string tfs_sbccs_dhflags_nocrc = {
- "NOCRC bit is set",
- "nocrc bit is NOT set"
+ "NOCRC bit is set",
+ "nocrc bit is NOT set"
};
static void
dissect_dh_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags)
{
- proto_item *item=NULL;
- proto_tree *tree=NULL;
-
- if(parent_tree){
- item=proto_tree_add_uint(parent_tree, hf_sbccs_dhflags,
- tvb, offset, 1, flags);
- tree=proto_item_add_subtree(item, ett_sbccs_dhflags);
- }
-
- proto_tree_add_boolean(tree, hf_sbccs_dhflags_end, tvb, offset, 1, flags);
- if (flags&0x80){
- proto_item_append_text(item, " End");
- }
- flags&=(~( 0x80 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dhflags_chaining, tvb, offset, 1, flags);
- if (flags&0x10){
- proto_item_append_text(item, " Chaining");
- }
- flags&=(~( 0x10 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dhflags_earlyend, tvb, offset, 1, flags);
- if (flags&0x08){
- proto_item_append_text(item, " Early End");
- }
- flags&=(~( 0x08 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dhflags_nocrc, tvb, offset, 1, flags);
- if (flags&0x04){
- proto_item_append_text(item, " No CRC");
- }
- flags&=(~( 0x04 ));
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+
+ if (parent_tree) {
+ item=proto_tree_add_uint(parent_tree, hf_sbccs_dhflags,
+ tvb, offset, 1, flags);
+ tree=proto_item_add_subtree(item, ett_sbccs_dhflags);
+ }
+
+ proto_tree_add_boolean(tree, hf_sbccs_dhflags_end, tvb, offset, 1, flags);
+ if (flags & 0x80) {
+ proto_item_append_text(item, " End");
+ }
+ flags &= (~( 0x80 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dhflags_chaining, tvb, offset, 1, flags);
+ if (flags & 0x10) {
+ proto_item_append_text(item, " Chaining");
+ }
+ flags &= (~( 0x10 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dhflags_earlyend, tvb, offset, 1, flags);
+ if (flags & 0x08) {
+ proto_item_append_text(item, " Early End");
+ }
+ flags &= (~( 0x08 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dhflags_nocrc, tvb, offset, 1, flags);
+ if (flags & 0x04) {
+ proto_item_append_text(item, " No CRC");
+ }
+ flags &= (~( 0x04 ));
}
static const true_false_string tfs_sbccs_ccwflags_cd = {
- "CD is set",
- "cd is NOT set"
+ "CD is set",
+ "cd is NOT set"
};
static const true_false_string tfs_sbccs_ccwflags_cc = {
- "CC is set",
- "cc is NOT set"
+ "CC is set",
+ "cc is NOT set"
};
static const true_false_string tfs_sbccs_ccwflags_sli = {
- "SLI is set",
- "sli is NOT set"
+ "SLI is set",
+ "sli is NOT set"
};
static const true_false_string tfs_sbccs_ccwflags_crr = {
- "CRR is set",
- "crr is NOT set"
+ "CRR is set",
+ "crr is NOT set"
};
static void
dissect_ccw_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 flags)
{
- proto_item *item=NULL;
- proto_tree *tree=NULL;
-
- if(parent_tree){
- item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_ccw_flags,
- tvb, offset, 1, flags);
- tree=proto_item_add_subtree(item, ett_sbccs_dib_ccw_flags);
- }
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_ccw_flags_cd, tvb, offset, 1, flags);
- if (flags&0x80){
- proto_item_append_text(item, " CD");
- }
- flags&=(~( 0x80 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_ccw_flags_cc, tvb, offset, 1, flags);
- if (flags&0x40){
- proto_item_append_text(item, " CC");
- }
- flags&=(~( 0x40 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_ccw_flags_sli, tvb, offset, 1, flags);
- if (flags&0x20){
- proto_item_append_text(item, " SLI");
- }
- flags&=(~( 0x20 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_ccw_flags_crr, tvb, offset, 1, flags);
- if (flags&0x08){
- proto_item_append_text(item, " CRR");
- }
- flags&=(~( 0x08 ));
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+
+ if (parent_tree) {
+ item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_ccw_flags,
+ tvb, offset, 1, flags);
+ tree=proto_item_add_subtree(item, ett_sbccs_dib_ccw_flags);
+ }
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_ccw_flags_cd, tvb, offset, 1, flags);
+ if (flags & 0x80) {
+ proto_item_append_text(item, " CD");
+ }
+ flags &= (~( 0x80 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_ccw_flags_cc, tvb, offset, 1, flags);
+ if (flags & 0x40) {
+ proto_item_append_text(item, " CC");
+ }
+ flags &= (~( 0x40 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_ccw_flags_sli, tvb, offset, 1, flags);
+ if (flags & 0x20) {
+ proto_item_append_text(item, " SLI");
+ }
+ flags &= (~( 0x20 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_ccw_flags_crr, tvb, offset, 1, flags);
+ if (flags & 0x08) {
+ proto_item_append_text(item, " CRR");
+ }
+ flags &= (~( 0x08 ));
}
static const true_false_string tfs_sbccs_cmdflags_du = {
- "DU is set",
- "du is NOT set"
+ "DU is set",
+ "du is NOT set"
};
static const true_false_string tfs_sbccs_cmdflags_coc = {
- "COC is set",
- "coc is NOT set"
+ "COC is set",
+ "coc is NOT set"
};
static const true_false_string tfs_sbccs_cmdflags_syr = {
- "SYR is set",
- "syr is NOT set"
+ "SYR is set",
+ "syr is NOT set"
};
static const true_false_string tfs_sbccs_cmdflags_rex = {
- "REX is set",
- "rex is NOT set"
+ "REX is set",
+ "rex is NOT set"
};
static const true_false_string tfs_sbccs_cmdflags_sss = {
- "SSS is set",
- "sss is NOT set"
+ "SSS is set",
+ "sss is NOT set"
};
static void
dissect_cmd_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 flags)
{
- proto_item *item=NULL;
- proto_tree *tree=NULL;
-
- if(parent_tree){
- item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_cmdflags,
- tvb, offset, 1, flags);
- tree=proto_item_add_subtree(item, ett_sbccs_dib_cmdflags);
- }
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_du, tvb, offset, 1, flags);
- if (flags&0x10){
- proto_item_append_text(item, " DU");
- }
- flags&=(~( 0x10 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_coc, tvb, offset, 1, flags);
- if (flags&0x08){
- proto_item_append_text(item, " COC");
- }
- flags&=(~( 0x08 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_syr, tvb, offset, 1, flags);
- if (flags&0x04){
- proto_item_append_text(item, " SYR");
- }
- flags&=(~( 0x04 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_rex, tvb, offset, 1, flags);
- if (flags&0x02){
- proto_item_append_text(item, " REX");
- }
- flags&=(~( 0x02 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_sss, tvb, offset, 1, flags);
- if (flags&0x01){
- proto_item_append_text(item, " SSS");
- }
- flags&=(~( 0x01 ));
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+
+ if (parent_tree) {
+ item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_cmdflags,
+ tvb, offset, 1, flags);
+ tree=proto_item_add_subtree(item, ett_sbccs_dib_cmdflags);
+ }
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_du, tvb, offset, 1, flags);
+ if (flags & 0x10) {
+ proto_item_append_text(item, " DU");
+ }
+ flags &= (~( 0x10 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_coc, tvb, offset, 1, flags);
+ if (flags & 0x08) {
+ proto_item_append_text(item, " COC");
+ }
+ flags &= (~( 0x08 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_syr, tvb, offset, 1, flags);
+ if (flags & 0x04) {
+ proto_item_append_text(item, " SYR");
+ }
+ flags &= (~( 0x04 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_rex, tvb, offset, 1, flags);
+ if (flags & 0x02) {
+ proto_item_append_text(item, " REX");
+ }
+ flags &= (~( 0x02 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_sss, tvb, offset, 1, flags);
+ if (flags & 0x01) {
+ proto_item_append_text(item, " SSS");
+ }
+ flags &= (~( 0x01 ));
}
static const value_string status_ffc_val[] = {
- { 0, "" },
- { 1, "FFC:Queuing Information Valid" },
- { 2, "FFC:Resetting Event" },
- { 0, NULL }
+ { 0, "" },
+ { 1, "FFC:Queuing Information Valid" },
+ { 2, "FFC:Resetting Event" },
+ { 0, NULL }
};
static const true_false_string tfs_sbccs_statusflags_ci = {
- "CI is set",
- "ci is NOT set"
+ "CI is set",
+ "ci is NOT set"
};
static const true_false_string tfs_sbccs_statusflags_cr = {
- "CR is set",
- "cr is NOT set"
+ "CR is set",
+ "cr is NOT set"
};
static const true_false_string tfs_sbccs_statusflags_lri = {
- "LRI is set",
- "lri is NOT set"
+ "LRI is set",
+ "lri is NOT set"
};
static const true_false_string tfs_sbccs_statusflags_rv = {
- "RV is set",
- "rv is NOT set"
+ "RV is set",
+ "rv is NOT set"
};
static void
dissect_status_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 flags)
{
- proto_item *item=NULL;
- proto_tree *tree=NULL;
-
- if(parent_tree){
- item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_statusflags,
- tvb, offset, 1, flags);
- tree=proto_item_add_subtree(item, ett_sbccs_dib_statusflags);
- }
-
-
- proto_tree_add_item (tree, hf_sbccs_dib_statusflags_ffc, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_item_append_text(item, "%s", val_to_str ((flags>>5)&0x07, status_ffc_val, "Reserved:0x%x"));
- flags&=(~( 0xE0 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_statusflags_ci, tvb, offset, 1, flags);
- if (flags&0x10){
- proto_item_append_text(item, " CI");
- }
- flags&=(~( 0x10 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_statusflags_cr, tvb, offset, 1, flags);
- if (flags&0x04){
- proto_item_append_text(item, " CR");
- }
- flags&=(~( 0x04 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_statusflags_lri, tvb, offset, 1, flags);
- if (flags&0x02){
- proto_item_append_text(item, " LRI");
- }
- flags&=(~( 0x02 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_statusflags_rv, tvb, offset, 1, flags);
- if (flags&0x01){
- proto_item_append_text(item, " RV");
- }
- flags&=(~( 0x01 ));
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+
+ if (parent_tree) {
+ item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_statusflags,
+ tvb, offset, 1, flags);
+ tree=proto_item_add_subtree(item, ett_sbccs_dib_statusflags);
+ }
+
+
+ proto_tree_add_item (tree, hf_sbccs_dib_statusflags_ffc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_item_append_text(item, "%s", val_to_str ((flags>>5) & 0x07, status_ffc_val, "Reserved:0x%x"));
+ flags &= (~( 0xE0 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_statusflags_ci, tvb, offset, 1, flags);
+ if (flags & 0x10) {
+ proto_item_append_text(item, " CI");
+ }
+ flags &= (~( 0x10 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_statusflags_cr, tvb, offset, 1, flags);
+ if (flags & 0x04) {
+ proto_item_append_text(item, " CR");
+ }
+ flags &= (~( 0x04 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_statusflags_lri, tvb, offset, 1, flags);
+ if (flags & 0x02) {
+ proto_item_append_text(item, " LRI");
+ }
+ flags &= (~( 0x02 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_statusflags_rv, tvb, offset, 1, flags);
+ if (flags & 0x01) {
+ proto_item_append_text(item, " RV");
+ }
+ flags &= (~( 0x01 ));
}
static const true_false_string tfs_sbccs_status_attention = {
- "ATTENTION is set",
- "attention is NOT set"
+ "ATTENTION is set",
+ "attention is NOT set"
};
static const true_false_string tfs_sbccs_status_modifier = {
- "STATUS MODIFIER is set",
- "status modifier is NOT set"
+ "STATUS MODIFIER is set",
+ "status modifier is NOT set"
};
static const true_false_string tfs_sbccs_status_cue = {
- "CONTROL-UNIT END is set",
- "control-unit end is NOT set"
+ "CONTROL-UNIT END is set",
+ "control-unit end is NOT set"
};
static const true_false_string tfs_sbccs_status_busy = {
- "BUSY is set",
- "busy is NOT set"
+ "BUSY is set",
+ "busy is NOT set"
};
static const true_false_string tfs_sbccs_status_channelend = {
- "CHANNEL-END is set",
- "channel-end is NOT set"
+ "CHANNEL-END is set",
+ "channel-end is NOT set"
};
static const true_false_string tfs_sbccs_status_deviceend = {
- "DEVICE-END is set",
- "device-end is NOT set"
+ "DEVICE-END is set",
+ "device-end is NOT set"
};
static const true_false_string tfs_sbccs_status_unitcheck = {
- "UNIT CHECK is set",
- "unit check is NOT set"
+ "UNIT CHECK is set",
+ "unit check is NOT set"
};
static const true_false_string tfs_sbccs_status_unitexception = {
- "UNIT EXCEPTION is set",
- "unit exception is NOT set"
+ "UNIT EXCEPTION is set",
+ "unit exception is NOT set"
};
static void
dissect_status (packet_info *pinfo, proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 flags)
{
- proto_item *item=NULL;
- proto_tree *tree=NULL;
-
- if(parent_tree){
- item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_status,
- tvb, offset, 1, flags);
- tree=proto_item_add_subtree(item, ett_sbccs_dib_status);
- }
-
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_status_attention, tvb, offset, 1, flags);
- if (flags&0x80){
- proto_item_append_text(item, " Attention");
- col_append_str(pinfo->cinfo, COL_INFO, " Attention");
- }
- flags&=(~( 0x80 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_status_modifier, tvb, offset, 1, flags);
- if (flags&0x40){
- proto_item_append_text(item, " Status Modifier");
- col_append_str(pinfo->cinfo, COL_INFO, " Status Modifier");
- }
- flags&=(~( 0x40 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_status_cue, tvb, offset, 1, flags);
- if (flags&0x20){
- proto_item_append_text(item, " Control-Unit End");
- col_append_str(pinfo->cinfo, COL_INFO, " Control-Unit End");
- }
- flags&=(~( 0x20 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_status_busy, tvb, offset, 1, flags);
- if (flags&0x10){
- proto_item_append_text(item, " Busy");
- col_append_str(pinfo->cinfo, COL_INFO, " Busy");
- }
- flags&=(~( 0x10 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_status_channelend, tvb, offset, 1, flags);
- if (flags&0x08){
- proto_item_append_text(item, " Channel End");
- col_append_str(pinfo->cinfo, COL_INFO, " Channel End");
- }
- flags&=(~( 0x08 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_status_deviceend, tvb, offset, 1, flags);
- if (flags&0x04){
- proto_item_append_text(item, " Device End");
- col_append_str(pinfo->cinfo, COL_INFO, " Device End");
- }
- flags&=(~( 0x04 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_status_unit_check, tvb, offset, 1, flags);
- if (flags&0x02){
- proto_item_append_text(item, " Unit Check");
- col_append_str(pinfo->cinfo, COL_INFO, " Unit Check");
- }
- flags&=(~( 0x02 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_status_unit_exception, tvb, offset, 1, flags);
- if (flags&0x01){
- proto_item_append_text(item, " Unit Exception");
- col_append_str(pinfo->cinfo, COL_INFO, " Unit Exception");
- }
- flags&=(~( 0x01 ));
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+
+ if (parent_tree) {
+ item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_status,
+ tvb, offset, 1, flags);
+ tree=proto_item_add_subtree(item, ett_sbccs_dib_status);
+ }
+
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_status_attention, tvb, offset, 1, flags);
+ if (flags & 0x80) {
+ proto_item_append_text(item, " Attention");
+ col_append_str(pinfo->cinfo, COL_INFO, " Attention");
+ }
+ flags &= (~( 0x80 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_status_modifier, tvb, offset, 1, flags);
+ if (flags & 0x40) {
+ proto_item_append_text(item, " Status Modifier");
+ col_append_str(pinfo->cinfo, COL_INFO, " Status Modifier");
+ }
+ flags &= (~( 0x40 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_status_cue, tvb, offset, 1, flags);
+ if (flags & 0x20) {
+ proto_item_append_text(item, " Control-Unit End");
+ col_append_str(pinfo->cinfo, COL_INFO, " Control-Unit End");
+ }
+ flags &= (~( 0x20 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_status_busy, tvb, offset, 1, flags);
+ if (flags & 0x10) {
+ proto_item_append_text(item, " Busy");
+ col_append_str(pinfo->cinfo, COL_INFO, " Busy");
+ }
+ flags &= (~( 0x10 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_status_channelend, tvb, offset, 1, flags);
+ if (flags & 0x08) {
+ proto_item_append_text(item, " Channel End");
+ col_append_str(pinfo->cinfo, COL_INFO, " Channel End");
+ }
+ flags &= (~( 0x08 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_status_deviceend, tvb, offset, 1, flags);
+ if (flags & 0x04) {
+ proto_item_append_text(item, " Device End");
+ col_append_str(pinfo->cinfo, COL_INFO, " Device End");
+ }
+ flags &= (~( 0x04 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_status_unit_check, tvb, offset, 1, flags);
+ if (flags & 0x02) {
+ proto_item_append_text(item, " Unit Check");
+ col_append_str(pinfo->cinfo, COL_INFO, " Unit Check");
+ }
+ flags &= (~( 0x02 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_status_unit_exception, tvb, offset, 1, flags);
+ if (flags & 0x01) {
+ proto_item_append_text(item, " Unit Exception");
+ col_append_str(pinfo->cinfo, COL_INFO, " Unit Exception");
+ }
+ flags &= (~( 0x01 ));
}
static const true_false_string tfs_sbccs_ctlparam_rc = {
- "RC is SET",
- "rc is NOT set"
+ "RC is SET",
+ "rc is NOT set"
};
static const true_false_string tfs_sbccs_ctlparam_ru = {
- "RU is SET",
- "ru is NOT set"
+ "RU is SET",
+ "ru is NOT set"
};
static const true_false_string tfs_sbccs_ctlparam_ro = {
- "RO is SET",
- "ro is NOT set"
+ "RO is SET",
+ "ro is NOT set"
};
static void
dissect_sel_rst_param (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint32 flags)
{
- proto_item *item=NULL;
- proto_tree *tree=NULL;
-
- if(parent_tree){
- item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_ctlparam,
- tvb, offset, 3, flags);
- tree=proto_item_add_subtree(item, ett_sbccs_dib_ctlparam);
- }
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_ctlparam_rc, tvb, offset, 3, flags);
- if (flags&0x80){
- proto_item_append_text(item, " RC");
- }
- flags&=(~( 0x80 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_ctlparam_ru, tvb, offset, 3, flags);
- if (flags&0x10){
- proto_item_append_text(item, " RU");
- }
- flags&=(~( 0x10 ));
-
- proto_tree_add_boolean(tree, hf_sbccs_dib_ctlparam_ro, tvb, offset, 3, flags);
- if (flags&0x08){
- proto_item_append_text(item, " RO");
- }
- flags&=(~( 0x08 ));
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+
+ if (parent_tree) {
+ item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_ctlparam,
+ tvb, offset, 3, flags);
+ tree=proto_item_add_subtree(item, ett_sbccs_dib_ctlparam);
+ }
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_ctlparam_rc, tvb, offset, 3, flags);
+ if (flags & 0x80) {
+ proto_item_append_text(item, " RC");
+ }
+ flags &= (~( 0x80 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_ctlparam_ru, tvb, offset, 3, flags);
+ if (flags & 0x10) {
+ proto_item_append_text(item, " RU");
+ }
+ flags &= (~( 0x10 ));
+
+ proto_tree_add_boolean(tree, hf_sbccs_dib_ctlparam_ro, tvb, offset, 3, flags);
+ if (flags & 0x08) {
+ proto_item_append_text(item, " RO");
+ }
+ flags &= (~( 0x08 ));
}
static void get_fc_sbccs_conv_data (tvbuff_t *tvb, guint offset,
guint16 *ch_cu_id, guint16 *dev_addr,
guint16 *ccw)
{
- *ch_cu_id = *dev_addr = *ccw = 0;
+ *ch_cu_id = *dev_addr = *ccw = 0;
- *ch_cu_id = (tvb_get_guint8 (tvb, offset+1)) << 8;
+ *ch_cu_id = (tvb_get_guint8 (tvb, offset+1)) << 8;
*ch_cu_id |= tvb_get_guint8 (tvb, offset+3);
- *dev_addr = tvb_get_ntohs (tvb, offset+4);
- *ccw = tvb_get_ntohs (tvb, offset+10);
+ *dev_addr = tvb_get_ntohs (tvb, offset+4);
+ *ccw = tvb_get_ntohs (tvb, offset+10);
}
/* Decode both the SB-3 and basic IU header */
@@ -744,8 +736,8 @@ dissect_fc_sbccs_sb3_iu_hdr (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
proto_item *subti;
proto_tree *sb3hdr_tree;
proto_tree *iuhdr_tree;
- guint8 iui, dhflags;
- guint type;
+ guint8 iui, dhflags;
+ guint type;
/* Decode the basic SB3 and IU header and determine type of frame */
type = get_fc_sbccs_iu_type (tvb, offset);
@@ -772,10 +764,10 @@ dissect_fc_sbccs_sb3_iu_hdr (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += FC_SBCCS_SB3_HDR_SIZE;
iui = tvb_get_guint8 (tvb, offset);
- dissect_iui_flags(iuhdr_tree, tvb, offset, iui);
+ dissect_iui_flags(iuhdr_tree, tvb, offset, iui);
dhflags = tvb_get_guint8 (tvb, offset+1);
- dissect_dh_flags(iuhdr_tree, tvb, offset+1, dhflags);
+ dissect_dh_flags(iuhdr_tree, tvb, offset+1, dhflags);
proto_tree_add_item (iuhdr_tree, hf_sbccs_ccw, tvb, offset+2, 2, ENC_BIG_ENDIAN);
proto_tree_add_item (iuhdr_tree, hf_sbccs_token, tvb, offset+5, 3, ENC_BIG_ENDIAN);
@@ -809,13 +801,13 @@ static void dissect_fc_sbccs_dib_cmd_hdr (tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item (tree, hf_sbccs_dib_ccw_cmd, tvb, offset, 1, ENC_BIG_ENDIAN);
flags = tvb_get_guint8 (tvb, offset+1);
- dissect_ccw_flags(tree, tvb, offset+1, flags);
+ dissect_ccw_flags(tree, tvb, offset+1, flags);
proto_tree_add_item (tree, hf_sbccs_dib_ccw_cnt, tvb, offset+2, 2, ENC_BIG_ENDIAN);
proto_tree_add_item (tree, hf_sbccs_dib_ioprio, tvb, offset+5, 1, ENC_BIG_ENDIAN);
flags = tvb_get_guint8 (tvb, offset+7);
- dissect_cmd_flags(tree, tvb, offset+7, flags);
+ dissect_cmd_flags(tree, tvb, offset+7, flags);
proto_tree_add_item (tree, hf_sbccs_dib_iucnt, tvb, offset+9, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (tree, hf_sbccs_dib_datacnt, tvb, offset+10, 2, ENC_BIG_ENDIAN);
@@ -827,19 +819,19 @@ static void dissect_fc_sbccs_dib_cmd_hdr (tvbuff_t *tvb, packet_info *pinfo,
static void dissect_fc_sbccs_dib_status_hdr (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, guint offset)
{
- guint8 flags;
- gboolean rv_valid, qparam_valid;
+ guint8 flags;
+ gboolean rv_valid, qparam_valid;
tvbuff_t *next_tvb;
- guint16 supp_status_cnt = 0;
+ guint16 supp_status_cnt = 0;
if (tree) {
flags = tvb_get_guint8 (tvb, offset);
rv_valid = flags & 0x1; /* if residual count is valid */
qparam_valid = (((flags & 0xE0) >> 5) == 0x1); /* From the FFC field */
- dissect_status_flags(tree, tvb, offset, flags);
+ dissect_status_flags(tree, tvb, offset, flags);
flags = tvb_get_guint8 (tvb, offset+1);
- dissect_status(pinfo, tree, tvb, offset+1, flags);
+ dissect_status(pinfo, tree, tvb, offset+1, flags);
if (rv_valid) {
proto_tree_add_item (tree, hf_sbccs_dib_residualcnt, tvb, offset+2,
@@ -920,9 +912,9 @@ static void dissect_fc_sbccs_dib_ctl_hdr (tvbuff_t *tvb, packet_info *pinfo,
static void dissect_fc_sbccs_dib_link_hdr (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, guint offset)
{
- guint8 link_ctl;
+ guint8 link_ctl;
guint16 ctl_info;
- guint link_payload_len, i;
+ guint link_payload_len, i;
if (check_col (pinfo->cinfo, COL_INFO)) {
col_append_fstr (pinfo->cinfo, COL_INFO,
@@ -988,16 +980,16 @@ static void dissect_fc_sbccs_dib_link_hdr (tvbuff_t *tvb, packet_info *pinfo,
static void dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree)
{
- guint8 type;
- guint16 ch_cu_id, dev_addr, ccw;
- guint offset = 0;
- proto_item *ti;
- proto_tree *sb3_tree = NULL,
- *dib_tree = NULL;
- tvbuff_t *next_tvb;
+ guint8 type;
+ guint16 ch_cu_id, dev_addr, ccw;
+ guint offset = 0;
+ proto_item *ti;
+ proto_tree *sb3_tree = NULL;
+ proto_tree *dib_tree = NULL;
+ tvbuff_t *next_tvb;
conversation_t *conversation;
- sb3_task_id_t task_key;
- void* pd_save;
+ sb3_task_id_t task_key;
+ void *pd_save;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FC-SB3");
@@ -1093,209 +1085,344 @@ proto_register_fcsbccs (void)
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{ &hf_sbccs_chid,
- {"Channel Image ID", "sbccs.chid", FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL}},
+ { "Channel Image ID", "sbccs.chid",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_cuid,
- {"Control Unit Image ID", "sbccs.cuid", FT_UINT8, BASE_DEC, NULL,
- 0x0, NULL, HFILL}},
+ { "Control Unit Image ID", "sbccs.cuid",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_devaddr,
- {"Device Address", "sbccs.devaddr", FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL}},
+ { "Device Address", "sbccs.devaddr",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_iui,
- {"Information Unit Identifier", "sbccs.iui", FT_UINT8, BASE_HEX,
- NULL, 0x0, NULL, HFILL}},
+ { "Information Unit Identifier", "sbccs.iui",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dhflags,
- {"DH Flags", "sbccs.dhflags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL,
- HFILL}},
+ { "DH Flags", "sbccs.dhflags",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_ccw,
- {"CCW Number", "sbccs.ccw", FT_UINT16, BASE_HEX, NULL, 0x0, NULL,
- HFILL}},
+ { "CCW Number", "sbccs.ccw",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_token,
- {"Token", "sbccs.token", FT_UINT24, BASE_DEC, NULL, 0x0, NULL,
- HFILL}},
+ { "Token", "sbccs.token",
+ FT_UINT24, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_iucnt,
- {"DIB IU Count", "sbccs.iucnt", FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL}},
+ { "DIB IU Count", "sbccs.iucnt",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_datacnt,
- {"DIB Data Byte Count", "sbccs.databytecnt", FT_UINT16, BASE_DEC,
- NULL, 0x0, NULL, HFILL}},
+ { "DIB Data Byte Count", "sbccs.databytecnt",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ccw_cmd,
- {"CCW Command", "sbccs.ccwcmd", FT_UINT8, BASE_HEX,
- VALS (fc_sbccs_dib_cmd_val), 0x0, NULL, HFILL}},
+ { "CCW Command", "sbccs.ccwcmd",
+ FT_UINT8, BASE_HEX, VALS (fc_sbccs_dib_cmd_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ccw_cnt,
- {"CCW Count", "sbccs.ccwcnt", FT_UINT16, BASE_DEC, NULL, 0x0, NULL,
- HFILL}},
+ { "CCW Count", "sbccs.ccwcnt",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ioprio,
- {"I/O Priority", "sbccs.ioprio", FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL}},
+ { "I/O Priority", "sbccs.ioprio",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_status,
- {"Status", "sbccs.status", FT_UINT8, BASE_HEX, NULL, 0x0, NULL,
- HFILL}},
+ { "Status", "sbccs.status",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_residualcnt,
- {"Residual Count", "sbccs.residualcnt", FT_UINT8, BASE_DEC,
- NULL, 0x0, NULL, HFILL}},
+ { "Residual Count", "sbccs.residualcnt",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_iupacing,
- {"IU Pacing", "sbccs.iupacing", FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL}},
+ { "IU Pacing", "sbccs.iupacing",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_qtuf,
- {"Queue-Time Unit Factor", "sbccs.qtuf", FT_UINT8, BASE_DEC,
- NULL, 0xF0, NULL, HFILL}},
+ { "Queue-Time Unit Factor", "sbccs.qtuf",
+ FT_UINT8, BASE_DEC, NULL, 0xF0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_qtu,
- {"Queue-Time Unit", "sbccs.qtu", FT_UINT16, BASE_DEC, NULL, 0xFFF,
- NULL, HFILL}},
+ { "Queue-Time Unit", "sbccs.qtu",
+ FT_UINT16, BASE_DEC, NULL, 0xFFF,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_dtuf,
- {"Defer-Time Unit Function", "sbccs.dtuf", FT_UINT8, BASE_DEC,
- NULL, 0xF0, NULL, HFILL}},
+ { "Defer-Time Unit Function", "sbccs.dtuf",
+ FT_UINT8, BASE_DEC, NULL, 0xF0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_dtu,
- {"Defer-Time Unit", "sbccs.dtu", FT_UINT16, BASE_DEC, NULL, 0xFFF,
- NULL, HFILL}},
+ { "Defer-Time Unit", "sbccs.dtu",
+ FT_UINT16, BASE_DEC, NULL, 0xFFF,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ctlfn,
- {"Control Function", "sbccs.ctlfn", FT_UINT8, BASE_HEX,
- VALS (fc_sbccs_dib_ctl_fn_val), 0x0, NULL, HFILL}},
+ { "Control Function", "sbccs.ctlfn",
+ FT_UINT8, BASE_HEX, VALS (fc_sbccs_dib_ctl_fn_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_linkctlfn,
- {"Link Control Function", "sbccs.linkctlfn", FT_UINT8, BASE_HEX,
- VALS (fc_sbccs_dib_link_ctl_fn_val), 0x0, NULL, HFILL}},
+ { "Link Control Function", "sbccs.linkctlfn",
+ FT_UINT8, BASE_HEX, VALS (fc_sbccs_dib_link_ctl_fn_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ctccntr,
- {"CTC Counter", "sbccs.ctccntr", FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL}},
+ { "CTC Counter", "sbccs.ctccntr",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_lrc,
- {"LRC", "sbccs.lrc", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ { "LRC", "sbccs.lrc",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dev_xcp_code,
- {"Device Level Exception Code", "sbccs.dip.xcpcode", FT_UINT8,
- BASE_DEC, VALS (fc_sbccs_dib_dev_xcpcode_val), 0x0, NULL, HFILL}},
+ { "Device Level Exception Code", "sbccs.dip.xcpcode",
+ FT_UINT8, BASE_DEC, VALS (fc_sbccs_dib_dev_xcpcode_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_prg_pth_errcode,
- {"Purge Path Error Code", "sbccs.purgepathcode", FT_UINT8,
- BASE_DEC, VALS (fc_sbccs_dib_purge_path_err_val), 0x0, NULL, HFILL}},
+ { "Purge Path Error Code", "sbccs.purgepathcode",
+ FT_UINT8, BASE_DEC, VALS (fc_sbccs_dib_purge_path_err_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_prg_rsp_errcode,
- {"Purge Path Response Error Code", "sbccs.purgepathrspcode",
- FT_UINT8, BASE_DEC, VALS (fc_sbccs_dib_purge_path_rsp_err_val),
- 0x0, NULL, HFILL}},
+ { "Purge Path Response Error Code", "sbccs.purgepathrspcode",
+ FT_UINT8, BASE_DEC, VALS (fc_sbccs_dib_purge_path_rsp_err_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_lprcode,
- {"LPR Reason Code", "sbccs.lprcode", FT_UINT8, BASE_DEC,
- VALS (fc_sbccs_dib_lpr_errcode_val), 0xF, NULL, HFILL}},
+ { "LPR Reason Code", "sbccs.lprcode",
+ FT_UINT8, BASE_DEC, VALS (fc_sbccs_dib_lpr_errcode_val), 0xF,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_tin_imgid_cnt,
- {"TIN Image ID", "sbccs.tinimageidcnt", FT_UINT8, BASE_DEC, NULL,
- 0x0, NULL, HFILL}},
+ { "TIN Image ID", "sbccs.tinimageidcnt",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_lrjcode,
- {"LRJ Reaspn Code", "sbccs.lrjcode", FT_UINT8, BASE_HEX,
- VALS (fc_sbccs_dib_lrj_errcode_val), 0x7F, NULL, HFILL}},
+ { "LRJ Reaspn Code", "sbccs.lrjcode",
+ FT_UINT8, BASE_HEX, VALS (fc_sbccs_dib_lrj_errcode_val), 0x7F,
+ NULL, HFILL}},
+
{ &hf_sbccs_iui_as,
- {"AS", "sbccs.iui.as", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_iui_as), 0x10, NULL, HFILL}},
+ { "AS", "sbccs.iui.as",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_iui_as), 0x10,
+ NULL, HFILL}},
+
{ &hf_sbccs_iui_es,
- {"ES", "sbccs.iui.es", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_iui_es), 0x08, NULL, HFILL}},
+ { "ES", "sbccs.iui.es",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_iui_es), 0x08,
+ NULL, HFILL}},
+
{ &hf_sbccs_iui_val,
- {"Val", "sbccs.iui.val", FT_UINT8, BASE_HEX,
- VALS(fc_sbccs_iu_val), 0x07, NULL, HFILL}},
+ { "Val", "sbccs.iui.val",
+ FT_UINT8, BASE_HEX, VALS(fc_sbccs_iu_val), 0x07,
+ NULL, HFILL}},
+
{ &hf_sbccs_dhflags_end,
- {"End", "sbccs.dhflags.end", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_dhflags_end), 0x80, NULL, HFILL}},
+ { "End", "sbccs.dhflags.end",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_dhflags_end), 0x80,
+ NULL, HFILL}},
+
{ &hf_sbccs_dhflags_chaining,
- {"Chaining", "sbccs.dhflags.chaining", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_dhflags_chaining), 0x10, NULL, HFILL}},
+ { "Chaining", "sbccs.dhflags.chaining",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_dhflags_chaining), 0x10,
+ NULL, HFILL}},
+
{ &hf_sbccs_dhflags_earlyend,
- {"Early End", "sbccs.dhflags.earlyend", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_dhflags_earlyend), 0x08, NULL, HFILL}},
+ { "Early End", "sbccs.dhflags.earlyend",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_dhflags_earlyend), 0x08,
+ NULL, HFILL}},
+
{ &hf_sbccs_dhflags_nocrc,
- {"No CRC", "sbccs.dhflags.nocrc", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_dhflags_nocrc), 0x04, NULL, HFILL}},
+ { "No CRC", "sbccs.dhflags.nocrc",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_dhflags_nocrc), 0x04,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ccw_flags,
- {"CCW Control Flags", "sbccs.ccwflags", FT_UINT8, BASE_HEX, NULL,
- 0x0, NULL, HFILL}},
+ { "CCW Control Flags", "sbccs.ccwflags",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ccw_flags_cd,
- {"CD", "sbccs.ccwflags.cd", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_ccwflags_cd), 0x80, NULL, HFILL}},
+ { "CD", "sbccs.ccwflags.cd",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_ccwflags_cd), 0x80,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ccw_flags_cc,
- {"CC", "sbccs.ccwflags.cc", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_ccwflags_cc), 0x40, NULL, HFILL}},
+ { "CC", "sbccs.ccwflags.cc",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_ccwflags_cc), 0x40,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ccw_flags_sli,
- {"SLI", "sbccs.ccwflags.sli", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_ccwflags_sli), 0x20, NULL, HFILL}},
+ { "SLI", "sbccs.ccwflags.sli",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_ccwflags_sli), 0x20,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ccw_flags_crr,
- {"CRR", "sbccs.ccwflags.crr", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_ccwflags_crr), 0x08, NULL, HFILL}},
+ { "CRR", "sbccs.ccwflags.crr",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_ccwflags_crr), 0x08,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_cmdflags,
- {"Command Flags", "sbccs.cmdflags", FT_UINT8, BASE_HEX, NULL, 0x0,
- NULL, HFILL}},
+ { "Command Flags", "sbccs.cmdflags",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_cmdflags_du,
- {"DU", "sbccs.cmdflags.du", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_cmdflags_du), 0x10, NULL, HFILL}},
+ { "DU", "sbccs.cmdflags.du",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_cmdflags_du), 0x10,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_cmdflags_coc,
- {"COC", "sbccs.cmdflags.coc", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_cmdflags_coc), 0x08, NULL, HFILL}},
+ { "COC", "sbccs.cmdflags.coc",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_cmdflags_coc), 0x08,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_cmdflags_syr,
- {"SYR", "sbccs.cmdflags.syr", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_cmdflags_syr), 0x04, NULL, HFILL}},
+ { "SYR", "sbccs.cmdflags.syr",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_cmdflags_syr), 0x04,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_cmdflags_rex,
- {"REX", "sbccs.cmdflags.rex", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_cmdflags_rex), 0x02, NULL, HFILL}},
+ { "REX", "sbccs.cmdflags.rex",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_cmdflags_rex), 0x02,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_cmdflags_sss,
- {"SSS", "sbccs.cmdflags.sss", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_cmdflags_sss), 0x01, NULL, HFILL}},
+ { "SSS", "sbccs.cmdflags.sss",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_cmdflags_sss), 0x01,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_statusflags,
- {"Status Flags", "sbccs.statusflags", FT_UINT8, BASE_HEX,
- NULL, 0, NULL, HFILL}},
+ { "Status Flags", "sbccs.statusflags",
+ FT_UINT8, BASE_HEX, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_statusflags_ffc,
- {"FFC", "sbccs.statusflags.ffc", FT_UINT8, BASE_HEX,
- VALS(status_ffc_val), 0xE0, NULL, HFILL}},
+ { "FFC", "sbccs.statusflags.ffc",
+ FT_UINT8, BASE_HEX, VALS(status_ffc_val), 0xE0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_statusflags_ci,
- {"CI", "sbccs.statusflags.ci", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_statusflags_ci), 0x10, NULL, HFILL}},
+ { "CI", "sbccs.statusflags.ci",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_statusflags_ci), 0x10,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_statusflags_cr,
- {"CR", "sbccs.statusflags.cr", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_statusflags_cr), 0x04, NULL, HFILL}},
+ { "CR", "sbccs.statusflags.cr",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_statusflags_cr), 0x04,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_statusflags_lri,
- {"LRI", "sbccs.statusflags.lri", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_statusflags_lri), 0x02, NULL, HFILL}},
+ { "LRI", "sbccs.statusflags.lri",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_statusflags_lri), 0x02,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_statusflags_rv,
- {"RV", "sbccs.statusflags.rv", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_statusflags_rv), 0x01, NULL, HFILL}},
+ { "RV", "sbccs.statusflags.rv",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_statusflags_rv), 0x01,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_status_attention,
- {"Attention", "sbccs.status.attention", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_status_attention), 0x80, NULL, HFILL}},
+ { "Attention", "sbccs.status.attention",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_status_attention), 0x80,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_status_modifier,
- {"Status Modifier", "sbccs.status.modifier", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_status_modifier), 0x40, NULL, HFILL}},
+ { "Status Modifier", "sbccs.status.modifier",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_status_modifier), 0x40,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_status_cue,
- {"Control-Unit End", "sbccs.status.cue", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_status_cue), 0x20, NULL, HFILL}},
+ { "Control-Unit End", "sbccs.status.cue",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_status_cue), 0x20,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_status_busy,
- {"Busy", "sbccs.status.busy", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_status_busy), 0x10, NULL, HFILL}},
+ { "Busy", "sbccs.status.busy",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_status_busy), 0x10,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_status_channelend,
- {"Channel End", "sbccs.status.channel_end", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_status_channelend), 0x08, NULL, HFILL}},
+ { "Channel End", "sbccs.status.channel_end",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_status_channelend), 0x08,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_status_deviceend,
- {"Device End", "sbccs.status.device_end", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_status_deviceend), 0x04, NULL, HFILL}},
+ { "Device End", "sbccs.status.device_end",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_status_deviceend), 0x04,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_status_unit_check,
- {"Unit Check", "sbccs.status.unit_check", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_status_unitcheck), 0x02, NULL, HFILL}},
+ { "Unit Check", "sbccs.status.unit_check",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_status_unitcheck), 0x02,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_status_unit_exception,
- {"Unit Exception", "sbccs.status.unitexception", FT_BOOLEAN, 8,
- TFS(&tfs_sbccs_status_unitexception), 0x01, NULL, HFILL}},
+ { "Unit Exception", "sbccs.status.unitexception",
+ FT_BOOLEAN, 8, TFS(&tfs_sbccs_status_unitexception), 0x01,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ctlparam,
- {"Control Parameters", "sbccs.ctlparam", FT_UINT24, BASE_HEX,
- NULL, 0x0, NULL, HFILL}},
+ { "Control Parameters", "sbccs.ctlparam",
+ FT_UINT24, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ctlparam_rc,
- {"RC", "sbccs.ctlparam.rc", FT_BOOLEAN, 24,
- TFS(&tfs_sbccs_ctlparam_rc), 0x80, NULL, HFILL}},
+ { "RC", "sbccs.ctlparam.rc",
+ FT_BOOLEAN, 24, TFS(&tfs_sbccs_ctlparam_rc), 0x80,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ctlparam_ru,
- {"RU", "sbccs.ctlparam.ru", FT_BOOLEAN, 24,
- TFS(&tfs_sbccs_ctlparam_ru), 0x10, NULL, HFILL}},
+ { "RU", "sbccs.ctlparam.ru",
+ FT_BOOLEAN, 24, TFS(&tfs_sbccs_ctlparam_ru), 0x10,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_ctlparam_ro,
- {"RO", "sbccs.ctlparam.ro", FT_BOOLEAN, 24,
- TFS(&tfs_sbccs_ctlparam_ro), 0x08, NULL, HFILL}},
+ { "RO", "sbccs.ctlparam.ro",
+ FT_BOOLEAN, 24, TFS(&tfs_sbccs_ctlparam_ro), 0x08,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_linkctlinfo,
- {"Link Control Information", "sbccs.linkctlinfo", FT_UINT16,
- BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ { "Link Control Information", "sbccs.linkctlinfo",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_linkctlinfo_ctcconn,
- {"CTC Conn", "sbccs.linkctlinfo.ctc_conn", FT_BOOLEAN, 16,
- TFS(&tfs_sbccs_linkctlinfo_ctcconn), 0x80, NULL, HFILL}},
+ { "CTC Conn", "sbccs.linkctlinfo.ctc_conn",
+ FT_BOOLEAN, 16, TFS(&tfs_sbccs_linkctlinfo_ctcconn), 0x80,
+ NULL, HFILL}},
+
{ &hf_sbccs_dib_linkctlinfo_ecrcg,
- {"Enhanced CRC Generation", "sbccs.linkctlinfo.ecrcg", FT_BOOLEAN, 16,
- TFS(&tfs_sbccs_linkctlinfo_ecrcg), 0x01, NULL, HFILL}},
+ { "Enhanced CRC Generation", "sbccs.linkctlinfo.ecrcg",
+ FT_BOOLEAN, 16, TFS(&tfs_sbccs_linkctlinfo_ecrcg), 0x01,
+ NULL, HFILL}},
};
@@ -1316,15 +1443,10 @@ proto_register_fcsbccs (void)
proto_fc_sbccs = proto_register_protocol ("Fibre Channel Single Byte Command",
"FC-SB3", "sb3");
- /* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_fc_sbccs, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_fcsbccs (void)
{
diff --git a/epan/dissectors/packet-fcsp.c b/epan/dissectors/packet-fcsp.c
index 34a9217d4a..c2f4c97761 100644
--- a/epan/dissectors/packet-fcsp.c
+++ b/epan/dissectors/packet-fcsp.c
@@ -9,12 +9,6 @@
* By Gerald Combs <gerald@wireshark.org>
* 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
* as published by the Free Software Foundation; either version 2
@@ -78,23 +72,23 @@
#define FC_AUTH_DHCHAP_PARAM_DHgIDLIST 0x2
/* Initialize the protocol and registered fields */
-static int proto_fcsp = -1;
-static int hf_auth_proto_ver = -1;
-static int hf_auth_msg_code = -1;
-static int hf_auth_flags = -1;
-static int hf_auth_len = -1;
-static int hf_auth_tid = -1;
-static int hf_auth_initiator_wwn = -1;
-static int hf_auth_initiator_name = -1;
-static int hf_auth_usable_proto = -1;
-static int hf_auth_rjt_code = -1;
-static int hf_auth_rjt_codedet = -1;
-static int hf_auth_responder_wwn = -1;
-static int hf_auth_responder_name = -1;
-static int hf_auth_dhchap_groupid = -1;
-static int hf_auth_dhchap_hashid = -1;
+static int proto_fcsp = -1;
+static int hf_auth_proto_ver = -1;
+static int hf_auth_msg_code = -1;
+static int hf_auth_flags = -1;
+static int hf_auth_len = -1;
+static int hf_auth_tid = -1;
+static int hf_auth_initiator_wwn = -1;
+static int hf_auth_initiator_name = -1;
+static int hf_auth_usable_proto = -1;
+static int hf_auth_rjt_code = -1;
+static int hf_auth_rjt_codedet = -1;
+static int hf_auth_responder_wwn = -1;
+static int hf_auth_responder_name = -1;
+static int hf_auth_dhchap_groupid = -1;
+static int hf_auth_dhchap_hashid = -1;
static int hf_auth_dhchap_chal_len = -1;
-static int hf_auth_dhchap_val_len = -1;
+static int hf_auth_dhchap_val_len = -1;
static int hf_auth_dhchap_rsp_len = -1;
static int hf_auth_initiator_name_type = -1;
static int hf_auth_initiator_name_len = -1;
@@ -116,18 +110,18 @@ static gint ett_fcsp = -1;
static dissector_handle_t data_handle;
static const value_string fcauth_msgcode_vals[] = {
- {FC_AUTH_MSG_AUTH_REJECT, "AUTH_Reject"},
+ {FC_AUTH_MSG_AUTH_REJECT, "AUTH_Reject"},
{FC_AUTH_MSG_AUTH_NEGOTIATE, "AUTH_Negotiate"},
- {FC_AUTH_MSG_AUTH_DONE, "AUTH_Done"},
- {FC_AUTH_DHCHAP_CHALLENGE, "DHCHAP_Challenge"},
- {FC_AUTH_DHCHAP_REPLY, "DHCHAP_Reply"},
- {FC_AUTH_DHCHAP_SUCCESS, "DHCHAP_Success"},
- {FC_AUTH_FCAP_REQUEST, "FCAP_Request"},
- {FC_AUTH_FCAP_ACKNOWLEDGE, "FCAP_Acknowledge"},
- {FC_AUTH_FCAP_CONFIRM, "FCAP_Confirm"},
- {FC_AUTH_FCPAP_INIT, "FCPAP_Init"},
- {FC_AUTH_FCPAP_ACCEPT, "FCPAP_Accept"},
- {FC_AUTH_FCPAP_COMPLETE, "FCPAP_Complete"},
+ {FC_AUTH_MSG_AUTH_DONE, "AUTH_Done"},
+ {FC_AUTH_DHCHAP_CHALLENGE, "DHCHAP_Challenge"},
+ {FC_AUTH_DHCHAP_REPLY, "DHCHAP_Reply"},
+ {FC_AUTH_DHCHAP_SUCCESS, "DHCHAP_Success"},
+ {FC_AUTH_FCAP_REQUEST, "FCAP_Request"},
+ {FC_AUTH_FCAP_ACKNOWLEDGE, "FCAP_Acknowledge"},
+ {FC_AUTH_FCAP_CONFIRM, "FCAP_Confirm"},
+ {FC_AUTH_FCPAP_INIT, "FCPAP_Init"},
+ {FC_AUTH_FCPAP_ACCEPT, "FCPAP_Accept"},
+ {FC_AUTH_FCPAP_COMPLETE, "FCPAP_Complete"},
{0, NULL},
};
@@ -150,13 +144,13 @@ static const value_string fcauth_rjtcode_detail_vals[] = {
};
static const value_string fcauth_dhchap_param_vals[] = {
- {FC_AUTH_DHCHAP_PARAM_HASHLIST, "HashList"},
+ {FC_AUTH_DHCHAP_PARAM_HASHLIST, "HashList"},
{FC_AUTH_DHCHAP_PARAM_DHgIDLIST, "DHgIDList"},
{0, NULL},
};
static const value_string fcauth_dhchap_hash_algo_vals[] = {
- {FC_AUTH_DHCHAP_HASH_MD5, "MD5"},
+ {FC_AUTH_DHCHAP_HASH_MD5, "MD5"},
{FC_AUTH_DHCHAP_HASH_SHA1, "SHA-1"},
{0, NULL},
};
@@ -168,7 +162,7 @@ static const value_string fcauth_name_type_vals[] = {
static const value_string fcauth_proto_type_vals[] = {
{FC_AUTH_PROTO_TYPE_DHCHAP, "DHCHAP"},
- {FC_AUTH_PROTO_TYPE_FCAP, "FCAP"},
+ {FC_AUTH_PROTO_TYPE_FCAP, "FCAP"},
{0, NULL},
};
@@ -185,32 +179,32 @@ static const value_string fcauth_dhchap_dhgid_vals[] = {
that calls all the protocol registration.
*/
-static void dissect_fcsp_dhchap_auth_param (tvbuff_t *tvb, proto_tree *tree,
+static void dissect_fcsp_dhchap_auth_param(tvbuff_t *tvb, proto_tree *tree,
int offset, gint32 total_len)
{
guint16 auth_param_tag;
guint16 param_len = 0, i;
if (tree) {
- auth_param_tag = tvb_get_ntohs (tvb, offset);
+ auth_param_tag = tvb_get_ntohs(tvb, offset);
total_len -= 4;
while (total_len > 0) {
- proto_tree_add_item (tree, hf_auth_dhchap_param_tag, tvb, offset,
- 2, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_auth_dhchap_param_len, tvb, offset+2,
- 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_auth_dhchap_param_tag, tvb, offset,
+ 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_auth_dhchap_param_len, tvb, offset+2,
+ 2, ENC_BIG_ENDIAN);
- auth_param_tag = tvb_get_ntohs (tvb, offset);
- param_len = tvb_get_ntohs (tvb, offset+2)*4;
+ auth_param_tag = tvb_get_ntohs(tvb, offset);
+ param_len = tvb_get_ntohs(tvb, offset+2)*4;
switch (auth_param_tag) {
case FC_AUTH_DHCHAP_PARAM_HASHLIST:
offset += 4;
total_len -= 4;
for (i = 0; i < param_len; i += 4) {
- proto_tree_add_item (tree, hf_auth_dhchap_hash_type, tvb,
- offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_auth_dhchap_hash_type, tvb,
+ offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
break;
@@ -218,8 +212,8 @@ static void dissect_fcsp_dhchap_auth_param (tvbuff_t *tvb, proto_tree *tree,
offset += 4;
total_len -= 4;
for (i = 0; i < param_len; i += 4) {
- proto_tree_add_item (tree, hf_auth_dhchap_group_type, tvb,
- offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_auth_dhchap_group_type, tvb,
+ offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
break;
@@ -232,138 +226,138 @@ static void dissect_fcsp_dhchap_auth_param (tvbuff_t *tvb, proto_tree *tree,
}
}
-static void dissect_fcsp_dhchap_challenge (tvbuff_t *tvb, proto_tree *tree)
+static void dissect_fcsp_dhchap_challenge(tvbuff_t *tvb, proto_tree *tree)
{
- int offset = 12;
+ int offset = 12;
guint16 name_type;
guint16 param_len, name_len;
if (tree) {
- proto_tree_add_item (tree, hf_auth_responder_name_type, tvb, offset,
- 2, ENC_BIG_ENDIAN);
- name_type = tvb_get_ntohs (tvb, offset);
+ proto_tree_add_item(tree, hf_auth_responder_name_type, tvb, offset,
+ 2, ENC_BIG_ENDIAN);
+ name_type = tvb_get_ntohs(tvb, offset);
- proto_tree_add_item (tree, hf_auth_responder_name_len, tvb, offset+2,
- 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_auth_responder_name_len, tvb, offset+2,
+ 2, ENC_BIG_ENDIAN);
- name_len = tvb_get_ntohs (tvb, offset+2);
+ name_len = tvb_get_ntohs(tvb, offset+2);
if (name_type == FC_AUTH_NAME_TYPE_WWN) {
- proto_tree_add_string (tree, hf_auth_responder_wwn, tvb, offset+4,
- 8, tvb_fcwwn_to_str (tvb, offset+4));
+ proto_tree_add_string(tree, hf_auth_responder_wwn, tvb, offset+4,
+ 8, tvb_fcwwn_to_str(tvb, offset+4));
}
else {
- proto_tree_add_item (tree, hf_auth_responder_name, tvb, offset+4,
- name_len, ENC_NA);
+ proto_tree_add_item(tree, hf_auth_responder_name, tvb, offset+4,
+ name_len, ENC_NA);
}
offset += (4+name_len);
- proto_tree_add_item (tree, hf_auth_dhchap_hash_type, tvb, offset,
- 4, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_auth_dhchap_group_type, tvb, offset+4,
- 4, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_auth_dhchap_chal_len, tvb, offset+8,
- 4, ENC_BIG_ENDIAN);
- param_len = tvb_get_ntohl (tvb, offset+8);
+ proto_tree_add_item(tree, hf_auth_dhchap_hash_type, tvb, offset,
+ 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_auth_dhchap_group_type, tvb, offset+4,
+ 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_auth_dhchap_chal_len, tvb, offset+8,
+ 4, ENC_BIG_ENDIAN);
+ param_len = tvb_get_ntohl(tvb, offset+8);
- proto_tree_add_item (tree, hf_auth_dhchap_chal_value, tvb, offset+12,
- param_len, ENC_NA);
+ proto_tree_add_item(tree, hf_auth_dhchap_chal_value, tvb, offset+12,
+ param_len, ENC_NA);
offset += (param_len + 12);
- proto_tree_add_item (tree, hf_auth_dhchap_val_len, tvb, offset, 4, ENC_BIG_ENDIAN);
- param_len = tvb_get_ntohl (tvb, offset);
+ proto_tree_add_item(tree, hf_auth_dhchap_val_len, tvb, offset, 4, ENC_BIG_ENDIAN);
+ param_len = tvb_get_ntohl(tvb, offset);
- proto_tree_add_item (tree, hf_auth_dhchap_dhvalue, tvb, offset+4,
- param_len, ENC_NA);
+ proto_tree_add_item(tree, hf_auth_dhchap_dhvalue, tvb, offset+4,
+ param_len, ENC_NA);
}
}
-static void dissect_fcsp_dhchap_reply (tvbuff_t *tvb, proto_tree *tree)
+static void dissect_fcsp_dhchap_reply(tvbuff_t *tvb, proto_tree *tree)
{
- int offset = 12;
+ int offset = 12;
guint32 param_len;
if (tree) {
- proto_tree_add_item (tree, hf_auth_dhchap_rsp_len, tvb, offset, 4, ENC_BIG_ENDIAN);
- param_len = tvb_get_ntohl (tvb, offset);
+ proto_tree_add_item(tree, hf_auth_dhchap_rsp_len, tvb, offset, 4, ENC_BIG_ENDIAN);
+ param_len = tvb_get_ntohl(tvb, offset);
- proto_tree_add_item (tree, hf_auth_dhchap_rsp_value, tvb, offset+4,
- param_len, ENC_NA);
+ proto_tree_add_item(tree, hf_auth_dhchap_rsp_value, tvb, offset+4,
+ param_len, ENC_NA);
offset += (param_len + 4);
- proto_tree_add_item (tree, hf_auth_dhchap_val_len, tvb, offset, 4, ENC_BIG_ENDIAN);
- param_len = tvb_get_ntohl (tvb, offset);
+ proto_tree_add_item(tree, hf_auth_dhchap_val_len, tvb, offset, 4, ENC_BIG_ENDIAN);
+ param_len = tvb_get_ntohl(tvb, offset);
- proto_tree_add_item (tree, hf_auth_dhchap_dhvalue, tvb, offset+4,
- param_len, ENC_NA);
+ proto_tree_add_item(tree, hf_auth_dhchap_dhvalue, tvb, offset+4,
+ param_len, ENC_NA);
offset += (param_len + 4);
- proto_tree_add_item (tree, hf_auth_dhchap_chal_len, tvb, offset, 4, ENC_BIG_ENDIAN);
- param_len = tvb_get_ntohl (tvb, offset);
+ proto_tree_add_item(tree, hf_auth_dhchap_chal_len, tvb, offset, 4, ENC_BIG_ENDIAN);
+ param_len = tvb_get_ntohl(tvb, offset);
- proto_tree_add_item (tree, hf_auth_dhchap_chal_value, tvb, offset+4,
- param_len, ENC_NA);
+ proto_tree_add_item(tree, hf_auth_dhchap_chal_value, tvb, offset+4,
+ param_len, ENC_NA);
}
}
-static void dissect_fcsp_dhchap_success (tvbuff_t *tvb, proto_tree *tree)
+static void dissect_fcsp_dhchap_success(tvbuff_t *tvb, proto_tree *tree)
{
- int offset = 12;
+ int offset = 12;
guint32 param_len;
if (tree) {
- proto_tree_add_item (tree, hf_auth_dhchap_rsp_len, tvb, offset, 4, ENC_BIG_ENDIAN);
- param_len = tvb_get_ntohl (tvb, offset);
+ proto_tree_add_item(tree, hf_auth_dhchap_rsp_len, tvb, offset, 4, ENC_BIG_ENDIAN);
+ param_len = tvb_get_ntohl(tvb, offset);
- proto_tree_add_item (tree, hf_auth_dhchap_rsp_value, tvb, offset+4,
- param_len, ENC_NA);
+ proto_tree_add_item(tree, hf_auth_dhchap_rsp_value, tvb, offset+4,
+ param_len, ENC_NA);
}
}
-static void dissect_fcsp_auth_negotiate (tvbuff_t *tvb, proto_tree *tree)
+static void dissect_fcsp_auth_negotiate(tvbuff_t *tvb, proto_tree *tree)
{
- int offset = 12;
+ int offset = 12;
guint16 name_type, name_len, proto_type, param_len;
guint32 num_protos, i;
if (tree) {
- proto_tree_add_item (tree, hf_auth_initiator_name_type, tvb, offset,
- 2, ENC_BIG_ENDIAN);
- name_type = tvb_get_ntohs (tvb, offset);
+ proto_tree_add_item(tree, hf_auth_initiator_name_type, tvb, offset,
+ 2, ENC_BIG_ENDIAN);
+ name_type = tvb_get_ntohs(tvb, offset);
- proto_tree_add_item (tree, hf_auth_initiator_name_len, tvb, offset+2,
- 2, ENC_BIG_ENDIAN);
- name_len = tvb_get_ntohs (tvb, offset+2);
+ proto_tree_add_item(tree, hf_auth_initiator_name_len, tvb, offset+2,
+ 2, ENC_BIG_ENDIAN);
+ name_len = tvb_get_ntohs(tvb, offset+2);
if (name_type == FC_AUTH_NAME_TYPE_WWN) {
- proto_tree_add_string (tree, hf_auth_initiator_wwn, tvb, offset+4, 8,
- tvb_fcwwn_to_str (tvb, offset+4));
+ proto_tree_add_string(tree, hf_auth_initiator_wwn, tvb, offset+4, 8,
+ tvb_fcwwn_to_str(tvb, offset+4));
}
else {
- proto_tree_add_item (tree, hf_auth_initiator_name, tvb, offset+4,
- name_len, ENC_NA);
+ proto_tree_add_item(tree, hf_auth_initiator_name, tvb, offset+4,
+ name_len, ENC_NA);
}
offset += (4+name_len);
- proto_tree_add_item (tree, hf_auth_usable_proto, tvb, offset, 4, ENC_BIG_ENDIAN);
- num_protos = tvb_get_ntohl (tvb, offset);
+ proto_tree_add_item(tree, hf_auth_usable_proto, tvb, offset, 4, ENC_BIG_ENDIAN);
+ num_protos = tvb_get_ntohl(tvb, offset);
offset += 4;
for (i = 0; i < num_protos; i++) {
- proto_tree_add_item (tree, hf_auth_proto_param_len, tvb, offset, 4, ENC_BIG_ENDIAN);
- param_len = tvb_get_ntohl (tvb, offset);
+ proto_tree_add_item(tree, hf_auth_proto_param_len, tvb, offset, 4, ENC_BIG_ENDIAN);
+ param_len = tvb_get_ntohl(tvb, offset);
offset += 4;
- if (tvb_bytes_exist (tvb, offset, param_len)) {
- proto_type = tvb_get_ntohl (tvb, offset);
+ if (tvb_bytes_exist(tvb, offset, param_len)) {
+ proto_type = tvb_get_ntohl(tvb, offset);
- proto_tree_add_item (tree, hf_auth_proto_type, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_auth_proto_type, tvb, offset, 4, ENC_BIG_ENDIAN);
switch (proto_type) {
case FC_AUTH_PROTO_TYPE_DHCHAP:
- dissect_fcsp_dhchap_auth_param (tvb, tree, offset+4, param_len);
+ dissect_fcsp_dhchap_auth_param(tvb, tree, offset+4, param_len);
break;
case FC_AUTH_PROTO_TYPE_FCAP:
break;
@@ -376,65 +370,65 @@ static void dissect_fcsp_auth_negotiate (tvbuff_t *tvb, proto_tree *tree)
}
}
-static void dissect_fcsp_auth_done (tvbuff_t *tvb _U_, proto_tree *tree _U_)
+static void dissect_fcsp_auth_done(tvbuff_t *tvb _U_, proto_tree *tree _U_)
{
}
-static void dissect_fcsp_auth_rjt (tvbuff_t *tvb, proto_tree *tree)
+static void dissect_fcsp_auth_rjt(tvbuff_t *tvb, proto_tree *tree)
{
int offset = 12;
if (tree) {
- proto_tree_add_item (tree, hf_auth_rjt_code, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_auth_rjt_codedet, tvb, offset+1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_auth_rjt_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_auth_rjt_codedet, tvb, offset+1, 1, ENC_BIG_ENDIAN);
}
}
-static void dissect_fcsp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void dissect_fcsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_item *ti = NULL;
- guint8 opcode;
- int offset = 0;
+ proto_item *ti = NULL;
+ guint8 opcode;
+ int offset = 0;
proto_tree *fcsp_tree = NULL;
/* Make entry in the Info column on summary display */
- opcode = tvb_get_guint8 (tvb, 2);
+ opcode = tvb_get_guint8(tvb, 2);
- if (check_col (pinfo->cinfo, COL_INFO)) {
- col_add_str (pinfo->cinfo, COL_INFO,
- val_to_str (opcode, fcauth_msgcode_vals, "0x%x"));
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_add_str(pinfo->cinfo, COL_INFO,
+ val_to_str(opcode, fcauth_msgcode_vals, "0x%x"));
}
if (tree) {
- ti = proto_tree_add_protocol_format (tree, proto_fcsp, tvb, 0,
- tvb_length (tvb), "FC-SP");
- fcsp_tree = proto_item_add_subtree (ti, ett_fcsp);
+ ti = proto_tree_add_protocol_format(tree, proto_fcsp, tvb, 0,
+ tvb_length(tvb), "FC-SP");
+ fcsp_tree = proto_item_add_subtree(ti, ett_fcsp);
- proto_tree_add_item (fcsp_tree, hf_auth_flags, tvb, offset+1, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (fcsp_tree, hf_auth_msg_code, tvb, offset+2, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (fcsp_tree, hf_auth_proto_ver, tvb, offset+3, 1,
- ENC_BIG_ENDIAN);
- proto_tree_add_item (fcsp_tree, hf_auth_len, tvb, offset+4, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item (fcsp_tree, hf_auth_tid, tvb, offset+8, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fcsp_tree, hf_auth_flags, tvb, offset+1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fcsp_tree, hf_auth_msg_code, tvb, offset+2, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fcsp_tree, hf_auth_proto_ver, tvb, offset+3, 1,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(fcsp_tree, hf_auth_len, tvb, offset+4, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fcsp_tree, hf_auth_tid, tvb, offset+8, 4, ENC_BIG_ENDIAN);
switch (opcode) {
case FC_AUTH_MSG_AUTH_REJECT:
- dissect_fcsp_auth_rjt (tvb, tree);
+ dissect_fcsp_auth_rjt(tvb, tree);
break;
case FC_AUTH_MSG_AUTH_NEGOTIATE:
- dissect_fcsp_auth_negotiate (tvb, tree);
+ dissect_fcsp_auth_negotiate(tvb, tree);
break;
case FC_AUTH_MSG_AUTH_DONE:
- dissect_fcsp_auth_done (tvb, tree);
+ dissect_fcsp_auth_done(tvb, tree);
break;
case FC_AUTH_DHCHAP_CHALLENGE:
- dissect_fcsp_dhchap_challenge (tvb, tree);
+ dissect_fcsp_dhchap_challenge(tvb, tree);
break;
case FC_AUTH_DHCHAP_REPLY:
- dissect_fcsp_dhchap_reply (tvb, tree);
+ dissect_fcsp_dhchap_reply(tvb, tree);
break;
case FC_AUTH_DHCHAP_SUCCESS:
- dissect_fcsp_dhchap_success (tvb, tree);
+ dissect_fcsp_dhchap_success(tvb, tree);
break;
case FC_AUTH_FCAP_REQUEST:
case FC_AUTH_FCAP_ACKNOWLEDGE:
@@ -442,8 +436,8 @@ static void dissect_fcsp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case FC_AUTH_FCPAP_INIT:
case FC_AUTH_FCPAP_ACCEPT:
case FC_AUTH_FCPAP_COMPLETE:
- proto_tree_add_text (fcsp_tree, tvb, offset+12, tvb_length (tvb),
- "FCAP Decoding Not Supported");
+ proto_tree_add_text(fcsp_tree, tvb, offset+12, tvb_length(tvb),
+ "FCAP Decoding Not Supported");
break;
default:
break;
@@ -452,101 +446,159 @@ static void dissect_fcsp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
void
-proto_register_fcsp (void)
+proto_register_fcsp(void)
{
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{ &hf_auth_proto_ver,
- {"Protocol Version", "fcsp.version", FT_UINT8, BASE_HEX, NULL,
- 0x0, NULL, HFILL}},
+ { "Protocol Version", "fcsp.version",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_msg_code,
- {"Message Code", "fcsp.opcode", FT_UINT8, BASE_HEX,
- VALS (fcauth_msgcode_vals), 0x0, NULL, HFILL}},
+ { "Message Code", "fcsp.opcode",
+ FT_UINT8, BASE_HEX, VALS(fcauth_msgcode_vals), 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_flags,
- {"Flags", "fcsp.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL,
- HFILL}},
+ { "Flags", "fcsp.flags",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_len,
- {"Packet Length", "fcsp.len", FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL}},
+ { "Packet Length", "fcsp.len",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_tid,
- {"Transaction Identifier", "fcsp.tid", FT_UINT32, BASE_HEX, NULL,
- 0x0, NULL, HFILL}},
+ { "Transaction Identifier", "fcsp.tid",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_initiator_wwn,
- {"Initiator Name (WWN)", "fcsp.initwwn", FT_STRING, BASE_NONE, NULL,
- 0x0, NULL, HFILL}},
+ { "Initiator Name (WWN)", "fcsp.initwwn",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_initiator_name,
- {"Initiator Name (Unknown Type)", "fcsp.initname", FT_BYTES,
- BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ { "Initiator Name (Unknown Type)", "fcsp.initname",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_initiator_name_type,
- {"Initiator Name Type", "fcsp.initnametype", FT_UINT16, BASE_HEX,
- VALS (fcauth_name_type_vals), 0x0, NULL, HFILL}},
+ { "Initiator Name Type", "fcsp.initnametype",
+ FT_UINT16, BASE_HEX, VALS(fcauth_name_type_vals), 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_initiator_name_len,
- {"Initiator Name Length", "fcsp.initnamelen", FT_UINT16, BASE_DEC,
- NULL, 0x0, NULL, HFILL}},
+ { "Initiator Name Length", "fcsp.initnamelen",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_usable_proto,
- {"Number of Usable Protocols", "fcsp.usableproto", FT_UINT32,
- BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ { "Number of Usable Protocols", "fcsp.usableproto",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_rjt_code,
- {"Reason Code", "fcsp.rjtcode", FT_UINT8, BASE_DEC,
- VALS (fcauth_rjtcode_vals), 0x0, NULL, HFILL}},
+ { "Reason Code", "fcsp.rjtcode",
+ FT_UINT8, BASE_DEC, VALS(fcauth_rjtcode_vals), 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_rjt_codedet,
- {"Reason Code Explanation", "fcsp.rjtcodet", FT_UINT8, BASE_DEC,
- VALS (fcauth_rjtcode_detail_vals), 0x0, NULL, HFILL}},
+ { "Reason Code Explanation", "fcsp.rjtcodet",
+ FT_UINT8, BASE_DEC, VALS(fcauth_rjtcode_detail_vals), 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_responder_wwn,
- {"Responder Name (WWN)", "fcsp.rspwwn", FT_STRING, BASE_NONE, NULL,
- 0x0, NULL, HFILL}},
+ { "Responder Name (WWN)", "fcsp.rspwwn",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_responder_name,
- {"Responder Name (Unknown Type)", "fcsp.rspname", FT_BYTES, BASE_NONE,
- NULL, 0x0, NULL, HFILL}},
+ { "Responder Name (Unknown Type)", "fcsp.rspname",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_responder_name_type,
- {"Responder Name Type", "fcsp.rspnametype", FT_UINT16, BASE_HEX,
- VALS (fcauth_name_type_vals), 0x0, NULL, HFILL}},
+ { "Responder Name Type", "fcsp.rspnametype",
+ FT_UINT16, BASE_HEX, VALS(fcauth_name_type_vals), 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_responder_name_len,
- {"Responder Name Type", "fcsp.rspnamelen", FT_UINT16, BASE_DEC,
- NULL, 0x0, NULL, HFILL}},
+ { "Responder Name Type", "fcsp.rspnamelen",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_dhchap_hashid,
- {"Hash Identifier", "fcsp.dhchap.hashid", FT_UINT32, BASE_HEX, NULL, 0x0,
- NULL, HFILL}},
+ { "Hash Identifier", "fcsp.dhchap.hashid",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_dhchap_groupid,
- {"DH Group Identifier", "fcsp.dhchap.groupid", FT_UINT32, BASE_HEX, NULL,
- 0x0, NULL, HFILL}},
+ { "DH Group Identifier", "fcsp.dhchap.groupid",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_dhchap_chal_len,
- {"Challenge Value Length", "fcsp.dhchap.challen", FT_UINT32, BASE_DEC,
- NULL, 0x0, NULL, HFILL}},
+ { "Challenge Value Length", "fcsp.dhchap.challen",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_dhchap_val_len,
- {"DH Value Length", "fcsp.dhchap.vallen", FT_UINT32, BASE_DEC, NULL,
- 0x0, NULL, HFILL}},
+ { "DH Value Length", "fcsp.dhchap.vallen",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_dhchap_rsp_len,
- {"Response Value Length", "fcsp.dhchap.rsplen", FT_UINT32, BASE_DEC,
- NULL, 0x0, NULL, HFILL}},
+ { "Response Value Length", "fcsp.dhchap.rsplen",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_proto_type,
- {"Authentication Protocol Type", "fcsp.proto", FT_UINT32, BASE_DEC,
- VALS (fcauth_proto_type_vals), 0x0, NULL, HFILL}},
+ { "Authentication Protocol Type", "fcsp.proto",
+ FT_UINT32, BASE_DEC, VALS(fcauth_proto_type_vals), 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_proto_param_len,
- {"Protocol Parameters Length", "fcsp.protoparamlen", FT_UINT32,
- BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ { "Protocol Parameters Length", "fcsp.protoparamlen",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_dhchap_param_tag,
- {"Parameter Tag", "fcsp.dhchap.paramtype", FT_UINT16, BASE_HEX,
- VALS (fcauth_dhchap_param_vals), 0x0, NULL, HFILL}},
+ { "Parameter Tag", "fcsp.dhchap.paramtype",
+ FT_UINT16, BASE_HEX, VALS(fcauth_dhchap_param_vals), 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_dhchap_param_len,
- {"Parameter Length", "fcsp.dhchap.paramlen", FT_UINT16, BASE_DEC,
- NULL, 0x0, NULL, HFILL}},
+ { "Parameter Length", "fcsp.dhchap.paramlen",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_dhchap_hash_type,
- {"Hash Algorithm", "fcsp.dhchap.hashtype", FT_UINT32, BASE_DEC,
- VALS (fcauth_dhchap_hash_algo_vals), 0x0, NULL, HFILL}},
+ { "Hash Algorithm", "fcsp.dhchap.hashtype",
+ FT_UINT32, BASE_DEC, VALS(fcauth_dhchap_hash_algo_vals), 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_dhchap_group_type,
- {"DH Group", "fcsp.dhchap.dhgid", FT_UINT32, BASE_DEC,
- VALS (fcauth_dhchap_dhgid_vals), 0x0, NULL, HFILL}},
+ { "DH Group", "fcsp.dhchap.dhgid",
+ FT_UINT32, BASE_DEC, VALS(fcauth_dhchap_dhgid_vals), 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_dhchap_chal_value,
- {"Challenge Value", "fcsp.dhchap.chalval", FT_BYTES, BASE_NONE,
- NULL, 0x0, NULL, HFILL}},
+ { "Challenge Value", "fcsp.dhchap.chalval",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_auth_dhchap_dhvalue,
- {"DH Value", "fcsp.dhchap.dhvalue", FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL, HFILL}},
- { &hf_auth_dhchap_rsp_value,
- {"Response Value", "fcsp.dhchap.rspval", FT_BYTES, BASE_NONE, NULL,
- 0x0, NULL, HFILL}},
+ { "DH Value", "fcsp.dhchap.dhvalue",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+ { &hf_auth_dhchap_rsp_value,
+ { "Response Value", "fcsp.dhchap.rspval",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
};
@@ -556,22 +608,18 @@ proto_register_fcsp (void)
};
/* Register the protocol name and description */
- proto_fcsp = proto_register_protocol ("Fibre Channel Security Protocol",
+ proto_fcsp = proto_register_protocol("Fibre Channel Security Protocol",
"FC-SP", "fcsp");
register_dissector("fcsp", dissect_fcsp, proto_fcsp);
- /* Required function calls to register the header fields and subtrees used */
+
proto_register_field_array(proto_fcsp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
-proto_reg_handoff_fcsp (void)
+proto_reg_handoff_fcsp(void)
{
- data_handle = find_dissector ("data");
+ data_handle = find_dissector("data");
}
diff --git a/epan/dissectors/packet-fcswils.c b/epan/dissectors/packet-fcswils.c
index a477241b46..4d9ad490ce 100644
--- a/epan/dissectors/packet-fcswils.c
+++ b/epan/dissectors/packet-fcswils.c
@@ -27,14 +27,6 @@
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
@@ -224,29 +216,29 @@ static gint ett_fcswils_ieinfo = -1;
static gint ett_fcswils_capinfo = -1;
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"},
- {FC_SWILS_ESS , "ESS"},
- {FC_SWILS_MRRA , "MRRA"},
+ {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"},
+ {FC_SWILS_ESS , "ESS"},
+ {FC_SWILS_MRRA , "MRRA"},
{FC_SWILS_AUTH_ILS, "AUTH_ILS"},
{0, NULL},
};
@@ -265,35 +257,35 @@ static const value_string fc_swils_rjt_val [] = {
};
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"},
+ {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"},
+ {FC_SWILS_ELP_FC_RRDY , "R_RDY Flow Ctrl"},
{0, NULL},
};
static const value_string fcswils_rectype_val[] = {
{FC_SWILS_LRECTYPE_DOMAIN, "Domain ID Record"},
- {FC_SWILS_LRECTYPE_MCAST, "Multicast ID Record"},
+ {FC_SWILS_LRECTYPE_MCAST , "Multicast ID Record"},
{0, NULL},
};
@@ -369,13 +361,13 @@ static const value_string fc_swils_zoneobj_type_val[] = {
};
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"},
+ {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},
};
@@ -412,10 +404,10 @@ static const value_string fc_swils_sfc_op_val[] = {
};
typedef struct _zonename {
- guint32 namelen:8,
- rsvd:24;
- gchar *name;
- gchar *pad;
+ guint32 namelen:8,
+ rsvd:24;
+ gchar *name;
+ gchar *pad;
} zonename_t;
typedef struct _fcswils_conv_key {
@@ -437,7 +429,7 @@ typedef struct _fcswils_func_table_t {
static dissector_handle_t data_handle, fcsp_handle;
-static gint get_zoneobj_len (tvbuff_t *tvb, gint offset);
+static gint get_zoneobj_len(tvbuff_t *tvb, gint offset);
/*
* Hash Functions
@@ -452,7 +444,7 @@ fcswils_equal(gconstpointer v, gconstpointer w)
}
static guint
-fcswils_hash (gconstpointer v)
+fcswils_hash(gconstpointer v)
{
const fcswils_conv_key_t *key = v;
guint val;
@@ -469,26 +461,26 @@ static void
fcswils_init_protocol(void)
{
if (fcswils_req_hash)
- g_hash_table_destroy (fcswils_req_hash);
+ g_hash_table_destroy(fcswils_req_hash);
fcswils_req_hash = g_hash_table_new(fcswils_hash, fcswils_equal);
}
static guint8 *
-zonenm_to_str (tvbuff_t *tvb, gint offset)
+zonenm_to_str(tvbuff_t *tvb, gint offset)
{
- int len = tvb_get_guint8 (tvb, offset);
- return tvb_get_ephemeral_string (tvb, offset+4, len);
+ int len = tvb_get_guint8(tvb, offset);
+ return tvb_get_ephemeral_string(tvb, offset+4, len);
}
/* Offset points to the start of the zone object */
static gint
-get_zoneobj_len (tvbuff_t *tvb, gint offset)
+get_zoneobj_len(tvbuff_t *tvb, gint offset)
{
- gint numrec, numrec1;
+ gint numrec, numrec1;
guint8 objtype;
- gint i, j, len;
+ gint i, j, len;
/* zone object structure is:
* type (1 byte), protocol (1 byte), rsvd (2 bytes), obj name (x bytes),
@@ -499,23 +491,23 @@ get_zoneobj_len (tvbuff_t *tvb, gint offset)
* type (1 byte), rsvd (1 byte), flags (1 byte), id_len (1 byte),
* id (id_len bytes)
*/
- objtype = tvb_get_guint8 (tvb, offset);
- len = 4 + ZONENAME_LEN (tvb, offset+4); /* length upto num_of_mbrs field */
- numrec = tvb_get_ntohl (tvb, offset+len); /* gets us num of zone mbrs */
+ objtype = tvb_get_guint8(tvb, offset);
+ len = 4 + ZONENAME_LEN(tvb, offset+4); /* length upto num_of_mbrs field */
+ numrec = tvb_get_ntohl(tvb, offset+len); /* gets us num of zone mbrs */
len += 4; /* + num_mbrs */
for (i = 0; i < numrec; i++) {
if (objtype == FC_SWILS_ZONEOBJ_ZONESET) {
- len += 4 + ZONENAME_LEN (tvb, offset+4+len); /* length upto num_of_mbrs field */
- numrec1 = tvb_get_ntohl (tvb, offset+len);
+ len += 4 + ZONENAME_LEN(tvb, offset+4+len); /* length upto num_of_mbrs field */
+ numrec1 = tvb_get_ntohl(tvb, offset+len);
len += 4;
for (j = 0; j < numrec1; j++) {
- len += 4 + tvb_get_guint8 (tvb, offset+3+len);
+ len += 4 + tvb_get_guint8(tvb, offset+3+len);
}
}
else {
- len += 4 + tvb_get_guint8 (tvb, offset+3+len);
+ len += 4 + tvb_get_guint8(tvb, offset+3+len);
}
}
@@ -524,31 +516,31 @@ get_zoneobj_len (tvbuff_t *tvb, gint offset)
#define MAX_INTERCONNECT_ELEMENT_INFO_LEN 252
static int
-dissect_swils_interconnect_element_info (tvbuff_t *tvb, proto_tree *tree, int offset)
+dissect_swils_interconnect_element_info(tvbuff_t *tvb, proto_tree *tree, int offset)
{
int len, max_len = MAX_INTERCONNECT_ELEMENT_INFO_LEN;
if (tree) {
- proto_tree_add_item (tree, hf_swils_interconnect_list_len, tvb, offset+3, 1, ENC_BIG_ENDIAN);
- len = tvb_strsize (tvb, offset+4);
- proto_tree_add_item (tree, hf_swils_ess_vendorname, tvb, offset+4, len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_swils_interconnect_list_len, tvb, offset+3, 1, ENC_BIG_ENDIAN);
+ len = tvb_strsize(tvb, offset+4);
+ proto_tree_add_item(tree, hf_swils_ess_vendorname, tvb, offset+4, len, ENC_ASCII|ENC_NA);
offset += (4 + len);
max_len -= len;
- len = tvb_strsize (tvb, offset);
- proto_tree_add_item (tree, hf_swils_ess_modelname, tvb, offset, len, ENC_ASCII|ENC_NA);
+ len = tvb_strsize(tvb, offset);
+ proto_tree_add_item(tree, hf_swils_ess_modelname, tvb, offset, len, ENC_ASCII|ENC_NA);
offset += len;
max_len -= len;
- len = tvb_strsize (tvb, offset);
- proto_tree_add_item (tree, hf_swils_ess_relcode, tvb, offset, len, ENC_ASCII|ENC_NA);
+ len = tvb_strsize(tvb, offset);
+ proto_tree_add_item(tree, hf_swils_ess_relcode, tvb, offset, len, ENC_ASCII|ENC_NA);
offset += len;
max_len -= len;
while (max_len > 0) {
/* Vendor specific field is a set of one or more null-terminated
* strings
*/
- len = tvb_strsize (tvb, offset);
- proto_tree_add_item (tree, hf_swils_ess_vendorspecific, tvb, offset, len, ENC_ASCII|ENC_NA);
+ len = tvb_strsize(tvb, offset);
+ proto_tree_add_item(tree, hf_swils_ess_vendorspecific, tvb, offset, len, ENC_ASCII|ENC_NA);
offset += len;
max_len -= len;
}
@@ -558,58 +550,58 @@ dissect_swils_interconnect_element_info (tvbuff_t *tvb, proto_tree *tree, int of
}
static void
-dissect_swils_ess_capability (tvbuff_t *tvb, proto_tree *tree, int offset,
- guint8 srvr_type)
+dissect_swils_ess_capability(tvbuff_t *tvb, proto_tree *tree, int offset,
+ guint8 srvr_type)
{
if (tree) {
switch (srvr_type) {
case FCCT_GSRVR_DNS:
- proto_tree_add_item (tree, hf_swils_ess_dns_zlacc, tvb, offset+3,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_dns_obj3h, tvb, offset+3,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_dns_obj2h, tvb, offset+3,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_dns_obj1h, tvb, offset+3,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_dns_obj0h, tvb, offset+3,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_dns_vendor, tvb,
- offset+4, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_dns_zlacc, tvb, offset+3,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_dns_obj3h, tvb, offset+3,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_dns_obj2h, tvb, offset+3,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_dns_obj1h, tvb, offset+3,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_dns_obj0h, tvb, offset+3,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_dns_vendor, tvb,
+ offset+4, 4, ENC_BIG_ENDIAN);
break;
case FCCT_GSRVR_FCTLR:
- proto_tree_add_item (tree, hf_swils_ess_fctlr_rscn, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_fctlr_vendor, tvb,
- offset+4, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fctlr_rscn, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fctlr_vendor, tvb,
+ offset+4, 4, ENC_BIG_ENDIAN);
break;
case FCCT_GSRVR_FCS:
- proto_tree_add_item (tree, hf_swils_ess_fcs_basic, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_fcs_platform, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_fcs_topology, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_fcs_enhanced, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fcs_basic, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fcs_platform, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fcs_topology, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fcs_enhanced, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
break;
case FCCT_GSRVR_FZS:
- proto_tree_add_item (tree, hf_swils_ess_fzs_enh_supp, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_fzs_enh_ena, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_fzs_mr, tvb, offset+3,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_fzs_defzone, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_fzs_zsdb_supp, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_fzs_zsdb_ena, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_fzs_adc_supp, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ess_fzs_hardzone, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fzs_enh_supp, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fzs_enh_ena, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fzs_mr, tvb, offset+3,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fzs_defzone, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fzs_zsdb_supp, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fzs_zsdb_ena, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fzs_adc_supp, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ess_fzs_hardzone, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
break;
default:
break;
@@ -620,11 +612,11 @@ dissect_swils_ess_capability (tvbuff_t *tvb, proto_tree *tree, int offset,
}
static int
-dissect_swils_ess_capability_obj (tvbuff_t *tvb, proto_tree *tree, int offset)
+dissect_swils_ess_capability_obj(tvbuff_t *tvb, proto_tree *tree, int offset)
{
- int i = 0, num_entries = 0, len = 0, total_len = 0;
- guint8 type, subtype, srvr_type;
- proto_item *ti = NULL;
+ int i = 0, num_entries = 0, len = 0, total_len = 0;
+ guint8 type, subtype, srvr_type;
+ proto_item *ti = NULL;
proto_tree *capinfo_tree = NULL;
if (tree) {
@@ -633,42 +625,42 @@ dissect_swils_ess_capability_obj (tvbuff_t *tvb, proto_tree *tree, int offset)
* rsvd (1), num_cap_entries (1), entry_1 (8) ... entry_n (8)
*/
/* Compute length first to create subtree of cap object */
- type = tvb_get_guint8 (tvb, offset);
+ type = tvb_get_guint8(tvb, offset);
if (type != FCCT_GSTYPE_VENDOR) {
- num_entries = tvb_get_guint8 (tvb, offset+3);
+ num_entries = tvb_get_guint8(tvb, offset+3);
total_len = 4 + (num_entries*8);
- ti = proto_tree_add_text (tree, tvb, offset,
- total_len, "Capability Object (%s)",
- val_to_str (type, fc_ct_gstype_vals,
- "Unknown (0x%x)"));
- capinfo_tree = proto_item_add_subtree (ti, ett_fcswils_capinfo);
+ ti = proto_tree_add_text(tree, tvb, offset,
+ total_len, "Capability Object (%s)",
+ val_to_str(type, fc_ct_gstype_vals,
+ "Unknown (0x%x)"));
+ capinfo_tree = proto_item_add_subtree(ti, ett_fcswils_capinfo);
} else {
- i = tvb_get_guint8 (tvb, offset+3);
+ i = tvb_get_guint8(tvb, offset+3);
i += 12;
- ti = proto_tree_add_text (tree, tvb, offset,
- i, "Capability Object (Vendor-specific 0x%x)",
- type);
- capinfo_tree = proto_item_add_subtree (ti, ett_fcswils_capinfo);
+ ti = proto_tree_add_text(tree, tvb, offset,
+ i, "Capability Object (Vendor-specific 0x%x)",
+ type);
+ capinfo_tree = proto_item_add_subtree(ti, ett_fcswils_capinfo);
}
- proto_tree_add_item (capinfo_tree, hf_swils_ess_cap_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (capinfo_tree, hf_swils_ess_cap_subtype, tvb, offset+1,
- 1, ENC_BIG_ENDIAN);
- subtype = tvb_get_guint8 (tvb, offset+1);
+ proto_tree_add_item(capinfo_tree, hf_swils_ess_cap_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(capinfo_tree, hf_swils_ess_cap_subtype, tvb, offset+1,
+ 1, ENC_BIG_ENDIAN);
+ subtype = tvb_get_guint8(tvb, offset+1);
if (type != FCCT_GSTYPE_VENDOR) {
- srvr_type = get_gs_server (type, subtype);
- proto_tree_add_uint (capinfo_tree, hf_swils_ess_cap_svc, tvb, offset, 2,
- srvr_type);
- proto_tree_add_item (capinfo_tree, hf_swils_ess_cap_numentries, tvb,
- offset+3, 1, ENC_BIG_ENDIAN);
+ srvr_type = get_gs_server(type, subtype);
+ proto_tree_add_uint(capinfo_tree, hf_swils_ess_cap_svc, tvb, offset, 2,
+ srvr_type);
+ proto_tree_add_item(capinfo_tree, hf_swils_ess_cap_numentries, tvb,
+ offset+3, 1, ENC_BIG_ENDIAN);
offset += 4;
len += 4;
- while ((num_entries > 0) && tvb_bytes_exist (tvb, offset, 8)) {
- dissect_swils_ess_capability (tvb, capinfo_tree, offset, srvr_type);
+ while ((num_entries > 0) && tvb_bytes_exist(tvb, offset, 8)) {
+ dissect_swils_ess_capability(tvb, capinfo_tree, offset, srvr_type);
num_entries--;
offset += 8;
len += 8;
@@ -677,17 +669,17 @@ dissect_swils_ess_capability_obj (tvbuff_t *tvb, proto_tree *tree, int offset)
/* Those damn T11 guys defined another format for
* Vendor-specific objects.
*/
- proto_tree_add_item (capinfo_tree, hf_swils_ess_cap_len, tvb, offset+3,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (capinfo_tree, hf_swils_ess_cap_t10, tvb, offset+4,
- 8, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(capinfo_tree, hf_swils_ess_cap_len, tvb, offset+3,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(capinfo_tree, hf_swils_ess_cap_t10, tvb, offset+4,
+ 8, ENC_ASCII|ENC_NA);
i -= 8; /* reduce length by t10 object size */
offset += 12;
len += 12;
- while ((i > 0) && tvb_bytes_exist (tvb, offset, 8)) {
- proto_tree_add_item (capinfo_tree, hf_swils_ess_cap_vendorobj,
- tvb, offset, 8, ENC_NA);
+ while ((i > 0) && tvb_bytes_exist(tvb, offset, 8)) {
+ proto_tree_add_item(capinfo_tree, hf_swils_ess_cap_vendorobj,
+ tvb, offset, 8, ENC_NA);
i -= 8;
offset += 8;
len += 12;
@@ -698,47 +690,47 @@ dissect_swils_ess_capability_obj (tvbuff_t *tvb, proto_tree *tree, int offset)
}
static void
-dissect_swils_nullpayload (tvbuff_t *tvb _U_, proto_tree *tree _U_,
- guint8 isreq _U_)
+dissect_swils_nullpayload(tvbuff_t *tvb _U_, proto_tree *tree _U_,
+ guint8 isreq _U_)
{
/* Common dissector for those ILSs without a payload */
return;
}
static void
-dissect_swils_elp (tvbuff_t *tvb, proto_tree *elp_tree, guint8 isreq _U_)
+dissect_swils_elp(tvbuff_t *tvb, proto_tree *elp_tree, guint8 isreq _U_)
{
/* Set up structures needed to add the protocol subtree and manage it */
- int offset = 0;
+ int offset = 0;
const gchar *flags;
- fcswils_elp elp;
+ fcswils_elp elp;
/* Response i.e. SW_ACC for an ELP has the same format as the request */
/* We skip the initial 4 bytes as we don't care about the opcode */
- tvb_memcpy (tvb, (guint8 *)&elp, 4, FC_SWILS_ELP_SIZE);
+ tvb_memcpy(tvb, (guint8 *)&elp, 4, FC_SWILS_ELP_SIZE);
- elp.r_a_tov = g_ntohl (elp.r_a_tov);
- elp.e_d_tov = g_ntohl (elp.e_d_tov);
- elp.isl_flwctrl_mode = g_ntohs (elp.isl_flwctrl_mode);
- elp.flw_ctrl_parmlen = g_ntohs (elp.flw_ctrl_parmlen);
+ elp.r_a_tov = g_ntohl(elp.r_a_tov);
+ elp.e_d_tov = g_ntohl(elp.e_d_tov);
+ elp.isl_flwctrl_mode = g_ntohs(elp.isl_flwctrl_mode);
+ elp.flw_ctrl_parmlen = g_ntohs(elp.flw_ctrl_parmlen);
if (elp_tree) {
offset += 4;
- proto_tree_add_item (elp_tree, hf_swils_elp_rev, tvb, offset++, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (elp_tree, hf_swils_elp_flags, tvb, offset, 2, ENC_NA);
+ proto_tree_add_item(elp_tree, hf_swils_elp_rev, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_flags, tvb, offset, 2, ENC_NA);
offset += 3;
- proto_tree_add_uint_format (elp_tree, hf_swils_elp_r_a_tov, tvb, offset, 4,
- elp.r_a_tov, "R_A_TOV: %d msecs", elp.r_a_tov);
+ proto_tree_add_uint_format(elp_tree, hf_swils_elp_r_a_tov, tvb, offset, 4,
+ elp.r_a_tov, "R_A_TOV: %d msecs", elp.r_a_tov);
offset += 4;
- proto_tree_add_uint_format (elp_tree, hf_swils_elp_e_d_tov, tvb, offset, 4,
- elp.e_d_tov, "E_D_TOV: %d msecs", elp.e_d_tov);
+ proto_tree_add_uint_format(elp_tree, hf_swils_elp_e_d_tov, tvb, offset, 4,
+ elp.e_d_tov, "E_D_TOV: %d msecs", elp.e_d_tov);
offset += 4;
- proto_tree_add_string (elp_tree, hf_swils_elp_req_epn, tvb, offset, 8,
- fcwwn_to_str (elp.req_epname));
+ proto_tree_add_string(elp_tree, hf_swils_elp_req_epn, tvb, offset, 8,
+ fcwwn_to_str(elp.req_epname));
offset += 8;
- proto_tree_add_string (elp_tree, hf_swils_elp_req_esn, tvb, offset, 8,
- fcwwn_to_str (elp.req_sname));
+ proto_tree_add_string(elp_tree, hf_swils_elp_req_esn, tvb, offset, 8,
+ fcwwn_to_str(elp.req_sname));
offset += 8;
if (elp.clsf_svcparm[0] & 0x80) {
@@ -750,17 +742,17 @@ dissect_swils_elp (tvbuff_t *tvb, proto_tree *elp_tree, guint8 isreq _U_)
} else {
flags="Class F Invld";
}
- proto_tree_add_bytes_format (elp_tree, hf_swils_elp_clsf_svcp, tvb, offset, 6,
- &elp.clsf_svcparm[0], "Class F Svc Parameters: (%s)", flags);
+ proto_tree_add_bytes_format(elp_tree, hf_swils_elp_clsf_svcp, tvb, offset, 6,
+ &elp.clsf_svcparm[0], "Class F Svc Parameters: (%s)", flags);
offset += 6;
- proto_tree_add_item (elp_tree, hf_swils_elp_clsf_rcvsz, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_clsf_rcvsz, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
- proto_tree_add_item (elp_tree, hf_swils_elp_clsf_conseq, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_clsf_conseq, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
- proto_tree_add_item (elp_tree, hf_swils_elp_clsf_e2e, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_clsf_e2e, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
- proto_tree_add_item (elp_tree, hf_swils_elp_clsf_openseq, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_clsf_openseq, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 4;
if (elp.cls1_svcparm[0] & 0x80) {
@@ -771,19 +763,19 @@ dissect_swils_elp (tvbuff_t *tvb, proto_tree *elp_tree, guint8 isreq _U_)
flagsbuf=ep_alloc(MAX_FLAGS_LEN);
stroff = 0;
- returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff,
- "Class 1 Valid");
+ returned_length = g_snprintf(flagsbuf+stroff, MAX_FLAGS_LEN-stroff,
+ "Class 1 Valid");
stroff += MIN(returned_length, MAX_FLAGS_LEN-stroff);
if (elp.cls1_svcparm[0] & 0x40) {
- returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff, " | IMX");
+ returned_length = g_snprintf(flagsbuf+stroff, MAX_FLAGS_LEN-stroff, " | IMX");
stroff += MIN(returned_length, MAX_FLAGS_LEN-stroff);
}
if (elp.cls1_svcparm[0] & 0x20) {
- returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff, " | IPS");
+ returned_length = g_snprintf(flagsbuf+stroff, MAX_FLAGS_LEN-stroff, " | IPS");
stroff += MIN(returned_length, MAX_FLAGS_LEN-stroff);
}
if (elp.cls1_svcparm[0] & 0x10) {
- returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff, " | LKS");
+ returned_length = g_snprintf(flagsbuf+stroff, MAX_FLAGS_LEN-stroff, " | LKS");
}
flags=flagsbuf;
}
@@ -791,11 +783,11 @@ dissect_swils_elp (tvbuff_t *tvb, proto_tree *elp_tree, guint8 isreq _U_)
flags="Class 1 Invalid";
}
- proto_tree_add_bytes_format (elp_tree, hf_swils_elp_cls1_svcp, tvb, offset, 2,
- NULL, "Class 1 Svc Parameters: (%s)", flags);
+ proto_tree_add_bytes_format(elp_tree, hf_swils_elp_cls1_svcp, tvb, offset, 2,
+ NULL, "Class 1 Svc Parameters: (%s)", flags);
offset += 2;
if (elp.cls1_svcparm[0] & 0x80) {
- proto_tree_add_item (elp_tree, hf_swils_elp_cls1_rcvsz, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_cls1_rcvsz, tvb, offset, 2, ENC_BIG_ENDIAN);
}
offset += 2;
@@ -811,13 +803,13 @@ dissect_swils_elp (tvbuff_t *tvb, proto_tree *elp_tree, guint8 isreq _U_)
flags="Class 2 Invld";
}
- proto_tree_add_bytes_format (elp_tree, hf_swils_elp_cls2_svcp, tvb, offset, 2,
- &elp.cls2_svcparm[0],
- "Class 2 Svc Parameters: (%s)", flags);
+ proto_tree_add_bytes_format(elp_tree, hf_swils_elp_cls2_svcp, tvb, offset, 2,
+ &elp.cls2_svcparm[0],
+ "Class 2 Svc Parameters: (%s)", flags);
offset += 2;
if (elp.cls2_svcparm[0] & 0x80) {
- proto_tree_add_item (elp_tree, hf_swils_elp_cls2_rcvsz, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_cls2_rcvsz, tvb, offset, 2, ENC_BIG_ENDIAN);
}
offset += 2;
@@ -832,100 +824,100 @@ dissect_swils_elp (tvbuff_t *tvb, proto_tree *elp_tree, guint8 isreq _U_)
else {
flags="Class 3 Invld";
}
- proto_tree_add_bytes_format (elp_tree, hf_swils_elp_cls3_svcp, tvb, offset, 2,
- &elp.cls3_svcparm[0],
- "Class 3 Svc Parameters: (%s)", flags);
+ proto_tree_add_bytes_format(elp_tree, hf_swils_elp_cls3_svcp, tvb, offset, 2,
+ &elp.cls3_svcparm[0],
+ "Class 3 Svc Parameters: (%s)", flags);
offset += 2;
if (elp.cls3_svcparm[0] & 0x80) {
- proto_tree_add_item (elp_tree, hf_swils_elp_cls3_rcvsz, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_cls3_rcvsz, tvb, offset, 2, ENC_BIG_ENDIAN);
}
offset += 22;
- proto_tree_add_string (elp_tree, hf_swils_elp_isl_fc_mode, tvb, offset, 2,
- val_to_str (elp.isl_flwctrl_mode, fcswils_elp_fc_val, "Vendor Unique"));
+ proto_tree_add_string(elp_tree, hf_swils_elp_isl_fc_mode, tvb, offset, 2,
+ val_to_str(elp.isl_flwctrl_mode, fcswils_elp_fc_val, "Vendor Unique"));
offset += 2;
- proto_tree_add_item (elp_tree, hf_swils_elp_fcplen, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_fcplen, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
- proto_tree_add_item (elp_tree, hf_swils_elp_b2bcredit, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_b2bcredit, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item (elp_tree, hf_swils_elp_compat1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_compat1, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item (elp_tree, hf_swils_elp_compat2, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_compat2, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item (elp_tree, hf_swils_elp_compat3, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_compat3, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item (elp_tree, hf_swils_elp_compat4, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(elp_tree, hf_swils_elp_compat4, tvb, offset, 4, ENC_BIG_ENDIAN);
}
}
static void
-dissect_swils_efp (tvbuff_t *tvb, proto_tree *efp_tree, guint8 isreq _U_)
+dissect_swils_efp(tvbuff_t *tvb, proto_tree *efp_tree, guint8 isreq _U_)
{
/* Set up structures needed to add the protocol subtree and manage it */
- proto_item *subti;
- proto_tree *lrec_tree;
- int num_listrec = 0,
- offset = 0;
- fcswils_efp efp;
- guint8 rec_type;
+ proto_item *subti;
+ proto_tree *lrec_tree;
+ int num_listrec = 0;
+ int offset = 0;
+ fcswils_efp efp;
+ guint8 rec_type;
offset += 1;
- efp.reclen = tvb_get_guint8 (tvb, offset);
+ efp.reclen = tvb_get_guint8(tvb, offset);
if (efp_tree)
- proto_tree_add_uint (efp_tree, hf_swils_efp_record_len, tvb, offset, 1, efp.reclen);
+ proto_tree_add_uint(efp_tree, hf_swils_efp_record_len, tvb, offset, 1, efp.reclen);
offset += 1;
- efp.payload_len = tvb_get_ntohs (tvb, offset);
+ efp.payload_len = tvb_get_ntohs(tvb, offset);
if (efp.payload_len < FC_SWILS_EFP_SIZE) {
if (efp_tree)
- proto_tree_add_uint_format (efp_tree, hf_swils_efp_payload_len,
- tvb, offset, 2, efp.payload_len,
- "Payload Len: %u (bogus, must be >= %u)",
- efp.payload_len, FC_SWILS_EFP_SIZE);
+ proto_tree_add_uint_format(efp_tree, hf_swils_efp_payload_len,
+ tvb, offset, 2, efp.payload_len,
+ "Payload Len: %u (bogus, must be >= %u)",
+ efp.payload_len, FC_SWILS_EFP_SIZE);
return;
}
if (efp_tree)
- proto_tree_add_item (efp_tree, hf_swils_efp_payload_len, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(efp_tree, hf_swils_efp_payload_len, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 5; /* skip 3 reserved bytes, too */
if (efp_tree)
- proto_tree_add_item (efp_tree, hf_swils_efp_pswitch_pri, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- offset++;
- tvb_memcpy (tvb, efp.pswitch_name, offset, 8);
+ proto_tree_add_item(efp_tree, hf_swils_efp_pswitch_pri, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ tvb_memcpy(tvb, efp.pswitch_name, offset, 8);
if (efp_tree)
- proto_tree_add_string (efp_tree, hf_swils_efp_pswitch_name, tvb, offset,
- 8, fcwwn_to_str (efp.pswitch_name));
+ proto_tree_add_string(efp_tree, hf_swils_efp_pswitch_name, tvb, offset,
+ 8, fcwwn_to_str(efp.pswitch_name));
offset += 8;
/* Add List Records now */
if (efp_tree) {
if (efp.reclen == 0) {
- proto_tree_add_text (efp_tree, tvb, 0, 0, "Record length is zero");
+ proto_tree_add_text(efp_tree, tvb, 0, 0, "Record length is zero");
return;
}
num_listrec = (efp.payload_len - FC_SWILS_EFP_SIZE)/efp.reclen;
while (num_listrec-- > 0) {
- rec_type = tvb_get_guint8 (tvb, offset);
- subti = proto_tree_add_text (efp_tree, tvb, offset, -1,
- "%s",
- val_to_str(rec_type,
- fcswils_rectype_val,
- "Unknown record type (0x%02x)"));
- lrec_tree = proto_item_add_subtree (subti, ett_fcswils_efplist);
- proto_tree_add_uint (lrec_tree, hf_swils_efp_rec_type, tvb, offset, 1,
- rec_type);
+ rec_type = tvb_get_guint8(tvb, offset);
+ subti = proto_tree_add_text(efp_tree, tvb, offset, -1,
+ "%s",
+ val_to_str(rec_type,
+ fcswils_rectype_val,
+ "Unknown record type (0x%02x)"));
+ lrec_tree = proto_item_add_subtree(subti, ett_fcswils_efplist);
+ proto_tree_add_uint(lrec_tree, hf_swils_efp_rec_type, tvb, offset, 1,
+ rec_type);
switch (rec_type) {
case FC_SWILS_LRECTYPE_DOMAIN:
- proto_tree_add_item (lrec_tree, hf_swils_efp_dom_id, tvb, offset+1, 1, ENC_BIG_ENDIAN);
- proto_tree_add_string (lrec_tree, hf_swils_efp_switch_name, tvb, offset+8, 8,
- tvb_fcwwn_to_str (tvb, offset+8));
+ proto_tree_add_item(lrec_tree, hf_swils_efp_dom_id, tvb, offset+1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_string(lrec_tree, hf_swils_efp_switch_name, tvb, offset+8, 8,
+ tvb_fcwwn_to_str(tvb, offset+8));
break;
case FC_SWILS_LRECTYPE_MCAST:
- proto_tree_add_item (lrec_tree, hf_swils_efp_mcast_grpno, tvb, offset+1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(lrec_tree, hf_swils_efp_mcast_grpno, tvb, offset+1, 1, ENC_BIG_ENDIAN);
break;
}
offset += efp.reclen;
@@ -934,30 +926,30 @@ dissect_swils_efp (tvbuff_t *tvb, proto_tree *efp_tree, guint8 isreq _U_)
}
static void
-dissect_swils_dia (tvbuff_t *tvb, proto_tree *dia_tree, guint8 isreq _U_)
+dissect_swils_dia(tvbuff_t *tvb, proto_tree *dia_tree, guint8 isreq _U_)
{
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
if (dia_tree) {
- proto_tree_add_string (dia_tree, hf_swils_dia_switch_name, tvb, offset+4,
- 8, tvb_fcwwn_to_str (tvb, offset+4));
+ proto_tree_add_string(dia_tree, hf_swils_dia_switch_name, tvb, offset+4,
+ 8, tvb_fcwwn_to_str(tvb, offset+4));
}
}
static void
-dissect_swils_rdi (tvbuff_t *tvb, proto_tree *rdi_tree, guint8 isreq)
+dissect_swils_rdi(tvbuff_t *tvb, proto_tree *rdi_tree, guint8 isreq)
{
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
int i, plen, numrec;
if (rdi_tree) {
- plen = tvb_get_ntohs (tvb, offset+2);
+ plen = tvb_get_ntohs(tvb, offset+2);
- proto_tree_add_item (rdi_tree, hf_swils_rdi_payload_len, tvb, offset+2, 2, ENC_BIG_ENDIAN);
- proto_tree_add_string (rdi_tree, hf_swils_rdi_req_sname, tvb, offset+4,
- 8, tvb_fcwwn_to_str (tvb, offset+4));
+ proto_tree_add_item(rdi_tree, hf_swils_rdi_payload_len, tvb, offset+2, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_string(rdi_tree, hf_swils_rdi_req_sname, tvb, offset+4,
+ 8, tvb_fcwwn_to_str(tvb, offset+4));
/* 12 is the length of the initial header and 4 is the size of each
* domain request record.
@@ -966,14 +958,14 @@ dissect_swils_rdi (tvbuff_t *tvb, proto_tree *rdi_tree, guint8 isreq)
offset = 12;
for (i = 0; i < numrec; i++) {
if (isreq) {
- proto_tree_add_text (rdi_tree, tvb, offset+3, 1,
- "Requested Domain ID: %d",
- tvb_get_guint8 (tvb, offset+3));
+ proto_tree_add_text(rdi_tree, tvb, offset+3, 1,
+ "Requested Domain ID: %d",
+ tvb_get_guint8(tvb, offset+3));
}
else {
- proto_tree_add_text (rdi_tree, tvb, offset+3, 1,
- "Granted Domain ID: %d",
- tvb_get_guint8 (tvb, offset+3));
+ proto_tree_add_text(rdi_tree, tvb, offset+3, 1,
+ "Granted Domain ID: %d",
+ tvb_get_guint8(tvb, offset+3));
}
offset += 4;
}
@@ -981,90 +973,90 @@ dissect_swils_rdi (tvbuff_t *tvb, proto_tree *rdi_tree, guint8 isreq)
}
static void
-dissect_swils_fspf_hdr (tvbuff_t *tvb, proto_tree *tree, int offset)
+dissect_swils_fspf_hdr(tvbuff_t *tvb, proto_tree *tree, int offset)
{
proto_item *subti;
proto_tree *fspfh_tree;
if (tree) {
/* 20 is the size of FSPF header */
- subti = proto_tree_add_text (tree, tvb, offset, 20, "FSPF Header");
- fspfh_tree = proto_item_add_subtree (subti, ett_fcswils_fspfhdr);
-
- proto_tree_add_item (fspfh_tree, hf_swils_fspfh_rev, tvb, offset+4,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (fspfh_tree, hf_swils_fspfh_ar_num, tvb,
- offset+5, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (fspfh_tree, hf_swils_fspfh_auth_type, tvb,
- offset+6, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (fspfh_tree, hf_swils_fspfh_dom_id, tvb, offset+11,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (fspfh_tree, hf_swils_fspfh_auth, tvb, offset+12,
- 8, ENC_NA);
+ subti = proto_tree_add_text(tree, tvb, offset, 20, "FSPF Header");
+ fspfh_tree = proto_item_add_subtree(subti, ett_fcswils_fspfhdr);
+
+ proto_tree_add_item(fspfh_tree, hf_swils_fspfh_rev, tvb, offset+4,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fspfh_tree, hf_swils_fspfh_ar_num, tvb,
+ offset+5, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fspfh_tree, hf_swils_fspfh_auth_type, tvb,
+ offset+6, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fspfh_tree, hf_swils_fspfh_dom_id, tvb, offset+11,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fspfh_tree, hf_swils_fspfh_auth, tvb, offset+12,
+ 8, ENC_NA);
}
}
static void
-dissect_swils_fspf_lsrechdr (tvbuff_t *tvb, proto_tree *tree, int offset)
+dissect_swils_fspf_lsrechdr(tvbuff_t *tvb, proto_tree *tree, int offset)
{
- proto_tree_add_item (tree, hf_swils_lsrh_lsr_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_text (tree, tvb, offset+2, 2, "LSR Age: %d secs",
- tvb_get_ntohs (tvb, offset+2));
- proto_tree_add_text (tree, tvb, offset+4, 4, "Options : 0x%x",
- tvb_get_ntohl (tvb, offset+4));
- proto_tree_add_item (tree, hf_swils_lsrh_lsid, tvb, offset+11, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_lsrh_adv_domid, tvb, offset+15, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_lsrh_ls_incid, tvb, offset+16, 4, ENC_BIG_ENDIAN);
- proto_tree_add_text (tree, tvb, offset+20, 2, "Checksum: 0x%x",
- tvb_get_ntohs (tvb, offset+20));
- proto_tree_add_text (tree, tvb, offset+22, 2, "LSR Length: %d",
- tvb_get_ntohs (tvb, offset+22));
+ proto_tree_add_item(tree, hf_swils_lsrh_lsr_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_text(tree, tvb, offset+2, 2, "LSR Age: %d secs",
+ tvb_get_ntohs(tvb, offset+2));
+ proto_tree_add_text(tree, tvb, offset+4, 4, "Options : 0x%x",
+ tvb_get_ntohl(tvb, offset+4));
+ proto_tree_add_item(tree, hf_swils_lsrh_lsid, tvb, offset+11, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_lsrh_adv_domid, tvb, offset+15, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_lsrh_ls_incid, tvb, offset+16, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_text(tree, tvb, offset+20, 2, "Checksum: 0x%x",
+ tvb_get_ntohs(tvb, offset+20));
+ proto_tree_add_text(tree, tvb, offset+22, 2, "LSR Length: %d",
+ tvb_get_ntohs(tvb, offset+22));
}
static void
-dissect_swils_fspf_ldrec (tvbuff_t *tvb, proto_tree *tree, int offset)
+dissect_swils_fspf_ldrec(tvbuff_t *tvb, proto_tree *tree, int offset)
{
- proto_tree_add_string (tree, hf_swils_ldrec_linkid, tvb, offset, 4,
- tvb_fc_to_str (tvb, offset+1));
- proto_tree_add_item (tree, hf_swils_ldrec_out_pidx, tvb, offset+5, 3, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ldrec_nbr_pidx, tvb, offset+9, 3, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ldrec_link_type, tvb, offset+12, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_ldrec_link_cost, tvb, offset+14, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_string(tree, hf_swils_ldrec_linkid, tvb, offset, 4,
+ tvb_fc_to_str(tvb, offset+1));
+ proto_tree_add_item(tree, hf_swils_ldrec_out_pidx, tvb, offset+5, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ldrec_nbr_pidx, tvb, offset+9, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ldrec_link_type, tvb, offset+12, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_ldrec_link_cost, tvb, offset+14, 2, ENC_BIG_ENDIAN);
}
static void
-dissect_swils_fspf_lsrec (tvbuff_t *tvb, proto_tree *tree, int offset,
- int num_lsrec)
+dissect_swils_fspf_lsrec(tvbuff_t *tvb, proto_tree *tree, int offset,
+ int num_lsrec)
{
- int i, j, num_ldrec;
+ int i, j, num_ldrec;
proto_item *subti1, *subti;
proto_tree *lsrec_tree, *ldrec_tree, *lsrechdr_tree;
if (tree) {
for (j = 0; j < num_lsrec; j++) {
- num_ldrec = tvb_get_ntohs (tvb, offset+26);
- subti = proto_tree_add_text (tree, tvb, offset, (28+num_ldrec*16),
- "Link State Record %d (Domain %d)", j,
- tvb_get_guint8 (tvb, offset+15));
- lsrec_tree = proto_item_add_subtree (subti, ett_fcswils_lsrec);
-
- subti = proto_tree_add_text (lsrec_tree, tvb, offset, 24,
- "Link State Record Header");
- lsrechdr_tree = proto_item_add_subtree (subti,
- ett_fcswils_lsrechdr);
-
- dissect_swils_fspf_lsrechdr (tvb, lsrechdr_tree, offset);
- proto_tree_add_text (tree, tvb, offset+26, 2, "Number of Links: %d",
- num_ldrec);
+ num_ldrec = tvb_get_ntohs(tvb, offset+26);
+ subti = proto_tree_add_text(tree, tvb, offset, (28+num_ldrec*16),
+ "Link State Record %d (Domain %d)", j,
+ tvb_get_guint8(tvb, offset+15));
+ lsrec_tree = proto_item_add_subtree(subti, ett_fcswils_lsrec);
+
+ subti = proto_tree_add_text(lsrec_tree, tvb, offset, 24,
+ "Link State Record Header");
+ lsrechdr_tree = proto_item_add_subtree(subti,
+ ett_fcswils_lsrechdr);
+
+ dissect_swils_fspf_lsrechdr(tvb, lsrechdr_tree, offset);
+ proto_tree_add_text(tree, tvb, offset+26, 2, "Number of Links: %d",
+ num_ldrec);
offset += 28;
for (i = 0; i < num_ldrec; i++) {
- subti1 = proto_tree_add_text (lsrec_tree, tvb, offset, 16,
- "Link Descriptor %d "
- "(Neighbor domain %d)", i,
- tvb_get_guint8 (tvb, offset+3));
- ldrec_tree = proto_item_add_subtree (subti1, ett_fcswils_ldrec);
- dissect_swils_fspf_ldrec (tvb, ldrec_tree, offset);
+ subti1 = proto_tree_add_text(lsrec_tree, tvb, offset, 16,
+ "Link Descriptor %d "
+ "(Neighbor domain %d)", i,
+ tvb_get_guint8(tvb, offset+3));
+ ldrec_tree = proto_item_add_subtree(subti1, ett_fcswils_ldrec);
+ dissect_swils_fspf_ldrec(tvb, ldrec_tree, offset);
offset += 16;
}
}
@@ -1072,123 +1064,123 @@ dissect_swils_fspf_lsrec (tvbuff_t *tvb, proto_tree *tree, int offset,
}
static void
-dissect_swils_hello (tvbuff_t *tvb, proto_tree *hlo_tree, guint8 isreq _U_)
+dissect_swils_hello(tvbuff_t *tvb, proto_tree *hlo_tree, guint8 isreq _U_)
{
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
if (hlo_tree) {
- dissect_swils_fspf_hdr (tvb, hlo_tree, offset);
+ dissect_swils_fspf_hdr(tvb, hlo_tree, offset);
- proto_tree_add_item (hlo_tree, hf_swils_hlo_options, tvb, offset+20, 4, ENC_NA);
- proto_tree_add_item (hlo_tree, hf_swils_hlo_hloint, tvb, offset+24, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item (hlo_tree, hf_swils_hlo_deadint, tvb, offset+28, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item (hlo_tree, hf_swils_hlo_rcv_domid, tvb, offset+35, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (hlo_tree, hf_swils_hlo_orig_pidx, tvb, offset+37, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(hlo_tree, hf_swils_hlo_options, tvb, offset+20, 4, ENC_NA);
+ proto_tree_add_item(hlo_tree, hf_swils_hlo_hloint, tvb, offset+24, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(hlo_tree, hf_swils_hlo_deadint, tvb, offset+28, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(hlo_tree, hf_swils_hlo_rcv_domid, tvb, offset+35, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(hlo_tree, hf_swils_hlo_orig_pidx, tvb, offset+37, 3, ENC_BIG_ENDIAN);
}
}
static void
-dissect_swils_lsupdate (tvbuff_t *tvb, proto_tree *lsu_tree, guint8 isreq _U_)
+dissect_swils_lsupdate(tvbuff_t *tvb, proto_tree *lsu_tree, guint8 isreq _U_)
{
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
int num_lsrec;
if (lsu_tree) {
- dissect_swils_fspf_hdr (tvb, lsu_tree, offset);
+ dissect_swils_fspf_hdr(tvb, lsu_tree, offset);
- proto_tree_add_text (lsu_tree, tvb, offset+23, 1, "Flags : %s",
- val_to_str (tvb_get_guint8 (tvb, offset+23),
- fc_swils_fspf_lsrflags_val, "0x%x"));
- num_lsrec = tvb_get_ntohl (tvb, offset+24);
+ proto_tree_add_text(lsu_tree, tvb, offset+23, 1, "Flags : %s",
+ val_to_str(tvb_get_guint8(tvb, offset+23),
+ fc_swils_fspf_lsrflags_val, "0x%x"));
+ num_lsrec = tvb_get_ntohl(tvb, offset+24);
- proto_tree_add_text (lsu_tree, tvb, offset+24, 4, "Num of LSRs: %d",
- num_lsrec);
+ proto_tree_add_text(lsu_tree, tvb, offset+24, 4, "Num of LSRs: %d",
+ num_lsrec);
offset = 28;
- dissect_swils_fspf_lsrec (tvb, lsu_tree, offset, num_lsrec);
+ dissect_swils_fspf_lsrec(tvb, lsu_tree, offset, num_lsrec);
}
}
static void
-dissect_swils_lsack (tvbuff_t *tvb, proto_tree *lsa_tree, guint8 isreq _U_)
+dissect_swils_lsack(tvbuff_t *tvb, proto_tree *lsa_tree, guint8 isreq _U_)
{
/* Set up structures needed to add the protocol subtree and manage it */
- int offset = 0;
- int num_lsrechdr, i;
+ int offset = 0;
+ int num_lsrechdr, i;
proto_item *subti;
proto_tree *lsrechdr_tree;
if (lsa_tree) {
- dissect_swils_fspf_hdr (tvb, lsa_tree, offset);
+ dissect_swils_fspf_hdr(tvb, lsa_tree, offset);
- proto_tree_add_text (lsa_tree, tvb, offset+23, 1, "Flags : %s",
- val_to_str (tvb_get_guint8 (tvb, offset+23),
- fc_swils_fspf_lsrflags_val, "0x%x"));
- num_lsrechdr = tvb_get_ntohl (tvb, offset+24);
+ proto_tree_add_text(lsa_tree, tvb, offset+23, 1, "Flags : %s",
+ val_to_str(tvb_get_guint8(tvb, offset+23),
+ fc_swils_fspf_lsrflags_val, "0x%x"));
+ num_lsrechdr = tvb_get_ntohl(tvb, offset+24);
- proto_tree_add_text (lsa_tree, tvb, offset+24, 4, "Num of LSR Headers: %d",
- num_lsrechdr);
+ proto_tree_add_text(lsa_tree, tvb, offset+24, 4, "Num of LSR Headers: %d",
+ num_lsrechdr);
offset = 28;
for (i = 0; i < num_lsrechdr; i++) {
- subti = proto_tree_add_text (lsa_tree, tvb, offset, 24,
- "Link State Record Header (Domain %d)",
- tvb_get_guint8 (tvb, offset+15));
- lsrechdr_tree = proto_item_add_subtree (subti,
- ett_fcswils_lsrechdr);
- dissect_swils_fspf_lsrechdr (tvb, lsrechdr_tree, offset);
+ subti = proto_tree_add_text(lsa_tree, tvb, offset, 24,
+ "Link State Record Header (Domain %d)",
+ tvb_get_guint8(tvb, offset+15));
+ lsrechdr_tree = proto_item_add_subtree(subti,
+ ett_fcswils_lsrechdr);
+ dissect_swils_fspf_lsrechdr(tvb, lsrechdr_tree, offset);
offset += 24;
}
}
}
static void
-dissect_swils_rscn (tvbuff_t *tvb, proto_tree *rscn_tree, guint8 isreq)
+dissect_swils_rscn(tvbuff_t *tvb, proto_tree *rscn_tree, guint8 isreq)
{
/* Set up structures needed to add the protocol subtree and manage it */
- int offset = 0;
+ int offset = 0;
proto_tree *dev_tree;
- int numrec, i;
+ int numrec, i;
proto_item *subti;
if (rscn_tree) {
if (!isreq)
return;
- proto_tree_add_item (rscn_tree, hf_swils_rscn_evtype, tvb, offset+4,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (rscn_tree, hf_swils_rscn_addrfmt, tvb, offset+4,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_string (rscn_tree, hf_swils_rscn_affectedport, tvb,
- offset+5, 3, tvb_fc_to_str (tvb, offset+5));
- proto_tree_add_item (rscn_tree, hf_swils_rscn_detectfn, tvb,
- offset+8, 4, ENC_BIG_ENDIAN);
- numrec = tvb_get_ntohl (tvb, offset+12);
-
- if (!tvb_bytes_exist (tvb, offset+16, FC_SWILS_RSCN_DEVENTRY_SIZE*numrec)) {
+ proto_tree_add_item(rscn_tree, hf_swils_rscn_evtype, tvb, offset+4,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(rscn_tree, hf_swils_rscn_addrfmt, tvb, offset+4,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_string(rscn_tree, hf_swils_rscn_affectedport, tvb,
+ offset+5, 3, tvb_fc_to_str(tvb, offset+5));
+ proto_tree_add_item(rscn_tree, hf_swils_rscn_detectfn, tvb,
+ offset+8, 4, ENC_BIG_ENDIAN);
+ numrec = tvb_get_ntohl(tvb, offset+12);
+
+ if (!tvb_bytes_exist(tvb, offset+16, FC_SWILS_RSCN_DEVENTRY_SIZE*numrec)) {
/* Some older devices do not include device entry information. */
return;
}
- proto_tree_add_text (rscn_tree, tvb, offset+12, 4, "Num Entries: %d",
- numrec);
+ proto_tree_add_text(rscn_tree, tvb, offset+12, 4, "Num Entries: %d",
+ numrec);
offset = 16;
for (i = 0; i < numrec; i++) {
- subti = proto_tree_add_text (rscn_tree, tvb, offset, 20,
- "Device Entry %d", i);
- dev_tree = proto_item_add_subtree (subti, ett_fcswils_rscn_dev);
-
- proto_tree_add_item (dev_tree, hf_swils_rscn_portstate, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_string (dev_tree, hf_swils_rscn_portid, tvb, offset+1, 3,
- tvb_fc_to_str (tvb, offset+1));
- proto_tree_add_string (dev_tree, hf_swils_rscn_pwwn, tvb, offset+4, 8,
- tvb_fcwwn_to_str (tvb, offset+4));
- proto_tree_add_string (dev_tree, hf_swils_rscn_nwwn, tvb, offset+12, 8,
- tvb_fcwwn_to_str (tvb, offset+12));
+ subti = proto_tree_add_text(rscn_tree, tvb, offset, 20,
+ "Device Entry %d", i);
+ dev_tree = proto_item_add_subtree(subti, ett_fcswils_rscn_dev);
+
+ proto_tree_add_item(dev_tree, hf_swils_rscn_portstate, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_string(dev_tree, hf_swils_rscn_portid, tvb, offset+1, 3,
+ tvb_fc_to_str(tvb, offset+1));
+ proto_tree_add_string(dev_tree, hf_swils_rscn_pwwn, tvb, offset+4, 8,
+ tvb_fcwwn_to_str(tvb, offset+4));
+ proto_tree_add_string(dev_tree, hf_swils_rscn_nwwn, tvb, offset+12, 8,
+ tvb_fcwwn_to_str(tvb, offset+12));
offset += 20;
}
}
@@ -1209,156 +1201,156 @@ dissect_swils_rscn (tvbuff_t *tvb, proto_tree *rscn_tree, guint8 isreq)
*/
static void
-dissect_swils_zone_mbr (tvbuff_t *tvb, proto_tree *zmbr_tree, int offset)
+dissect_swils_zone_mbr(tvbuff_t *tvb, proto_tree *zmbr_tree, int offset)
{
- guint8 mbrtype;
- int idlen;
- char dpbuf[2+8+1];
- char *str;
-
- mbrtype = tvb_get_guint8 (tvb, offset);
- proto_tree_add_uint (zmbr_tree, hf_swils_zone_mbrtype, tvb,
- offset, 1, mbrtype);
- proto_tree_add_text (zmbr_tree, tvb, offset+2, 1, "Flags: 0x%x",
- tvb_get_guint8 (tvb, offset+2));
- idlen = tvb_get_guint8 (tvb, offset+3);
- proto_tree_add_text (zmbr_tree, tvb, offset+3, 1,
- "Identifier Length: %u", idlen);
+ guint8 mbrtype;
+ int idlen;
+ char dpbuf[2+8+1];
+ char *str;
+
+ mbrtype = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint(zmbr_tree, hf_swils_zone_mbrtype, tvb,
+ offset, 1, mbrtype);
+ proto_tree_add_text(zmbr_tree, tvb, offset+2, 1, "Flags: 0x%x",
+ tvb_get_guint8(tvb, offset+2));
+ idlen = tvb_get_guint8(tvb, offset+3);
+ proto_tree_add_text(zmbr_tree, tvb, offset+3, 1,
+ "Identifier Length: %u", idlen);
switch (mbrtype) {
case FC_SWILS_ZONEMBR_WWN:
- proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
- offset+4, 8,
- tvb_fcwwn_to_str (tvb, offset+4));
+ proto_tree_add_string(zmbr_tree, hf_swils_zone_mbrid, tvb,
+ offset+4, 8,
+ tvb_fcwwn_to_str(tvb, offset+4));
break;
case FC_SWILS_ZONEMBR_DP:
- g_snprintf(dpbuf, sizeof(dpbuf), "0x%08x", tvb_get_ntohl (tvb, offset+4));
- proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
- offset+4, 4, dpbuf);
+ g_snprintf(dpbuf, sizeof(dpbuf), "0x%08x", tvb_get_ntohl(tvb, offset+4));
+ proto_tree_add_string(zmbr_tree, hf_swils_zone_mbrid, tvb,
+ offset+4, 4, dpbuf);
break;
case FC_SWILS_ZONEMBR_FCID:
- proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
- offset+4, 4,
- tvb_fc_to_str (tvb, offset+5));
+ proto_tree_add_string(zmbr_tree, hf_swils_zone_mbrid, tvb,
+ offset+4, 4,
+ tvb_fc_to_str(tvb, offset+5));
break;
case FC_SWILS_ZONEMBR_ALIAS:
- str = zonenm_to_str (tvb, offset+4);
- proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
- offset+4, idlen, str);
+ str = zonenm_to_str(tvb, offset+4);
+ proto_tree_add_string(zmbr_tree, hf_swils_zone_mbrid, tvb,
+ offset+4, idlen, str);
break;
case FC_SWILS_ZONEMBR_WWN_LUN:
- proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
- offset+4, 8,
- tvb_fcwwn_to_str (tvb, offset+4));
- proto_tree_add_item (zmbr_tree, hf_swils_zone_mbrid_lun, tvb,
- offset+12, 8, ENC_NA);
+ proto_tree_add_string(zmbr_tree, hf_swils_zone_mbrid, tvb,
+ offset+4, 8,
+ tvb_fcwwn_to_str(tvb, offset+4));
+ proto_tree_add_item(zmbr_tree, hf_swils_zone_mbrid_lun, tvb,
+ offset+12, 8, ENC_NA);
break;
case FC_SWILS_ZONEMBR_DP_LUN:
- g_snprintf(dpbuf, sizeof(dpbuf), "0x%08x", tvb_get_ntohl (tvb, offset+4));
- proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
- offset+4, 4, dpbuf);
- proto_tree_add_item (zmbr_tree, hf_swils_zone_mbrid_lun, tvb,
- offset+8, 8, ENC_NA);
+ g_snprintf(dpbuf, sizeof(dpbuf), "0x%08x", tvb_get_ntohl(tvb, offset+4));
+ proto_tree_add_string(zmbr_tree, hf_swils_zone_mbrid, tvb,
+ offset+4, 4, dpbuf);
+ proto_tree_add_item(zmbr_tree, hf_swils_zone_mbrid_lun, tvb,
+ offset+8, 8, ENC_NA);
break;
case FC_SWILS_ZONEMBR_FCID_LUN:
- proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
- offset+4, 4,
- tvb_fc_to_str (tvb, offset+5));
- proto_tree_add_item (zmbr_tree, hf_swils_zone_mbrid_lun, tvb,
- offset+8, 8, ENC_NA);
+ proto_tree_add_string(zmbr_tree, hf_swils_zone_mbrid, tvb,
+ offset+4, 4,
+ tvb_fc_to_str(tvb, offset+5));
+ proto_tree_add_item(zmbr_tree, hf_swils_zone_mbrid_lun, tvb,
+ offset+8, 8, ENC_NA);
break;
default:
- proto_tree_add_string (zmbr_tree, hf_swils_zone_mbrid, tvb,
- offset+4, idlen,
- "Unknown member type format");
+ proto_tree_add_string(zmbr_tree, hf_swils_zone_mbrid, tvb,
+ offset+4, idlen,
+ "Unknown member type format");
}
}
static void
-dissect_swils_zone_obj (tvbuff_t *tvb, proto_tree *zobj_tree, int offset)
+dissect_swils_zone_obj(tvbuff_t *tvb, proto_tree *zobj_tree, int offset)
{
proto_tree *zmbr_tree;
- int mbrlen, numrec, i, objtype;
- char *str;
+ int mbrlen, numrec, i, objtype;
+ char *str;
proto_item *subti;
- objtype = tvb_get_guint8 (tvb, offset);
+ objtype = tvb_get_guint8(tvb, offset);
- proto_tree_add_item (zobj_tree, hf_swils_zone_objtype, tvb, offset,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (zobj_tree, hf_swils_zone_protocol, tvb,
- offset+1, 1, ENC_BIG_ENDIAN);
- str = zonenm_to_str (tvb, offset+4);
- proto_tree_add_string (zobj_tree, hf_swils_zone_objname, tvb,
- offset+4, ZONENAME_LEN (tvb, offset+4), str);
+ proto_tree_add_item(zobj_tree, hf_swils_zone_objtype, tvb, offset,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(zobj_tree, hf_swils_zone_protocol, tvb,
+ offset+1, 1, ENC_BIG_ENDIAN);
+ str = zonenm_to_str(tvb, offset+4);
+ proto_tree_add_string(zobj_tree, hf_swils_zone_objname, tvb,
+ offset+4, ZONENAME_LEN(tvb, offset+4), str);
- numrec = tvb_get_ntohl (tvb, offset+4+ZONENAME_LEN (tvb, offset+4));
- proto_tree_add_text (zobj_tree, tvb,
- offset+4+ZONENAME_LEN (tvb, offset+4), 4,
- "Number of Zone Members: %d", numrec);
+ numrec = tvb_get_ntohl(tvb, offset+4+ZONENAME_LEN(tvb, offset+4));
+ proto_tree_add_text(zobj_tree, tvb,
+ offset+4+ZONENAME_LEN(tvb, offset+4), 4,
+ "Number of Zone Members: %d", numrec);
- offset += 8 + ZONENAME_LEN (tvb, offset+4);
+ offset += 8 + ZONENAME_LEN(tvb, offset+4);
for (i = 0; i < numrec; i++) {
if (objtype == FC_SWILS_ZONEOBJ_ZONESET) {
- dissect_swils_zone_obj (tvb, zobj_tree, offset);
- offset += get_zoneobj_len (tvb, offset);
+ dissect_swils_zone_obj(tvb, zobj_tree, offset);
+ offset += get_zoneobj_len(tvb, offset);
}
else {
- mbrlen = 4 + tvb_get_guint8 (tvb, offset+3);
- subti = proto_tree_add_text (zobj_tree, tvb, offset, mbrlen,
- "Zone Member %d", i);
- zmbr_tree = proto_item_add_subtree (subti,
- ett_fcswils_zonembr);
- dissect_swils_zone_mbr (tvb, zmbr_tree, offset);
+ mbrlen = 4 + tvb_get_guint8(tvb, offset+3);
+ subti = proto_tree_add_text(zobj_tree, tvb, offset, mbrlen,
+ "Zone Member %d", i);
+ zmbr_tree = proto_item_add_subtree(subti,
+ ett_fcswils_zonembr);
+ dissect_swils_zone_mbr(tvb, zmbr_tree, offset);
offset += mbrlen;
}
}
}
static void
-dissect_swils_mergereq (tvbuff_t *tvb, proto_tree *mr_tree, guint8 isreq)
+dissect_swils_mergereq(tvbuff_t *tvb, proto_tree *mr_tree, guint8 isreq)
{
/* Set up structures needed to add the protocol subtree and manage it */
- int offset = 0;
+ int offset = 0;
proto_tree *zobjlist_tree, *zobj_tree;
- int numrec, i, zonesetlen, objlistlen, objlen;
- char *str;
+ int numrec, i, zonesetlen, objlistlen, objlen;
+ char *str;
proto_item *subti;
if (mr_tree) {
if (isreq) {
/* zonesetlen is the size of the zoneset including the zone name */
- zonesetlen = tvb_get_ntohs (tvb, offset+2);
- proto_tree_add_text (mr_tree, tvb, offset+2, 2,
- "Active ZoneSet Length: %u", zonesetlen);
+ zonesetlen = tvb_get_ntohs(tvb, offset+2);
+ proto_tree_add_text(mr_tree, tvb, offset+2, 2,
+ "Active ZoneSet Length: %u", zonesetlen);
if (zonesetlen) {
- str = zonenm_to_str (tvb, offset+4);
- proto_tree_add_string (mr_tree, hf_swils_zone_activezonenm, tvb,
- offset+4, ZONENAME_LEN (tvb, offset+4),
- str);
+ str = zonenm_to_str(tvb, offset+4);
+ proto_tree_add_string(mr_tree, hf_swils_zone_activezonenm, tvb,
+ offset+4, ZONENAME_LEN(tvb, offset+4),
+ str);
/* objlistlen gives the size of the active zoneset object list */
- objlistlen = zonesetlen - ZONENAME_LEN (tvb, offset+4);
+ objlistlen = zonesetlen - ZONENAME_LEN(tvb, offset+4);
/* Offset = start of the active zoneset zoning object list */
- offset = offset + (4 + ZONENAME_LEN (tvb, offset+4));
- numrec = tvb_get_ntohl (tvb, offset);
+ offset = offset + (4 + ZONENAME_LEN(tvb, offset+4));
+ numrec = tvb_get_ntohl(tvb, offset);
- subti = proto_tree_add_text (mr_tree, tvb, offset, objlistlen,
- "Active Zone Set");
- zobjlist_tree = proto_item_add_subtree (subti,
- ett_fcswils_zoneobjlist);
+ subti = proto_tree_add_text(mr_tree, tvb, offset, objlistlen,
+ "Active Zone Set");
+ zobjlist_tree = proto_item_add_subtree(subti,
+ ett_fcswils_zoneobjlist);
- proto_tree_add_text (zobjlist_tree, tvb, offset, 4,
- "Number of zoning objects: %d", numrec);
+ proto_tree_add_text(zobjlist_tree, tvb, offset, 4,
+ "Number of zoning objects: %d", numrec);
offset += 4;
for (i = 0; i < numrec; i++) {
- objlen = get_zoneobj_len (tvb, offset);
- subti = proto_tree_add_text (zobjlist_tree, tvb, offset+4,
- objlen, "Zone Object %d", i);
- zobj_tree = proto_item_add_subtree (subti, ett_fcswils_zoneobj);
- dissect_swils_zone_obj (tvb, zobj_tree, offset);
+ objlen = get_zoneobj_len(tvb, offset);
+ subti = proto_tree_add_text(zobjlist_tree, tvb, offset+4,
+ objlen, "Zone Object %d", i);
+ zobj_tree = proto_item_add_subtree(subti, ett_fcswils_zoneobj);
+ dissect_swils_zone_obj(tvb, zobj_tree, offset);
offset += objlen;
}
}
@@ -1366,48 +1358,48 @@ dissect_swils_mergereq (tvbuff_t *tvb, proto_tree *mr_tree, guint8 isreq)
offset += 4;
}
- zonesetlen = tvb_get_ntohl (tvb, offset);
- proto_tree_add_text (mr_tree, tvb, offset, 4,
- "Full Zone Set Length: %d", zonesetlen);
+ zonesetlen = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_text(mr_tree, tvb, offset, 4,
+ "Full Zone Set Length: %d", zonesetlen);
if (zonesetlen) {
objlistlen = zonesetlen;
/* Offset = start of the active zoneset zoning object list */
offset += 4;
- numrec = tvb_get_ntohl (tvb, offset);
+ numrec = tvb_get_ntohl(tvb, offset);
- subti = proto_tree_add_text (mr_tree, tvb, offset, objlistlen,
- "Full Zone Set");
+ subti = proto_tree_add_text(mr_tree, tvb, offset, objlistlen,
+ "Full Zone Set");
- zobjlist_tree = proto_item_add_subtree (subti,
- ett_fcswils_zoneobjlist);
- proto_tree_add_text (zobjlist_tree, tvb, offset, 4,
- "Number of zoning objects: %d", numrec);
+ zobjlist_tree = proto_item_add_subtree(subti,
+ ett_fcswils_zoneobjlist);
+ proto_tree_add_text(zobjlist_tree, tvb, offset, 4,
+ "Number of zoning objects: %d", numrec);
offset += 4;
for (i = 0; i < numrec; i++) {
- objlen = get_zoneobj_len (tvb, offset);
- subti = proto_tree_add_text (zobjlist_tree, tvb, offset,
- objlen, "Zone Object %d", i);
- zobj_tree = proto_item_add_subtree (subti, ett_fcswils_zoneobj);
- dissect_swils_zone_obj (tvb, zobj_tree, offset);
+ objlen = get_zoneobj_len(tvb, offset);
+ subti = proto_tree_add_text(zobjlist_tree, tvb, offset,
+ objlen, "Zone Object %d", i);
+ zobj_tree = proto_item_add_subtree(subti, ett_fcswils_zoneobj);
+ dissect_swils_zone_obj(tvb, zobj_tree, offset);
offset += objlen;
}
}
}
else {
- proto_tree_add_item (mr_tree, hf_swils_zone_status, tvb,
- offset+5, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (mr_tree, hf_swils_zone_reason, tvb,
- offset+6, 1, ENC_BIG_ENDIAN);
- proto_tree_add_text (mr_tree, tvb, offset+7, 1,
- "Vendor Unique: 0x%x",
- tvb_get_guint8 (tvb, offset+7));
+ proto_tree_add_item(mr_tree, hf_swils_zone_status, tvb,
+ offset+5, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mr_tree, hf_swils_zone_reason, tvb,
+ offset+6, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_text(mr_tree, tvb, offset+7, 1,
+ "Vendor Unique: 0x%x",
+ tvb_get_guint8(tvb, offset+7));
}
}
}
static void
-dissect_swils_aca (tvbuff_t *tvb, proto_tree *aca_tree, guint8 isreq)
+dissect_swils_aca(tvbuff_t *tvb, proto_tree *aca_tree, guint8 isreq)
{
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
@@ -1415,97 +1407,97 @@ dissect_swils_aca (tvbuff_t *tvb, proto_tree *aca_tree, guint8 isreq)
if (aca_tree) {
if (isreq) {
- plen = tvb_get_ntohs (tvb, offset+2);
- proto_tree_add_text (aca_tree, tvb, offset+2, 2,
- "Domain ID List Length: %d", plen);
+ plen = tvb_get_ntohs(tvb, offset+2);
+ proto_tree_add_text(aca_tree, tvb, offset+2, 2,
+ "Domain ID List Length: %d", plen);
numrec = plen/4;
offset = 4;
for (i = 0; i < numrec; i++) {
- proto_tree_add_uint_format (aca_tree, hf_swils_aca_domainid,
- tvb, offset+3, 1,
- tvb_get_guint8 (tvb, offset+3),
- "Domain ID %d: %d", i,
- tvb_get_guint8 (tvb, offset+3));
+ proto_tree_add_uint_format(aca_tree, hf_swils_aca_domainid,
+ tvb, offset+3, 1,
+ tvb_get_guint8(tvb, offset+3),
+ "Domain ID %d: %d", i,
+ tvb_get_guint8(tvb, offset+3));
offset += 4;
}
}
else {
- proto_tree_add_item (aca_tree, hf_swils_zone_status, tvb,
- offset+5, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (aca_tree, hf_swils_zone_reason, tvb,
- offset+6, 1, ENC_BIG_ENDIAN);
- proto_tree_add_text (aca_tree, tvb, offset+7, 1,
- "Vendor Unique: 0x%x",
- tvb_get_guint8 (tvb, offset+7));
+ proto_tree_add_item(aca_tree, hf_swils_zone_status, tvb,
+ offset+5, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(aca_tree, hf_swils_zone_reason, tvb,
+ offset+6, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_text(aca_tree, tvb, offset+7, 1,
+ "Vendor Unique: 0x%x",
+ tvb_get_guint8(tvb, offset+7));
}
}
}
static void
-dissect_swils_rca (tvbuff_t *tvb, proto_tree *rca_tree, guint8 isreq)
+dissect_swils_rca(tvbuff_t *tvb, proto_tree *rca_tree, guint8 isreq)
{
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
if (rca_tree) {
if (!isreq) {
- proto_tree_add_item (rca_tree, hf_swils_zone_status, tvb,
- offset+5, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (rca_tree, hf_swils_zone_reason, tvb,
- offset+6, 1, ENC_BIG_ENDIAN);
- proto_tree_add_text (rca_tree, tvb, offset+7, 1,
- "Vendor Unique: 0x%x",
- tvb_get_guint8 (tvb, offset+7));
+ proto_tree_add_item(rca_tree, hf_swils_zone_status, tvb,
+ offset+5, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(rca_tree, hf_swils_zone_reason, tvb,
+ offset+6, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_text(rca_tree, tvb, offset+7, 1,
+ "Vendor Unique: 0x%x",
+ tvb_get_guint8(tvb, offset+7));
}
}
}
static void
-dissect_swils_sfc (tvbuff_t *tvb, proto_tree *sfc_tree, guint8 isreq)
+dissect_swils_sfc(tvbuff_t *tvb, proto_tree *sfc_tree, guint8 isreq)
{
/* Set up structures needed to add the protocol subtree and manage it */
- int offset = 0;
+ int offset = 0;
proto_tree *zobjlist_tree, *zobj_tree;
- int numrec, i, zonesetlen, objlistlen, objlen;
- char *str;
+ int numrec, i, zonesetlen, objlistlen, objlen;
+ char *str;
proto_item *subti;
if (sfc_tree) {
if (isreq) {
- proto_tree_add_item (sfc_tree, hf_swils_sfc_opcode, tvb, offset+1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sfc_tree, hf_swils_sfc_opcode, tvb, offset+1, 1, ENC_BIG_ENDIAN);
- zonesetlen = tvb_get_ntohs (tvb, offset+2);
- proto_tree_add_text (sfc_tree, tvb, offset+2, 2,
- "ZoneSet Length: %d", zonesetlen);
+ zonesetlen = tvb_get_ntohs(tvb, offset+2);
+ proto_tree_add_text(sfc_tree, tvb, offset+2, 2,
+ "ZoneSet Length: %d", zonesetlen);
if (zonesetlen) {
- str = zonenm_to_str (tvb, offset+4);
- proto_tree_add_string (sfc_tree, hf_swils_sfc_zonenm, tvb,
- offset+4, ZONENAME_LEN (tvb, offset+4),
- str);
+ str = zonenm_to_str(tvb, offset+4);
+ proto_tree_add_string(sfc_tree, hf_swils_sfc_zonenm, tvb,
+ offset+4, ZONENAME_LEN(tvb, offset+4),
+ str);
/* objlistlen gives the size of the active zoneset object list */
- objlistlen = zonesetlen - ZONENAME_LEN (tvb, offset+4);
+ objlistlen = zonesetlen - ZONENAME_LEN(tvb, offset+4);
/* Offset = start of the active zoneset zoning object list */
- offset = offset + (4 + ZONENAME_LEN (tvb, offset+4));
- numrec = tvb_get_ntohl (tvb, offset);
+ offset = offset + (4 + ZONENAME_LEN(tvb, offset+4));
+ numrec = tvb_get_ntohl(tvb, offset);
- subti = proto_tree_add_text (sfc_tree, tvb, offset, objlistlen,
- "Zone Set");
- zobjlist_tree = proto_item_add_subtree (subti,
- ett_fcswils_zoneobjlist);
+ subti = proto_tree_add_text(sfc_tree, tvb, offset, objlistlen,
+ "Zone Set");
+ zobjlist_tree = proto_item_add_subtree(subti,
+ ett_fcswils_zoneobjlist);
- proto_tree_add_text (zobjlist_tree, tvb, offset, 4,
- "Number of zoning objects: %d", numrec);
+ proto_tree_add_text(zobjlist_tree, tvb, offset, 4,
+ "Number of zoning objects: %d", numrec);
offset += 4;
for (i = 0; i < numrec; i++) {
- objlen = get_zoneobj_len (tvb, offset);
- subti = proto_tree_add_text (zobjlist_tree, tvb, offset,
- objlen, "Zone Object %d", i);
- zobj_tree = proto_item_add_subtree (subti, ett_fcswils_zoneobj);
- dissect_swils_zone_obj (tvb, zobj_tree, offset);
+ objlen = get_zoneobj_len(tvb, offset);
+ subti = proto_tree_add_text(zobjlist_tree, tvb, offset,
+ objlen, "Zone Object %d", i);
+ zobj_tree = proto_item_add_subtree(subti, ett_fcswils_zoneobj);
+ dissect_swils_zone_obj(tvb, zobj_tree, offset);
offset += objlen;
}
}
@@ -1513,167 +1505,167 @@ dissect_swils_sfc (tvbuff_t *tvb, proto_tree *sfc_tree, guint8 isreq)
offset += 4;
}
- zonesetlen = tvb_get_ntohl (tvb, offset);
- proto_tree_add_text (sfc_tree, tvb, offset, 4,
- "Full Zone Set Length: %d", zonesetlen);
+ zonesetlen = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_text(sfc_tree, tvb, offset, 4,
+ "Full Zone Set Length: %d", zonesetlen);
if (zonesetlen) {
objlistlen = zonesetlen;
/* Offset = start of the active zoneset zoning object list */
offset += 4;
- numrec = tvb_get_ntohl (tvb, offset);
+ numrec = tvb_get_ntohl(tvb, offset);
- subti = proto_tree_add_text (sfc_tree, tvb, offset, objlistlen,
- "Full Zone Set");
+ subti = proto_tree_add_text(sfc_tree, tvb, offset, objlistlen,
+ "Full Zone Set");
- zobjlist_tree = proto_item_add_subtree (subti,
- ett_fcswils_zoneobjlist);
- proto_tree_add_text (zobjlist_tree, tvb, offset, 4,
- "Number of zoning objects: %d", numrec);
+ zobjlist_tree = proto_item_add_subtree(subti,
+ ett_fcswils_zoneobjlist);
+ proto_tree_add_text(zobjlist_tree, tvb, offset, 4,
+ "Number of zoning objects: %d", numrec);
offset += 4;
for (i = 0; i < numrec; i++) {
- objlen = get_zoneobj_len (tvb, offset);
- subti = proto_tree_add_text (zobjlist_tree, tvb, offset,
- objlen, "Zone Object %d", i);
- zobj_tree = proto_item_add_subtree (subti, ett_fcswils_zoneobj);
- dissect_swils_zone_obj (tvb, zobj_tree, offset);
+ objlen = get_zoneobj_len(tvb, offset);
+ subti = proto_tree_add_text(zobjlist_tree, tvb, offset,
+ objlen, "Zone Object %d", i);
+ zobj_tree = proto_item_add_subtree(subti, ett_fcswils_zoneobj);
+ dissect_swils_zone_obj(tvb, zobj_tree, offset);
offset += objlen;
}
}
}
else {
- proto_tree_add_item (sfc_tree, hf_swils_zone_status, tvb,
- offset+5, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (sfc_tree, hf_swils_zone_reason, tvb,
- offset+6, 1, ENC_BIG_ENDIAN);
- proto_tree_add_text (sfc_tree, tvb, offset+7, 1,
- "Vendor Unique: 0x%x",
- tvb_get_guint8 (tvb, offset+7));
+ proto_tree_add_item(sfc_tree, hf_swils_zone_status, tvb,
+ offset+5, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sfc_tree, hf_swils_zone_reason, tvb,
+ offset+6, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_text(sfc_tree, tvb, offset+7, 1,
+ "Vendor Unique: 0x%x",
+ tvb_get_guint8(tvb, offset+7));
}
}
}
static void
-dissect_swils_ufc (tvbuff_t *tvb, proto_tree *ufc_tree, guint8 isreq)
+dissect_swils_ufc(tvbuff_t *tvb, proto_tree *ufc_tree, guint8 isreq)
{
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
if (ufc_tree) {
if (!isreq) {
- proto_tree_add_item (ufc_tree, hf_swils_zone_status, tvb,
- offset+5, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (ufc_tree, hf_swils_zone_reason, tvb,
- offset+6, 1, ENC_BIG_ENDIAN);
- proto_tree_add_text (ufc_tree, tvb, offset+7, 1,
- "Vendor Unique: 0x%x",
- tvb_get_guint8 (tvb, offset+7));
+ proto_tree_add_item(ufc_tree, hf_swils_zone_status, tvb,
+ offset+5, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ufc_tree, hf_swils_zone_reason, tvb,
+ offset+6, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_text(ufc_tree, tvb, offset+7, 1,
+ "Vendor Unique: 0x%x",
+ tvb_get_guint8(tvb, offset+7));
}
}
}
static void
-dissect_swils_esc (tvbuff_t *tvb, proto_tree *esc_tree, guint8 isreq)
+dissect_swils_esc(tvbuff_t *tvb, proto_tree *esc_tree, guint8 isreq)
{
/* Set up structures needed to add the protocol subtree and manage it */
- int offset = 0;
- int i, numrec, plen;
+ int offset = 0;
+ int i, numrec, plen;
proto_tree *pdesc_tree;
proto_item *subti;
if (esc_tree) {
if (isreq) {
- plen = tvb_get_ntohs (tvb, offset+2);
- proto_tree_add_text (esc_tree, tvb, offset+2, 2,
- "Payload Length: %d", plen);
- proto_tree_add_item (esc_tree, hf_swils_esc_swvendorid, tvb,
- offset+4, 8, ENC_ASCII|ENC_NA);
+ plen = tvb_get_ntohs(tvb, offset+2);
+ proto_tree_add_text(esc_tree, tvb, offset+2, 2,
+ "Payload Length: %d", plen);
+ proto_tree_add_item(esc_tree, hf_swils_esc_swvendorid, tvb,
+ offset+4, 8, ENC_ASCII|ENC_NA);
numrec = (plen - 12)/12;
offset = 12;
for (i = 0; i < numrec; i++) {
- subti = proto_tree_add_text (esc_tree, tvb, offset, 12,
- "Protocol Descriptor %d", i);
- pdesc_tree = proto_item_add_subtree (subti,
- ett_fcswils_esc_pdesc);
- proto_tree_add_item (pdesc_tree, hf_swils_esc_pdesc_vendorid, tvb,
- offset, 8, ENC_ASCII|ENC_NA);
- proto_tree_add_item (pdesc_tree, hf_swils_esc_protocolid,
- tvb, offset+10, 2, ENC_BIG_ENDIAN);
+ subti = proto_tree_add_text(esc_tree, tvb, offset, 12,
+ "Protocol Descriptor %d", i);
+ pdesc_tree = proto_item_add_subtree(subti,
+ ett_fcswils_esc_pdesc);
+ proto_tree_add_item(pdesc_tree, hf_swils_esc_pdesc_vendorid, tvb,
+ offset, 8, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(pdesc_tree, hf_swils_esc_protocolid,
+ tvb, offset+10, 2, ENC_BIG_ENDIAN);
offset += 12;
}
}
else {
- proto_tree_add_item (esc_tree, hf_swils_esc_swvendorid, tvb,
- offset+4, 8, ENC_ASCII|ENC_NA);
- subti = proto_tree_add_text (esc_tree, tvb, offset+12, 12,
- "Accepted Protocol Descriptor");
- pdesc_tree = proto_item_add_subtree (subti, ett_fcswils_esc_pdesc);
-
- proto_tree_add_item (pdesc_tree, hf_swils_esc_pdesc_vendorid, tvb,
- offset+12, 8, ENC_ASCII|ENC_NA);
- proto_tree_add_item (pdesc_tree, hf_swils_esc_protocolid,
- tvb, offset+22, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(esc_tree, hf_swils_esc_swvendorid, tvb,
+ offset+4, 8, ENC_ASCII|ENC_NA);
+ subti = proto_tree_add_text(esc_tree, tvb, offset+12, 12,
+ "Accepted Protocol Descriptor");
+ pdesc_tree = proto_item_add_subtree(subti, ett_fcswils_esc_pdesc);
+
+ proto_tree_add_item(pdesc_tree, hf_swils_esc_pdesc_vendorid, tvb,
+ offset+12, 8, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(pdesc_tree, hf_swils_esc_protocolid,
+ tvb, offset+22, 2, ENC_BIG_ENDIAN);
}
}
}
static void
-dissect_swils_drlir (tvbuff_t *tvb _U_, proto_tree *drlir_tree _U_,
- guint8 isreq _U_)
+dissect_swils_drlir(tvbuff_t *tvb _U_, proto_tree *drlir_tree _U_,
+ guint8 isreq _U_)
{
/* Set up structures needed to add the protocol subtree and manage it */
return;
}
static void
-dissect_swils_swrjt (tvbuff_t *tvb, proto_tree *swrjt_tree, guint8 isreq _U_)
+dissect_swils_swrjt(tvbuff_t *tvb, proto_tree *swrjt_tree, guint8 isreq _U_)
{
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
if (swrjt_tree) {
- proto_tree_add_item (swrjt_tree, hf_swils_rjt, tvb, offset+5, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (swrjt_tree, hf_swils_rjtdet, tvb, offset+6, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (swrjt_tree, hf_swils_rjtvendor, tvb, offset+7,
- 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(swrjt_tree, hf_swils_rjt, tvb, offset+5, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(swrjt_tree, hf_swils_rjtdet, tvb, offset+6, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(swrjt_tree, hf_swils_rjtvendor, tvb, offset+7,
+ 1, ENC_BIG_ENDIAN);
}
}
static void
-dissect_swils_ess (tvbuff_t *tvb, proto_tree *ess_tree, guint8 isreq _U_)
+dissect_swils_ess(tvbuff_t *tvb, proto_tree *ess_tree, guint8 isreq _U_)
{
- int offset = 0;
- gint16 numcapobj = 0;
- gint len = 0;
- gint capobjlen = 0;
- proto_item *ti = NULL;
+ int offset = 0;
+ gint16 numcapobj = 0;
+ gint len = 0;
+ gint capobjlen = 0;
+ proto_item *ti = NULL;
proto_tree *ieinfo_tree = NULL;
if (!ess_tree) {
return;
}
- proto_tree_add_item (ess_tree, hf_swils_ess_rev, tvb, offset+4, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item (ess_tree, hf_swils_ess_len, tvb, offset+8, 4, ENC_BIG_ENDIAN);
- len = tvb_get_ntohl (tvb, offset+8);
+ proto_tree_add_item(ess_tree, hf_swils_ess_rev, tvb, offset+4, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ess_tree, hf_swils_ess_len, tvb, offset+8, 4, ENC_BIG_ENDIAN);
+ len = tvb_get_ntohl(tvb, offset+8);
- ti = proto_tree_add_text (ess_tree, tvb, offset+12,
- MAX_INTERCONNECT_ELEMENT_INFO_LEN+4,
- "Interconnect Element Info");
- ieinfo_tree = proto_item_add_subtree (ti, ett_fcswils_ieinfo);
- dissect_swils_interconnect_element_info (tvb, ieinfo_tree, offset+12);
+ ti = proto_tree_add_text(ess_tree, tvb, offset+12,
+ MAX_INTERCONNECT_ELEMENT_INFO_LEN+4,
+ "Interconnect Element Info");
+ ieinfo_tree = proto_item_add_subtree(ti, ett_fcswils_ieinfo);
+ dissect_swils_interconnect_element_info(tvb, ieinfo_tree, offset+12);
len -= 256; /* the interconnect obj above is 256 bytes */
offset += 268;
- proto_tree_add_item (ess_tree, hf_swils_ess_numobj, tvb, offset, 2, ENC_BIG_ENDIAN);
- numcapobj = tvb_get_ntohs (tvb, offset);
+ proto_tree_add_item(ess_tree, hf_swils_ess_numobj, tvb, offset, 2, ENC_BIG_ENDIAN);
+ numcapobj = tvb_get_ntohs(tvb, offset);
len -= 4; /* 2B numcapobj + 2B rsvd */
offset += 4;
while ((len > 0) && (numcapobj > 0)) {
- capobjlen = dissect_swils_ess_capability_obj (tvb, ess_tree, offset);
+ capobjlen = dissect_swils_ess_capability_obj(tvb, ess_tree, offset);
numcapobj--;
len -= capobjlen;
offset += capobjlen;
@@ -1681,7 +1673,7 @@ dissect_swils_ess (tvbuff_t *tvb, proto_tree *ess_tree, guint8 isreq _U_)
}
static void
-dissect_swils_mrra (tvbuff_t *tvb, proto_tree *tree, guint8 isreq)
+dissect_swils_mrra(tvbuff_t *tvb, proto_tree *tree, guint8 isreq)
{
int offset = 0;
@@ -1691,20 +1683,20 @@ dissect_swils_mrra (tvbuff_t *tvb, proto_tree *tree, guint8 isreq)
}
if (isreq) {
- proto_tree_add_item (tree, hf_swils_mrra_rev, tvb, offset+4, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_mrra_size, tvb, offset+8, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_mrra_vendorid, tvb, offset+12, 8, ENC_ASCII|ENC_NA);
- proto_tree_add_item (tree, hf_swils_mrra_vendorinfo, tvb, offset+20,
- 8, ENC_NA);
+ proto_tree_add_item(tree, hf_swils_mrra_rev, tvb, offset+4, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_mrra_size, tvb, offset+8, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_mrra_vendorid, tvb, offset+12, 8, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_swils_mrra_vendorinfo, tvb, offset+20,
+ 8, ENC_NA);
} else {
- proto_tree_add_item (tree, hf_swils_mrra_vendorid, tvb, offset+4,
- 8, ENC_ASCII|ENC_NA);
- proto_tree_add_item (tree, hf_swils_mrra_reply, tvb, offset+12,
- 4, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_mrra_reply_size, tvb, offset+16,
- 4, ENC_BIG_ENDIAN);
- proto_tree_add_item (tree, hf_swils_mrra_waittime, tvb, offset+20,
- 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_mrra_vendorid, tvb, offset+4,
+ 8, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_swils_mrra_reply, tvb, offset+12,
+ 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_mrra_reply_size, tvb, offset+16,
+ 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_swils_mrra_waittime, tvb, offset+20,
+ 4, ENC_BIG_ENDIAN);
}
@@ -1768,46 +1760,46 @@ static fcswils_func_table_t fcswils_func_table[FC_SWILS_MAXCODE] = {
/* Code to actually dissect the packets */
static void
-dissect_fcswils (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+dissect_fcswils(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_item *ti = NULL;
- guint8 opcode,
- failed_opcode = 0;
- int offset = 0;
- conversation_t *conversation;
+ proto_item *ti = NULL;
+ guint8 opcode;
+ guint8 failed_opcode = 0;
+ int offset = 0;
+ conversation_t *conversation;
fcswils_conv_data_t *cdata;
- fcswils_conv_key_t ckey, *req_key;
- proto_tree *swils_tree = NULL;
- guint8 isreq = FC_SWILS_REQ;
- tvbuff_t *next_tvb;
+ fcswils_conv_key_t ckey, *req_key;
+ proto_tree *swils_tree = NULL;
+ guint8 isreq = FC_SWILS_REQ;
+ tvbuff_t *next_tvb;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SW_ILS");
/* decoding of this is done by each individual opcode handler */
- opcode = tvb_get_guint8 (tvb, 0);
+ opcode = tvb_get_guint8(tvb, 0);
if (tree) {
- ti = proto_tree_add_protocol_format (tree, proto_fcswils, tvb, 0,
- tvb_length (tvb), "SW_ILS");
- swils_tree = proto_item_add_subtree (ti, ett_fcswils);
+ ti = proto_tree_add_protocol_format(tree, proto_fcswils, tvb, 0,
+ tvb_length(tvb), "SW_ILS");
+ swils_tree = proto_item_add_subtree(ti, ett_fcswils);
}
/* Register conversation if this is not a response */
if ((opcode != FC_SWILS_SWACC) && (opcode != FC_SWILS_SWRJT)) {
- conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->oxid,
- pinfo->rxid, NO_PORT2);
+ conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
+ pinfo->ptype, pinfo->oxid,
+ pinfo->rxid, NO_PORT2);
if (!conversation) {
- conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->oxid,
- pinfo->rxid, NO_PORT2);
+ conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
+ pinfo->ptype, pinfo->oxid,
+ pinfo->rxid, NO_PORT2);
}
ckey.conv_idx = conversation->index;
- cdata = (fcswils_conv_data_t *)g_hash_table_lookup (fcswils_req_hash,
- &ckey);
+ cdata = (fcswils_conv_data_t *)g_hash_table_lookup(fcswils_req_hash,
+ &ckey);
if (cdata) {
/* Since we never free the memory used by an exchange, this maybe a
* case of another request using the same exchange as a previous
@@ -1816,33 +1808,33 @@ dissect_fcswils (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cdata->opcode = opcode;
}
else {
- req_key = se_alloc (sizeof(fcswils_conv_key_t));
+ req_key = se_alloc(sizeof(fcswils_conv_key_t));
req_key->conv_idx = conversation->index;
- cdata = se_alloc (sizeof(fcswils_conv_data_t));
+ cdata = se_alloc(sizeof(fcswils_conv_data_t));
cdata->opcode = opcode;
- g_hash_table_insert (fcswils_req_hash, req_key, cdata);
+ g_hash_table_insert(fcswils_req_hash, req_key, cdata);
}
}
else {
/* Opcode is ACC or RJT */
- conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->oxid,
- pinfo->rxid, NO_PORT2);
+ conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
+ pinfo->ptype, pinfo->oxid,
+ pinfo->rxid, NO_PORT2);
isreq = FC_SWILS_RPLY;
if (!conversation) {
if (tree && (opcode == FC_SWILS_SWACC)) {
/* No record of what this accept is for. Can't decode */
- proto_tree_add_text (swils_tree, tvb, 0, tvb_length (tvb),
- "No record of Exchg. Unable to decode SW_ACC");
+ proto_tree_add_text(swils_tree, tvb, 0, tvb_length(tvb),
+ "No record of Exchg. Unable to decode SW_ACC");
return;
}
}
else {
ckey.conv_idx = conversation->index;
- cdata = (fcswils_conv_data_t *)g_hash_table_lookup (fcswils_req_hash, &ckey);
+ cdata = (fcswils_conv_data_t *)g_hash_table_lookup(fcswils_req_hash, &ckey);
if (cdata != NULL) {
if (opcode == FC_SWILS_SWACC)
@@ -1854,43 +1846,43 @@ dissect_fcswils (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree) {
if ((cdata == NULL) && (opcode != FC_SWILS_SWRJT)) {
/* No record of what this accept is for. Can't decode */
- proto_tree_add_text (swils_tree, tvb, 0, tvb_length (tvb),
- "No record of SW_ILS Req. Unable to decode SW_ACC");
+ proto_tree_add_text(swils_tree, tvb, 0, tvb_length(tvb),
+ "No record of SW_ILS Req. Unable to decode SW_ACC");
return;
}
}
}
}
- if (check_col (pinfo->cinfo, COL_INFO)) {
+ if (check_col(pinfo->cinfo, COL_INFO)) {
if (isreq == FC_SWILS_REQ) {
- col_add_str (pinfo->cinfo, COL_INFO,
- val_to_str (opcode, fc_swils_opcode_key_val, "0x%x"));
+ col_add_str(pinfo->cinfo, COL_INFO,
+ val_to_str(opcode, fc_swils_opcode_key_val, "0x%x"));
}
else if (opcode == FC_SWILS_SWRJT) {
- col_add_fstr (pinfo->cinfo, COL_INFO, "SW_RJT (%s)",
- val_to_str (failed_opcode, fc_swils_opcode_key_val, "0x%x"));
+ col_add_fstr(pinfo->cinfo, COL_INFO, "SW_RJT (%s)",
+ val_to_str(failed_opcode, fc_swils_opcode_key_val, "0x%x"));
}
else {
- col_add_fstr (pinfo->cinfo, COL_INFO, "SW_ACC (%s)",
- val_to_str (opcode, fc_swils_opcode_key_val, "0x%x"));
+ col_add_fstr(pinfo->cinfo, COL_INFO, "SW_ACC (%s)",
+ val_to_str(opcode, fc_swils_opcode_key_val, "0x%x"));
}
}
if (tree) {
- proto_tree_add_item (swils_tree, hf_swils_opcode, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(swils_tree, hf_swils_opcode, tvb, offset, 1, ENC_BIG_ENDIAN);
}
if ((opcode < FC_SWILS_MAXCODE) && fcswils_func_table[opcode].func) {
- fcswils_func_table[opcode].func (tvb, swils_tree, isreq);
+ fcswils_func_table[opcode].func(tvb, swils_tree, isreq);
} else if (opcode == FC_SWILS_AUTH_ILS) {
- /* This is treated differently */
- if (isreq && fcsp_handle)
- call_dissector (fcsp_handle, tvb, pinfo, swils_tree);
+ /* This is treated differently */
+ if (isreq && fcsp_handle)
+ call_dissector(fcsp_handle, tvb, pinfo, swils_tree);
} else {
- /* data dissector */
- next_tvb = tvb_new_subset_remaining (tvb, offset+4);
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ /* data dissector */
+ next_tvb = tvb_new_subset_remaining(tvb, offset+4);
+ call_dissector(data_handle, next_tvb, pinfo, tree);
}
}
@@ -1898,386 +1890,634 @@ dissect_fcswils (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Register the protocol with Wireshark */
void
-proto_register_fcswils (void)
+proto_register_fcswils(void)
{
static hf_register_info hf[] = {
{ &hf_swils_opcode,
{"Cmd Code", "swils.opcode",
- FT_UINT8, BASE_HEX, VALS (fc_swils_opcode_key_val), 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, VALS(fc_swils_opcode_key_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_rev,
{"Revision", "swils.elp.rev",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_flags,
{"Flag", "swils.elp.flag",
- FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_r_a_tov,
{"R_A_TOV", "swils.elp.ratov",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_e_d_tov,
{"E_D_TOV", "swils.elp.edtov",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_req_epn,
{"Req Eport Name", "swils.elp.reqepn",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_req_esn,
{"Req Switch Name", "swils.elp.reqesn",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_clsf_svcp,
{"Class F Svc Param", "swils.elp.clsfp",
- FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_clsf_rcvsz,
{"Max Class F Frame Size", "swils.elp.clsfrsz",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_clsf_conseq,
{"Class F Max Concurrent Seq", "swils.elp.clsfcs",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_clsf_e2e,
{"Class F E2E Credit", "swils.elp.cfe2e",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_clsf_openseq,
{"Class F Max Open Seq", "swils.elp.oseq",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_cls1_svcp,
{"Class 1 Svc Param", "swils.elp.cls1p",
- FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_cls1_rcvsz,
{"Class 1 Frame Size", "swils.elp.cls1rsz",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_cls2_svcp,
{"Class 2 Svc Param", "swils.elp.cls2p",
- FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_cls2_rcvsz,
{"Class 2 Frame Size", "swils.elp.cls2rsz",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_cls3_svcp,
{"Class 3 Svc Param", "swils.elp.cls3p",
- FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_cls3_rcvsz,
{"Class 3 Frame Size", "swils.elp.cls3rsz",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_isl_fc_mode,
{"ISL Flow Ctrl Mode", "swils.elp.fcmode",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_fcplen,
{"Flow Ctrl Param Len", "swils.elp.fcplen",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_b2bcredit,
{"B2B Credit", "swils.elp.b2b",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_compat1,
{"Compatibility Param 1", "swils.elp.compat1",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_compat2,
{"Compatibility Param 2", "swils.elp.compat2",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_compat3,
{"Compatibility Param 3", "swils.elp.compat3",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_elp_compat4,
{"Compatibility Param 4", "swils.elp.compat4",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_efp_rec_type,
{"Record Type", "swils.efp.rectype",
- FT_UINT8, BASE_HEX, VALS (fcswils_rectype_val), 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, VALS(fcswils_rectype_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_efp_dom_id,
{"Domain ID", "swils.efp.domid",
- FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_efp_switch_name,
{"Switch Name", "swils.efp.sname",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_efp_mcast_grpno,
{"Mcast Grp#", "swils.efp.mcastno",
- FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_efp_alias_token,
{"Alias Token", "swils.efp.aliastok",
- FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_efp_record_len,
{"Record Len", "swils.efp.recordlen",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_efp_payload_len,
{"Payload Len", "swils.efp.payloadlen",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_efp_pswitch_pri,
{"Principal Switch Priority", "swils.efp.psprio",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_efp_pswitch_name,
{"Principal Switch Name", "swils.efp.psname",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_dia_switch_name,
{"Switch Name", "swils.dia.sname",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_rdi_payload_len,
{"Payload Len", "swils.rdi.len",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_rdi_req_sname,
{"Req Switch Name", "swils.rdi.reqsn",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_fspfh_cmd,
{"Command:", "swils.fspf.cmd",
- FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_fspfh_rev,
{"Version", "swils.fspf.ver",
- FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_fspfh_ar_num,
{"AR Number", "swils.fspf.arnum",
- FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_fspfh_auth_type,
{"Authentication Type", "swils.fspf.authtype",
- FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_fspfh_dom_id,
{"Originating Domain ID", "swils.fspf.origdomid",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_fspfh_auth,
{"Authentication", "swils.fspf.auth",
- FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_hlo_options,
{"Options", "swils.hlo.options",
- FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_hlo_hloint,
{"Hello Interval (secs)", "swils.hlo.hloint",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_hlo_deadint,
{"Dead Interval (secs)", "swils.hlo.deadint",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_hlo_rcv_domid,
{"Recipient Domain ID", "swils.hlo.rcvdomid",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_hlo_orig_pidx,
{"Originating Port Idx", "swils.hlo.origpidx",
- FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT24, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_lsrh_lsr_type,
{"LSR Type", "swils.lsr.type",
- FT_UINT8, BASE_HEX, VALS (fc_swils_fspf_linkrec_val), 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, VALS(fc_swils_fspf_linkrec_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_lsrh_lsid,
{"Link State Id", "swils.ls.id",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_lsrh_adv_domid,
{"Advertising Domain Id", "swils.lsr.advdomid",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_lsrh_ls_incid,
{"LS Incarnation Number", "swils.lsr.incid",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ldrec_linkid,
{"Link ID", "swils.ldr.linkid",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ldrec_out_pidx,
{"Output Port Idx", "swils.ldr.out_portidx",
- FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT24, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ldrec_nbr_pidx,
{"Neighbor Port Idx", "swils.ldr.nbr_portidx",
- FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT24, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ldrec_link_type,
{"Link Type", "swils.ldr.linktype",
- FT_UINT8, BASE_HEX, VALS (fc_swils_link_type_val), 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, VALS(fc_swils_link_type_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ldrec_link_cost,
{"Link Cost", "swils.ldr.linkcost",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_rscn_evtype,
{"Event Type", "swils.rscn.evtype",
- FT_UINT8, BASE_DEC, VALS (fc_swils_rscn_portstate_val), 0xF0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, VALS(fc_swils_rscn_portstate_val), 0xF0,
+ NULL, HFILL}},
+
{ &hf_swils_rscn_addrfmt,
{"Address Format", "swils.rscn.addrfmt",
- FT_UINT8, BASE_DEC, VALS (fc_swils_rscn_addrfmt_val), 0x0F, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, VALS(fc_swils_rscn_addrfmt_val), 0x0F,
+ NULL, HFILL}},
+
{ &hf_swils_rscn_affectedport,
{"Affected Port ID", "swils.rscn.affectedport",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_rscn_detectfn,
{"Detection Function", "swils.rscn.detectfn",
- FT_UINT32, BASE_HEX, VALS (fc_swils_rscn_detectfn_val), 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_HEX, VALS(fc_swils_rscn_detectfn_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_rscn_portstate,
{"Port State", "swils.rscn.portstate",
- FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_rscn_portid,
{"Port Id", "swils.rscn.portid",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_rscn_pwwn,
{"Port WWN", "swils.rscn.pwwn",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_rscn_nwwn,
{"Node WWN", "swils.rscn.nwwn",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_esc_swvendorid,
{"Switch Vendor ID", "swils.esc.swvendor",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_esc_pdesc_vendorid,
{"Vendor ID", "swils.esc.vendorid",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_esc_protocolid,
{"Protocol ID", "swils.esc.protocol",
- FT_UINT16, BASE_HEX, VALS (fc_swils_esc_protocol_val), 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_HEX, VALS(fc_swils_esc_protocol_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_zone_activezonenm,
{"Active Zoneset Name", "swils.mr.activezonesetname",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_zone_objname,
{"Zone Object Name", "swils.zone.zoneobjname",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_zone_objtype,
{"Zone Object Type", "swils.zone.zoneobjtype",
- FT_UINT8, BASE_HEX, VALS (fc_swils_zoneobj_type_val), 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, VALS(fc_swils_zoneobj_type_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_zone_mbrtype,
{"Zone Member Type", "swils.zone.mbrtype",
- FT_UINT8, BASE_HEX, VALS (fc_swils_zonembr_type_val), 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, VALS(fc_swils_zonembr_type_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_zone_protocol,
{"Zone Protocol", "swils.zone.protocol",
- FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_zone_mbrid,
{"Member Identifier", "swils.zone.mbrid",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_zone_status,
{"Zone Command Status", "swils.zone.status",
- FT_UINT8, BASE_HEX, VALS (fc_swils_mr_rsp_val), 0x0,
+ FT_UINT8, BASE_HEX, VALS(fc_swils_mr_rsp_val), 0x0,
"Applies to MR, ACA, RCA, SFC, UFC", HFILL}},
+
{ &hf_swils_zone_reason,
{"Zone Command Reason Code", "swils.zone.reason",
- FT_UINT8, BASE_HEX, VALS (fc_swils_mr_reason_val), 0x0,
+ FT_UINT8, BASE_HEX, VALS(fc_swils_mr_reason_val), 0x0,
"Applies to MR, ACA, RCA, SFC, UFC", HFILL}},
+
{ &hf_swils_aca_domainid,
{"Known Domain ID", "swils.aca.domainid",
- FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_sfc_opcode,
{"Operation Request", "swils.sfc.opcode",
- FT_UINT8, BASE_HEX, VALS (fc_swils_sfc_op_val), 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, VALS(fc_swils_sfc_op_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_sfc_zonenm,
{"Zone Set Name", "swils.sfc.zonename",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_rjt,
{"Reason Code", "swils.rjt.reason",
- FT_UINT8, BASE_HEX, VALS (fc_swils_rjt_val), 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, VALS(fc_swils_rjt_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_rjtdet,
{"Reason Code Explanantion", "swils.rjt.reasonexpl",
- FT_UINT8, BASE_HEX, VALS (fc_swils_deterr_val), 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, VALS(fc_swils_deterr_val), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_rjtvendor,
{"Vendor Unique Error Code", "swils.rjt.vendor",
- FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_zone_mbrid_lun,
{"LUN", "swils.zone.lun",
- FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_rev,
{"Revision", "swils.ess.revision",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_len,
{"Payload Length", "swils.ess.leb",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_numobj,
{"Number of Capability Objects", "swils.ess.numobj",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_interconnect_list_len,
{"List Length", "swils.ess.listlen",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_vendorname,
{"Vendor Name", "swils.ess.vendorname",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_modelname,
{"Model Name", "swils.ess.modelname",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_relcode,
{"Release Code", "swils.ess.relcode",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_vendorspecific,
{"Vendor Specific", "swils.ess.vendorspecific",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_cap_type,
{"Type", "swils.ess.capability.type",
- FT_UINT8, BASE_DEC, VALS (fc_ct_gstype_vals), 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, VALS(fc_ct_gstype_vals), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_cap_subtype,
{"Subtype", "swils.ess.capability.subtype",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_cap_numentries,
{"Number of Entries", "swils.ess.capability.numentries",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_cap_svc,
{"Service Name", "swils.ess.capability.service",
- FT_UINT8, BASE_DEC, VALS (fc_ct_gsserver_vals), 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, VALS(fc_ct_gsserver_vals), 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_dns_obj0h,
{"Name Server Entry Object 00h Support", "swils.ess.capability.dns.obj0h",
- FT_BOOLEAN, 8, NULL, 0x1, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x1,
+ NULL, HFILL}},
+
{ &hf_swils_ess_dns_obj1h,
{"Name Server Entry Object 01h Support", "swils.ess.capability.dns.obj1h",
- FT_BOOLEAN, 8, NULL, 0x2, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x2,
+ NULL, HFILL}},
+
{ &hf_swils_ess_dns_obj2h,
{"Name Server Entry Object 02h Support", "swils.ess.capability.dns.obj2h",
- FT_BOOLEAN, 8, NULL, 0x4, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x4,
+ NULL, HFILL}},
+
{ &hf_swils_ess_dns_obj3h,
{"Name Server Entry Object 03h Support", "swils.ess.capability.dns.obj3h",
- FT_BOOLEAN, 8, NULL, 0x8, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x8,
+ NULL, HFILL}},
+
{ &hf_swils_ess_dns_zlacc,
{"GE_PT Zero Length Accepted", "swils.ess.capability.dns.zlacc",
- FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x10,
+ NULL, HFILL}},
+
{ &hf_swils_ess_dns_vendor,
{"Vendor Specific Flags", "swils.ess.capability.dns.vendor",
- FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fctlr_rscn,
{"SW_RSCN Supported", "swils.ess.capability.fctlr.rscn",
- FT_BOOLEAN, 8, NULL, 0x1, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x1,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fctlr_vendor,
{"Vendor Specific Flags", "swils.ess.capability.fctlr.vendor",
- FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fcs_basic,
{"Basic Configuration Services", "swils.ess.capability.fcs.basic",
- FT_BOOLEAN, 8, NULL, 0x1, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x1,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fcs_platform,
{"Platform Configuration Services", "swils.ess.capability.fcs.platform",
- FT_BOOLEAN, 8, NULL, 0x2, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x2,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fcs_topology,
{"Topology Discovery Services", "swils.ess.capability.fcs.topology",
- FT_BOOLEAN, 8, NULL, 0x4, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x4,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fcs_enhanced,
{"Enhanced Configuration Services", "swils.ess.capability.fcs.enhanced",
- FT_BOOLEAN, 8, NULL, 0x8, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x8,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fzs_enh_supp,
{"Enhanced Zoning Supported", "swils.ess.capability.fzs.ezonesupp",
- FT_BOOLEAN, 8, NULL, 0x1, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x1,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fzs_enh_ena,
{"Enhanced Zoning Enabled", "swils.ess.capability.fzs.ezoneena",
- FT_BOOLEAN, 8, NULL, 0x2, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x2,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fzs_mr,
{"Merge Control Setting", "swils.ess.capability.fzs.mr",
- FT_BOOLEAN, 8, NULL, 0x4, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x4,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fzs_defzone,
{"Default Zone Setting", "swils.ess.capability.fzs.defzone",
- FT_BOOLEAN, 8, NULL, 0x8, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x8,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fzs_zsdb_supp,
{"Zoneset Database Supported", "swils.ess.capability.fzs.zsdbsupp",
- FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x10,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fzs_zsdb_ena,
{"Zoneset Database Enabled", "swils.ess.capability.fzs.zsdbena",
- FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x20,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fzs_adc_supp,
{"Active Direct Command Supported", "swils.ess.capability.fzs.adcsupp",
- FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x40,
+ NULL, HFILL}},
+
{ &hf_swils_ess_fzs_hardzone,
{"Hard Zoning Supported", "swils.ess.capability.fzs.hardzone",
- FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL}},
+ FT_BOOLEAN, 8, NULL, 0x80,
+ NULL, HFILL}},
+
{ &hf_swils_ess_cap_len,
{"Length", "swils.ess.capability.length",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_cap_t10,
{"T10 Vendor ID", "swils.ess.capability.t10id",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_ess_cap_vendorobj,
{"Vendor-Specific Info", "swils.ess.capability.vendorobj",
- FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_mrra_rev,
{"Revision", "swils.mrra.revision",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_mrra_size,
{"Merge Request Size", "swils.mrra.size",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_mrra_vendorid,
{"Vendor ID", "swils.mrra.vendorid",
- FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_mrra_vendorinfo,
{"Vendor-Specific Info", "swils.mrra.vendorinfo",
- FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_mrra_reply,
{"MRRA Response", "swils.mrra.reply",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_mrra_reply_size,
{"Maximum Resources Available", "swils.mrra.replysize",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
{ &hf_swils_mrra_waittime,
{"Waiting Period (secs)", "swils.mrra.waittime",
- FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL}},
+
};
static gint *ett[] = {
@@ -2323,13 +2563,13 @@ proto_register_fcswils (void)
}
void
-proto_reg_handoff_fcswils (void)
+proto_reg_handoff_fcswils(void)
{
dissector_handle_t swils_handle;
- swils_handle = create_dissector_handle (dissect_fcswils, proto_fcswils);
+ swils_handle = create_dissector_handle(dissect_fcswils, proto_fcswils);
dissector_add_uint("fc.ftype", FC_FTYPE_SWILS, swils_handle);
- data_handle = find_dissector ("data");
- fcsp_handle = find_dissector ("fcsp");
+ data_handle = find_dissector("data");
+ fcsp_handle = find_dissector("fcsp");
}
diff --git a/epan/dissectors/packet-fddi.c b/epan/dissectors/packet-fddi.c
index cc41ee3f5c..a7a71102de 100644
--- a/epan/dissectors/packet-fddi.c
+++ b/epan/dissectors/packet-fddi.c
@@ -32,10 +32,10 @@
# include "config.h"
#endif
-#include <string.h>
#include <glib.h>
-#include <epan/bitswap.h>
+
#include <epan/packet.h>
+#include <epan/bitswap.h>
#include <epan/prefs.h>
#include "packet-fddi.h"
#include "packet-llc.h"
@@ -60,78 +60,78 @@ static int fddi_tap = -1;
static gboolean fddi_padding = FALSE;
-#define FDDI_PADDING ((fddi_padding) ? 3 : 0)
+#define FDDI_PADDING ((fddi_padding) ? 3 : 0)
/* FDDI Frame Control values */
-#define FDDI_FC_VOID 0x00 /* Void frame */
-#define FDDI_FC_NRT 0x80 /* Nonrestricted token */
-#define FDDI_FC_RT 0xc0 /* Restricted token */
-#define FDDI_FC_MAC 0xc0 /* MAC frame */
-#define FDDI_FC_SMT 0x40 /* SMT frame */
-#define FDDI_FC_SMT_INFO 0x41 /* SMT Info */
-#define FDDI_FC_SMT_NSA 0x4F /* SMT Next station adrs */
-#define FDDI_FC_SMT_MIN FDDI_FC_SMT_INFO
-#define FDDI_FC_SMT_MAX FDDI_FC_SMT_NSA
-#define FDDI_FC_MAC_MIN 0xc1
-#define FDDI_FC_MAC_BEACON 0xc2 /* MAC Beacon frame */
-#define FDDI_FC_MAC_CLAIM 0xc3 /* MAC Claim frame */
-#define FDDI_FC_MAC_MAX 0xcf
-#define FDDI_FC_LLC_ASYNC 0x50 /* Async. LLC frame */
-#define FDDI_FC_LLC_ASYNC_MIN FDDI_FC_LLC_ASYNC
-#define FDDI_FC_LLC_ASYNC_DEF 0x54
-#define FDDI_FC_LLC_ASYNC_MAX 0x5f
-#define FDDI_FC_LLC_SYNC 0xd0 /* Sync. LLC frame */
-#define FDDI_FC_LLC_SYNC_MIN FDDI_FC_LLC_SYNC
-#define FDDI_FC_LLC_SYNC_MAX 0xd7
-#define FDDI_FC_IMP_ASYNC 0x60 /* Implementor Async. */
-#define FDDI_FC_IMP_ASYNC_MIN FDDI_FC_IMP_ASYNC
-#define FDDI_FC_IMP_ASYNC_MAX 0x6f
-#define FDDI_FC_IMP_SYNC 0xe0 /* Implementor Synch. */
-
-#define FDDI_FC_CLFF 0xF0 /* Class/Length/Format bits */
-#define FDDI_FC_ZZZZ 0x0F /* Control bits */
+#define FDDI_FC_VOID 0x00 /* Void frame */
+#define FDDI_FC_NRT 0x80 /* Nonrestricted token */
+#define FDDI_FC_RT 0xc0 /* Restricted token */
+#define FDDI_FC_MAC 0xc0 /* MAC frame */
+#define FDDI_FC_SMT 0x40 /* SMT frame */
+#define FDDI_FC_SMT_INFO 0x41 /* SMT Info */
+#define FDDI_FC_SMT_NSA 0x4F /* SMT Next station adrs */
+#define FDDI_FC_SMT_MIN FDDI_FC_SMT_INFO
+#define FDDI_FC_SMT_MAX FDDI_FC_SMT_NSA
+#define FDDI_FC_MAC_MIN 0xc1
+#define FDDI_FC_MAC_BEACON 0xc2 /* MAC Beacon frame */
+#define FDDI_FC_MAC_CLAIM 0xc3 /* MAC Claim frame */
+#define FDDI_FC_MAC_MAX 0xcf
+#define FDDI_FC_LLC_ASYNC 0x50 /* Async. LLC frame */
+#define FDDI_FC_LLC_ASYNC_MIN FDDI_FC_LLC_ASYNC
+#define FDDI_FC_LLC_ASYNC_DEF 0x54
+#define FDDI_FC_LLC_ASYNC_MAX 0x5f
+#define FDDI_FC_LLC_SYNC 0xd0 /* Sync. LLC frame */
+#define FDDI_FC_LLC_SYNC_MIN FDDI_FC_LLC_SYNC
+#define FDDI_FC_LLC_SYNC_MAX 0xd7
+#define FDDI_FC_IMP_ASYNC 0x60 /* Implementor Async. */
+#define FDDI_FC_IMP_ASYNC_MIN FDDI_FC_IMP_ASYNC
+#define FDDI_FC_IMP_ASYNC_MAX 0x6f
+#define FDDI_FC_IMP_SYNC 0xe0 /* Implementor Synch. */
+
+#define FDDI_FC_CLFF 0xF0 /* Class/Length/Format bits */
+#define FDDI_FC_ZZZZ 0x0F /* Control bits */
/*
* Async frame ZZZZ bits:
*/
-#define FDDI_FC_ASYNC_R 0x08 /* Reserved */
-#define FDDI_FC_ASYNC_PRI 0x07 /* Priority */
+#define FDDI_FC_ASYNC_R 0x08 /* Reserved */
+#define FDDI_FC_ASYNC_PRI 0x07 /* Priority */
-#define CLFF_BITS(fc) (((fc) & FDDI_FC_CLFF) >> 4)
-#define ZZZZ_BITS(fc) ((fc) & FDDI_FC_ZZZZ)
+#define CLFF_BITS(fc) (((fc) & FDDI_FC_CLFF) >> 4)
+#define ZZZZ_BITS(fc) ((fc) & FDDI_FC_ZZZZ)
static const value_string clf_vals[] = {
- { CLFF_BITS(FDDI_FC_VOID), "Void" },
- { CLFF_BITS(FDDI_FC_SMT), "SMT" },
- { CLFF_BITS(FDDI_FC_LLC_ASYNC), "Async LLC" },
- { CLFF_BITS(FDDI_FC_IMP_ASYNC), "Implementor Async" },
- { CLFF_BITS(FDDI_FC_NRT), "Nonrestricted Token" },
- { CLFF_BITS(FDDI_FC_MAC), "MAC" },
- { CLFF_BITS(FDDI_FC_LLC_SYNC), "Sync LLC" },
- { CLFF_BITS(FDDI_FC_IMP_SYNC), "Implementor Sync" },
- { 0, NULL }
+ { CLFF_BITS(FDDI_FC_VOID), "Void" },
+ { CLFF_BITS(FDDI_FC_SMT), "SMT" },
+ { CLFF_BITS(FDDI_FC_LLC_ASYNC), "Async LLC" },
+ { CLFF_BITS(FDDI_FC_IMP_ASYNC), "Implementor Async" },
+ { CLFF_BITS(FDDI_FC_NRT), "Nonrestricted Token" },
+ { CLFF_BITS(FDDI_FC_MAC), "MAC" },
+ { CLFF_BITS(FDDI_FC_LLC_SYNC), "Sync LLC" },
+ { CLFF_BITS(FDDI_FC_IMP_SYNC), "Implementor Sync" },
+ { 0, NULL }
};
static const value_string smt_subtype_vals[] = {
- { ZZZZ_BITS(FDDI_FC_SMT_INFO), "Info" },
- { ZZZZ_BITS(FDDI_FC_SMT_NSA), "Next Station Address" },
- { 0, NULL }
+ { ZZZZ_BITS(FDDI_FC_SMT_INFO), "Info" },
+ { ZZZZ_BITS(FDDI_FC_SMT_NSA), "Next Station Address" },
+ { 0, NULL }
};
static const value_string mac_subtype_vals[] = {
- { ZZZZ_BITS(FDDI_FC_MAC_BEACON), "Beacon" },
- { ZZZZ_BITS(FDDI_FC_MAC_CLAIM), "Claim" },
- { 0, NULL }
+ { ZZZZ_BITS(FDDI_FC_MAC_BEACON), "Beacon" },
+ { ZZZZ_BITS(FDDI_FC_MAC_CLAIM), "Claim" },
+ { 0, NULL }
};
-#define FDDI_HEADER_SIZE 13
+#define FDDI_HEADER_SIZE 13
/* field positions */
-#define FDDI_P_FC 0
-#define FDDI_P_DHOST 1
-#define FDDI_P_SHOST 7
+#define FDDI_P_FC 0
+#define FDDI_P_DHOST 1
+#define FDDI_P_SHOST 7
static dissector_handle_t llc_handle;
static dissector_handle_t data_handle;
@@ -139,18 +139,18 @@ static dissector_handle_t data_handle;
static void
swap_mac_addr(guint8 *swapped_addr, tvbuff_t *tvb, gint offset)
{
- int i;
+ int i;
- for (i = 0; i < 6; i++) {
- swapped_addr[i] = BIT_SWAP(tvb_get_guint8(tvb, offset+i));
- }
+ for (i = 0; i < 6; i++) {
+ swapped_addr[i] = BIT_SWAP(tvb_get_guint8(tvb, offset+i));
+ }
}
void
capture_fddi(const guchar *pd, int len, packet_counts *ld)
{
- int offset = 0, fc;
+ int offset = 0, fc;
if (!BYTES_ARE_IN_FRAME(0, len, FDDI_HEADER_SIZE + FDDI_PADDING)) {
ld->other++;
@@ -197,25 +197,25 @@ fddifc_to_str(int fc)
switch (fc) {
- case FDDI_FC_VOID: /* Void frame */
+ case FDDI_FC_VOID: /* Void frame */
return "Void frame";
- case FDDI_FC_NRT: /* Nonrestricted token */
+ case FDDI_FC_NRT: /* Nonrestricted token */
return "Nonrestricted token";
- case FDDI_FC_RT: /* Restricted token */
+ case FDDI_FC_RT: /* Restricted token */
return "Restricted token";
- case FDDI_FC_SMT_INFO: /* SMT Info */
+ case FDDI_FC_SMT_INFO: /* SMT Info */
return "SMT info";
- case FDDI_FC_SMT_NSA: /* SMT Next station adrs */
+ case FDDI_FC_SMT_NSA: /* SMT Next station adrs */
return "SMT Next station address";
- case FDDI_FC_MAC_BEACON: /* MAC Beacon frame */
+ case FDDI_FC_MAC_BEACON: /* MAC Beacon frame */
return "MAC beacon";
- case FDDI_FC_MAC_CLAIM: /* MAC Claim frame */
+ case FDDI_FC_MAC_CLAIM: /* MAC Claim frame */
return "MAC claim token";
default:
@@ -234,7 +234,7 @@ fddifc_to_str(int fc)
g_snprintf(strbuf, sizeof(strbuf), "Async LLC frame, control %x", fc & FDDI_FC_ZZZZ);
else
g_snprintf(strbuf, sizeof(strbuf), "Async LLC frame, priority %d",
- fc & FDDI_FC_ASYNC_PRI);
+ fc & FDDI_FC_ASYNC_PRI);
return strbuf;
case FDDI_FC_LLC_SYNC:
@@ -246,12 +246,12 @@ fddifc_to_str(int fc)
case FDDI_FC_IMP_ASYNC:
g_snprintf(strbuf, sizeof(strbuf), "Implementor async frame, control %x",
- fc & FDDI_FC_ZZZZ);
+ fc & FDDI_FC_ZZZZ);
return strbuf;
case FDDI_FC_IMP_SYNC:
g_snprintf(strbuf, sizeof(strbuf), "Implementor sync frame, control %x",
- fc & FDDI_FC_ZZZZ);
+ fc & FDDI_FC_ZZZZ);
return strbuf;
default:
@@ -263,36 +263,35 @@ fddifc_to_str(int fc)
static void
dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- gboolean bitswapped)
+ gboolean bitswapped)
{
- proto_tree *fh_tree = NULL;
- proto_item *ti, *hidden_item;
- const gchar *fc_str;
- proto_tree *fc_tree;
- static guchar src[6], dst[6];
- guchar src_swapped[6], dst_swapped[6];
- tvbuff_t *next_tvb;
- static fddi_hdr fddihdrs[4];
- static int fddihdr_num=0;
- fddi_hdr *fddihdr;
+ proto_tree *fh_tree = NULL;
+ proto_item *ti, *hidden_item;
+ const gchar *fc_str;
+ proto_tree *fc_tree;
+ static guchar src[6], dst[6];
+ guchar src_swapped[6], dst_swapped[6];
+ tvbuff_t *next_tvb;
+ static fddi_hdr fddihdrs[4];
+ static int fddihdr_num = 0;
+ fddi_hdr *fddihdr;
fddihdr_num++;
- if(fddihdr_num>=4){
- fddihdr_num=0;
+ if (fddihdr_num >= 4) {
+ fddihdr_num = 0;
}
- fddihdr=&fddihdrs[fddihdr_num];
+ fddihdr = &fddihdrs[fddihdr_num];
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FDDI");
fddihdr->fc = tvb_get_guint8(tvb, FDDI_P_FC + FDDI_PADDING);
fc_str = fddifc_to_str(fddihdr->fc);
- if (check_col(pinfo->cinfo, COL_INFO))
- col_add_str(pinfo->cinfo, COL_INFO, fc_str);
+ col_add_str(pinfo->cinfo, COL_INFO, fc_str);
if (tree) {
ti = proto_tree_add_protocol_format(tree, proto_fddi, tvb, 0, FDDI_HEADER_SIZE+FDDI_PADDING,
- "Fiber Distributed Data Interface, %s", fc_str);
+ "Fiber Distributed Data Interface, %s", fc_str);
fh_tree = proto_item_add_subtree(ti, ett_fddi);
ti = proto_tree_add_uint_format(fh_tree, hf_fddi_fc, tvb, FDDI_P_FC + FDDI_PADDING, 1, fddihdr->fc,
"Frame Control: 0x%02x (%s)", fddihdr->fc, fc_str);
@@ -355,15 +354,15 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
SET_ADDRESS(&fddihdr->src, AT_ETHER, 6, &src[0]);
if (fh_tree) {
- proto_tree_add_ether(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src);
- hidden_item = proto_tree_add_ether(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
-
- /* hide some bit-swapped mac address fields in the proto_tree, just in case */
- hidden_item = proto_tree_add_ether(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src_swapped);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
- hidden_item = proto_tree_add_ether(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src_swapped);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
+ proto_tree_add_ether(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src);
+ hidden_item = proto_tree_add_ether(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+
+ /* hide some bit-swapped mac address fields in the proto_tree, just in case */
+ hidden_item = proto_tree_add_ether(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src_swapped);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_ether(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src_swapped);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
next_tvb = tvb_new_subset_remaining(tvb, FDDI_HEADER_SIZE + FDDI_PADDING);
@@ -405,101 +404,101 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
dissect_fddi_bitswapped(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- dissect_fddi(tvb, pinfo, tree, TRUE);
+ dissect_fddi(tvb, pinfo, tree, TRUE);
}
static void
dissect_fddi_not_bitswapped(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- dissect_fddi(tvb, pinfo, tree, FALSE);
+ dissect_fddi(tvb, pinfo, tree, FALSE);
}
void
proto_register_fddi(void)
{
- static hf_register_info hf[] = {
-
- /*
- * XXX - we want this guy to have his own private formatting
- * routine, using "fc_to_str()"; if "fc_to_str()" returns
- * NULL, just show the hex value, else show the string.
- */
- { &hf_fddi_fc,
- { "Frame Control", "fddi.fc", FT_UINT8, BASE_HEX, NULL, 0x0,
- NULL, HFILL }},
-
- { &hf_fddi_fc_clf,
- { "Class/Length/Format", "fddi.fc.clf", FT_UINT8, BASE_HEX, VALS(clf_vals), FDDI_FC_CLFF,
- NULL, HFILL }},
-
- { &hf_fddi_fc_prio,
- { "Priority", "fddi.fc.prio", FT_UINT8, BASE_DEC, NULL, FDDI_FC_ASYNC_PRI,
- NULL, HFILL }},
-
- { &hf_fddi_fc_smt_subtype,
- { "SMT Subtype", "fddi.fc.smt_subtype", FT_UINT8, BASE_DEC, VALS(smt_subtype_vals), FDDI_FC_ZZZZ,
- NULL, HFILL }},
-
- { &hf_fddi_fc_mac_subtype,
- { "MAC Subtype", "fddi.fc.mac_subtype", FT_UINT8, BASE_DEC, VALS(mac_subtype_vals), FDDI_FC_ZZZZ,
- NULL, HFILL }},
-
- { &hf_fddi_dst,
- { "Destination", "fddi.dst", FT_ETHER, BASE_NONE, NULL, 0x0,
- "Destination Hardware Address", HFILL }},
-
- { &hf_fddi_src,
- { "Source", "fddi.src", FT_ETHER, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
-
- { &hf_fddi_addr,
- { "Source or Destination Address", "fddi.addr", FT_ETHER, BASE_NONE, NULL, 0x0,
- "Source or Destination Hardware Address", HFILL }},
-
- };
- static gint *ett[] = {
- &ett_fddi,
- &ett_fddi_fc,
- };
-
- module_t *fddi_module;
-
- proto_fddi = proto_register_protocol("Fiber Distributed Data Interface",
- "FDDI", "fddi");
- proto_register_field_array(proto_fddi, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
-
- /*
- * Called from various dissectors for encapsulated FDDI frames.
- * We assume the MAC addresses in them aren't bitswapped.
- */
- register_dissector("fddi", dissect_fddi_not_bitswapped, proto_fddi);
-
- fddi_module = prefs_register_protocol(proto_fddi, NULL);
- prefs_register_bool_preference(fddi_module, "padding",
- "Add 3-byte padding to all FDDI packets",
- "Whether the FDDI dissector should add 3-byte padding to all "
- "captured FDDI packets (useful with e.g. Tru64 UNIX tcpdump)",
- &fddi_padding);
-
- fddi_tap = register_tap("fddi");
+ static hf_register_info hf[] = {
+
+ /*
+ * XXX - we want this guy to have his own private formatting
+ * routine, using "fc_to_str()"; if "fc_to_str()" returns
+ * NULL, just show the hex value, else show the string.
+ */
+ { &hf_fddi_fc,
+ { "Frame Control", "fddi.fc", FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_fddi_fc_clf,
+ { "Class/Length/Format", "fddi.fc.clf", FT_UINT8, BASE_HEX, VALS(clf_vals), FDDI_FC_CLFF,
+ NULL, HFILL }},
+
+ { &hf_fddi_fc_prio,
+ { "Priority", "fddi.fc.prio", FT_UINT8, BASE_DEC, NULL, FDDI_FC_ASYNC_PRI,
+ NULL, HFILL }},
+
+ { &hf_fddi_fc_smt_subtype,
+ { "SMT Subtype", "fddi.fc.smt_subtype", FT_UINT8, BASE_DEC, VALS(smt_subtype_vals), FDDI_FC_ZZZZ,
+ NULL, HFILL }},
+
+ { &hf_fddi_fc_mac_subtype,
+ { "MAC Subtype", "fddi.fc.mac_subtype", FT_UINT8, BASE_DEC, VALS(mac_subtype_vals), FDDI_FC_ZZZZ,
+ NULL, HFILL }},
+
+ { &hf_fddi_dst,
+ { "Destination", "fddi.dst", FT_ETHER, BASE_NONE, NULL, 0x0,
+ "Destination Hardware Address", HFILL }},
+
+ { &hf_fddi_src,
+ { "Source", "fddi.src", FT_ETHER, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_fddi_addr,
+ { "Source or Destination Address", "fddi.addr", FT_ETHER, BASE_NONE, NULL, 0x0,
+ "Source or Destination Hardware Address", HFILL }},
+
+ };
+ static gint *ett[] = {
+ &ett_fddi,
+ &ett_fddi_fc,
+ };
+
+ module_t *fddi_module;
+
+ proto_fddi = proto_register_protocol("Fiber Distributed Data Interface",
+ "FDDI", "fddi");
+ proto_register_field_array(proto_fddi, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ /*
+ * Called from various dissectors for encapsulated FDDI frames.
+ * We assume the MAC addresses in them aren't bitswapped.
+ */
+ register_dissector("fddi", dissect_fddi_not_bitswapped, proto_fddi);
+
+ fddi_module = prefs_register_protocol(proto_fddi, NULL);
+ prefs_register_bool_preference(fddi_module, "padding",
+ "Add 3-byte padding to all FDDI packets",
+ "Whether the FDDI dissector should add 3-byte padding to all "
+ "captured FDDI packets (useful with e.g. Tru64 UNIX tcpdump)",
+ &fddi_padding);
+
+ fddi_tap = register_tap("fddi");
}
void
proto_reg_handoff_fddi(void)
{
- dissector_handle_t fddi_handle, fddi_bitswapped_handle;
-
- /*
- * Get a handle for the LLC dissector.
- */
- llc_handle = find_dissector("llc");
- data_handle = find_dissector("data");
-
- fddi_handle = find_dissector("fddi");
- dissector_add_uint("wtap_encap", WTAP_ENCAP_FDDI, fddi_handle);
- fddi_bitswapped_handle =
- create_dissector_handle(dissect_fddi_bitswapped, proto_fddi);
- dissector_add_uint("wtap_encap", WTAP_ENCAP_FDDI_BITSWAPPED,
- fddi_bitswapped_handle);
+ dissector_handle_t fddi_handle, fddi_bitswapped_handle;
+
+ /*
+ * Get a handle for the LLC dissector.
+ */
+ llc_handle = find_dissector("llc");
+ data_handle = find_dissector("data");
+
+ fddi_handle = find_dissector("fddi");
+ dissector_add_uint("wtap_encap", WTAP_ENCAP_FDDI, fddi_handle);
+ fddi_bitswapped_handle =
+ create_dissector_handle(dissect_fddi_bitswapped, proto_fddi);
+ dissector_add_uint("wtap_encap", WTAP_ENCAP_FDDI_BITSWAPPED,
+ fddi_bitswapped_handle);
}
diff --git a/epan/dissectors/packet-fefd.c b/epan/dissectors/packet-fefd.c
index 76e13dd1c7..4cfc68dbdb 100644
--- a/epan/dissectors/packet-fefd.c
+++ b/epan/dissectors/packet-fefd.c
@@ -94,12 +94,12 @@ dissect_fefd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ti;
proto_tree *fefd_tree = NULL;
- int offset = 0;
- guint16 type;
- guint16 length;
+ int offset = 0;
+ guint16 type;
+ guint16 length;
proto_item *tlvi;
proto_tree *tlv_tree;
- int real_length;
+ int real_length;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FEFD");
col_clear(pinfo->cinfo, COL_INFO);
diff --git a/epan/dissectors/packet-fip.c b/epan/dissectors/packet-fip.c
index ba54280b54..5b25d7baca 100644
--- a/epan/dissectors/packet-fip.c
+++ b/epan/dissectors/packet-fip.c
@@ -38,57 +38,53 @@
# include "config.h"
#endif
-#include <stdlib.h>
-
#include <glib.h>
#include <epan/packet.h>
#include <epan/etypes.h>
#include <epan/expert.h>
-void proto_reg_handoff_fip(void);
-
/*
* FIP protocol information.
*/
#define FIP_HEADER_LEN 10
-#define FIP_BPW 4 /* bytes per descriptor length unit */
+#define FIP_BPW 4 /* bytes per descriptor length unit */
/*
* FIP opcodes and subcodes.
*/
enum fip_opcode {
- FIP_OP_DISC = 1, /* discovery, advertisement, etc. */
- FIP_OP_LS = 2, /* Link Service request or reply */
- FIP_OP_CTRL = 3, /* control */
- FIP_OP_VLAN = 4, /* VLAN request or reply */
- FIP_OP_VN2VN = 5 /* VN_port to VN_port operation */
+ FIP_OP_DISC = 1, /* discovery, advertisement, etc. */
+ FIP_OP_LS = 2, /* Link Service request or reply */
+ FIP_OP_CTRL = 3, /* control */
+ FIP_OP_VLAN = 4, /* VLAN request or reply */
+ FIP_OP_VN2VN = 5 /* VN_port to VN_port operation */
};
/*
* Subcodes for FIP_OP_DISC.
*/
enum fip_disc_subcode {
- FIP_SC_SOL = 1, /* solicitation */
- FIP_SC_ADV = 2 /* advertisement */
+ FIP_SC_SOL = 1, /* solicitation */
+ FIP_SC_ADV = 2 /* advertisement */
};
/*
* Subcodes for FIP_OP_LS.
*/
enum fip_ls_subcode {
- FIP_SC_REQ = 1, /* request */
- FIP_SC_REP = 2 /* reply */
+ FIP_SC_REQ = 1, /* request */
+ FIP_SC_REP = 2 /* reply */
};
enum fip_ctrl_subcode {
- FIP_SC_KA = 1, /* keep-alive */
- FIP_SC_CVL = 2 /* clear virtual link */
+ FIP_SC_KA = 1, /* keep-alive */
+ FIP_SC_CVL = 2 /* clear virtual link */
};
enum fip_vlan_subcode {
- FIP_VL_REQ = 1, /* request */
- FIP_VL_REP = 2 /* reply */
+ FIP_VL_REQ = 1, /* request */
+ FIP_VL_REP = 2 /* reply */
};
/*
@@ -96,105 +92,105 @@ enum fip_vlan_subcode {
* XXX proposal
*/
enum fip_vn2vn_subcode {
- FIP_SC_VN_PROBE_REQ = 1, /* probe request */
- FIP_SC_VN_PROBE_REP = 2, /* probe reply */
- FIP_SC_VN_CLAIM_NOTIFY = 3, /* claim notification */
- FIP_SC_VN_CLAIM_REP = 4, /* claim response */
- FIP_SC_VN_BEACON = 5 /* beacon */
+ FIP_SC_VN_PROBE_REQ = 1, /* probe request */
+ FIP_SC_VN_PROBE_REP = 2, /* probe reply */
+ FIP_SC_VN_CLAIM_NOTIFY = 3, /* claim notification */
+ FIP_SC_VN_CLAIM_REP = 4, /* claim response */
+ FIP_SC_VN_BEACON = 5 /* beacon */
};
static const value_string fip_opcodes[] = {
- { FIP_OP_DISC, "Discovery" },
- { FIP_OP_LS, "Link Service" },
- { FIP_OP_CTRL, "Control" },
- { FIP_OP_VLAN, "VLAN" },
- { FIP_OP_VN2VN, "VN2VN" },
- { 0, NULL }
+ { FIP_OP_DISC, "Discovery" },
+ { FIP_OP_LS, "Link Service" },
+ { FIP_OP_CTRL, "Control" },
+ { FIP_OP_VLAN, "VLAN" },
+ { FIP_OP_VN2VN, "VN2VN" },
+ { 0, NULL }
};
static const value_string fip_disc_subcodes[] = {
- { FIP_SC_SOL, "Solicitation" },
- { FIP_SC_ADV, "Advertisement" },
- { 0, NULL }
+ { FIP_SC_SOL, "Solicitation" },
+ { FIP_SC_ADV, "Advertisement" },
+ { 0, NULL }
};
static const value_string fip_ls_subcodes[] = {
- { FIP_SC_REQ, "ELS Request" },
- { FIP_SC_REP, "ELS Response" },
- { 0, NULL }
+ { FIP_SC_REQ, "ELS Request" },
+ { FIP_SC_REP, "ELS Response" },
+ { 0, NULL }
};
static const value_string fip_ctrl_subcodes[] = {
- { FIP_SC_KA, "Keep-Alive" },
- { FIP_SC_CVL, "Clear Virtual Link" },
- { 0, NULL }
+ { FIP_SC_KA, "Keep-Alive" },
+ { FIP_SC_CVL, "Clear Virtual Link" },
+ { 0, NULL }
};
static const value_string fip_vlan_subcodes[] = {
- { FIP_VL_REQ, "VLAN Request" },
- { FIP_VL_REP, "VLAN Response" },
- { 0, NULL }
+ { FIP_VL_REQ, "VLAN Request" },
+ { FIP_VL_REP, "VLAN Response" },
+ { 0, NULL }
};
static const value_string fip_vn2vn_subcodes[] = {
- { FIP_SC_VN_PROBE_REQ, "Probe Request" },
- { FIP_SC_VN_PROBE_REP, "Probe Reply" },
- { FIP_SC_VN_CLAIM_NOTIFY, "Claim Notification" },
- { FIP_SC_VN_CLAIM_REP, "Claim Response" },
- { FIP_SC_VN_BEACON, "Beacon" },
- { 0, NULL }
+ { FIP_SC_VN_PROBE_REQ, "Probe Request" },
+ { FIP_SC_VN_PROBE_REP, "Probe Reply" },
+ { FIP_SC_VN_CLAIM_NOTIFY, "Claim Notification" },
+ { FIP_SC_VN_CLAIM_REP, "Claim Response" },
+ { FIP_SC_VN_BEACON, "Beacon" },
+ { 0, NULL }
};
/*
* Descriptor types.
*/
enum fip_desc_type {
- FIP_DT_PRI = 1, /* priority for forwarder selection */
- FIP_DT_MAC = 2, /* MAC address */
- FIP_DT_MAP_OUI = 3, /* FC-MAP OUI */
- FIP_DT_NAME = 4, /* switch name or node name */
- FIP_DT_FAB = 5, /* fabric descriptor */
- FIP_DT_FCOE_SIZE = 6, /* max FCoE frame size */
- FIP_DT_FLOGI = 7, /* FLOGI request or response */
- FIP_DT_FDISC = 8, /* FDISC request or response */
- FIP_DT_LOGO = 9, /* LOGO request or response */
- FIP_DT_ELP = 10, /* ELP request or response */
- FIP_DT_VN = 11, /* VN_Port Info */
- FIP_DT_FKA = 12, /* FIP keep-alive / advert. period */
- FIP_DT_VEND = 13, /* Vendor-specific TLV */
- FIP_DT_VLAN = 14, /* VLAN number */
- FIP_DT_FC4F = 15 /* FC-4 features */
+ FIP_DT_PRI = 1, /* priority for forwarder selection */
+ FIP_DT_MAC = 2, /* MAC address */
+ FIP_DT_MAP_OUI = 3, /* FC-MAP OUI */
+ FIP_DT_NAME = 4, /* switch name or node name */
+ FIP_DT_FAB = 5, /* fabric descriptor */
+ FIP_DT_FCOE_SIZE = 6, /* max FCoE frame size */
+ FIP_DT_FLOGI = 7, /* FLOGI request or response */
+ FIP_DT_FDISC = 8, /* FDISC request or response */
+ FIP_DT_LOGO = 9, /* LOGO request or response */
+ FIP_DT_ELP = 10, /* ELP request or response */
+ FIP_DT_VN = 11, /* VN_Port Info */
+ FIP_DT_FKA = 12, /* FIP keep-alive / advert. period */
+ FIP_DT_VEND = 13, /* Vendor-specific TLV */
+ FIP_DT_VLAN = 14, /* VLAN number */
+ FIP_DT_FC4F = 15 /* FC-4 features */
};
static const value_string fip_desc_types[] = {
- { FIP_DT_PRI, "Priority" },
- { FIP_DT_MAC, "MAC Address" },
- { FIP_DT_MAP_OUI, "FPMA MAP OUI" },
- { FIP_DT_NAME, "Switch or Node Name" },
- { FIP_DT_FAB, "Fabric Descriptor" },
- { FIP_DT_FCOE_SIZE, "Max FCoE frame size" },
- { FIP_DT_FLOGI, "FLOGI Encapsulation" },
- { FIP_DT_FDISC, "FDISC Encapsulation" },
- { FIP_DT_LOGO, "LOGO Encapsulation" },
- { FIP_DT_ELP, "ELP Encapsulation" },
- { FIP_DT_VN, "VN_Port Info" },
- { FIP_DT_FKA, "FKA_ADV_Period" },
- { FIP_DT_VEND, "Vendor_ID" },
- { FIP_DT_VLAN, "VLAN" },
- { FIP_DT_FC4F, "FC-4 features" },
- { 0, NULL }
+ { FIP_DT_PRI, "Priority" },
+ { FIP_DT_MAC, "MAC Address" },
+ { FIP_DT_MAP_OUI, "FPMA MAP OUI" },
+ { FIP_DT_NAME, "Switch or Node Name" },
+ { FIP_DT_FAB, "Fabric Descriptor" },
+ { FIP_DT_FCOE_SIZE, "Max FCoE frame size" },
+ { FIP_DT_FLOGI, "FLOGI Encapsulation" },
+ { FIP_DT_FDISC, "FDISC Encapsulation" },
+ { FIP_DT_LOGO, "LOGO Encapsulation" },
+ { FIP_DT_ELP, "ELP Encapsulation" },
+ { FIP_DT_VN, "VN_Port Info" },
+ { FIP_DT_FKA, "FKA_ADV_Period" },
+ { FIP_DT_VEND, "Vendor_ID" },
+ { FIP_DT_VLAN, "VLAN" },
+ { FIP_DT_FC4F, "FC-4 features" },
+ { 0, NULL }
};
/*
* flags in header fip_flags.
*/
enum fip_flag {
- FIP_FL_FPMA = 0x8000, /* supports FPMA fabric-provided MACs */
- FIP_FL_SPMA = 0x4000, /* supports SPMA server-provided MACs */
- FIP_FL_REC_P2P = 0x0008, /* recorded addr or point-to-point */
- FIP_FL_AVAIL = 0x0004, /* available for FLOGI */
- FIP_FL_SOL = 0x0002, /* this is a solicited message */
- FIP_FL_FPORT = 0x0001 /* sent from an F port */
+ FIP_FL_FPMA = 0x8000, /* supports FPMA fabric-provided MACs */
+ FIP_FL_SPMA = 0x4000, /* supports SPMA server-provided MACs */
+ FIP_FL_REC_P2P = 0x0008, /* recorded addr or point-to-point */
+ FIP_FL_AVAIL = 0x0004, /* available for FLOGI */
+ FIP_FL_SOL = 0x0002, /* this is a solicited message */
+ FIP_FL_FPORT = 0x0001 /* sent from an F port */
};
static int proto_fip = -1;
@@ -204,7 +200,7 @@ static int hf_fip_disc_subcode = -1;
static int hf_fip_ls_subcode = -1;
static int hf_fip_ctrl_subcode = -1;
static int hf_fip_vlan_subcode = -1;
-static int hf_fip_vn2vn_subcode = -1;
+static int hf_fip_vn2vn_subcode = -1;
static int hf_fip_hex_subcode = -1;
static int hf_fip_dlen = -1;
static int hf_fip_flags = -1;
@@ -225,49 +221,49 @@ static const int *hf_fip_flags_fields[] = {
NULL
};
-static int hf_fip_desc_type = -1;
-static int hf_fip_desc_len = -1;
-static int hf_fip_desc_pri = -1;
-static int hf_fip_desc_mac = -1;
-static int hf_fip_desc_map = -1;
-static int hf_fip_desc_name = -1;
-static int hf_fip_desc_fab_vfid = -1;
-static int hf_fip_desc_fab_map = -1;
-static int hf_fip_desc_fab_name = -1;
-static int hf_fip_desc_fcoe_size = -1;
-static int hf_fip_desc_vn_mac = -1;
-static int hf_fip_desc_vn_fid = -1;
-static int hf_fip_desc_vn_wwpn = -1;
-static int hf_fip_desc_fka = -1;
-static int hf_fip_desc_vend = -1;
-static int hf_fip_desc_vend_data = -1;
-static int hf_fip_desc_vlan = -1;
-static int hf_fip_desc_unk = -1;
+static int hf_fip_desc_type = -1;
+static int hf_fip_desc_len = -1;
+static int hf_fip_desc_pri = -1;
+static int hf_fip_desc_mac = -1;
+static int hf_fip_desc_map = -1;
+static int hf_fip_desc_name = -1;
+static int hf_fip_desc_fab_vfid = -1;
+static int hf_fip_desc_fab_map = -1;
+static int hf_fip_desc_fab_name = -1;
+static int hf_fip_desc_fcoe_size = -1;
+static int hf_fip_desc_vn_mac = -1;
+static int hf_fip_desc_vn_fid = -1;
+static int hf_fip_desc_vn_wwpn = -1;
+static int hf_fip_desc_fka = -1;
+static int hf_fip_desc_vend = -1;
+static int hf_fip_desc_vend_data = -1;
+static int hf_fip_desc_vlan = -1;
+static int hf_fip_desc_unk = -1;
static int hf_fip_desc_fc4f_types = -1;
-static int hf_fip_desc_fcp_feat = -1;
-static int hf_fip_type_ip = -1;
-static int hf_fip_type_fcp = -1;
-static int hf_fip_type_gs3 = -1;
-static int hf_fip_fcp_feat_i = -1;
-static int hf_fip_fcp_feat_t = -1;
-
-static int ett_fip = -1;
-static int ett_fip_flags = -1;
-static int ett_fip_dt_pri = -1;
-static int ett_fip_dt_mac = -1;
-static int ett_fip_dt_map = -1;
-static int ett_fip_dt_name = -1;
-static int ett_fip_dt_fab = -1;
-static int ett_fip_dt_mdl = -1;
-static int ett_fip_dt_caps = -1;
-static int ett_fip_dt_vn = -1;
-static int ett_fip_dt_fka = -1;
-static int ett_fip_dt_vend = -1;
-static int ett_fip_dt_vlan = -1;
-static int ett_fip_dt_unk = -1;
-static int ett_fip_dt_fc4f = -1;
-static int ett_fip_dt_fc4f_types = -1;
-static int ett_fip_dt_fcp_feat = -1;
+static int hf_fip_desc_fcp_feat = -1;
+static int hf_fip_type_ip = -1;
+static int hf_fip_type_fcp = -1;
+static int hf_fip_type_gs3 = -1;
+static int hf_fip_fcp_feat_i = -1;
+static int hf_fip_fcp_feat_t = -1;
+
+static int ett_fip = -1;
+static int ett_fip_flags = -1;
+static int ett_fip_dt_pri = -1;
+static int ett_fip_dt_mac = -1;
+static int ett_fip_dt_map = -1;
+static int ett_fip_dt_name = -1;
+static int ett_fip_dt_fab = -1;
+static int ett_fip_dt_mdl = -1;
+static int ett_fip_dt_caps = -1;
+static int ett_fip_dt_vn = -1;
+static int ett_fip_dt_fka = -1;
+static int ett_fip_dt_vend = -1;
+static int ett_fip_dt_vlan = -1;
+static int ett_fip_dt_unk = -1;
+static int ett_fip_dt_fc4f = -1;
+static int ett_fip_dt_fc4f_types = -1;
+static int ett_fip_dt_fcp_feat = -1;
static dissector_handle_t fc_handle;
@@ -289,6 +285,7 @@ fip_desc_fc4f(tvbuff_t *tvb, proto_tree *tree, proto_item *item)
{
guint mask;
guint offset;
+
static const int *types_word0[] = { /* types 0 - 31 */
&hf_fip_type_ip,
&hf_fip_type_fcp,
@@ -334,21 +331,20 @@ fip_desc_fc4f(tvbuff_t *tvb, proto_tree *tree, proto_item *item)
static void
dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint op;
- guint sub;
- guint rlen;
+ guint op;
+ guint sub;
+ guint rlen;
proto_item *ti;
proto_item *item;
proto_tree *fip_tree;
proto_tree *subtree;
- guint dtype;
- guint dlen;
- guint desc_offset;
- guint val;
- tvbuff_t *desc_tvb;
- tvbuff_t *ls_tvb = NULL;
+ guint dtype;
+ guint dlen;
+ guint desc_offset;
+ guint val;
+ tvbuff_t *desc_tvb;
const char *info;
- char *text;
+ char *text;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FIP");
col_clear(pinfo->cinfo, COL_INFO);
@@ -361,7 +357,7 @@ dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
}
- op = tvb_get_ntohs(tvb, 2);
+ op = tvb_get_ntohs(tvb, 2);
sub = tvb_get_guint8(tvb, 5);
switch (op) {
@@ -424,7 +420,7 @@ dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
rlen *= FIP_BPW;
proto_tree_add_text(fip_tree, tvb, desc_offset, rlen, "Descriptors:");
- while (rlen > 0 && tvb_bytes_exist(tvb, desc_offset, 2)) {
+ while ((rlen > 0) && tvb_bytes_exist(tvb, desc_offset, 2)) {
dlen = tvb_get_guint8(tvb, desc_offset + 1) * FIP_BPW;
if (!dlen) {
proto_tree_add_text(fip_tree, tvb, desc_offset, -1,
@@ -497,12 +493,14 @@ dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case FIP_DT_FLOGI:
case FIP_DT_FDISC:
case FIP_DT_LOGO:
- case FIP_DT_ELP:
+ case FIP_DT_ELP: {
+ tvbuff_t *ls_tvb;
subtree = proto_item_add_subtree(item, ett_fip_dt_caps);
fip_desc_type_len(subtree, desc_tvb);
ls_tvb = tvb_new_subset(desc_tvb, 4, dlen - 4, -1);
call_dissector(fc_handle, ls_tvb, pinfo, subtree);
proto_item_append_text(item, "%u bytes", dlen - 4);
+ }
break;
case FIP_DT_VN:
subtree = proto_item_add_subtree(item, ett_fip_dt_vn);
@@ -567,126 +565,214 @@ proto_register_fip(void)
* FIP header fields.
*/
{ &hf_fip_ver,
- {"Version", "fip.ver", FT_UINT8, BASE_DEC,
- NULL, 0xf0, NULL, HFILL}},
+ { "Version", "fip.ver",
+ FT_UINT8, BASE_DEC, NULL, 0xf0,
+ NULL, HFILL}},
+
+
{ &hf_fip_op,
- {"Opcode", "fip.opcode", FT_UINT16, BASE_HEX,
- VALS(fip_opcodes), 0, NULL, HFILL}},
+ { "Opcode", "fip.opcode",
+ FT_UINT16, BASE_HEX, VALS(fip_opcodes), 0,
+ NULL, HFILL}},
+
{ &hf_fip_disc_subcode,
- {"Discovery Subcode", "fip.disc_subcode", FT_UINT8, BASE_HEX,
- VALS(fip_disc_subcodes), 0, NULL, HFILL}},
+ { "Discovery Subcode", "fip.disc_subcode",
+ FT_UINT8, BASE_HEX, VALS(fip_disc_subcodes), 0,
+ NULL, HFILL}},
+
{ &hf_fip_ls_subcode,
- {"Link Service Subcode", "fip.ls.subcode", FT_UINT8, BASE_HEX,
- VALS(fip_ls_subcodes), 0, NULL, HFILL}},
+ { "Link Service Subcode", "fip.ls.subcode",
+ FT_UINT8, BASE_HEX, VALS(fip_ls_subcodes), 0,
+ NULL, HFILL}},
+
{ &hf_fip_ctrl_subcode,
- {"Control Subcode", "fip.ctrl_subcode", FT_UINT8, BASE_HEX,
- VALS(fip_ctrl_subcodes), 0, NULL, HFILL}},
+ { "Control Subcode", "fip.ctrl_subcode",
+ FT_UINT8, BASE_HEX, VALS(fip_ctrl_subcodes), 0,
+ NULL, HFILL}},
+
{ &hf_fip_vlan_subcode,
- {"VLAN Subcode", "fip.vlan_subcode", FT_UINT8, BASE_HEX,
- VALS(fip_vlan_subcodes), 0, NULL, HFILL}},
+ { "VLAN Subcode", "fip.vlan_subcode",
+ FT_UINT8, BASE_HEX, VALS(fip_vlan_subcodes), 0,
+ NULL, HFILL}},
+
{ &hf_fip_vn2vn_subcode,
- {"VN2VN Subcode", "fip.vn2vn_subcode", FT_UINT8, BASE_HEX,
- VALS(fip_vn2vn_subcodes), 0, NULL, HFILL}},
+ { "VN2VN Subcode", "fip.vn2vn_subcode",
+ FT_UINT8, BASE_HEX, VALS(fip_vn2vn_subcodes), 0,
+ NULL, HFILL}},
+
{ &hf_fip_hex_subcode,
- {"Unknown Subcode", "fip.subcode", FT_UINT8, BASE_HEX,
- NULL, 0, NULL, HFILL}},
+ { "Unknown Subcode", "fip.subcode",
+ FT_UINT8, BASE_HEX, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_dlen,
- {"Length of Descriptors (words)", "fip.dl_len", FT_UINT16, BASE_DEC,
- NULL, 0, NULL, HFILL}},
+ { "Length of Descriptors (words)", "fip.dl_len",
+ FT_UINT16, BASE_DEC, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_flags,
- {"Flags", "fip.flags", FT_UINT16, BASE_HEX,
- NULL, 0, NULL, HFILL}},
+ { "Flags", "fip.flags",
+ FT_UINT16, BASE_HEX, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_flag_fpma,
- {"Fabric Provided MAC addr", "fip.flags.fpma", FT_BOOLEAN, 16,
- NULL, FIP_FL_FPMA, NULL, HFILL}},
+ { "Fabric Provided MAC addr", "fip.flags.fpma",
+ FT_BOOLEAN, 16, NULL, FIP_FL_FPMA,
+ NULL, HFILL}},
+
{ &hf_fip_flag_spma,
- {"Server Provided MAC addr", "fip.flags.spma", FT_BOOLEAN, 16,
- NULL, FIP_FL_SPMA, NULL, HFILL}},
+ { "Server Provided MAC addr", "fip.flags.spma",
+ FT_BOOLEAN, 16, NULL, FIP_FL_SPMA,
+ NULL, HFILL}},
+
{ &hf_fip_flag_rec_p2p,
- {"REC/P2P", "fip.flags.rec_p2p", FT_BOOLEAN, 16,
- NULL, FIP_FL_REC_P2P, NULL, HFILL}},
+ { "REC/P2P", "fip.flags.rec_p2p",
+ FT_BOOLEAN, 16, NULL, FIP_FL_REC_P2P,
+ NULL, HFILL}},
+
{ &hf_fip_flag_avail,
- {"Available", "fip.flags.available", FT_BOOLEAN, 16,
- NULL, FIP_FL_AVAIL, NULL, HFILL}},
+ { "Available", "fip.flags.available",
+ FT_BOOLEAN, 16, NULL, FIP_FL_AVAIL,
+ NULL, HFILL}},
+
{ &hf_fip_flag_sol,
- {"Solicited", "fip.flags.sol", FT_BOOLEAN, 16,
- NULL, FIP_FL_SOL, NULL, HFILL}},
+ { "Solicited", "fip.flags.sol",
+ FT_BOOLEAN, 16, NULL, FIP_FL_SOL,
+ NULL, HFILL}},
+
{ &hf_fip_flag_fport,
- {"F_Port", "fip.flags.fport", FT_BOOLEAN, 16,
- NULL, FIP_FL_FPORT, NULL, HFILL}},
+ { "F_Port", "fip.flags.fport",
+ FT_BOOLEAN, 16, NULL, FIP_FL_FPORT,
+ NULL, HFILL}},
+
{ &hf_fip_desc_type,
- {"Descriptor Type", "fip.desc_type", FT_UINT8, BASE_HEX,
- VALS(fip_desc_types), 0, NULL, HFILL}},
+ { "Descriptor Type", "fip.desc_type",
+ FT_UINT8, BASE_HEX, VALS(fip_desc_types), 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_len,
- {"Descriptor Length (words)", "fip.desc_len", FT_UINT8, BASE_DEC,
- NULL, 0, NULL, HFILL}},
+ { "Descriptor Length (words)", "fip.desc_len",
+ FT_UINT8, BASE_DEC, NULL, 0,
+ NULL, HFILL}},
+
/*
* Various descriptor fields.
*/
{ &hf_fip_desc_pri,
- {"Priority", "fip.pri", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL}},
+ { "Priority", "fip.pri",
+ FT_UINT8, BASE_DEC, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_mac,
- {"MAC Address", "fip.mac", FT_ETHER, BASE_NONE, NULL,
- 0, NULL, HFILL}},
+ { "MAC Address", "fip.mac",
+ FT_ETHER, BASE_NONE, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_map,
- {"FC-MAP-OUI", "fip.map", FT_STRING, BASE_NONE, NULL,
- 0, NULL, HFILL}},
+ { "FC-MAP-OUI", "fip.map",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_name,
- {"Switch or Node Name", "fip.name", FT_STRING, BASE_NONE, NULL,
- 0, NULL, HFILL}},
+ { "Switch or Node Name", "fip.name",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_fab_vfid,
- {"VFID", "fip.fab.vfid", FT_UINT16, BASE_DEC, NULL,
- 0, NULL, HFILL}},
+ { "VFID", "fip.fab.vfid",
+ FT_UINT16, BASE_DEC, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_fab_map,
- {"FC-MAP", "fip.fab.map", FT_STRING, BASE_NONE, NULL,
- 0, NULL, HFILL}},
+ { "FC-MAP", "fip.fab.map",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_fab_name,
- {"Fabric Name", "fip.fab.name", FT_STRING, BASE_NONE, NULL,
- 0, NULL, HFILL}},
+ { "Fabric Name", "fip.fab.name",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_fcoe_size,
- {"Max FCoE frame size", "fip.fcoe_size", FT_UINT16, BASE_DEC, NULL,
- 0, NULL, HFILL}},
+ { "Max FCoE frame size", "fip.fcoe_size",
+ FT_UINT16, BASE_DEC, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_vn_mac,
- {"VN_Port MAC Address", "fip.vn.mac", FT_ETHER, BASE_NONE, NULL,
- 0, NULL, HFILL}},
+ { "VN_Port MAC Address", "fip.vn.mac",
+ FT_ETHER, BASE_NONE, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_vn_fid,
- {"VN_Port FC_ID", "fip.vn.fc_id", FT_UINT32, BASE_HEX, NULL,
- 0, NULL, HFILL}},
+ { "VN_Port FC_ID", "fip.vn.fc_id",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_vn_wwpn,
- {"Port Name", "fip.vn.pwwn", FT_STRING, BASE_NONE, NULL,
- 0, NULL, HFILL}},
+ { "Port Name", "fip.vn.pwwn",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_fka,
- {"FKA_ADV_Period", "fip.fka", FT_UINT32, BASE_DEC, NULL,
- 0, NULL, HFILL}},
+ { "FKA_ADV_Period", "fip.fka",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_vend,
- {"Vendor-ID", "fip.vendor", FT_BYTES, BASE_NONE, NULL,
- 0, NULL, HFILL}},
+ { "Vendor-ID", "fip.vendor",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_vend_data,
- {"Vendor-specific data", "fip.vendor.data", FT_BYTES, BASE_NONE, NULL,
- 0, NULL, HFILL}},
+ { "Vendor-specific data", "fip.vendor.data",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_vlan,
- {"VLAN", "fip.vlan", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL}},
+ { "VLAN", "fip.vlan",
+ FT_UINT16, BASE_DEC, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_fc4f_types,
- {"FC4 Types", "fip.fc4f.types", FT_UINT32, BASE_HEX, NULL,
- 0, NULL, HFILL}},
+ { "FC4 Types", "fip.fc4f.types",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ NULL, HFILL}},
+
{ &hf_fip_desc_fcp_feat,
- {"FCP Features", "fip.fc4f.feat.fcp", FT_UINT32, BASE_HEX, NULL,
- 0xf, NULL, HFILL}},
+ { "FCP Features", "fip.fc4f.feat.fcp",
+ FT_UINT32, BASE_HEX, NULL, 0xf,
+ NULL, HFILL}},
+
{ &hf_fip_type_ip,
- {"IP", "fip.fc4f.ip", FT_BOOLEAN, 32, NULL, 1 << 5, NULL, HFILL}},
+ { "IP", "fip.fc4f.ip",
+ FT_BOOLEAN, 32, NULL, 1 << 5,
+ NULL, HFILL}},
+
{ &hf_fip_type_fcp,
- {"FCP", "fip.fc4f.fcp", FT_BOOLEAN, 32, NULL, 1 << 8, NULL, HFILL}},
+ { "FCP", "fip.fc4f.fcp",
+ FT_BOOLEAN, 32, NULL, 1 << 8,
+ NULL, HFILL}},
+
{ &hf_fip_type_gs3,
- {"GS3", "fip.fc4f.gs3", FT_BOOLEAN, 32, NULL, 1 << 0, NULL, HFILL}},
+ { "GS3", "fip.fc4f.gs3",
+ FT_BOOLEAN, 32, NULL, 1 << 0,
+ NULL, HFILL}},
+
{ &hf_fip_fcp_feat_t,
- {"FCP Target", "fip.fc4f.feat.fcp.target", FT_BOOLEAN,
- 32, NULL, 1, NULL, HFILL}},
+ { "FCP Target", "fip.fc4f.feat.fcp.target",
+ FT_BOOLEAN, 32, NULL, 1,
+ NULL, HFILL}},
+
{ &hf_fip_fcp_feat_i,
- {"FCP Initiator", "fip.fc4f.feat.fcp.initiator", FT_BOOLEAN,
- 32, NULL, 2, NULL, HFILL}},
+ { "FCP Initiator", "fip.fc4f.feat.fcp.initiator",
+ FT_BOOLEAN, 32, NULL, 2,
+ NULL, HFILL}},
+
{ &hf_fip_desc_unk,
- {"Unknown Descriptor", "fip.desc", FT_BYTES, BASE_NONE, NULL,
- 0, NULL, HFILL}}
+ { "Unknown Descriptor", "fip.desc",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ NULL, HFILL}}
+
};
static gint *ett[] = {
&ett_fip,
diff --git a/epan/dissectors/packet-fix.c b/epan/dissectors/packet-fix.c
index e57070a69c..2f253d7927 100644
--- a/epan/dissectors/packet-fix.c
+++ b/epan/dissectors/packet-fix.c
@@ -76,9 +76,10 @@ static range_t *fix_tcp_range = NULL;
/* 8=FIX */
#define MARKER_TAG "8=FIX"
#define MARKER_LEN 5
+
static int fix_marker(tvbuff_t *tvb, int offset)
{
- return tvb_strneql(tvb, offset, MARKER_TAG, MARKER_LEN);
+ return tvb_strneql(tvb, offset, MARKER_TAG, MARKER_LEN);
}
/*
@@ -114,9 +115,9 @@ tag_search(int key)
static int fix_next_header(tvbuff_t *tvb, int offset)
{
/* try to resync to the next start */
- guint min_len = tvb_length_remaining(tvb, offset);
- const guint8 *data = tvb_get_ephemeral_string(tvb, offset, min_len);
- const guint8 *start = data;
+ guint min_len = tvb_length_remaining(tvb, offset);
+ const guint8 *data = tvb_get_ephemeral_string(tvb, offset, min_len);
+ const guint8 *start = data;
while ((start = strstr(start, "\0018"))) {
min_len = (guint) (start +1 -data);
@@ -138,7 +139,7 @@ static int fix_next_header(tvbuff_t *tvb, int offset)
static fix_parameter *fix_param(tvbuff_t *tvb, int offset)
{
static fix_parameter ret;
- int equals;
+ int equals;
ret.ctrla_offset = tvb_find_guint8(tvb, offset, -1, 0x01);
if (ret.ctrla_offset == -1) {
@@ -152,17 +153,17 @@ static fix_parameter *fix_param(tvbuff_t *tvb, int offset)
}
ret.value_offset = equals + 1;
- ret.tag_len = ret.value_offset - offset - 1;
- ret.value_len = ret.ctrla_offset - ret.value_offset;
+ ret.tag_len = ret.value_offset - offset - 1;
+ ret.value_len = ret.ctrla_offset - ret.value_offset;
return &ret;
}
/* ---------------------------------------------- */
static int fix_header_len(tvbuff_t *tvb, int offset)
{
- int base_offset, ctrla_offset;
- char *value;
- int size;
+ int base_offset, ctrla_offset;
+ char *value;
+ int size;
fix_parameter *tag;
base_offset = offset;
@@ -219,14 +220,14 @@ static void
dissect_fix_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* Set up structures needed to add the protocol subtree and manage it */
- proto_item *ti;
- proto_tree *fix_tree;
- int pdu_len;
- int offset = 0;
- int field_offset, ctrla_offset;
- int tag_value;
- char *value;
- char *tag_str;
+ proto_item *ti;
+ proto_tree *fix_tree;
+ int pdu_len;
+ int offset = 0;
+ int field_offset, ctrla_offset;
+ int tag_value;
+ char *value;
+ char *tag_str;
fix_parameter *tag;
/* Make entries in Protocol column and Info column on summary display */
@@ -466,7 +467,6 @@ static void fix_prefs(void)
void
proto_register_fix(void)
{
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{ &hf_fix_data,
{ "Continuation Data", "fix.data", FT_BYTES, BASE_NONE, NULL, 0x00,
@@ -507,7 +507,6 @@ proto_register_fix(void)
proto_fix = proto_register_protocol("Financial Information eXchange Protocol",
"FIX", "fix");
- /* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_fix, hf, array_length(hf));
proto_register_field_array(proto_fix, hf_FIX, array_length(hf_FIX));
proto_register_subtree_array(ett, array_length(ett));
@@ -516,7 +515,8 @@ proto_register_fix(void)
prefs_register_bool_preference(fix_module, "desegment",
"Reassemble FIX messages spanning multiple TCP segments",
"Whether the FIX dissector should reassemble messages spanning multiple TCP segments."
- " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
+ " To use this option, you must also enable"
+ " \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
&fix_desegment);
prefs_register_range_preference(fix_module, "tcp.port", "TCP Ports", "TCP Ports range", &global_fix_tcp_range, 65535);
diff --git a/epan/dissectors/packet-fmp.c b/epan/dissectors/packet-fmp.c
index 583e8bcb71..d738eb7af0 100644
--- a/epan/dissectors/packet-fmp.c
+++ b/epan/dissectors/packet-fmp.c
@@ -111,404 +111,404 @@ static gboolean fmp_fhandle_reqrep_matching = FALSE;
static int
dissect_fmp_genString(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- encoding mode;
+ encoding mode;
- mode = tvb_get_ntohl(tvb, offset);
+ mode = tvb_get_ntohl(tvb, offset);
- switch (mode) {
- case FMP_ASCII:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Encoding Mode: ASCII (%d)", mode);
- break;
+ switch (mode) {
+ case FMP_ASCII:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Encoding Mode: ASCII (%d)", mode);
+ break;
- case FMP_UTF8:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Encoding Mode: UTF8 (%d)", mode);
- break;
+ case FMP_UTF8:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Encoding Mode: UTF8 (%d)", mode);
+ break;
- case FMP_UNICODE1:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Encoding Mode: UNICODE (%d)", mode);
- break;
+ case FMP_UNICODE1:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Encoding Mode: UNICODE (%d)", mode);
+ break;
- default:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Encoding Mode: UNKNOWN (%d)", mode);
- offset += 4;
- return offset;
- }
- offset += 4;
- offset = dissect_rpc_string(tvb, tree, hf_fmp_path,
- offset, NULL);
+ default:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Encoding Mode: UNKNOWN (%d)", mode);
+ offset += 4;
+ return offset;
+ }
+ offset += 4;
+ offset = dissect_rpc_string(tvb, tree, hf_fmp_path,
+ offset, NULL);
- return offset;
+ return offset;
}
static int
get_fileHandleSrc_size(tvbuff_t *tvb, int offset)
{
- int length;
- nativeProtocol np;
-
- np = tvb_get_ntohl(tvb, offset);
-
- switch (np) {
- case FMP_PATH:
- length = 4 + FMP_MAX_PATH_LEN;
- break;
- case FMP_NFS:
- length = 8 + tvb_get_ntohl(tvb, offset + 4);
- break;
- case FMP_CIFS:
- length = 10;
- break;
- case FMP_FMP:
- length = 8 + tvb_get_ntohl(tvb, offset + 4);
- break;
- case FMP_FS_ONLY:
- length = 8;
- break;
- case FMP_SHARE:
- /* FALLTHROUGH */
- case FMP_MOUNT:
- length = 8 + FMP_MAX_PATH_LEN;
- break;
- default:
- length = 4;
- break;
- }
-
- return length;
+ int length;
+ nativeProtocol np;
+
+ np = tvb_get_ntohl(tvb, offset);
+
+ switch (np) {
+ case FMP_PATH:
+ length = 4 + FMP_MAX_PATH_LEN;
+ break;
+ case FMP_NFS:
+ length = 8 + tvb_get_ntohl(tvb, offset + 4);
+ break;
+ case FMP_CIFS:
+ length = 10;
+ break;
+ case FMP_FMP:
+ length = 8 + tvb_get_ntohl(tvb, offset + 4);
+ break;
+ case FMP_FS_ONLY:
+ length = 8;
+ break;
+ case FMP_SHARE:
+ /* FALLTHROUGH */
+ case FMP_MOUNT:
+ length = 8 + FMP_MAX_PATH_LEN;
+ break;
+ default:
+ length = 4;
+ break;
+ }
+
+ return length;
}
static int
dissect_fmp_fileHandleSrc(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- nativeProtocol np;
-
- proto_item *fileHandleItem;
- proto_tree *fileHandleTree;
- int length;
-
- length = get_fileHandleSrc_size(tvb, offset);
-
- np = tvb_get_ntohl(tvb, offset);
-
- fileHandleItem = proto_tree_add_text(tree, tvb, offset, length,
- "Source File Handle");
- fileHandleTree = proto_item_add_subtree(fileHandleItem,
- ett_fmp_fileHandle);
-
- switch (np) {
- case FMP_PATH:
- proto_tree_add_text(fileHandleTree, tvb, offset, 4,
- "Native Protocol: PATH (%d)", np);
- offset += 4;
-
- offset = dissect_rpc_string(tvb, fileHandleTree,
- hf_fmp_mount_path, offset, NULL);
- break;
-
- case FMP_NFS:
- proto_tree_add_text(fileHandleTree, tvb, offset, 4,
- "Native Protocol: NFS (%d)", np);
- offset += 4;
-
- offset = dissect_rpc_data(tvb, fileHandleTree,
- hf_fmp_nfsFHandle, offset);
- break;
-
- case FMP_CIFS:
- proto_tree_add_text(fileHandleTree, tvb, offset, 4,
- "Native Protocol: CIFS (%d)", np);
- offset += 4;
-
- proto_tree_add_text(fileHandleTree, tvb, offset, 2, "fid: %d",
- tvb_get_ntohs(tvb, offset));
- offset += 2;
-
- proto_tree_add_text(fileHandleTree, tvb, offset, 2, "tid: %d",
- tvb_get_ntohs(tvb, offset));
- offset += 2;
-
- proto_tree_add_text(fileHandleTree, tvb, offset, 2, "uid: %d",
- tvb_get_ntohs(tvb, offset));
- offset += 2;
- break;
-
- case FMP_FMP:
- proto_tree_add_text(fileHandleTree, tvb, offset, 4,
- "Native Protocol: FMP (%d)", np);
- offset += 4;
-
- offset = dissect_rpc_string(tvb, fileHandleTree,
- hf_fmp_fmpFHandle, offset, NULL);
- break;
-
- case FMP_FS_ONLY:
- proto_tree_add_text(fileHandleTree, tvb, offset, 4,
- "Native Protocol: FS_ONLY (%d)", np);
- offset += 4;
-
- proto_tree_add_text(fileHandleTree, tvb, offset, 4,
- "FsID: %d", tvb_get_ntohl(tvb, offset));
- offset += 4;
- break;
-
- case FMP_SHARE:
- proto_tree_add_text(fileHandleTree, tvb, offset, 4,
- "Native Protocol: SHARE (%d)", np);
- offset += 4;
-
- offset = dissect_fmp_genString(tvb, offset, fileHandleTree);
- break;
-
- case FMP_MOUNT:
- proto_tree_add_text(fileHandleTree, tvb, offset, 4,
- "Native Protocol: MOUNT (%d)", np);
- offset += 4;
-
- offset = dissect_fmp_genString(tvb, offset, fileHandleTree);
- break;
-
- case FMP_CIFSV2:
- proto_tree_add_text(fileHandleTree, tvb, offset, 4,
- "Native Protocol: CIFSV2: (%d)", np);
- offset += 4;
- proto_tree_add_text(fileHandleTree, tvb, offset, 2, "fid : %d",
- tvb_get_ntohs(tvb, offset));
- offset += 2;
-
- proto_tree_add_text(fileHandleTree, tvb, offset, 2, "tid : %d",
- tvb_get_ntohs(tvb, offset));
- offset += 2;
-
- proto_tree_add_text(fileHandleTree, tvb, offset, 2, "uid : %d",
- tvb_get_ntohs(tvb, offset));
- offset += 2;
-
- proto_tree_add_text(fileHandleTree, tvb, offset, 2, "cifsPort: %d",
- tvb_get_ntohs(tvb, offset));
- offset += 2;
- break;
- case FMP_UNC:
- proto_tree_add_text(fileHandleTree, tvb, offset, 4,
- "Native Protocol: UNC: (%d)", np);
- offset += 4;
+ nativeProtocol np;
+
+ proto_item *fileHandleItem;
+ proto_tree *fileHandleTree;
+ int length;
+
+ length = get_fileHandleSrc_size(tvb, offset);
+
+ np = tvb_get_ntohl(tvb, offset);
+
+ fileHandleItem = proto_tree_add_text(tree, tvb, offset, length,
+ "Source File Handle");
+ fileHandleTree = proto_item_add_subtree(fileHandleItem,
+ ett_fmp_fileHandle);
+
+ switch (np) {
+ case FMP_PATH:
+ proto_tree_add_text(fileHandleTree, tvb, offset, 4,
+ "Native Protocol: PATH (%d)", np);
+ offset += 4;
+
+ offset = dissect_rpc_string(tvb, fileHandleTree,
+ hf_fmp_mount_path, offset, NULL);
+ break;
+
+ case FMP_NFS:
+ proto_tree_add_text(fileHandleTree, tvb, offset, 4,
+ "Native Protocol: NFS (%d)", np);
+ offset += 4;
+
+ offset = dissect_rpc_data(tvb, fileHandleTree,
+ hf_fmp_nfsFHandle, offset);
+ break;
+
+ case FMP_CIFS:
+ proto_tree_add_text(fileHandleTree, tvb, offset, 4,
+ "Native Protocol: CIFS (%d)", np);
+ offset += 4;
+
+ proto_tree_add_text(fileHandleTree, tvb, offset, 2, "fid: %d",
+ tvb_get_ntohs(tvb, offset));
+ offset += 2;
+
+ proto_tree_add_text(fileHandleTree, tvb, offset, 2, "tid: %d",
+ tvb_get_ntohs(tvb, offset));
+ offset += 2;
+
+ proto_tree_add_text(fileHandleTree, tvb, offset, 2, "uid: %d",
+ tvb_get_ntohs(tvb, offset));
+ offset += 2;
+ break;
+
+ case FMP_FMP:
+ proto_tree_add_text(fileHandleTree, tvb, offset, 4,
+ "Native Protocol: FMP (%d)", np);
+ offset += 4;
+
+ offset = dissect_rpc_string(tvb, fileHandleTree,
+ hf_fmp_fmpFHandle, offset, NULL);
+ break;
- offset = dissect_fmp_genString(tvb, offset, fileHandleTree);
- break;
+ case FMP_FS_ONLY:
+ proto_tree_add_text(fileHandleTree, tvb, offset, 4,
+ "Native Protocol: FS_ONLY (%d)", np);
+ offset += 4;
+
+ proto_tree_add_text(fileHandleTree, tvb, offset, 4,
+ "FsID: %d", tvb_get_ntohl(tvb, offset));
+ offset += 4;
+ break;
+
+ case FMP_SHARE:
+ proto_tree_add_text(fileHandleTree, tvb, offset, 4,
+ "Native Protocol: SHARE (%d)", np);
+ offset += 4;
+
+ offset = dissect_fmp_genString(tvb, offset, fileHandleTree);
+ break;
+
+ case FMP_MOUNT:
+ proto_tree_add_text(fileHandleTree, tvb, offset, 4,
+ "Native Protocol: MOUNT (%d)", np);
+ offset += 4;
+
+ offset = dissect_fmp_genString(tvb, offset, fileHandleTree);
+ break;
+
+ case FMP_CIFSV2:
+ proto_tree_add_text(fileHandleTree, tvb, offset, 4,
+ "Native Protocol: CIFSV2: (%d)", np);
+ offset += 4;
+ proto_tree_add_text(fileHandleTree, tvb, offset, 2, "fid : %d",
+ tvb_get_ntohs(tvb, offset));
+ offset += 2;
+
+ proto_tree_add_text(fileHandleTree, tvb, offset, 2, "tid : %d",
+ tvb_get_ntohs(tvb, offset));
+ offset += 2;
+
+ proto_tree_add_text(fileHandleTree, tvb, offset, 2, "uid : %d",
+ tvb_get_ntohs(tvb, offset));
+ offset += 2;
+
+ proto_tree_add_text(fileHandleTree, tvb, offset, 2, "cifsPort: %d",
+ tvb_get_ntohs(tvb, offset));
+ offset += 2;
+ break;
+ case FMP_UNC:
+ proto_tree_add_text(fileHandleTree, tvb, offset, 4,
+ "Native Protocol: UNC: (%d)", np);
+ offset += 4;
+
+ offset = dissect_fmp_genString(tvb, offset, fileHandleTree);
+ break;
- default:
- proto_tree_add_text(fileHandleTree, tvb, offset, 4,
- "Native Protocol: UNKNOWN (%d)", np);
- offset += 4;
- break;
- }
+ default:
+ proto_tree_add_text(fileHandleTree, tvb, offset, 4,
+ "Native Protocol: UNKNOWN (%d)", np);
+ offset += 4;
+ break;
+ }
- return offset;
+ return offset;
}
static int
dissect_fmp_extentState(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_extent_state,
- offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_extent_state,
+ offset);
- return offset;
+ return offset;
}
static int
dissect_fmp_extent(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, guint32 ext_num)
{
- proto_item *extItem;
- proto_tree *extTree;
+ proto_item *extItem;
+ proto_tree *extTree;
- extItem = proto_tree_add_text(tree, tvb, offset, 20 ,
- "Extent (%u)", (guint32) ext_num);
+ extItem = proto_tree_add_text(tree, tvb, offset, 20 ,
+ "Extent (%u)", (guint32) ext_num);
- extTree = proto_item_add_subtree(extItem, ett_fmp_ext);
+ extTree = proto_item_add_subtree(extItem, ett_fmp_ext);
- offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_firstLogBlk,
- offset);
- offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_numBlks,
- offset);
- offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_volID, offset);
- offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_startOffset,
- offset);
- offset = dissect_fmp_extentState(tvb, offset, extTree);
+ offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_firstLogBlk,
+ offset);
+ offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_numBlks,
+ offset);
+ offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_volID, offset);
+ offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_startOffset,
+ offset);
+ offset = dissect_fmp_extentState(tvb, offset, extTree);
- return offset;
+ return offset;
}
static int
dissect_fmp_extentList(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- guint32 numExtents;
- guint32 totalLength;
- proto_item *extListItem;
- proto_tree *extListTree;
- guint32 i;
+ guint32 numExtents;
+ guint32 totalLength;
+ proto_item *extListItem;
+ proto_tree *extListTree;
+ guint32 i;
- numExtents = tvb_get_ntohl(tvb, offset);
- totalLength = 4 + (20 * numExtents);
+ numExtents = tvb_get_ntohl(tvb, offset);
+ totalLength = 4 + (20 * numExtents);
- extListItem = proto_tree_add_text(tree, tvb, offset, totalLength,
- "Extent List");
- extListTree = proto_item_add_subtree(extListItem, ett_fmp_extList);
+ extListItem = proto_tree_add_text(tree, tvb, offset, totalLength,
+ "Extent List");
+ extListTree = proto_item_add_subtree(extListItem, ett_fmp_extList);
- offset = dissect_rpc_uint32(tvb, extListTree,
- hf_fmp_extentList_len, offset);
+ offset = dissect_rpc_uint32(tvb, extListTree,
+ hf_fmp_extentList_len, offset);
- for (i = 1; i <= numExtents; i++) {
- offset = dissect_fmp_extent(tvb, offset, pinfo, extListTree, i);
- }
+ for (i = 1; i <= numExtents; i++) {
+ offset = dissect_fmp_extent(tvb, offset, pinfo, extListTree, i);
+ }
- return offset;
+ return offset;
}
static int
dissect_fmp_extentListEx(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree)
+ proto_tree *tree)
{
- guint32 numExtents;
- proto_item *extListItem;
- proto_tree *extListTree;
- guint32 i;
+ guint32 numExtents;
+ proto_item *extListItem;
+ proto_tree *extListTree;
+ guint32 i;
- numExtents = tvb_get_ntohl(tvb, offset);
+ numExtents = tvb_get_ntohl(tvb, offset);
- offset += 4;
+ offset += 4;
- for (i = 1; i <= numExtents; i++) {
- extListItem = proto_tree_add_text(tree, tvb, offset, 28,
+ for (i = 1; i <= numExtents; i++) {
+ extListItem = proto_tree_add_text(tree, tvb, offset, 28,
"Extent List");
- extListTree = proto_item_add_subtree(extListItem, ett_fmp_extList);
+ extListTree = proto_item_add_subtree(extListItem, ett_fmp_extList);
- offset = dissect_rpc_uint64(tvb,extListTree , hf_fmp_firstLogBlk64, offset);
+ offset = dissect_rpc_uint64(tvb,extListTree , hf_fmp_firstLogBlk64, offset);
- offset = dissect_rpc_uint32(tvb,extListTree , hf_fmp_numBlksReq,
+ offset = dissect_rpc_uint32(tvb,extListTree , hf_fmp_numBlksReq,
offset);
- offset = dissect_rpc_uint32(tvb,extListTree , hf_fmp_volID, offset);
+ offset = dissect_rpc_uint32(tvb,extListTree , hf_fmp_volID, offset);
- offset = dissect_rpc_uint64(tvb,extListTree , hf_fmp_start_offset64, offset);
+ offset = dissect_rpc_uint64(tvb,extListTree , hf_fmp_start_offset64, offset);
- offset = dissect_fmp_extentState(tvb, offset, extListTree);
+ offset = dissect_fmp_extentState(tvb, offset, extListTree);
- }
+ }
- return offset;
+ return offset;
}
static int
dissect_plugInID(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- if (!tree) {
- return offset;
- }
+ if (!tree) {
+ return offset;
+ }
- proto_tree_add_item(tree, hf_fmp_plugInID, tvb, offset, FMP_PLUG_IN_ID_SZ,
- ENC_NA);
- return offset;
+ proto_tree_add_item(tree, hf_fmp_plugInID, tvb, offset, FMP_PLUG_IN_ID_SZ,
+ ENC_NA);
+ return offset;
}
static int
-dissect_fmp_flushCmd(tvbuff_t *tvb, int offset, proto_tree *tree)
-{
- guint32 cmd;
- char msg[MAX_MSG_SIZE];
- guint32 bitValue;
- int i;
-
- if (tree) {
- cmd = tvb_get_ntohl(tvb, offset);
-
- /* Initialize the message for an empty string */
- msg[0] = '\0';
-
- for (i = 0; cmd != 0 && i < 32; i++) {
-
- bitValue = 1 << i;
-
- if (cmd & bitValue) {
- switch (bitValue) {
- case FMP_COMMIT_SPECIFIED:
- g_strlcat(msg, "COMMIT_SPECIFIED", MAX_MSG_SIZE);
- break;
- case FMP_RELEASE_SPECIFIED:
- g_strlcat(msg, "RELEASE_SPECIFIED", MAX_MSG_SIZE);
- break;
- case FMP_RELEASE_ALL:
- g_strlcat(msg, "RELEASE_ALL", MAX_MSG_SIZE);
- break;
- case FMP_CLOSE_FILE:
- g_strlcat(msg, "CLOSE_FILE", MAX_MSG_SIZE);
- break;
- case FMP_UPDATE_TIME:
- g_strlcat(msg, "UPDATE_TIME", MAX_MSG_SIZE);
- break;
- case FMP_ACCESS_TIME:
- g_strlcat(msg, "ACCESS_TIME", MAX_MSG_SIZE);
- break;
- default:
- g_strlcat(msg, "UNKNOWN", MAX_MSG_SIZE);
- break;
- }
-
- /* clear the bit that we processed */
- cmd &= ~bitValue;
-
- /* add a "bitwise inclusive OR" symbol between cmds */
- if (cmd) {
- g_strlcat(msg, " | ", MAX_MSG_SIZE);
- }
- }
- }
+dissect_fmp_flushCmd(tvbuff_t *tvb, int offset, proto_tree *tree)
+{
+ guint32 cmd;
+ char msg[MAX_MSG_SIZE];
+ guint32 bitValue;
+ int i;
+
+ if (tree) {
+ cmd = tvb_get_ntohl(tvb, offset);
+
+ /* Initialize the message for an empty string */
+ msg[0] = '\0';
+
+ for (i = 0; cmd != 0 && i < 32; i++) {
+
+ bitValue = 1 << i;
+
+ if (cmd & bitValue) {
+ switch (bitValue) {
+ case FMP_COMMIT_SPECIFIED:
+ g_strlcat(msg, "COMMIT_SPECIFIED", MAX_MSG_SIZE);
+ break;
+ case FMP_RELEASE_SPECIFIED:
+ g_strlcat(msg, "RELEASE_SPECIFIED", MAX_MSG_SIZE);
+ break;
+ case FMP_RELEASE_ALL:
+ g_strlcat(msg, "RELEASE_ALL", MAX_MSG_SIZE);
+ break;
+ case FMP_CLOSE_FILE:
+ g_strlcat(msg, "CLOSE_FILE", MAX_MSG_SIZE);
+ break;
+ case FMP_UPDATE_TIME:
+ g_strlcat(msg, "UPDATE_TIME", MAX_MSG_SIZE);
+ break;
+ case FMP_ACCESS_TIME:
+ g_strlcat(msg, "ACCESS_TIME", MAX_MSG_SIZE);
+ break;
+ default:
+ g_strlcat(msg, "UNKNOWN", MAX_MSG_SIZE);
+ break;
+ }
+
+ /* clear the bit that we processed */
+ cmd &= ~bitValue;
+
+ /* add a "bitwise inclusive OR" symbol between cmds */
+ if (cmd) {
+ g_strlcat(msg, " | ", MAX_MSG_SIZE);
+ }
+ }
+ }
- if (strlen(msg) == 0) {
- g_strlcpy(msg, "No command specified", MAX_MSG_SIZE);
- }
+ if (strlen(msg) == 0) {
+ g_strlcpy(msg, "No command specified", MAX_MSG_SIZE);
+ }
- proto_tree_add_text(tree, tvb, offset, 4, "Cmd: %s", msg);
- }
- offset += 4;
- return offset;
+ proto_tree_add_text(tree, tvb, offset, 4, "Cmd: %s", msg);
+ }
+ offset += 4;
+ return offset;
}
static int
dissect_InterpretVolMgtStuff(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- int length,numdisks,i,j;
+ int length, numdisks, i, j;
- numdisks = tvb_get_ntohl(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 4, "Number of Disk: %d", numdisks);
- offset += 4;
+ numdisks = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_text(tree, tvb, offset, 4, "Number of Disk: %d", numdisks);
+ offset += 4;
- for(i=0;i<numdisks;i++){
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_sig_offset, offset);
- length = tvb_get_ntohl(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 4, "Length of List : %d", length);
- offset += 4;
+ for (i=0; i<numdisks; i++) {
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_sig_offset, offset);
+ length = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_text(tree, tvb, offset, 4, "Length of List : %d", length);
+ offset += 4;
- for(j=0;j<length;j++){
- proto_tree_add_text(tree, tvb, offset, 4, "sigOffset: 0x%x",
- tvb_get_ntohl(tvb, offset));
- offset += 4;
- offset = dissect_rpc_string(tvb, tree, hf_fmp_dskSigEnt_val,
- offset, NULL);
+ for (j=0; j<length; j++) {
+ proto_tree_add_text(tree, tvb, offset, 4, "sigOffset: 0x%x",
+ tvb_get_ntohl(tvb, offset));
+ offset += 4;
+ offset = dissect_rpc_string(tvb, tree, hf_fmp_dskSigEnt_val,
+ offset, NULL);
- }
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_volID, offset);
+ }
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_volID, offset);
- }
- return offset;
+ }
+ return offset;
}
@@ -516,45 +516,45 @@ dissect_InterpretVolMgtStuff(tvbuff_t *tvb, int offset, proto_tree *tree)
static int
dissect_fmp_capability(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- if (tree) {
- int vmType;
- vmType = tvb_get_ntohl(tvb, offset);
-
- switch (vmType) {
- case FMP_SERVER_BASED:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Capability: SERVER_BASED (%d)", vmType);
- break;
-
- case FMP_THIRD_PARTY:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Capability: THIRD_PARTY (%d)", vmType);
- break;
-
- case FMP_CLIENT_BASED_DART:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Capability: CLIENT_BASED_DART (%d)",
- vmType);
- break;
-
- case FMP_CLIENT_BASED_SIMPLE:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Capability: CLIENT_BASED_SIMPLE (%d)",
- vmType);
- break;
- case FMP_HIERARCHICAL_VOLUME:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Capability: FMP_HIERARCHICAL_VOLUME (%d)",
- vmType);
- break;
- default:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Capability: UNKNOWN (%d)", vmType);
- break;
- }
- }
- offset += 4;
- return offset;
+ if (tree) {
+ int vmType;
+ vmType = tvb_get_ntohl(tvb, offset);
+
+ switch (vmType) {
+ case FMP_SERVER_BASED:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Capability: SERVER_BASED (%d)", vmType);
+ break;
+
+ case FMP_THIRD_PARTY:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Capability: THIRD_PARTY (%d)", vmType);
+ break;
+
+ case FMP_CLIENT_BASED_DART:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Capability: CLIENT_BASED_DART (%d)",
+ vmType);
+ break;
+
+ case FMP_CLIENT_BASED_SIMPLE:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Capability: CLIENT_BASED_SIMPLE (%d)",
+ vmType);
+ break;
+ case FMP_HIERARCHICAL_VOLUME:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Capability: FMP_HIERARCHICAL_VOLUME (%d)",
+ vmType);
+ break;
+ default:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Capability: UNKNOWN (%d)", vmType);
+ break;
+ }
+ }
+ offset += 4;
+ return offset;
}
static int
@@ -562,146 +562,146 @@ dissect_fmp_timeval(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree, int hf_time, int hf_time_sec,
int hf_time_nsec)
{
- if (tree) {
- nstime_t ts;
+ if (tree) {
+ nstime_t ts;
- proto_item* time_item;
- proto_tree* time_tree = NULL;
+ proto_item* time_item;
+ proto_tree* time_tree = NULL;
- ts.secs = tvb_get_ntohl(tvb, offset+0);
- ts.nsecs = tvb_get_ntohl(tvb, offset+4);
+ ts.secs = tvb_get_ntohl(tvb, offset+0);
+ ts.nsecs = tvb_get_ntohl(tvb, offset+4);
- time_item = proto_tree_add_time(tree, hf_time, tvb, offset, 8, &ts);
- time_tree = proto_item_add_subtree(time_item, ett_fmp_timeval);
+ time_item = proto_tree_add_time(tree, hf_time, tvb, offset, 8, &ts);
+ time_tree = proto_item_add_subtree(time_item, ett_fmp_timeval);
- proto_tree_add_uint(time_tree, hf_time_sec, tvb, offset, 4,
- (guint32) ts.secs);
- proto_tree_add_uint(time_tree, hf_time_nsec, tvb, offset+4, 4,
- ts.nsecs);
- }
- offset += 8;
- return offset;
+ proto_tree_add_uint(time_tree, hf_time_sec, tvb, offset, 4,
+ (guint32) ts.secs);
+ proto_tree_add_uint(time_tree, hf_time_nsec, tvb, offset+4, 4,
+ ts.nsecs);
+ }
+ offset += 8;
+ return offset;
}
static int
dissect_fmp_heartBeatIntv(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- if (tree) {
- proto_tree_add_text(tree, tvb, offset, 8,
- "Heart Beat Interval: %d.%d seconds",
- tvb_get_ntohl(tvb, offset),
- tvb_get_ntohl(tvb, offset+4));
- }
- offset += 8;
- return offset;
+ if (tree) {
+ proto_tree_add_text(tree, tvb, offset, 8,
+ "Heart Beat Interval: %d.%d seconds",
+ tvb_get_ntohl(tvb, offset),
+ tvb_get_ntohl(tvb, offset+4));
+ }
+ offset += 8;
+ return offset;
}
static int
dissect_fmp_status(tvbuff_t *tvb, int offset, proto_tree *tree, int *rval)
{
- fmpStat status;
-
- status = tvb_get_ntohl(tvb, offset);
-
- switch (status) {
- case FMP_OK:
- *rval = 0;
- break;
- case FMP_IOERROR:
- *rval = 1;
- break;
- case FMP_NOMEM:
- *rval = 1;
- break;
- case FMP_NOACCESS:
- *rval = 1;
- break;
- case FMP_INVALIDARG:
-
- *rval = 1;
- break;
- case FMP_FSFULL:
- *rval = 0;
- break;
- case FMP_QUEUE_FULL:
- case FMP_NOTIFY_ERROR:
- case FMP_WRITER_LOST_BLK:
- case FMP_WRONG_MSG_NUM:
- case FMP_SESSION_LOST:
- case FMP_REQUEST_CANCELLED:
- *rval = 1;
- break;
- case FMP_HOT_SESSION:
- *rval = 0;
- break;
- case FMP_COLD_SESSION:
- *rval = 0;
- break;
- case FMP_CLIENT_TERMINATED:
- *rval = 0;
- break;
- case FMP_REQUEST_QUEUED:
- *rval = 0;
- break;
- case FMP_FALL_BACK:
- *rval = 0;
- break;
- case FMP_WRITER_ZEROED_BLK:
- *rval = 0;
- break;
- case FMP_WRONG_HANDLE:
- *rval = 0;
- break;
- case FMP_DUPLICATE_OPEN:
- *rval = 1;
- break;
- case FMP_PLUGIN_NOFUNC:
- *rval = 1;
- break;
- default:
- *rval = 1;
- break;
- }
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_status , offset);
- return offset;
+ fmpStat status;
+
+ status = tvb_get_ntohl(tvb, offset);
+
+ switch (status) {
+ case FMP_OK:
+ *rval = 0;
+ break;
+ case FMP_IOERROR:
+ *rval = 1;
+ break;
+ case FMP_NOMEM:
+ *rval = 1;
+ break;
+ case FMP_NOACCESS:
+ *rval = 1;
+ break;
+ case FMP_INVALIDARG:
+
+ *rval = 1;
+ break;
+ case FMP_FSFULL:
+ *rval = 0;
+ break;
+ case FMP_QUEUE_FULL:
+ case FMP_NOTIFY_ERROR:
+ case FMP_WRITER_LOST_BLK:
+ case FMP_WRONG_MSG_NUM:
+ case FMP_SESSION_LOST:
+ case FMP_REQUEST_CANCELLED:
+ *rval = 1;
+ break;
+ case FMP_HOT_SESSION:
+ *rval = 0;
+ break;
+ case FMP_COLD_SESSION:
+ *rval = 0;
+ break;
+ case FMP_CLIENT_TERMINATED:
+ *rval = 0;
+ break;
+ case FMP_REQUEST_QUEUED:
+ *rval = 0;
+ break;
+ case FMP_FALL_BACK:
+ *rval = 0;
+ break;
+ case FMP_WRITER_ZEROED_BLK:
+ *rval = 0;
+ break;
+ case FMP_WRONG_HANDLE:
+ *rval = 0;
+ break;
+ case FMP_DUPLICATE_OPEN:
+ *rval = 1;
+ break;
+ case FMP_PLUGIN_NOFUNC:
+ *rval = 1;
+ break;
+ default:
+ *rval = 1;
+ break;
+ }
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_status , offset);
+ return offset;
}
static int
dissect_fmp_devSerial(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- if (tree) {
- queryCmd qc;
+ if (tree) {
+ queryCmd qc;
- qc = tvb_get_ntohl(tvb, offset);
+ qc = tvb_get_ntohl(tvb, offset);
- switch (qc) {
- case FMP_SCSI_INQUIRY:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Query Command: SCSI_INQUIRY (%d)", qc);
- break;
- case FMP_DART_STAMP:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Query Command: DART_STAMP (%d)", qc);
- break;
- default:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Query Command: UNKNOWN (%d)", qc);
- break;
- }
- }
- offset += 4;
+ switch (qc) {
+ case FMP_SCSI_INQUIRY:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Query Command: SCSI_INQUIRY (%d)", qc);
+ break;
+ case FMP_DART_STAMP:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Query Command: DART_STAMP (%d)", qc);
+ break;
+ default:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Query Command: UNKNOWN (%d)", qc);
+ break;
+ }
+ }
+ offset += 4;
- if (tree) {
- proto_tree_add_text(tree, tvb, offset, 4, "sigOffset: 0x%x",
- tvb_get_ntohl(tvb, offset));
- }
- offset += 4;
+ if (tree) {
+ proto_tree_add_text(tree, tvb, offset, 4, "sigOffset: 0x%x",
+ tvb_get_ntohl(tvb, offset));
+ }
+ offset += 4;
- offset = dissect_rpc_string(tvb, tree, hf_fmp_devSignature,
- offset, NULL);
- return offset;
+ offset = dissect_rpc_string(tvb, tree, hf_fmp_devSignature,
+ offset, NULL);
+ return offset;
}
@@ -710,109 +710,110 @@ dissect_fmp_devSerial(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
static int
dissect_fmp_VolumeDescription(tvbuff_t *tvb, int offset, proto_tree * tree)
{
- int i,length;
- proto_tree *Hietree,*hieTree;
- fmpVolumeType volumeType;
- fmpDiskIdentifierType diskIdentifierType;
- volumeType = tvb_get_ntohl(tvb, offset);
- switch(volumeType){
-
- case FMP_VOLUME_DISK:
- hieTree = proto_tree_add_text(tree, tvb, offset, 4,
- "VOLUME: DISK(%d)", volumeType );
- Hietree = proto_item_add_subtree(hieTree,
- ett_HierVolumeDescription);
- offset += 4;
- offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
- offset += 8; /* blockIndex64 */
- diskIdentifierType = tvb_get_ntohl(tvb, offset);
-
-
- switch(diskIdentifierType){
- case FMP_DISK_IDENTIFIER_SIGNATURE:
- proto_tree_add_text(Hietree, tvb, offset, 4,
- "DISK IDENTIFIER: SIGNATURE(%d)", diskIdentifierType);
- offset += 4;
- offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_sig_offset, offset);
- length = tvb_get_ntohl(tvb, offset);
- proto_tree_add_text(Hietree, tvb, offset, 4, "Length of List : %d", length);
- offset += 4;
-
- for(i=0;i<length;i++){
- proto_tree_add_text(Hietree, tvb, offset, 4, "sigOffset: 0x%x",
- tvb_get_ntohl(tvb, offset));
- offset += 4;
- offset = dissect_rpc_string(tvb, Hietree, hf_fmp_dskSigEnt_val, offset, NULL);
-
-
- }
-
- break;
-
- case FMP_DISK_IDENTIFIER_SERIAL:
- proto_tree_add_text(Hietree, tvb, offset, 4,
- "DISK IDENTIFIER: SERIAL(%d)", diskIdentifierType);
- dissect_fmp_devSerial(tvb, offset, NULL, Hietree);
- break;
- }
-
- break;
- case FMP_VOLUME_SLICE:
- hieTree = proto_tree_add_text(tree, tvb, offset, 4,
- "VOLUME: SLICE(%d)", volumeType );
- Hietree = proto_item_add_subtree(hieTree,
- ett_HierVolumeDescription);
- offset += 4;
- offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
-
- offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_offset64, offset);
-
- offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_slice_size, offset);
-
- offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset);
-
- break;
-
- case FMP_VOLUME_STRIPE:
- hieTree = proto_tree_add_text(tree, tvb, offset, 4,
- "VOLUME: STRIPE(%d)", volumeType );
- Hietree = proto_item_add_subtree(hieTree,
- ett_HierVolumeDescription);
- offset += 4;
- offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
-
- offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_stripeSize, offset);
- length = tvb_get_ntohl(tvb, offset);
- proto_tree_add_text(Hietree, tvb, offset, 4, "Length of List : %d", length);
- offset += 4;
-
- for(i=0;i<length;i++){
- offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset); /* FIXME: Size or length not know */
-
- }
- break;
-
- case FMP_VOLUME_META:
- hieTree = proto_tree_add_text(tree, tvb, offset, 4,
- "VOLUME: META(%d)", volumeType );
- Hietree = proto_item_add_subtree(hieTree,
- ett_HierVolumeDescription);
- offset += 4;
- offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
-
- length = tvb_get_ntohl(tvb, offset);
- proto_tree_add_text(Hietree, tvb, offset, 4, "Length of List : %d", length);
- offset += 4;
- for(i=0;i<length;i++){
- offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset); /* FIXME: Size or length not know */
- }
- break;
- default:
- proto_tree_add_text(tree, tvb, offset, 4,
- "VOLUME: UNKNOWN (%d)",volumeType);
- offset += 4;
-}
- return offset;
+ int i,length;
+ proto_tree *Hietree,*hieTree;
+ fmpVolumeType volumeType;
+ fmpDiskIdentifierType diskIdentifierType;
+
+ volumeType = tvb_get_ntohl(tvb, offset);
+ switch (volumeType) {
+
+ case FMP_VOLUME_DISK:
+ hieTree = proto_tree_add_text(tree, tvb, offset, 4,
+ "VOLUME: DISK(%d)", volumeType );
+ Hietree = proto_item_add_subtree(hieTree,
+ ett_HierVolumeDescription);
+ offset += 4;
+ offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
+ offset += 8; /* blockIndex64 */
+ diskIdentifierType = tvb_get_ntohl(tvb, offset);
+
+
+ switch (diskIdentifierType) {
+ case FMP_DISK_IDENTIFIER_SIGNATURE:
+ proto_tree_add_text(Hietree, tvb, offset, 4,
+ "DISK IDENTIFIER: SIGNATURE(%d)", diskIdentifierType);
+ offset += 4;
+ offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_sig_offset, offset);
+ length = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_text(Hietree, tvb, offset, 4, "Length of List : %d", length);
+ offset += 4;
+
+ for (i=0; i<length; i++) {
+ proto_tree_add_text(Hietree, tvb, offset, 4, "sigOffset: 0x%x",
+ tvb_get_ntohl(tvb, offset));
+ offset += 4;
+ offset = dissect_rpc_string(tvb, Hietree, hf_fmp_dskSigEnt_val, offset, NULL);
+
+
+ }
+
+ break;
+
+ case FMP_DISK_IDENTIFIER_SERIAL:
+ proto_tree_add_text(Hietree, tvb, offset, 4,
+ "DISK IDENTIFIER: SERIAL(%d)", diskIdentifierType);
+ dissect_fmp_devSerial(tvb, offset, NULL, Hietree);
+ break;
+ }
+
+ break;
+ case FMP_VOLUME_SLICE:
+ hieTree = proto_tree_add_text(tree, tvb, offset, 4,
+ "VOLUME: SLICE(%d)", volumeType );
+ Hietree = proto_item_add_subtree(hieTree,
+ ett_HierVolumeDescription);
+ offset += 4;
+ offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
+
+ offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_offset64, offset);
+
+ offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_slice_size, offset);
+
+ offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset);
+
+ break;
+
+ case FMP_VOLUME_STRIPE:
+ hieTree = proto_tree_add_text(tree, tvb, offset, 4,
+ "VOLUME: STRIPE(%d)", volumeType );
+ Hietree = proto_item_add_subtree(hieTree,
+ ett_HierVolumeDescription);
+ offset += 4;
+ offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
+
+ offset = dissect_rpc_uint64(tvb, Hietree, hf_fmp_stripeSize, offset);
+ length = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_text(Hietree, tvb, offset, 4, "Length of List : %d", length);
+ offset += 4;
+
+ for (i=0; i<length; i++) {
+ offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset); /* FIXME: Size or length not know */
+
+ }
+ break;
+
+ case FMP_VOLUME_META:
+ hieTree = proto_tree_add_text(tree, tvb, offset, 4,
+ "VOLUME: META(%d)", volumeType );
+ Hietree = proto_item_add_subtree(hieTree,
+ ett_HierVolumeDescription);
+ offset += 4;
+ offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volID, offset);
+
+ length = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_text(Hietree, tvb, offset, 4, "Length of List : %d", length);
+ offset += 4;
+ for (i=0; i<length; i++) {
+ offset = dissect_rpc_uint32(tvb, Hietree, hf_fmp_volume, offset); /* FIXME: Size or length not know */
+ }
+ break;
+ default:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "VOLUME: UNKNOWN (%d)",volumeType);
+ offset += 4;
+ }
+ return offset;
}
@@ -820,38 +821,39 @@ static int
dissect_fmp_Hiervolume(tvbuff_t *tvb, int offset, proto_tree * tree)
{
- int vollength;
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_topVolumeId, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cursor, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
-
- /* hierarchical description of volume. Each volume describes a
- piece of the entire hierarchy and is guarenteed to only refer to
- volumes that have already been described by the data structure up
- to this point in time. In some extreme cases, the number of
- volumes and their descriptions may be to large to fit in a single
- RPC reply. In this case, the application may send getVolumeInfo
- requests for the specific topVolumeId -- specifying the number of
- volumes already recieved by the client, and the cookie. The
- server is then responsible for sending another message containing
- additional volumes. These RPCs exchanges may continue multiple
- times, until the client has fetched the entire hierarchical
- volume description. If the volume hierarchy changes duing a
- multiple RPC sequence, the server will return an
- FMP_VOLUME_CHANGED error, and the client must discard all
- information already received and restart the request with
- FMP_Mount.
- */
-
- vollength = tvb_get_ntohl(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 4, "Length of volume List : %d", vollength);
- offset += 4;
- while(vollength){
- offset = dissect_fmp_VolumeDescription(tvb, offset, tree);
- vollength--;
- }
+ int vollength;
+
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_topVolumeId, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cursor, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
+
+ /* hierarchical description of volume. Each volume describes a
+ piece of the entire hierarchy and is guarenteed to only refer to
+ volumes that have already been described by the data structure up
+ to this point in time. In some extreme cases, the number of
+ volumes and their descriptions may be to large to fit in a single
+ RPC reply. In this case, the application may send getVolumeInfo
+ requests for the specific topVolumeId -- specifying the number of
+ volumes already recieved by the client, and the cookie. The
+ server is then responsible for sending another message containing
+ additional volumes. These RPCs exchanges may continue multiple
+ times, until the client has fetched the entire hierarchical
+ volume description. If the volume hierarchy changes duing a
+ multiple RPC sequence, the server will return an
+ FMP_VOLUME_CHANGED error, and the client must discard all
+ information already received and restart the request with
+ FMP_Mount.
+ */
+
+ vollength = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_text(tree, tvb, offset, 4, "Length of volume List : %d", vollength);
+ offset += 4;
+ while (vollength) {
+ offset = dissect_fmp_VolumeDescription(tvb, offset, tree);
+ vollength--;
+ }
- return offset;
+ return offset;
}
@@ -861,235 +863,236 @@ static int
dissect_fmp_vmInfo(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- int vmType;
- guint32 phyVolList_len;
- guint32 volIndex;
-
- vmType = tvb_get_ntohl(tvb, offset);
-
- switch (vmType) {
- case FMP_SERVER_BASED:
- /*
- * Need to finish
- */
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Type: SERVER_BASED (%d)",
- vmType);
- offset += 4;
-
- phyVolList_len = tvb_get_ntohl(tvb, offset);
- offset += 4;
-
- /*
- * Loop through and print all of the devInfo
- * structures.
- */
- while (phyVolList_len) {
- offset =
- dissect_fmp_devSerial(tvb, offset, pinfo, tree);
- volIndex = tvb_get_ntohl(tvb, offset);
- proto_tree_add_text(tree, tvb, offset, 4, "0x%x",
- volIndex);
- offset += 4;
- phyVolList_len--;
- }
- break;
-
- case FMP_THIRD_PARTY:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Type: THIRD_PARTY (%d)",
- vmType);
- offset += 4;
-
- offset = dissect_rpc_string(tvb, tree, hf_fmp_volHandle,
- offset, NULL);
- break;
-
- case FMP_CLIENT_BASED_DART:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Type: CLIENT_BASED_DART (%d)",
- vmType);
- offset += 4;
-
- offset = dissect_rpc_string(tvb, tree, hf_fmp_volHandle,
- offset, NULL);
- break;
-
- case FMP_CLIENT_BASED_SIMPLE:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Type: CLIENT_BASED_SIMPLE (%d)",
- vmType);
- offset += 4;
-
- /*
- * Decoding simpleVolInfo
- */
- offset = dissect_fmp_devSerial(tvb, offset, pinfo, tree);
-
- proto_tree_add_text(tree, tvb, offset, 4, "blockIndex: 0x%x",
- tvb_get_ntohl(tvb, offset));
- offset += 4;
- break;
-
- case FMP_DISK_SIGNATURE:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Type: DISK_SIGNATURE: (%d)",
- vmType);
- offset += 4;
- offset = dissect_InterpretVolMgtStuff(tvb, offset, tree);
- break;
-
- case FMP_HIERARCHICAL_VOLUME:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Type: FMP_HIERARCHICAL_VOLUME: (%d)",
- vmType);
- offset += 4;
-
- dissect_fmp_Hiervolume(tvb, offset, tree);
- break;
-
- default:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Volume Mgmt Type: UNKNOWN (%d)", vmType);
- offset += 4;
- break;
- }
-
- return offset;
+ int vmType;
+ guint32 phyVolList_len;
+ guint32 volIndex;
+
+ vmType = tvb_get_ntohl(tvb, offset);
+
+ switch (vmType) {
+ case FMP_SERVER_BASED:
+ /*
+ * Need to finish
+ */
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Type: SERVER_BASED (%d)",
+ vmType);
+ offset += 4;
+
+ phyVolList_len = tvb_get_ntohl(tvb, offset);
+ offset += 4;
+
+ /*
+ * Loop through and print all of the devInfo
+ * structures.
+ */
+ while (phyVolList_len) {
+ offset =
+ dissect_fmp_devSerial(tvb, offset, pinfo, tree);
+ volIndex = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_text(tree, tvb, offset, 4, "0x%x",
+ volIndex);
+ offset += 4;
+ phyVolList_len--;
+ }
+ break;
+
+ case FMP_THIRD_PARTY:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Type: THIRD_PARTY (%d)",
+ vmType);
+ offset += 4;
+
+ offset = dissect_rpc_string(tvb, tree, hf_fmp_volHandle,
+ offset, NULL);
+ break;
+
+ case FMP_CLIENT_BASED_DART:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Type: CLIENT_BASED_DART (%d)",
+ vmType);
+ offset += 4;
+
+ offset = dissect_rpc_string(tvb, tree, hf_fmp_volHandle,
+ offset, NULL);
+ break;
+
+ case FMP_CLIENT_BASED_SIMPLE:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Type: CLIENT_BASED_SIMPLE (%d)",
+ vmType);
+ offset += 4;
+
+ /*
+ * Decoding simpleVolInfo
+ */
+ offset = dissect_fmp_devSerial(tvb, offset, pinfo, tree);
+
+ proto_tree_add_text(tree, tvb, offset, 4, "blockIndex: 0x%x",
+ tvb_get_ntohl(tvb, offset));
+ offset += 4;
+ break;
+
+ case FMP_DISK_SIGNATURE:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Type: DISK_SIGNATURE: (%d)",
+ vmType);
+ offset += 4;
+ offset = dissect_InterpretVolMgtStuff(tvb, offset, tree);
+ break;
+
+ case FMP_HIERARCHICAL_VOLUME:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Type: FMP_HIERARCHICAL_VOLUME: (%d)",
+ vmType);
+ offset += 4;
+
+ dissect_fmp_Hiervolume(tvb, offset, tree);
+ break;
+
+ default:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Volume Mgmt Type: UNKNOWN (%d)", vmType);
+ offset += 4;
+ break;
+ }
+
+ return offset;
}
static int
dissect_fmp_notifyProtocol(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- if (tree) {
- int proto;
-
- proto = tvb_get_ntohl(tvb, offset);
-
- switch(proto){
- case FMP_TCP:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Protocol: TCP (%d)",
- proto);
- break;
- case FMP_UDP:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Protocol: UDP (%d)",
- proto);
- break;
- default:
- proto_tree_add_text(tree, tvb, offset, 4,
- "Protocol: UNKNOWN (%d)",
- proto);
- break;
- }
- }
- return (offset+4);
+ if (tree) {
+ int proto;
+
+ proto = tvb_get_ntohl(tvb, offset);
+
+ switch (proto) {
+ case FMP_TCP:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Protocol: TCP (%d)",
+ proto);
+ break;
+ case FMP_UDP:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Protocol: UDP (%d)",
+ proto);
+ break;
+ default:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "Protocol: UNKNOWN (%d)",
+ proto);
+ break;
+ }
+ }
+ return (offset+4);
}
static int
dissect_fmp_capabilities(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- if (tree) {
- int cap_val ;
- proto_tree *capTree;
- proto_tree *captree;
+ if (tree) {
+ int cap_val ;
+ proto_tree *capTree;
+ proto_tree *captree;
- cap_val = tvb_get_ntohl(tvb, offset);
- captree = proto_tree_add_text(tree, tvb, offset, 4,
- "Capabilities: ");
+ cap_val = tvb_get_ntohl(tvb, offset);
+ captree = proto_tree_add_text(tree, tvb, offset, 4,
+ "Capabilities: ");
- capTree = proto_item_add_subtree(captree,
- ett_capabilities);
+ capTree = proto_item_add_subtree(captree,
+ ett_capabilities);
- if (cap_val & FMP_CAP_REVOKE_HANDLE_LIST ){
- proto_tree_add_text(capTree, tvb, offset, 4,
- "CAP_REVOKE_HANDLE_LIST (%x)",
- cap_val);
- }
- if (cap_val & FMP_CAP_UNC_NAMES ){
- proto_tree_add_text(capTree, tvb, offset, 4,
- "CAP_UNC_NAMES (%x)",
- cap_val);
- }
- if (cap_val & FMP_CAP_CIFSV2 ){
- proto_tree_add_text(capTree, tvb, offset, 4,
- "CAP_CIFSV2 (%x)",
- cap_val);
- }
- }
- return (offset+4);
+ if (cap_val & FMP_CAP_REVOKE_HANDLE_LIST) {
+ proto_tree_add_text(capTree, tvb, offset, 4,
+ "CAP_REVOKE_HANDLE_LIST (%x)",
+ cap_val);
+ }
+ if (cap_val & FMP_CAP_UNC_NAMES) {
+ proto_tree_add_text(capTree, tvb, offset, 4,
+ "CAP_UNC_NAMES (%x)",
+ cap_val);
+ }
+ if (cap_val & FMP_CAP_CIFSV2) {
+ proto_tree_add_text(capTree, tvb, offset, 4,
+ "CAP_CIFSV2 (%x)",
+ cap_val);
+ }
+ }
+ return (offset+4);
}
static int
dissect_fmp_cerrInfo(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- int rval;
- clientErrorNum errorNum;
- errorNum = tvb_get_ntohl(tvb, offset);
+ int rval;
+ clientErrorNum errorNum;
- switch(errorNum){
- case FMP_CE_GENERIC:
- proto_tree_add_text(tree, tvb, offset, 4,
- "CLIENT Error Number: FMP_CE_GENERIC (%d)",
- errorNum);
- break;
+ errorNum = tvb_get_ntohl(tvb, offset);
- case FMP_CE_DISK_ERROR:
- proto_tree_add_text(tree, tvb, offset, 4,
- "CLIENT Error Number: FMP_CE_DISK_ERROR (%d)",
- errorNum);
- break;
+ switch (errorNum) {
+ case FMP_CE_GENERIC:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "CLIENT Error Number: FMP_CE_GENERIC (%d)",
+ errorNum);
+ break;
- default:
- proto_tree_add_text(tree, tvb, offset, 4,
- "CLIENT Error Number: Unknown Error Number (%d)",
- errorNum);
- break;
- }
+ case FMP_CE_DISK_ERROR:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "CLIENT Error Number: FMP_CE_DISK_ERROR (%d)",
+ errorNum);
+ break;
+ default:
+ proto_tree_add_text(tree, tvb, offset, 4,
+ "CLIENT Error Number: Unknown Error Number (%d)",
+ errorNum);
+ break;
+ }
- offset += 4;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- return offset;
+ offset += 4;
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+
+ return offset;
}
static int
dissect_fmp_attrs(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- proto_tree *attrstree;
- proto_tree *attrsTree;
-
- attrstree = proto_tree_add_text(tree, tvb, offset, 84,
- "Attribute: ");
- attrsTree = proto_item_add_subtree(attrstree,
- ett_attrs );
- offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_type, offset);
- offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_mode, offset);
- offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_nlink, offset);
- offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_uid, offset);
- offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_gid, offset);
- offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_fileSize, offset);
- /* Here hf_fmp_fileSize is used in
- * place of size
- */
- offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_used, offset);
- offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_rdev, offset);
- offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_fsid, offset);
- offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_fileid, offset);
- proto_tree_add_text(tree, tvb, offset, 8,"atime: %d.%d seconds",
- tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
- offset +=8;
- proto_tree_add_text(tree, tvb, offset, 8,"mtime: %d.%d seconds",
- tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
- offset +=8;
- proto_tree_add_text(tree, tvb, offset, 8,"ctime: %d.%d seconds",
- tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
- offset +=8;
- return offset;
+ proto_tree *attrstree;
+ proto_tree *attrsTree;
+
+ attrstree = proto_tree_add_text(tree, tvb, offset, 84,
+ "Attribute: ");
+ attrsTree = proto_item_add_subtree(attrstree,
+ ett_attrs );
+ offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_type, offset);
+ offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_mode, offset);
+ offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_nlink, offset);
+ offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_uid, offset);
+ offset = dissect_rpc_uint32(tvb, attrsTree, hf_fmp_nfsv3Attr_gid, offset);
+ offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_fileSize, offset);
+ /* Here hf_fmp_fileSize is used in
+ * place of size
+ */
+ offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_used, offset);
+ offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_rdev, offset);
+ offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_fsid, offset);
+ offset = dissect_rpc_uint64(tvb, attrsTree, hf_fmp_nfsv3Attr_fileid, offset);
+ proto_tree_add_text(tree, tvb, offset, 8,"atime: %d.%d seconds",
+ tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
+ offset +=8;
+ proto_tree_add_text(tree, tvb, offset, 8,"mtime: %d.%d seconds",
+ tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
+ offset +=8;
+ proto_tree_add_text(tree, tvb, offset, 8,"ctime: %d.%d seconds",
+ tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
+ offset +=8;
+ return offset;
}
@@ -1098,405 +1101,405 @@ static int
dissect_FMP_SessionCreate_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
- offset, NULL);
- offset = dissect_fmp_timeval(tvb, offset, pinfo, tree, hf_fmp_btime,
- hf_fmp_time_sec, hf_fmp_time_nsec);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_notifyPort,
- offset);
- return offset;
+ offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
+ offset, NULL);
+ offset = dissect_fmp_timeval(tvb, offset, pinfo, tree, hf_fmp_btime,
+ hf_fmp_time_sec, hf_fmp_time_nsec);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_notifyPort,
+ offset);
+ return offset;
}
static int
dissect_FMP_SessionCreate_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_data(tvb, tree,
- hf_fmp_sessionHandle, offset);
- offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
- offset, NULL);
- offset = dissect_fmp_timeval(tvb, offset, pinfo, tree,
- hf_fmp_btime, hf_fmp_time_sec,
- hf_fmp_time_nsec);
- offset = dissect_fmp_heartBeatIntv(tvb, offset, pinfo, tree);
- }
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_data(tvb, tree,
+ hf_fmp_sessionHandle, offset);
+ offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
+ offset, NULL);
+ offset = dissect_fmp_timeval(tvb, offset, pinfo, tree,
+ hf_fmp_btime, hf_fmp_time_sec,
+ hf_fmp_time_nsec);
+ offset = dissect_fmp_heartBeatIntv(tvb, offset, pinfo, tree);
+ }
- return offset;
+ return offset;
}
static int
dissect_FMP_HeartBeat_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
+ offset);
- return offset;
+ return offset;
}
static int
dissect_FMP_HeartBeat_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- return offset;
+ int rval;
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ return offset;
}
static int
dissect_FMP_Mount_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
- offset = dissect_fmp_capability(tvb, offset, tree);
- offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
- return offset;
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
+ offset);
+ offset = dissect_fmp_capability(tvb, offset, tree);
+ offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
+ return offset;
}
static int
dissect_FMP_Mount_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsBlkSz,
- offset);
- offset = dissect_fmp_vmInfo(tvb, offset, pinfo, tree);
- }
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsBlkSz,
+ offset);
+ offset = dissect_fmp_vmInfo(tvb, offset, pinfo, tree);
+ }
- return offset;
+ return offset;
}
static int
dissect_FMP_Open_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
- offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
- return offset;
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
+ offset);
+ offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
+ return offset;
}
static int
dissect_FMP_Open_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
- offset);
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
+ offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
- offset);
- }
- return offset;
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
+ offset);
+ }
+ return offset;
}
static int
dissect_FMP_Close_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- return offset;
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ return offset;
}
static int
dissect_FMP_Close_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- }
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ }
- return offset;
+ return offset;
}
static int
dissect_FMP_OpenGetMap_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
+ offset);
- offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
- return offset;
+ offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
+ return offset;
}
static int
dissect_FMP_OpenGetMap_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
- offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
- offset);
- offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
- }
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
+ offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
+ offset);
+ offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
+ }
- return offset;
+ return offset;
}
static int
dissect_FMP_OpenAllocSpace_request(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree)
{
- offset = dissect_rpc_data(tvb , tree, hf_fmp_sessionHandle,
- offset);
- offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
- return offset;
+ offset = dissect_rpc_data(tvb , tree, hf_fmp_sessionHandle,
+ offset);
+ offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
+ return offset;
}
static int
dissect_FMP_OpenAllocSpace_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
- offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
- offset);
- offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
- }
- return offset;
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
+ offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
+ offset);
+ offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
+ }
+ return offset;
}
static int
dissect_FMP_GetMap_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
- return offset;
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
+ return offset;
}
static int
dissect_FMP_GetMap_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
- offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
- offset);
- offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
- }
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
+ offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
+ offset);
+ offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
+ }
- return offset;
+ return offset;
}
static int
dissect_FMP_AllocSpace_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
- return offset;
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
+ return offset;
}
static int
dissect_FMP_AllocSpace_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
- offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
- offset);
- offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
- }
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
+ offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
+ offset);
+ offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
+ }
- return offset;
+ return offset;
}
static int
dissect_FMP_Flush_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- offset = dissect_fmp_flushCmd(tvb, offset, tree);
- offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
- offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
- return offset;
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ offset = dissect_fmp_flushCmd(tvb, offset, tree);
+ offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
+ offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
+ return offset;
}
static int
dissect_FMP_Flush_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- }
- return offset;
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ }
+ return offset;
}
static int
dissect_FMP_CancelReq_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
- return offset;
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
+ return offset;
}
static int
dissect_FMP_CancelReq_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree)
+ proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- }
- return offset;
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ }
+ return offset;
}
static int
dissect_FMP_PlugIn_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- offset = dissect_plugInID(tvb, offset, tree);
- offset = dissect_rpc_data(tvb, tree, hf_fmp_plugInBuf, offset);
- return offset;
+ offset = dissect_plugInID(tvb, offset, tree);
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_plugInBuf, offset);
+ return offset;
}
static int
dissect_FMP_PlugIn_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_data(tvb, tree, hf_fmp_plugInBuf,
- offset);
- }
- return offset;
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_plugInBuf,
+ offset);
+ }
+ return offset;
}
static int
dissect_FMP_SessionTerminate_request(tvbuff_t *tvb, int offset,
packet_info *pinfo _U_, proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
- return offset;
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
+ offset);
+ return offset;
}
static int
dissect_FMP_SessionTerminate_reply(tvbuff_t *tvb, int offset,
packet_info *pinfo _U_, proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- return offset;
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ return offset;
}
static int
dissect_FMP_SessionCreateEx_request(tvbuff_t *tvb, int offset,packet_info *pinfo, proto_tree *tree)
{
- offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
- offset, NULL);
- offset = dissect_fmp_timeval(tvb, offset, pinfo ,tree, hf_fmp_btime,
- hf_fmp_time_sec, hf_fmp_time_nsec);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_notifyPort,
- offset);
- offset = dissect_fmp_notifyProtocol(tvb, offset, tree);
+ offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
+ offset, NULL);
+ offset = dissect_fmp_timeval(tvb, offset, pinfo ,tree, hf_fmp_btime,
+ hf_fmp_time_sec, hf_fmp_time_nsec);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_notifyPort,
+ offset);
+ offset = dissect_fmp_notifyProtocol(tvb, offset, tree);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_major,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_minor,
- offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_major,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_minor,
+ offset);
- offset = dissect_rpc_string(tvb, tree, hf_fmp_os_name,
- offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_fmp_os_name,
+ offset, NULL);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_patch,
- offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_patch,
+ offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_build,
- offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_build,
+ offset);
- offset = dissect_fmp_capabilities(tvb, offset, tree);
+ offset = dissect_fmp_capabilities(tvb, offset, tree);
- return offset;
+ return offset;
}
@@ -1504,87 +1507,87 @@ static int
dissect_FMP_SessionCreateEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset, tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_data(tvb, tree,
- hf_fmp_sessionHandle, offset);
- offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
- offset, NULL);
- offset = dissect_fmp_timeval(tvb, offset, pinfo ,tree,
- hf_fmp_btime, hf_fmp_time_sec,
- hf_fmp_time_nsec);
- offset = dissect_fmp_heartBeatIntv(tvb, offset, pinfo , tree);
+ offset = dissect_fmp_status(tvb, offset, tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_data(tvb, tree,
+ hf_fmp_sessionHandle, offset);
+ offset = dissect_rpc_string(tvb, tree, hf_fmp_hostID,
+ offset, NULL);
+ offset = dissect_fmp_timeval(tvb, offset, pinfo ,tree,
+ hf_fmp_btime, hf_fmp_time_sec,
+ hf_fmp_time_nsec);
+ offset = dissect_fmp_heartBeatIntv(tvb, offset, pinfo , tree);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_major,
- offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_major,
+ offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_minor,
- offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_minor,
+ offset);
- offset = dissect_rpc_string(tvb, tree, hf_fmp_server_version_string,
- offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_fmp_server_version_string,
+ offset, NULL);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_patch,
- offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_patch,
+ offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_build,
- offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_os_build,
+ offset);
- offset = dissect_fmp_capabilities(tvb, offset, tree);
- }
+ offset = dissect_fmp_capabilities(tvb, offset, tree);
+ }
- return offset;
+ return offset;
}
static int
dissect_FMP_ReportClientError_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree)
+ packet_info *pinfo _U_, proto_tree *tree)
{
- offset = dissect_rpc_string(tvb, tree, hf_fmp_description,
- offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_fmp_description,
+ offset, NULL);
- offset = dissect_fmp_cerrInfo(tvb, offset, tree);
- return offset;
+ offset = dissect_fmp_cerrInfo(tvb, offset, tree);
+ return offset;
}
static int
dissect_FMP_ReportClientError_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree)
+ packet_info *pinfo _U_, proto_tree *tree)
{
- int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ int rval;
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
- return offset;
+ return offset;
}
static int
dissect_FMP_GetAttr_request(tvbuff_t *tvb, int offset,
packet_info *pinfo _U_, proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- return offset;
+ return offset;
}
static int
dissect_FMP_GetAttr_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree)
+ packet_info *pinfo _U_, proto_tree *tree)
{
- int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if(rval == 0){
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ int rval;
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- offset = dissect_fmp_attrs(tvb, offset, tree);
- }
+ offset = dissect_fmp_attrs(tvb, offset, tree);
+ }
- return offset;
+ return offset;
}
static int
@@ -1592,80 +1595,80 @@ dissect_FMP_OpenGetAttr_request(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
+ offset);
- offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
+ offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
- return offset;
+ return offset;
}
static int
dissect_FMP_OpenGetAttr_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree)
+ packet_info *pinfo _U_, proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset, tree, &rval);
+ offset = dissect_fmp_status(tvb, offset, tree, &rval);
- if (rval == 0){
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID, offset);
+ if (rval == 0) {
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID, offset);
offset = dissect_fmp_attrs(tvb, offset, tree);
- }
+ }
- return offset;
+ return offset;
}
static int
dissect_FMP_FlushGetAttr_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree)
+ packet_info *pinfo, proto_tree *tree)
{
- offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cmd, offset);
- offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
+ offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cmd, offset);
+ offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
proto_tree_add_text(tree, tvb, offset, 8,"mtime: %d.%d seconds",
- tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
- offset += 8;
- offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
+ tvb_get_ntohl(tvb, offset),tvb_get_ntohl(tvb, offset+4));
+ offset += 8;
+ offset = dissect_fmp_extentList(tvb, offset, pinfo, tree);
- return offset;
+ return offset;
}
static int
dissect_FMP_FlushGetAttr_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree)
+ packet_info *pinfo _U_, proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if(rval == 0){
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- offset = dissect_fmp_attrs(tvb, offset, tree);
- }
+ offset = dissect_fmp_attrs(tvb, offset, tree);
+ }
- return offset;
+ return offset;
}
static int
dissect_FMP_GetVolumeInfo_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree)
+ packet_info *pinfo _U_, proto_tree *tree)
{
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_topVolumeId, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cursor, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
- return offset;
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_topVolumeId, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cursor, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie, offset);
+ return offset;
}
@@ -1674,187 +1677,187 @@ static int
dissect_FMP_GetVolumeInfo_reply(tvbuff_t *tvb, int offset,
packet_info *pinfo _U_, proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- /* FIXME: I don't know size of this volumes */
- offset = dissect_fmp_Hiervolume(tvb,offset, tree);
- }
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ /* FIXME: I don't know size of this volumes */
+ offset = dissect_fmp_Hiervolume(tvb,offset, tree);
+ }
return offset;
}
static int
dissect_FMP_OpenGetMapEx_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree)
+ packet_info *pinfo, proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
- offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
+ offset);
+ offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
- return offset;
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
+ return offset;
}
static int
dissect_FMP_OpenGetMapEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree)
+ proto_tree *tree)
{
- int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
- offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
- offset);
- offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
- }
+ int rval;
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
+ offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
+ offset);
+ offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
+ }
- return offset;
+ return offset;
}
static int
dissect_FMP_OpenAllocSpaceEx_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree)
+ packet_info *pinfo, proto_tree *tree)
{
- offset = dissect_rpc_data(tvb , tree, hf_fmp_sessionHandle,
- offset);
- offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
- return offset;
+ offset = dissect_rpc_data(tvb , tree, hf_fmp_sessionHandle,
+ offset);
+ offset = dissect_fmp_fileHandleSrc(tvb, offset, pinfo, tree);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
+ return offset;
}
static int
dissect_FMP_OpenAllocSpaceEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree)
+ proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
- offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
- offset);
- offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
- }
- return offset;
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
+ offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID,
+ offset);
+ offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
+ }
+ return offset;
}
static int
dissect_FMP_GetMapEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree)
+ proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
- return offset;
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
+ return offset;
}
static int
dissect_FMP_GetMapEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree)
+ proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
- offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
- offset);
- offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
- }
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
+ offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
+ offset);
+ offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
+ }
- return offset;
+ return offset;
}
static int
dissect_FMP_AllocSpaceEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree)
+ proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
- return offset;
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_firstLogBlk64, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_minBlks, offset);
+ return offset;
}
static int
dissect_FMP_AllocSpaceEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree)
+ proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
- offset);
- offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
- offset);
- offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
- }
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
+ offset);
+ offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize,
+ offset);
+ offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
+ }
- return offset;
+ return offset;
}
static int
dissect_FMP_FlushEx_request(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree)
+ proto_tree *tree)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
- offset = dissect_fmp_flushCmd(tvb, offset, tree);
- offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
- offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
- return offset;
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
+ offset = dissect_fmp_flushCmd(tvb, offset, tree);
+ offset = dissect_rpc_uint64(tvb,tree, hf_fmp_eof, offset);
+ offset = dissect_fmp_extentListEx(tvb, offset, pinfo, tree);
+ return offset;
}
static int
dissect_FMP_FlushEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree)
+ proto_tree *tree)
{
- int rval;
+ int rval;
- offset = dissect_fmp_status(tvb, offset,tree, &rval);
- if (rval == 0) {
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
- }
- return offset;
+ offset = dissect_fmp_status(tvb, offset,tree, &rval);
+ if (rval == 0) {
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
+ offset);
+ }
+ return offset;
}
/*
* proc number, "proc name", dissect_request, dissect_reply
@@ -1862,152 +1865,202 @@ dissect_FMP_FlushEx_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
*/
static const vsff fmp3_proc[] = {
-{ 1, "SessionCreate",
- dissect_FMP_SessionCreate_request, dissect_FMP_SessionCreate_reply },
-
-{ 2, "HeartBeat",
- dissect_FMP_HeartBeat_request, dissect_FMP_HeartBeat_reply },
-
-{ 3, "Mount",
- dissect_FMP_Mount_request, dissect_FMP_Mount_reply },
-
-{ 4, "Open",
- dissect_FMP_Open_request, dissect_FMP_Open_reply },
-
-{ 5, "Close",
- dissect_FMP_Close_request, dissect_FMP_Close_reply },
-
-{ 6, "OpenGetMap",
- dissect_FMP_OpenGetMap_request, dissect_FMP_OpenGetMap_reply },
-
-{ 7, "OpenAllocSpace",
- dissect_FMP_OpenAllocSpace_request, dissect_FMP_OpenAllocSpace_reply },
-
-{ 8, "GetMap",
- dissect_FMP_GetMap_request, dissect_FMP_GetMap_reply },
-
-{ 9, "AllocSpace",
- dissect_FMP_AllocSpace_request, dissect_FMP_AllocSpace_reply },
-
-{ 10, "Flush",
- dissect_FMP_Flush_request, dissect_FMP_Flush_reply },
-
-{ 11, "CancelReq",
- dissect_FMP_CancelReq_request, dissect_FMP_CancelReq_reply },
-
-{ 12, "PlugIn",
- dissect_FMP_PlugIn_request, dissect_FMP_PlugIn_reply },
-
-{ 13, "SessionTerminate",
- dissect_FMP_SessionTerminate_request, dissect_FMP_SessionTerminate_reply },
-
-{ 14, "SessionCreateEx",
- dissect_FMP_SessionCreateEx_request, dissect_FMP_SessionCreateEx_reply },
-
-{ 15, "ReportClientError",
- dissect_FMP_ReportClientError_request, dissect_FMP_ReportClientError_reply },
-
-{ 16 , "Get Attribute",
- dissect_FMP_GetAttr_request, dissect_FMP_GetAttr_reply },
-
-{ 17 , "Open Get Attribute",
- dissect_FMP_OpenGetAttr_request, dissect_FMP_OpenGetAttr_reply },
-
-{ 18 , "Flush Get Attribute",
- dissect_FMP_FlushGetAttr_request, dissect_FMP_FlushGetAttr_reply },
-
-{ 19 , "OpenGetMapEx",
- dissect_FMP_OpenGetMapEx_request, dissect_FMP_OpenGetMapEx_reply },
-
-{ 20 , "OpenAllocSpaceEx",
- dissect_FMP_OpenAllocSpaceEx_request, dissect_FMP_OpenAllocSpaceEx_reply },
-
-{ 21 , "GetMapEx",
- dissect_FMP_GetMapEx_request, dissect_FMP_GetMapEx_reply },
-
-{ 22 , "AllocSpaceEx",
- dissect_FMP_AllocSpaceEx_request, dissect_FMP_AllocSpaceEx_reply },
-
-{ 23 , "FMP_FlushEx",
- dissect_FMP_FlushEx_request, dissect_FMP_FlushEx_reply },
+ { 1,
+ "SessionCreate",
+ dissect_FMP_SessionCreate_request,
+ dissect_FMP_SessionCreate_reply },
+
+ { 2,
+ "HeartBeat",
+ dissect_FMP_HeartBeat_request,
+ dissect_FMP_HeartBeat_reply },
+
+ { 3,
+ "Mount",
+ dissect_FMP_Mount_request,
+ dissect_FMP_Mount_reply },
+
+ { 4,
+ "Open",
+ dissect_FMP_Open_request,
+ dissect_FMP_Open_reply },
+
+ { 5,
+ "Close",
+ dissect_FMP_Close_request,
+ dissect_FMP_Close_reply },
+
+ { 6,
+ "OpenGetMap",
+ dissect_FMP_OpenGetMap_request,
+ dissect_FMP_OpenGetMap_reply },
+
+ { 7,
+ "OpenAllocSpace",
+ dissect_FMP_OpenAllocSpace_request,
+ dissect_FMP_OpenAllocSpace_reply },
+
+ { 8,
+ "GetMap",
+ dissect_FMP_GetMap_request,
+ dissect_FMP_GetMap_reply },
+
+ { 9,
+ "AllocSpace",
+ dissect_FMP_AllocSpace_request,
+ dissect_FMP_AllocSpace_reply },
+
+ { 10,
+ "Flush",
+ dissect_FMP_Flush_request,
+ dissect_FMP_Flush_reply },
+
+ { 11,
+ "CancelReq",
+ dissect_FMP_CancelReq_request,
+ dissect_FMP_CancelReq_reply },
+
+ { 12,
+ "PlugIn",
+ dissect_FMP_PlugIn_request,
+ dissect_FMP_PlugIn_reply },
+
+ { 13,
+ "SessionTerminate",
+ dissect_FMP_SessionTerminate_request,
+ dissect_FMP_SessionTerminate_reply },
+
+ { 14,
+ "SessionCreateEx",
+ dissect_FMP_SessionCreateEx_request,
+ dissect_FMP_SessionCreateEx_reply },
+
+ { 15,
+ "ReportClientError",
+ dissect_FMP_ReportClientError_request,
+ dissect_FMP_ReportClientError_reply },
+
+ { 16 ,
+ "Get Attribute",
+ dissect_FMP_GetAttr_request,
+ dissect_FMP_GetAttr_reply },
+
+ { 17 ,
+ "Open Get Attribute",
+ dissect_FMP_OpenGetAttr_request,
+ dissect_FMP_OpenGetAttr_reply },
+
+ { 18 ,
+ "Flush Get Attribute",
+ dissect_FMP_FlushGetAttr_request,
+ dissect_FMP_FlushGetAttr_reply },
+
+ { 19 ,
+ "OpenGetMapEx",
+ dissect_FMP_OpenGetMapEx_request,
+ dissect_FMP_OpenGetMapEx_reply },
+
+ { 20 ,
+ "OpenAllocSpaceEx",
+ dissect_FMP_OpenAllocSpaceEx_request,
+ dissect_FMP_OpenAllocSpaceEx_reply },
+
+ { 21 ,
+ "GetMapEx",
+ dissect_FMP_GetMapEx_request,
+ dissect_FMP_GetMapEx_reply },
+
+ { 22 ,
+ "AllocSpaceEx",
+ dissect_FMP_AllocSpaceEx_request,
+ dissect_FMP_AllocSpaceEx_reply },
+
+ { 23 ,
+ "FMP_FlushEx",
+ dissect_FMP_FlushEx_request,
+ dissect_FMP_FlushEx_reply },
#if 0
-{ 24 , "FlushGetAttrEx",
- dissect_FMP_FlushGetAttrEx_request, dissect_FMP_FlushGetAttrEx_reply },
+ { 24 ,
+ "FlushGetAttrEx",
+ dissect_FMP_FlushGetAttrEx_request,
+ dissect_FMP_FlushGetAttrEx_reply },
#endif
-{ 25 , "GetVolumeInfo",
- dissect_FMP_GetVolumeInfo_request, dissect_FMP_GetVolumeInfo_reply },
+ { 25 ,
+ "GetVolumeInfo",
+ dissect_FMP_GetVolumeInfo_request,
+ dissect_FMP_GetVolumeInfo_reply },
-{0 , NULL , NULL , NULL }
+ {0 , NULL , NULL , NULL }
};
static const value_string fmp_proc_vals[] = {
- { 1, "SessionCreate" },
- { 2, "HeartBeat" },
- { 3, "Mount" },
- { 4, "Open" },
- { 5, "Close" },
- { 6, "OpenGetMap" },
- { 7, "OpenAllocSpace" },
- { 8, "GetMap" },
- { 9, "AllocSpace " },
- { 10, "Flush" },
- { 11, "CancelReq" },
- { 12, "PlugIn" },
- { 13, "SessionTerminate" },
- { 14, "SessionCreateEx" },
- { 15, "ReportClientError" },
- { 16, "GetAttr " },
- { 17, "OpenGetAttr" },
- { 18, "FlushGetAttr"},
- { 19, "OpenGetMapEx"},
- { 20, "OpenAllocSpaceEx"},
- { 21, "GetMapEx"},
- { 22, "AllocSpaceEx"},
- { 23, "FlushEx"},
- { 24, "FlushGetAttrEx"},
- { 25, "GetVolumeInfo"},
- { 0, "NULL" },
- { 0,NULL }
+ { 0, "NULL" },
+ { 1, "SessionCreate" },
+ { 2, "HeartBeat" },
+ { 3, "Mount" },
+ { 4, "Open" },
+ { 5, "Close" },
+ { 6, "OpenGetMap" },
+ { 7, "OpenAllocSpace" },
+ { 8, "GetMap" },
+ { 9, "AllocSpace " },
+ { 10, "Flush" },
+ { 11, "CancelReq" },
+ { 12, "PlugIn" },
+ { 13, "SessionTerminate" },
+ { 14, "SessionCreateEx" },
+ { 15, "ReportClientError" },
+ { 16, "GetAttr " },
+ { 17, "OpenGetAttr" },
+ { 18, "FlushGetAttr"},
+ { 19, "OpenGetMapEx"},
+ { 20, "OpenAllocSpaceEx"},
+ { 21, "GetMapEx"},
+ { 22, "AllocSpaceEx"},
+ { 23, "FlushEx"},
+ { 24, "FlushGetAttrEx"},
+ { 25, "GetVolumeInfo"},
+ { 0,NULL }
};
static const value_string fmp_status_vals[] = {
- {0,"OK"},
- {5,"IOERROR"},
- {12,"NOMEM"},
- {13,"NOACCESS"},
- {22,"INVALIDARG"},
- {28,"FSFULL"},
- {79,"QUEUE_FULL"},
- {500,"WRONG_MSG_NUM"},
- {501,"SESSION_LOST"},
- {502,"HOT_SESSION"},
- {503,"COLD_SESSION"},
- {504,"CLIENT_TERMINATED"},
- {505,"WRITER_LOST_BLK"},
- {506,"FMP_REQUEST_QUEUED"},
- {507,"FMP_FALL_BACK"},
- {508,"REQUEST_CANCELLED"},
- {509,"WRITER_ZEROED_BLK"},
- {510,"NOTIFY_ERROR"},
- {511,"FMP_WRONG_HANDLE"},
- {512,"DUPLICATE_OPEN"},
- {600,"PLUGIN_NOFUNC"},
- {0,NULL}
+ { 0, "OK"},
+ { 5, "IOERROR"},
+ { 12, "NOMEM"},
+ { 13, "NOACCESS"},
+ { 22, "INVALIDARG"},
+ { 28, "FSFULL"},
+ { 79, "QUEUE_FULL"},
+ {500, "WRONG_MSG_NUM"},
+ {501, "SESSION_LOST"},
+ {502, "HOT_SESSION"},
+ {503, "COLD_SESSION"},
+ {504, "CLIENT_TERMINATED"},
+ {505, "WRITER_LOST_BLK"},
+ {506, "FMP_REQUEST_QUEUED"},
+ {507, "FMP_FALL_BACK"},
+ {508, "REQUEST_CANCELLED"},
+ {509, "WRITER_ZEROED_BLK"},
+ {510, "NOTIFY_ERROR"},
+ {511, "FMP_WRONG_HANDLE"},
+ {512, "DUPLICATE_OPEN"},
+ {600, "PLUGIN_NOFUNC"},
+ {0,NULL}
};
static const value_string fmp_extentState_vals[] = {
- {0,"VALID_DATA"},
- {1,"INVALID_DATA"},
- {2,"NONE_DATA"},
- {0,NULL}
+ {0,"VALID_DATA"},
+ {1,"INVALID_DATA"},
+ {2,"NONE_DATA"},
+ {0,NULL}
};
@@ -2015,243 +2068,329 @@ static const value_string fmp_extentState_vals[] = {
void
proto_register_fmp(void)
{
- static hf_register_info hf[] = {
- { &hf_fmp_procedure, {
- "Procedure", "fmp.procedure", FT_UINT32, BASE_DEC,
- VALS(fmp_proc_vals) , 0, NULL, HFILL }}, /* New addition */
-
- { &hf_fmp_hostID, {
- "Host ID", "fmp.hostID", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL }},
-
- { &hf_fmp_btime, {
- "Boot Time", "fmp.btime", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL,
- NULL, 0, "Machine Boot Time", HFILL }},
-
- { &hf_fmp_time_sec, {
- "seconds", "fmp.btime.sec", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
-
- { &hf_fmp_time_nsec, {
- "nanoseconds", "fmp.btime.nsec", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
-
- { &hf_fmp_notifyPort, {
- "Notify Port", "fmp.notifyPort", FT_UINT32, BASE_DEC,
- NULL, 0, "FMP Notify Port", HFILL }},
-
- { &hf_fmp_sessionHandle, {
- "Session Handle", "fmp.sessHandle", FT_BYTES, BASE_NONE,
- NULL, 0, "FMP Session Handle", HFILL }},
-
- { &hf_fmp_fmpFHandle, {
- "FMP File Handle", "fmp.fmpFHandle",
- FT_BYTES, BASE_NONE, NULL, 0, NULL,
- HFILL }},
-
- { &hf_fmp_nfsFHandle, {
- "NFS File Handle", "fmp.nfsFHandle", FT_BYTES,
- BASE_NONE, NULL, 0, NULL, HFILL }},
-
- { &hf_fmp_fsID, {
- "File System ID", "fmp.fsID", FT_UINT32, BASE_HEX,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_status, {
- "Status", "fmp.status", FT_UINT32, BASE_DEC,
- VALS(fmp_status_vals), 0, "Reply Status", HFILL }},
-
- { &hf_fmp_fsBlkSz, {
- "FS Block Size", "fmp.fsBlkSz", FT_UINT32, BASE_DEC,
- NULL, 0, "File System Block Size", HFILL }},
-
- { &hf_fmp_volHandle, {
- "Volume Handle", "fmp.volHandle", FT_STRING, BASE_NONE,
- NULL, 0, "FMP Volume Handle", HFILL }},
-
- { &hf_fmp_dskSigEnt_val, {
- "Celerra Signature", "fmp.dsi.ds.dsList.dskSigLst_val.dse.dskSigEnt_val", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_devSignature, {
- "Signature DATA", "fmp.devSig", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_mount_path, {
- "Native Protocol: PATH", "fmp.mount_path", FT_STRING, BASE_NONE,
- NULL, 0, "Absolute path from the root on the server side", HFILL }},
- { &hf_fmp_sig_offset, {
- "Sig Offset", "fmp.dsi.ds.sig_offset", FT_UINT64, BASE_DEC,
- NULL, 0, NULL, HFILL }},
-
- { &hf_fmp_numBlksReq, {
- "Extent Length", "fmp.numBlksReq", FT_UINT32,
- BASE_DEC, NULL, 0, NULL, HFILL }},
-
- { &hf_fmp_minBlks, {
- "Minimum Blocks to Grant", "fmp.minBlks", FT_UINT32,
- BASE_DEC, NULL, 0, NULL, HFILL }},
-
- { &hf_fmp_msgNum, {
- "Message Number", "fmp.msgNum", FT_UINT32, BASE_DEC,
- NULL, 0, "FMP Message Number", HFILL }},
-
- { &hf_fmp_cookie, {
- "Cookie", "fmp.cookie", FT_UINT32, BASE_HEX,
- NULL, 0, "Cookie for FMP_REQUEST_QUEUED Resp", HFILL }},
-
- { &hf_fmp_fileSize, {
- "File Size", "fmp.fileSize", FT_UINT64, BASE_DEC,
- NULL, 0, NULL, HFILL }},
-
- { &hf_fmp_extentList_len, {
- "Extent List Length", "fmp.extentList_len", FT_UINT32,
- BASE_DEC, NULL, 0, "FMP Extent List Length", HFILL }},
-
- { &hf_fmp_extent_state, {
- "Extent State", "fmp.extentState", FT_UINT32,BASE_DEC,
- VALS(fmp_extentState_vals), 0, "FMP Extent State", HFILL }},
-
- { &hf_fmp_firstLogBlk, {
- "firstLogBlk", "fmp.firstLogBlk", FT_UINT32,
- BASE_DEC, NULL, 0, "First Logical File Block", HFILL }},
-
- { &hf_fmp_numBlks, {
- "Number Blocks", "fmp.numBlks", FT_UINT32, BASE_DEC,
- NULL, 0, "Number of Blocks", HFILL }},
-
- { &hf_fmp_volID, {
- "Volume ID inside DART", "fmp.volID", FT_UINT32, BASE_HEX,
- NULL, 0, "FMP Volume ID inside DART", HFILL }},
-
- { &hf_fmp_startOffset, {
- "Start Offset", "fmp.startOffset", FT_UINT32, BASE_DEC,
- NULL, 0, "FMP Start Offset", HFILL }},
-
- { &hf_fmp_start_offset64, {
- "Start offset", "fmp.start_offset64", FT_UINT64, BASE_DEC,
- NULL, 0, "Start Offset of extentEx", HFILL }},
-
- { &hf_fmp_eof, {
- "EOF", "fmp.eof", FT_UINT64, BASE_DEC,
- NULL, 0, "End Of File", HFILL }},
-
- { &hf_fmp_plugInID, {
- "Plug In Cmd ID", "fmp.plugInID", FT_BYTES, BASE_NONE,
- NULL, 0, "Plug In Command ID", HFILL }},
-
- { &hf_fmp_plugInBuf, {
- "Plug In Args", "fmp.plugIn", FT_BYTES, BASE_NONE,
- NULL, 0, "FMP Plug In Arguments", HFILL }},
- { &hf_fmp_os_major, {
- "OS Major", "fmp.os_major", FT_UINT32, BASE_DEC,
- NULL, 0, "FMP OS Major", HFILL }},
- { &hf_fmp_os_minor, {
- "OS Minor", "fmp.os_minor", FT_UINT32, BASE_DEC,
- NULL, 0, "FMP OS Minor", HFILL }},
- { &hf_fmp_os_name, {
- "OS Name", "fmp.os_name", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_path, {
- "Mount Path", "fmp.Path", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_os_patch, {
- "OS Path", "fmp.os_patch", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_os_build, {
- "OS Build", "fmp.os_build", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_server_version_string, {
- "Server Version String", "fmp.server_version_string", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_description, {
- "Error Description", "fmp.description", FT_STRING, BASE_NONE,
- NULL, 0, "Client Error Description", HFILL }},
- { &hf_fmp_nfsv3Attr_type, {
- "Type", "fmp.nfsv3Attr_type", FT_UINT32, BASE_DEC,
- NULL, 0, "NFSV3 Attr Type", HFILL }},
- { &hf_fmp_nfsv3Attr_mode, {
- "Mode", "fmp.nfsv3Attr_mod", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_nfsv3Attr_nlink, {
- "nlink", "fmp.nfsv3Attr_nlink", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_nfsv3Attr_uid, {
- "uid", "fmp.nfsv3Attr_uid", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_nfsv3Attr_gid, {
- "gid", "fmp.nfsv3Attr_gid", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- /* for nfsv3Attr_size use hf_fmp_fileSize */
- { &hf_fmp_nfsv3Attr_used, {
- "Used", "fmp.nfsv3Attr_used", FT_UINT64, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_nfsv3Attr_rdev, {
- "rdev", "fmp.nfsv3Attr_rdev", FT_UINT64, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_nfsv3Attr_fsid, {
- "fsid", "fmp.nfsv3Attr_fsid", FT_UINT64, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_nfsv3Attr_fileid, {
- "File ID", "fmp.nfsv3Attr_fileid", FT_UINT64, BASE_DEC,
- NULL, 0, "fileid", HFILL }},
- { &hf_fmp_cmd, {
- "Command", "fmp.cmd", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_topVolumeId, {
- "Top Volume ID", "fmp.topVolumeId", FT_UINT32, BASE_HEX,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_cursor, {
- "number of volumes", "fmp.cursor", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_offset64, {
- "offset", "fmp.offset64", FT_UINT64, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_slice_size, {
- "size of the slice", "fmp.slice_size", FT_UINT64, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_volume, {
- "Volume ID's", "fmp.volume", FT_UINT32, BASE_HEX,
- NULL, 0, "FMP Volume ID's", HFILL }},
- { &hf_fmp_stripeSize, {
- "size of the stripe", "fmp.stripeSize", FT_UINT64, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_fmp_firstLogBlk64, {
- "First Logical Block", "fmp.firstLogBlk64", FT_UINT64, BASE_DEC,
- NULL, 0, NULL, HFILL }},
-
- };
-
- static gint *ett[] = {
- &ett_fmp,
- &ett_fmp_timeval,
- &ett_fmp_extList,
- &ett_fmp_ext,
- &ett_fmp_fileHandle,
- &ett_capabilities,
- &ett_HierVolumeDescription,
- &ett_attrs
- };
-
- module_t *fmp_module;
- proto_fmp = proto_register_protocol("File Mapping Protocol", "FMP",
- "fmp");
-
- proto_register_field_array(proto_fmp, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
-
- fmp_module=prefs_register_protocol(proto_fmp, NULL);
-
- prefs_register_bool_preference(fmp_module, "fhandle_find_both_reqrep",
- "Fhandle filters finds both request/response",
- "With this option display filters for fmp fhandle a RPC call, even if the actual fhandle is only present in one of the packets",
- &fmp_fhandle_reqrep_matching);
+ static hf_register_info hf[] = {
+ { &hf_fmp_procedure,
+ { "Procedure", "fmp.procedure",
+ FT_UINT32, BASE_DEC, VALS(fmp_proc_vals),
+ 0, NULL, HFILL }}, /* New addition */
+
+ { &hf_fmp_hostID,
+ { "Host ID", "fmp.hostID",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_btime,
+ { "Boot Time", "fmp.btime",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0,
+ "Machine Boot Time", HFILL }},
+
+ { &hf_fmp_time_sec,
+ { "seconds", "fmp.btime.sec",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_time_nsec,
+ { "nanoseconds", "fmp.btime.nsec",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_notifyPort,
+ { "Notify Port", "fmp.notifyPort",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "FMP Notify Port", HFILL }},
+
+ { &hf_fmp_sessionHandle,
+ { "Session Handle", "fmp.sessHandle",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ "FMP Session Handle", HFILL }},
+
+ { &hf_fmp_fmpFHandle,
+ { "FMP File Handle", "fmp.fmpFHandle",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ NULL,
+
+ HFILL }},
+ { &hf_fmp_nfsFHandle,
+ { "NFS File Handle", "fmp.nfsFHandle",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_fsID,
+ { "File System ID", "fmp.fsID",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_status,
+ { "Status", "fmp.status",
+ FT_UINT32, BASE_DEC, VALS(fmp_status_vals), 0,
+ "Reply Status", HFILL }},
+
+ { &hf_fmp_fsBlkSz,
+ { "FS Block Size", "fmp.fsBlkSz",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "File System Block Size", HFILL }},
+
+ { &hf_fmp_volHandle,
+ { "Volume Handle", "fmp.volHandle",
+ FT_STRING, BASE_NONE, NULL, 0,
+ "FMP Volume Handle", HFILL }},
+
+ { &hf_fmp_dskSigEnt_val,
+ { "Celerra Signature", "fmp.dsi.ds.dsList.dskSigLst_val.dse.dskSigEnt_val",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_devSignature,
+ { "Signature DATA", "fmp.devSig",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_mount_path,
+ { "Native Protocol: PATH", "fmp.mount_path",
+ FT_STRING, BASE_NONE, NULL, 0,
+ "Absolute path from the root on the server side", HFILL }},
+
+ { &hf_fmp_sig_offset,
+ { "Sig Offset", "fmp.dsi.ds.sig_offset",
+ FT_UINT64, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_numBlksReq,
+ { "Extent Length", "fmp.numBlksReq",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_minBlks,
+ { "Minimum Blocks to Grant", "fmp.minBlks",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_msgNum,
+ { "Message Number", "fmp.msgNum",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "FMP Message Number", HFILL }},
+
+ { &hf_fmp_cookie,
+ { "Cookie", "fmp.cookie",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ "Cookie for FMP_REQUEST_QUEUED Resp", HFILL }},
+
+ { &hf_fmp_fileSize,
+ { "File Size", "fmp.fileSize",
+ FT_UINT64, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_extentList_len,
+ { "Extent List Length", "fmp.extentList_len",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "FMP Extent List Length", HFILL }},
+
+ { &hf_fmp_extent_state,
+ { "Extent State", "fmp.extentState",
+ FT_UINT32,BASE_DEC, VALS(fmp_extentState_vals), 0,
+ "FMP Extent State", HFILL }},
+
+ { &hf_fmp_firstLogBlk,
+ { "firstLogBlk", "fmp.firstLogBlk",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "First Logical File Block", HFILL }},
+
+ { &hf_fmp_numBlks,
+ { "Number Blocks", "fmp.numBlks",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "Number of Blocks", HFILL }},
+
+ { &hf_fmp_volID,
+ { "Volume ID inside DART", "fmp.volID",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ "FMP Volume ID inside DART", HFILL }},
+
+ { &hf_fmp_startOffset,
+ { "Start Offset", "fmp.startOffset",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "FMP Start Offset", HFILL }},
+
+ { &hf_fmp_start_offset64,
+ { "Start offset", "fmp.start_offset64",
+ FT_UINT64, BASE_DEC, NULL, 0,
+ "Start Offset of extentEx", HFILL }},
+
+ { &hf_fmp_eof,
+ { "EOF", "fmp.eof",
+ FT_UINT64, BASE_DEC, NULL, 0,
+ "End Of File", HFILL }},
+
+ { &hf_fmp_plugInID,
+ { "Plug In Cmd ID", "fmp.plugInID",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ "Plug In Command ID", HFILL }},
+
+ { &hf_fmp_plugInBuf,
+ { "Plug In Args", "fmp.plugIn",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ "FMP Plug In Arguments", HFILL }},
+
+ { &hf_fmp_os_major,
+ { "OS Major", "fmp.os_major",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "FMP OS Major", HFILL }},
+
+ { &hf_fmp_os_minor,
+ { "OS Minor", "fmp.os_minor",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "FMP OS Minor", HFILL }},
+
+ { &hf_fmp_os_name,
+ { "OS Name", "fmp.os_name",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_path,
+ { "Mount Path", "fmp.Path",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_os_patch,
+ { "OS Path", "fmp.os_patch",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_os_build,
+ { "OS Build", "fmp.os_build",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_server_version_string,
+ { "Server Version String", "fmp.server_version_string",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_description,
+ { "Error Description", "fmp.description",
+ FT_STRING, BASE_NONE, NULL, 0,
+ "Client Error Description", HFILL }},
+
+ { &hf_fmp_nfsv3Attr_type,
+ { "Type", "fmp.nfsv3Attr_type",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ "NFSV3 Attr Type", HFILL }},
+
+ { &hf_fmp_nfsv3Attr_mode,
+ { "Mode", "fmp.nfsv3Attr_mod",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_nfsv3Attr_nlink,
+ { "nlink", "fmp.nfsv3Attr_nlink",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_nfsv3Attr_uid,
+ { "uid", "fmp.nfsv3Attr_uid",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_nfsv3Attr_gid,
+ { "gid", "fmp.nfsv3Attr_gid",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ /* for nfsv3Attr_size use hf_fmp_fileSize */
+ { &hf_fmp_nfsv3Attr_used,
+ { "Used", "fmp.nfsv3Attr_used",
+ FT_UINT64, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_nfsv3Attr_rdev,
+ { "rdev", "fmp.nfsv3Attr_rdev",
+ FT_UINT64, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_nfsv3Attr_fsid,
+ { "fsid", "fmp.nfsv3Attr_fsid",
+ FT_UINT64, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_nfsv3Attr_fileid,
+ { "File ID", "fmp.nfsv3Attr_fileid",
+ FT_UINT64, BASE_DEC, NULL, 0,
+ "fileid", HFILL }},
+
+ { &hf_fmp_cmd,
+ { "Command", "fmp.cmd",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_topVolumeId,
+ { "Top Volume ID", "fmp.topVolumeId",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_cursor,
+ { "number of volumes", "fmp.cursor",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_offset64,
+ { "offset", "fmp.offset64",
+ FT_UINT64, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_slice_size,
+ { "size of the slice", "fmp.slice_size",
+ FT_UINT64, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_volume,
+ { "Volume ID's", "fmp.volume",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ "FMP Volume ID's", HFILL }},
+
+ { &hf_fmp_stripeSize,
+ { "size of the stripe", "fmp.stripeSize",
+ FT_UINT64, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ { &hf_fmp_firstLogBlk64,
+ { "First Logical Block", "fmp.firstLogBlk64",
+ FT_UINT64, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
+ };
+
+ static gint *ett[] = {
+ &ett_fmp,
+ &ett_fmp_timeval,
+ &ett_fmp_extList,
+ &ett_fmp_ext,
+ &ett_fmp_fileHandle,
+ &ett_capabilities,
+ &ett_HierVolumeDescription,
+ &ett_attrs
+ };
+
+ module_t *fmp_module;
+ proto_fmp = proto_register_protocol("File Mapping Protocol", "FMP", "fmp");
+
+ proto_register_field_array(proto_fmp, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ fmp_module=prefs_register_protocol(proto_fmp, NULL);
+
+ prefs_register_bool_preference(fmp_module, "fhandle_find_both_reqrep",
+ "Fhandle filters finds both request/response",
+ "With this option display filters for fmp fhandle a RPC call,"
+ " even if the actual fhandle is only present in one of the packets",
+ &fmp_fhandle_reqrep_matching);
}
void
proto_reg_handoff_fmp(void)
{
- /* Register the protocol as RPC */
- rpc_init_prog(proto_fmp, FMP_PROGRAM, ett_fmp);
+ /* Register the protocol as RPC */
+ rpc_init_prog(proto_fmp, FMP_PROGRAM, ett_fmp);
- /* Register the procedure tables */
- rpc_init_proc_table(FMP_PROGRAM, FMP_VERSION_3, fmp3_proc, hf_fmp_procedure);
+ /* Register the procedure tables */
+ rpc_init_proc_table(FMP_PROGRAM, FMP_VERSION_3, fmp3_proc, hf_fmp_procedure);
}
diff --git a/epan/dissectors/packet-fr.c b/epan/dissectors/packet-fr.c
index 7b23e26c8d..e2fc035a9b 100644
--- a/epan/dissectors/packet-fr.c
+++ b/epan/dissectors/packet-fr.c
@@ -1,7 +1,7 @@
/* packet-fr.c
* Routines for Frame Relay dissection
*
- * Copyright 2001, Paul Ionescu <paul@acorp.ro>
+ * Copyright 2001, Paul Ionescu <paul@acorp.ro>
*
* $Id$
*
@@ -38,9 +38,6 @@
# include "config.h"
#endif
-#include <stdlib.h>
-#include <ctype.h>
-
#include <glib.h>
#include <epan/packet.h>
#include <epan/prefs.h>
@@ -60,57 +57,57 @@
/*
* Bits in the address field.
*/
-#define FRELAY_EA 0x01 /* Address field extension bit */
-
-#define FRELAY_UPPER_DLCI 0xFC /* Upper DLCI */
-#define FRELAY_CR 0x02 /* Command/response bit in first octet */
-
-#define FRELAY_SECOND_DLCI 0xF0 /* DLCI bits in FECN/BECN/DE octet */
-#define FRELAY_FECN 0x08 /* Forward Explicit Congestion Notification */
-#define FRELAY_BECN 0x04 /* Backward Explicit Congestion Notification */
-#define FRELAY_DE 0x02 /* Discard Eligibility */
-
-#define FRELAY_THIRD_DLCI 0xFE /* DLCI bits in third octet, if any */
-
-#define FRELAY_LOWER_DLCI 0xFC /* Lower DLCI */
-#define FRELAY_DC 0x02 /* DLCI or DL-CORE control indicator in last octet */
-
-#define FROM_DCE 0x80 /* for direction setting */
-
-static gint proto_fr = -1;
-static gint ett_fr = -1;
-static gint ett_fr_address = -1;
-static gint ett_fr_control = -1;
-static gint hf_fr_ea = -1;
-static gint hf_fr_upper_dlci = -1;
-static gint hf_fr_cr = -1;
-static gint hf_fr_second_dlci = -1;
-static gint hf_fr_fecn = -1;
-static gint hf_fr_becn = -1;
-static gint hf_fr_de = -1;
-static gint hf_fr_third_dlci = -1;
-static gint hf_fr_dlcore_control = -1;
-static gint hf_fr_lower_dlci = -1;
-static gint hf_fr_dc = -1;
-static gint hf_fr_dlci = -1;
-static gint hf_fr_control = -1;
-static gint hf_fr_n_r = -1;
-static gint hf_fr_n_s = -1;
-static gint hf_fr_p = -1;
-static gint hf_fr_p_ext = -1;
-static gint hf_fr_f = -1;
-static gint hf_fr_f_ext = -1;
-static gint hf_fr_s_ftype = -1;
-static gint hf_fr_u_modifier_cmd = -1;
+#define FRELAY_EA 0x01 /* Address field extension bit */
+
+#define FRELAY_UPPER_DLCI 0xFC /* Upper DLCI */
+#define FRELAY_CR 0x02 /* Command/response bit in first octet */
+
+#define FRELAY_SECOND_DLCI 0xF0 /* DLCI bits in FECN/BECN/DE octet */
+#define FRELAY_FECN 0x08 /* Forward Explicit Congestion Notification */
+#define FRELAY_BECN 0x04 /* Backward Explicit Congestion Notification */
+#define FRELAY_DE 0x02 /* Discard Eligibility */
+
+#define FRELAY_THIRD_DLCI 0xFE /* DLCI bits in third octet, if any */
+
+#define FRELAY_LOWER_DLCI 0xFC /* Lower DLCI */
+#define FRELAY_DC 0x02 /* DLCI or DL-CORE control indicator in last octet */
+
+#define FROM_DCE 0x80 /* for direction setting */
+
+static gint proto_fr = -1;
+static gint ett_fr = -1;
+static gint ett_fr_address = -1;
+static gint ett_fr_control = -1;
+static gint hf_fr_ea = -1;
+static gint hf_fr_upper_dlci = -1;
+static gint hf_fr_cr = -1;
+static gint hf_fr_second_dlci = -1;
+static gint hf_fr_fecn = -1;
+static gint hf_fr_becn = -1;
+static gint hf_fr_de = -1;
+static gint hf_fr_third_dlci = -1;
+static gint hf_fr_dlcore_control = -1;
+static gint hf_fr_lower_dlci = -1;
+static gint hf_fr_dc = -1;
+static gint hf_fr_dlci = -1;
+static gint hf_fr_control = -1;
+static gint hf_fr_n_r = -1;
+static gint hf_fr_n_s = -1;
+static gint hf_fr_p = -1;
+static gint hf_fr_p_ext = -1;
+static gint hf_fr_f = -1;
+static gint hf_fr_f_ext = -1;
+static gint hf_fr_s_ftype = -1;
+static gint hf_fr_u_modifier_cmd = -1;
static gint hf_fr_u_modifier_resp = -1;
-static gint hf_fr_ftype_i = -1;
-static gint hf_fr_ftype_s_u = -1;
-static gint hf_fr_ftype_s_u_ext = -1;
-static gint hf_fr_nlpid = -1;
-static gint hf_fr_oui = -1;
-static gint hf_fr_pid = -1;
-static gint hf_fr_snaptype = -1;
-static gint hf_fr_chdlctype = -1;
+static gint hf_fr_ftype_i = -1;
+static gint hf_fr_ftype_s_u = -1;
+static gint hf_fr_ftype_s_u_ext = -1;
+static gint hf_fr_nlpid = -1;
+static gint hf_fr_oui = -1;
+static gint hf_fr_pid = -1;
+static gint hf_fr_snaptype = -1;
+static gint hf_fr_chdlctype = -1;
static dissector_handle_t eth_withfcs_handle;
static dissector_handle_t gprs_ns_handle;
@@ -122,20 +119,20 @@ static dissector_table_t osinl_subdissector_table;
* Encapsulation type.
* XXX - this should be per-DLCI as well.
*/
-#define FRF_3_2 0 /* FRF 3.2 or Cisco HDLC */
-#define GPRS_NS 1 /* GPRS Network Services (3GPP TS 08.16) */
-#define RAW_ETHER 2 /* Raw Ethernet */
+#define FRF_3_2 0 /* FRF 3.2 or Cisco HDLC */
+#define GPRS_NS 1 /* GPRS Network Services (3GPP TS 08.16) */
+#define RAW_ETHER 2 /* Raw Ethernet */
static gint fr_encap = FRF_3_2;
static const true_false_string ctrl_string = {
- "DLCI Address",
- "Control"
- };
+ "DLCI Address",
+ "Control"
+};
static const true_false_string ea_string = {
- "Last Octet",
- "More Follows"
- };
+ "Last Octet",
+ "More Follows"
+};
/*
* This isn't the same as "nlpid_vals[]"; 0x08 is Q.933, not Q.931,
@@ -143,60 +140,60 @@ static const true_false_string ea_string = {
* protocol identifier, so 0x01 is T.70, not X.29.
*/
static const value_string fr_nlpid_vals[] = {
- { NLPID_NULL, "NULL" },
- { NLPID_IPI_T_70, "T.70" }, /* XXX - IPI, or SPI? */
- { NLPID_X_633, "X.633" },
- { NLPID_Q_931, "Q.933" },
- { NLPID_LMI, "LMI" },
- { NLPID_Q_2119, "Q.2119" },
- { NLPID_SNAP, "SNAP" },
- { NLPID_ISO8473_CLNP, "CLNP" },
- { NLPID_ISO9542_ESIS, "ESIS" },
- { NLPID_ISO10589_ISIS, "ISIS" },
- { NLPID_ISO10747_IDRP, "IDRP" },
- { NLPID_ISO9542X25_ESIS, "ESIS (X.25)" },
- { NLPID_ISO10030, "ISO 10030" },
- { NLPID_ISO11577, "ISO 11577" },
- { NLPID_COMPRESSED, "Data compression protocol" },
- { NLPID_IP, "IP" },
- { NLPID_IP6, "IPv6" },
- { NLPID_PPP, "PPP" },
- { 0, NULL },
+ { NLPID_NULL, "NULL" },
+ { NLPID_IPI_T_70, "T.70" }, /* XXX - IPI, or SPI? */
+ { NLPID_X_633, "X.633" },
+ { NLPID_Q_931, "Q.933" },
+ { NLPID_LMI, "LMI" },
+ { NLPID_Q_2119, "Q.2119" },
+ { NLPID_SNAP, "SNAP" },
+ { NLPID_ISO8473_CLNP, "CLNP" },
+ { NLPID_ISO9542_ESIS, "ESIS" },
+ { NLPID_ISO10589_ISIS, "ISIS" },
+ { NLPID_ISO10747_IDRP, "IDRP" },
+ { NLPID_ISO9542X25_ESIS, "ESIS (X.25)" },
+ { NLPID_ISO10030, "ISO 10030" },
+ { NLPID_ISO11577, "ISO 11577" },
+ { NLPID_COMPRESSED, "Data compression protocol" },
+ { NLPID_IP, "IP" },
+ { NLPID_IP6, "IPv6" },
+ { NLPID_PPP, "PPP" },
+ { 0, NULL },
};
static dissector_table_t fr_subdissector_table;
static dissector_table_t fr_osinl_subdissector_table;
static void dissect_fr_nlpid(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, proto_item *ti,
- proto_tree *fr_tree, guint8 fr_ctrl);
+ proto_tree *tree, proto_item *ti,
+ proto_tree *fr_tree, guint8 fr_ctrl);
static void dissect_lapf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static void dissect_fr_xid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
/* Used only for U frames */
static const xdlc_cf_items fr_cf_items = {
- NULL,
- NULL,
- &hf_fr_p,
- &hf_fr_f,
- NULL,
- &hf_fr_u_modifier_cmd,
- &hf_fr_u_modifier_resp,
- NULL,
- &hf_fr_ftype_s_u
+ NULL,
+ NULL,
+ &hf_fr_p,
+ &hf_fr_f,
+ NULL,
+ &hf_fr_u_modifier_cmd,
+ &hf_fr_u_modifier_resp,
+ NULL,
+ &hf_fr_ftype_s_u
};
/* Used only for I and S frames */
static const xdlc_cf_items fr_cf_items_ext = {
- &hf_fr_n_r,
- &hf_fr_n_s,
- &hf_fr_p_ext,
- &hf_fr_f_ext,
- &hf_fr_s_ftype,
- NULL,
- NULL,
- &hf_fr_ftype_i,
- &hf_fr_ftype_s_u_ext
+ &hf_fr_n_r,
+ &hf_fr_n_s,
+ &hf_fr_p_ext,
+ &hf_fr_f_ext,
+ &hf_fr_s_ftype,
+ NULL,
+ NULL,
+ &hf_fr_ftype_i,
+ &hf_fr_ftype_s_u_ext
};
void
@@ -268,15 +265,15 @@ capture_fr(const guchar *pd, int offset, int len, packet_counts *ld)
}
fr_octet = pd[offset];
while (!(fr_octet & FRELAY_EA)) {
- /*
- * Bogus! More than 4 octets of address.
- */
+ /*
+ * Bogus! More than 4 octets of address.
+ */
offset++;
if (!BYTES_ARE_IN_FRAME(offset, len, 1)) {
ld->other++;
return;
}
- fr_octet = pd[offset];
+ fr_octet = pd[offset];
}
}
@@ -319,12 +316,12 @@ capture_fr(const guchar *pd, int offset, int len, packet_counts *ld)
}
fr_nlpid = pd[offset];
if (fr_nlpid == 0) {
- offset++;
+ offset++;
if (!BYTES_ARE_IN_FRAME(offset, len, 1)) {
ld->other++;
return;
}
- fr_nlpid = pd[offset];
+ fr_nlpid = pd[offset];
}
offset++;
switch (fr_nlpid) {
@@ -351,25 +348,25 @@ capture_fr(const guchar *pd, int offset, int len, packet_counts *ld)
}
} else {
if (addr == 0) {
- /*
- * This must be some sort of LAPF on DLCI 0 for SVC
- * because DLCI 0 is reserved for LMI and SVC signaling
- * encapsulated in LAPF, and LMI is transmitted in
- * unnumbered information (03), so this must be LAPF
- * (guessing).
- *
- * XXX - but what is it? Is Q.933 carried inside UI
- * frames or other types of frames or both?
- */
- ld->other++;
- return;
+ /*
+ * This must be some sort of LAPF on DLCI 0 for SVC
+ * because DLCI 0 is reserved for LMI and SVC signaling
+ * encapsulated in LAPF, and LMI is transmitted in
+ * unnumbered information (03), so this must be LAPF
+ * (guessing).
+ *
+ * XXX - but what is it? Is Q.933 carried inside UI
+ * frames or other types of frames or both?
+ */
+ ld->other++;
+ return;
}
if (fr_ctrl == (XDLC_U|XDLC_XID)) {
- /*
- * XID.
- */
- ld->other++;
- return;
+ /*
+ * XID.
+ */
+ ld->other++;
+ return;
}
/*
@@ -395,19 +392,19 @@ capture_fr(const guchar *pd, int offset, int len, packet_counts *ld)
static void
dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- gboolean has_direction, gboolean decode_address )
+ gboolean has_direction, gboolean decode_address )
{
- int offset = 0;
- proto_item *ti = NULL;
- proto_tree *fr_tree = NULL;
- proto_item *octet_item = NULL;
- proto_tree *octet_tree = NULL;
- guint8 fr_octet;
- int is_response = FALSE;
- guint32 addr = 0;
- guint8 fr_ctrl;
- guint16 fr_type;
- tvbuff_t *next_tvb;
+ int offset = 0;
+ proto_item *ti = NULL;
+ proto_tree *fr_tree = NULL;
+ proto_item *octet_item = NULL;
+ proto_tree *octet_tree = NULL;
+ guint8 fr_octet;
+ int is_response = FALSE;
+ guint32 addr = 0;
+ guint8 fr_ctrl;
+ guint16 fr_type;
+ tvbuff_t *next_tvb;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FR");
col_clear(pinfo->cinfo, COL_INFO);
@@ -443,7 +440,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
addr = 0;
if (tree) {
proto_tree_add_text(fr_tree, tvb, offset, 1,
- "Bogus 1-octet address field");
+ "Bogus 1-octet address field");
offset++;
}
} else {
@@ -455,7 +452,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
is_response = (fr_octet & FRELAY_CR);
if (tree) {
octet_item = proto_tree_add_text(fr_tree, tvb, offset, 1,
- "First address octet: 0x%02x", fr_octet);
+ "First address octet: 0x%02x", fr_octet);
octet_tree = proto_item_add_subtree(octet_item, ett_fr_address);
proto_tree_add_uint(octet_tree, hf_fr_upper_dlci, tvb, offset, 1, fr_octet);
proto_tree_add_boolean(octet_tree, hf_fr_cr, tvb, offset, 1, fr_octet);
@@ -471,8 +468,8 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
addr = (addr << 4) | ((fr_octet & FRELAY_SECOND_DLCI) >> 4);
if (tree) {
octet_item = proto_tree_add_text(fr_tree, tvb, offset, 1,
- "Second address octet: 0x%02x",
- fr_octet);
+ "Second address octet: 0x%02x",
+ fr_octet);
octet_tree = proto_item_add_subtree(octet_item, ett_fr_address);
proto_tree_add_uint(octet_tree, hf_fr_second_dlci, tvb, offset, 1, fr_octet);
proto_tree_add_boolean(octet_tree, hf_fr_fecn, tvb, 0, offset, fr_octet);
@@ -492,37 +489,37 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
*/
fr_octet = tvb_get_guint8(tvb, offset);
if (!(fr_octet & FRELAY_EA)) {
- /*
- * 7 more bits of DLCI.
- */
- addr = (addr << 7) | ((fr_octet & FRELAY_THIRD_DLCI) >> 1);
- if (tree) {
- octet_item = proto_tree_add_text(fr_tree, tvb, offset, 1,
- "Third address octet: 0x%02x",
- fr_octet);
- octet_tree = proto_item_add_subtree(octet_item, ett_fr_address);
- proto_tree_add_uint(octet_tree, hf_fr_third_dlci, tvb, offset, 1, fr_octet);
- proto_tree_add_boolean(octet_tree, hf_fr_ea, tvb, offset, 1, fr_octet);
- }
- offset++;
- fr_octet = tvb_get_guint8(tvb, offset);
- while (!(fr_octet & FRELAY_EA)) {
- /*
- * Bogus! More than 4 octets of address.
- */
- if (tree) {
- proto_tree_add_text(fr_tree, tvb, offset, 1,
- "Bogus extra address octet");
- }
- offset++;
- fr_octet = tvb_get_guint8(tvb, offset);
- }
+ /*
+ * 7 more bits of DLCI.
+ */
+ addr = (addr << 7) | ((fr_octet & FRELAY_THIRD_DLCI) >> 1);
+ if (tree) {
+ octet_item = proto_tree_add_text(fr_tree, tvb, offset, 1,
+ "Third address octet: 0x%02x",
+ fr_octet);
+ octet_tree = proto_item_add_subtree(octet_item, ett_fr_address);
+ proto_tree_add_uint(octet_tree, hf_fr_third_dlci, tvb, offset, 1, fr_octet);
+ proto_tree_add_boolean(octet_tree, hf_fr_ea, tvb, offset, 1, fr_octet);
+ }
+ offset++;
+ fr_octet = tvb_get_guint8(tvb, offset);
+ while (!(fr_octet & FRELAY_EA)) {
+ /*
+ * Bogus! More than 4 octets of address.
+ */
+ if (tree) {
+ proto_tree_add_text(fr_tree, tvb, offset, 1,
+ "Bogus extra address octet");
+ }
+ offset++;
+ fr_octet = tvb_get_guint8(tvb, offset);
+ }
}
if (tree) {
- octet_item = proto_tree_add_text(fr_tree, tvb, offset, 1,
- "Final address octet: 0x%02x",
- fr_octet);
- octet_tree = proto_item_add_subtree(octet_item, ett_fr_address);
+ octet_item = proto_tree_add_text(fr_tree, tvb, offset, 1,
+ "Final address octet: 0x%02x",
+ fr_octet);
+ octet_tree = proto_item_add_subtree(octet_item, ett_fr_address);
}
/*
@@ -530,16 +527,16 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* DL-CORE control indicator flag.
*/
if (fr_octet & FRELAY_DC) {
- /*
- * DL-CORE.
- */
- proto_tree_add_uint(octet_tree, hf_fr_dlcore_control, tvb, offset, 1, fr_octet);
+ /*
+ * DL-CORE.
+ */
+ proto_tree_add_uint(octet_tree, hf_fr_dlcore_control, tvb, offset, 1, fr_octet);
} else {
- /*
- * Last 6 bits of DLCI.
- */
- addr = (addr << 6) | ((fr_octet & FRELAY_LOWER_DLCI) >> 2);
- proto_tree_add_uint(octet_tree, hf_fr_lower_dlci, tvb, offset, 1, fr_octet);
+ /*
+ * Last 6 bits of DLCI.
+ */
+ addr = (addr << 6) | ((fr_octet & FRELAY_LOWER_DLCI) >> 2);
+ proto_tree_add_uint(octet_tree, hf_fr_lower_dlci, tvb, offset, 1, fr_octet);
}
proto_tree_add_boolean(octet_tree, hf_fr_dc, tvb, offset, 1, fr_octet);
proto_tree_add_boolean(octet_tree, hf_fr_ea, tvb, offset, 1, fr_octet);
@@ -566,8 +563,8 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
fr_ctrl = tvb_get_guint8(tvb, offset);
if (fr_ctrl == XDLC_U) {
dissect_xdlc_control(tvb, offset, pinfo, fr_tree, hf_fr_control,
- ett_fr_control, &fr_cf_items, &fr_cf_items_ext,
- NULL, NULL, is_response, TRUE, TRUE);
+ ett_fr_control, &fr_cf_items, &fr_cf_items_ext,
+ NULL, NULL, is_response, TRUE, TRUE);
offset++;
/*
@@ -579,30 +576,30 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
dissect_fr_nlpid(tvb, offset, pinfo, tree, ti, fr_tree, fr_ctrl);
} else {
if (addr == 0) {
- /*
- * This must be some sort of LAPF on DLCI 0 for SVC
- * because DLCI 0 is reserved for LMI and SVC signaling
- * encapsulated in LAPF, and LMI is transmitted in
- * unnumbered information (03), so this must be LAPF
- * (guessing).
- *
- * XXX - but what is it? Is Q.933 carried inside UI
- * frames or other types of frames or both?
- */
- dissect_xdlc_control(tvb, offset, pinfo, fr_tree,
- hf_fr_control, ett_fr_control,
- &fr_cf_items, &fr_cf_items_ext,
- NULL, NULL, is_response, TRUE, TRUE);
- dissect_lapf(tvb_new_subset_remaining(tvb,offset),pinfo,tree);
- return;
+ /*
+ * This must be some sort of LAPF on DLCI 0 for SVC
+ * because DLCI 0 is reserved for LMI and SVC signaling
+ * encapsulated in LAPF, and LMI is transmitted in
+ * unnumbered information (03), so this must be LAPF
+ * (guessing).
+ *
+ * XXX - but what is it? Is Q.933 carried inside UI
+ * frames or other types of frames or both?
+ */
+ dissect_xdlc_control(tvb, offset, pinfo, fr_tree,
+ hf_fr_control, ett_fr_control,
+ &fr_cf_items, &fr_cf_items_ext,
+ NULL, NULL, is_response, TRUE, TRUE);
+ dissect_lapf(tvb_new_subset_remaining(tvb,offset),pinfo,tree);
+ return;
}
if (fr_ctrl == (XDLC_U|XDLC_XID)) {
- dissect_xdlc_control(tvb, offset, pinfo, fr_tree,
- hf_fr_control, ett_fr_control,
- &fr_cf_items, &fr_cf_items_ext,
- NULL, NULL, is_response, TRUE, TRUE);
- dissect_fr_xid(tvb_new_subset_remaining(tvb,offset),pinfo,tree);
- return;
+ dissect_xdlc_control(tvb, offset, pinfo, fr_tree,
+ hf_fr_control, ett_fr_control,
+ &fr_cf_items, &fr_cf_items_ext,
+ NULL, NULL, is_response, TRUE, TRUE);
+ dissect_fr_xid(tvb_new_subset_remaining(tvb,offset),pinfo,tree);
+ return;
}
/*
@@ -611,9 +608,9 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
*/
fr_type = tvb_get_ntohs(tvb, offset);
if (ti != NULL) {
- /* Include the Cisco HDLC type in the top-level protocol
- tree item. */
- proto_item_set_end(ti, tvb, offset+2);
+ /* Include the Cisco HDLC type in the top-level protocol
+ tree item. */
+ proto_item_set_end(ti, tvb, offset+2);
}
chdlctype(fr_type, tvb, offset+2, pinfo, tree, fr_tree, hf_fr_chdlctype);
}
@@ -655,8 +652,9 @@ dissect_fr_stripped_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_fr_common(tvb, pinfo, tree, TRUE, FALSE );
}
-static void dissect_fr_uncompressed(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *tree)
+static void
+dissect_fr_uncompressed(tvbuff_t *tvb, packet_info *pinfo,
+ proto_tree *tree)
{
proto_item *ti = NULL;
proto_tree *fr_tree = NULL;
@@ -671,11 +669,12 @@ static void dissect_fr_uncompressed(tvbuff_t *tvb, packet_info *pinfo,
dissect_fr_nlpid(tvb, 0, pinfo, tree, ti, fr_tree, XDLC_U);
}
-static void dissect_fr_nlpid(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, proto_item *ti,
- proto_tree *fr_tree, guint8 fr_ctrl)
+static void
+dissect_fr_nlpid(tvbuff_t *tvb, int offset, packet_info *pinfo,
+ proto_tree *tree, proto_item *ti,
+ proto_tree *fr_tree, guint8 fr_ctrl)
{
- guint8 fr_nlpid;
+ guint8 fr_nlpid;
tvbuff_t *next_tvb;
/*
@@ -686,14 +685,14 @@ static void dissect_fr_nlpid(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item_set_end(ti, tvb, offset);
fr_nlpid = tvb_get_guint8 (tvb,offset);
if (fr_nlpid == 0) {
- if (tree)
- proto_tree_add_text(fr_tree, tvb, offset, 1, "Padding");
- offset++;
- if (ti != NULL) {
- /* Include the padding in the top-level protocol tree item. */
- proto_item_set_end(ti, tvb, offset);
- }
- fr_nlpid=tvb_get_guint8( tvb,offset);
+ if (tree)
+ proto_tree_add_text(fr_tree, tvb, offset, 1, "Padding");
+ offset++;
+ if (ti != NULL) {
+ /* Include the padding in the top-level protocol tree item. */
+ proto_item_set_end(ti, tvb, offset);
+ }
+ fr_nlpid=tvb_get_guint8( tvb,offset);
}
/*
@@ -733,20 +732,20 @@ static void dissect_fr_nlpid(tvbuff_t *tvb, int offset, packet_info *pinfo,
*/
next_tvb = tvb_new_subset_remaining(tvb,offset);
if (dissector_try_uint(osinl_subdissector_table, fr_nlpid, next_tvb,
- pinfo, tree) ||
+ pinfo, tree) ||
dissector_try_uint(fr_osinl_subdissector_table, fr_nlpid, next_tvb,
- pinfo, tree)) {
- /*
- * Yes, we got a match. Add the NLPID as a hidden item,
- * so you can, at least, filter on it.
- */
- if (tree) {
- proto_item *hidden_item;
- hidden_item = proto_tree_add_uint(fr_tree, hf_fr_nlpid,
- tvb, offset, 1, fr_nlpid );
- PROTO_ITEM_SET_HIDDEN(hidden_item);
- }
- return;
+ pinfo, tree)) {
+ /*
+ * Yes, we got a match. Add the NLPID as a hidden item,
+ * so you can, at least, filter on it.
+ */
+ if (tree) {
+ proto_item *hidden_item;
+ hidden_item = proto_tree_add_uint(fr_tree, hf_fr_nlpid,
+ tvb, offset, 1, fr_nlpid );
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ }
+ return;
}
/*
@@ -756,139 +755,203 @@ static void dissect_fr_nlpid(tvbuff_t *tvb, int offset, packet_info *pinfo,
* to be part of the LMI PDU?
*/
if (tree)
- proto_tree_add_uint(fr_tree, hf_fr_nlpid, tvb, offset, 1, fr_nlpid );
+ proto_tree_add_uint(fr_tree, hf_fr_nlpid, tvb, offset, 1, fr_nlpid );
offset++;
switch (fr_nlpid) {
case NLPID_SNAP:
- if (ti != NULL) {
- /* Include the NLPID and SNAP header in the top-level
- protocol tree item. */
- proto_item_set_end(ti, tvb, offset+5);
- }
- dissect_snap(tvb, offset, pinfo, tree, fr_tree, fr_ctrl,
- hf_fr_oui, hf_fr_snaptype, hf_fr_pid, 0);
- return;
+ if (ti != NULL) {
+ /* Include the NLPID and SNAP header in the top-level
+ protocol tree item. */
+ proto_item_set_end(ti, tvb, offset+5);
+ }
+ dissect_snap(tvb, offset, pinfo, tree, fr_tree, fr_ctrl,
+ hf_fr_oui, hf_fr_snaptype, hf_fr_pid, 0);
+ return;
default:
- if (ti != NULL) {
- /* Include the NLPID in the top-level protocol tree item. */
- proto_item_set_end(ti, tvb, offset);
- }
- next_tvb = tvb_new_subset_remaining(tvb,offset);
- if (!dissector_try_uint(fr_subdissector_table,fr_nlpid,
- next_tvb, pinfo, tree))
- call_dissector(data_handle,next_tvb, pinfo, tree);
- break;
+ if (ti != NULL) {
+ /* Include the NLPID in the top-level protocol tree item. */
+ proto_item_set_end(ti, tvb, offset);
+ }
+ next_tvb = tvb_new_subset_remaining(tvb,offset);
+ if (!dissector_try_uint(fr_subdissector_table,fr_nlpid,
+ next_tvb, pinfo, tree))
+ call_dissector(data_handle,next_tvb, pinfo, tree);
+ break;
}
}
-static void dissect_lapf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static void
+dissect_lapf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_tree_add_text(tree, tvb, 0, 0, "Frame relay lapf not yet implemented");
- call_dissector(data_handle,tvb_new_subset_remaining(tvb,0),pinfo,tree);
+ proto_tree_add_text(tree, tvb, 0, 0, "Frame relay lapf not yet implemented");
+ call_dissector(data_handle,tvb_new_subset_remaining(tvb,0),pinfo,tree);
}
-static void dissect_fr_xid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+
+static void
+dissect_fr_xid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_tree_add_text(tree, tvb, 0, 0, "Frame relay xid not yet implemented");
- call_dissector(data_handle,tvb_new_subset_remaining(tvb,0),pinfo,tree);
+ proto_tree_add_text(tree, tvb, 0, 0, "Frame relay xid not yet implemented");
+ call_dissector(data_handle,tvb_new_subset_remaining(tvb,0),pinfo,tree);
}
/* Register the protocol with Wireshark */
-void proto_register_fr(void)
+void
+proto_register_fr(void)
{
static hf_register_info hf[] = {
- { &hf_fr_ea, {
- "EA", "fr.ea", FT_BOOLEAN, 8, TFS(&ea_string),
- FRELAY_EA, "Extended Address", HFILL }},
- { &hf_fr_upper_dlci, {
- "Upper DLCI", "fr.upper_dlci", FT_UINT8, BASE_HEX,
- NULL, FRELAY_UPPER_DLCI, "Upper bits of DLCI", HFILL }},
- { &hf_fr_cr, {
- "CR", "fr.cr", FT_BOOLEAN, 8, TFS(&tfs_command_response),
- FRELAY_CR, "Command/Response", HFILL }},
- { &hf_fr_second_dlci, {
- "Second DLCI", "fr.second_dlci", FT_UINT8, BASE_HEX,
- NULL, FRELAY_SECOND_DLCI, "Bits below upper bits of DLCI", HFILL }},
- { &hf_fr_fecn, {
- "FECN", "fr.fecn", FT_BOOLEAN, 8,
- NULL, FRELAY_FECN, "Forward Explicit Congestion Notification", HFILL }},
- { &hf_fr_becn, {
- "BECN", "fr.becn", FT_BOOLEAN, 8,
- NULL, FRELAY_BECN, "Backward Explicit Congestion Notification", HFILL }},
- { &hf_fr_de, {
- "DE", "fr.de", FT_BOOLEAN, 8,
- NULL, FRELAY_DE, "Discard Eligibility", HFILL }},
- { &hf_fr_third_dlci, {
- "Third DLCI", "fr.third_dlci", FT_UINT8, BASE_HEX,
- NULL, FRELAY_THIRD_DLCI, "Additional bits of DLCI", HFILL }},
- { &hf_fr_dlcore_control, {
- "DL-CORE Control", "fr.dlcore_control", FT_UINT8, BASE_HEX,
- NULL, FRELAY_LOWER_DLCI, "DL-Core control bits", HFILL }},
- { &hf_fr_lower_dlci, {
- "Lower DLCI", "fr.lower_dlci", FT_UINT8, BASE_HEX,
- NULL, FRELAY_LOWER_DLCI, "Lower bits of DLCI", HFILL }},
- { &hf_fr_dc, {
- "DC", "fr.dc", FT_BOOLEAN, 16, TFS(&ctrl_string),
- FRELAY_CR, "Address/Control", HFILL }},
- { &hf_fr_dlci, {
- "DLCI", "fr.dlci", FT_UINT32, BASE_DEC,
- NULL, 0x0, "Data-Link Connection Identifier", HFILL }},
- { &hf_fr_control, {
- "Control Field", "fr.control", FT_UINT8, BASE_HEX,
- NULL, 0x0, NULL, HFILL }},
- { &hf_fr_n_r, {
- "N(R)", "fr.control.n_r", FT_UINT16, BASE_DEC,
- NULL, XDLC_N_R_EXT_MASK, NULL, HFILL }},
- { &hf_fr_n_s, {
- "N(S)", "fr.control.n_s", FT_UINT16, BASE_DEC,
- NULL, XDLC_N_S_EXT_MASK, NULL, HFILL }},
- { &hf_fr_p, {
- "Poll", "fr.control.p", FT_BOOLEAN, 8,
- TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }},
- { &hf_fr_p_ext, {
- "Poll", "fr.control.p", FT_BOOLEAN, 16,
- TFS(&tfs_set_notset), XDLC_P_F_EXT, NULL, HFILL }},
- { &hf_fr_f, {
- "Final", "fr.control.f", FT_BOOLEAN, 8,
- TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }},
- { &hf_fr_f_ext, {
- "Final", "fr.control.f", FT_BOOLEAN, 16,
- TFS(&tfs_set_notset), XDLC_P_F_EXT, NULL, HFILL }},
- { &hf_fr_s_ftype, {
- "Supervisory frame type", "fr.control.s_ftype", FT_UINT16, BASE_HEX,
- VALS(stype_vals), XDLC_S_FTYPE_MASK, NULL, HFILL }},
- { &hf_fr_u_modifier_cmd, {
- "Command", "fr.control.u_modifier_cmd", FT_UINT8, BASE_HEX,
- VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, NULL, HFILL }},
- { &hf_fr_u_modifier_resp, {
- "Response", "fr.control.u_modifier_resp", FT_UINT8, BASE_HEX,
- VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, NULL, HFILL }},
- { &hf_fr_ftype_i, {
- "Frame type", "fr.control.ftype", FT_UINT16, BASE_HEX,
- VALS(ftype_vals), XDLC_I_MASK, NULL, HFILL }},
- { &hf_fr_ftype_s_u, {
- "Frame type", "fr.control.ftype", FT_UINT8, BASE_HEX,
- VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }},
- { &hf_fr_ftype_s_u_ext, {
- "Frame type", "fr.control.ftype", FT_UINT16, BASE_HEX,
- VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }},
- { &hf_fr_nlpid, {
- "NLPID", "fr.nlpid", FT_UINT8, BASE_HEX,
- VALS(fr_nlpid_vals), 0x0, "Frame Relay Encapsulated Protocol NLPID", HFILL }},
- { &hf_fr_oui, {
- "Organization Code", "fr.snap.oui", FT_UINT24, BASE_HEX,
- VALS(oui_vals), 0x0, NULL, HFILL }},
- { &hf_fr_pid, {
- "Protocol ID", "fr.snap.pid", FT_UINT16, BASE_HEX,
- NULL, 0x0, NULL, HFILL }},
- { &hf_fr_snaptype, {
- "Type", "fr.snaptype", FT_UINT16, BASE_HEX,
- VALS(etype_vals), 0x0, "Frame Relay SNAP Encapsulated Protocol", HFILL }},
- { &hf_fr_chdlctype, {
- "Type", "fr.chdlctype", FT_UINT16, BASE_HEX,
- VALS(chdlc_vals), 0x0, "Frame Relay Cisco HDLC Encapsulated Protocol", HFILL }},
+ { &hf_fr_ea,
+ { "EA", "fr.ea",
+ FT_BOOLEAN, 8, TFS(&ea_string), FRELAY_EA,
+ "Extended Address", HFILL }},
+
+ { &hf_fr_upper_dlci,
+ { "Upper DLCI", "fr.upper_dlci",
+ FT_UINT8, BASE_HEX, NULL, FRELAY_UPPER_DLCI,
+ "Upper bits of DLCI", HFILL }},
+
+ { &hf_fr_cr,
+ { "CR", "fr.cr",
+ FT_BOOLEAN, 8, TFS(&tfs_command_response), FRELAY_CR,
+ "Command/Response", HFILL }},
+
+ { &hf_fr_second_dlci,
+ { "Second DLCI", "fr.second_dlci",
+ FT_UINT8, BASE_HEX, NULL, FRELAY_SECOND_DLCI,
+ "Bits below upper bits of DLCI", HFILL }},
+
+ { &hf_fr_fecn,
+ { "FECN", "fr.fecn",
+ FT_BOOLEAN, 8, NULL, FRELAY_FECN,
+ "Forward Explicit Congestion Notification", HFILL }},
+
+ { &hf_fr_becn,
+ { "BECN", "fr.becn",
+ FT_BOOLEAN, 8, NULL, FRELAY_BECN,
+ "Backward Explicit Congestion Notification", HFILL }},
+
+ { &hf_fr_de,
+ { "DE", "fr.de",
+ FT_BOOLEAN, 8, NULL, FRELAY_DE,
+ "Discard Eligibility", HFILL }},
+
+ { &hf_fr_third_dlci,
+ { "Third DLCI", "fr.third_dlci",
+ FT_UINT8, BASE_HEX, NULL, FRELAY_THIRD_DLCI,
+ "Additional bits of DLCI", HFILL }},
+
+ { &hf_fr_dlcore_control,
+ { "DL-CORE Control", "fr.dlcore_control",
+ FT_UINT8, BASE_HEX, NULL, FRELAY_LOWER_DLCI,
+ "DL-Core control bits", HFILL }},
+
+ { &hf_fr_lower_dlci,
+ { "Lower DLCI", "fr.lower_dlci",
+ FT_UINT8, BASE_HEX, NULL, FRELAY_LOWER_DLCI,
+ "Lower bits of DLCI", HFILL }},
+
+ { &hf_fr_dc,
+ { "DC", "fr.dc",
+ FT_BOOLEAN, 16, TFS(&ctrl_string), FRELAY_CR,
+ "Address/Control", HFILL }},
+
+ { &hf_fr_dlci,
+ { "DLCI", "fr.dlci",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Data-Link Connection Identifier", HFILL }},
+
+ { &hf_fr_control,
+ { "Control Field", "fr.control",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_fr_n_r,
+ { "N(R)", "fr.control.n_r",
+ FT_UINT16, BASE_DEC, NULL, XDLC_N_R_EXT_MASK,
+ NULL, HFILL }},
+
+ { &hf_fr_n_s,
+ { "N(S)", "fr.control.n_s",
+ FT_UINT16, BASE_DEC, NULL, XDLC_N_S_EXT_MASK,
+ NULL, HFILL }},
+
+ { &hf_fr_p,
+ { "Poll", "fr.control.p",
+ FT_BOOLEAN, 8, TFS(&tfs_set_notset), XDLC_P_F,
+ NULL, HFILL }},
+
+ { &hf_fr_p_ext,
+ { "Poll", "fr.control.p",
+ FT_BOOLEAN, 16, TFS(&tfs_set_notset), XDLC_P_F_EXT,
+ NULL, HFILL }},
+
+ { &hf_fr_f,
+ { "Final", "fr.control.f",
+ FT_BOOLEAN, 8, TFS(&tfs_set_notset), XDLC_P_F,
+ NULL, HFILL }},
+
+ { &hf_fr_f_ext,
+ { "Final", "fr.control.f",
+ FT_BOOLEAN, 16, TFS(&tfs_set_notset), XDLC_P_F_EXT,
+ NULL, HFILL }},
+
+ { &hf_fr_s_ftype,
+ { "Supervisory frame type", "fr.control.s_ftype",
+ FT_UINT16, BASE_HEX, VALS(stype_vals), XDLC_S_FTYPE_MASK,
+ NULL, HFILL }},
+
+ { &hf_fr_u_modifier_cmd,
+ { "Command", "fr.control.u_modifier_cmd",
+ FT_UINT8, BASE_HEX, VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK,
+ NULL, HFILL }},
+
+ { &hf_fr_u_modifier_resp,
+ { "Response", "fr.control.u_modifier_resp",
+ FT_UINT8, BASE_HEX, VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK,
+ NULL, HFILL }},
+
+ { &hf_fr_ftype_i,
+ { "Frame type", "fr.control.ftype",
+ FT_UINT16, BASE_HEX, VALS(ftype_vals), XDLC_I_MASK,
+ NULL, HFILL }},
+
+ { &hf_fr_ftype_s_u,
+ { "Frame type", "fr.control.ftype",
+ FT_UINT8, BASE_HEX, VALS(ftype_vals), XDLC_S_U_MASK,
+ NULL, HFILL }},
+
+ { &hf_fr_ftype_s_u_ext,
+ { "Frame type", "fr.control.ftype",
+ FT_UINT16, BASE_HEX, VALS(ftype_vals), XDLC_S_U_MASK,
+ NULL, HFILL }},
+
+ { &hf_fr_nlpid,
+ { "NLPID", "fr.nlpid",
+ FT_UINT8, BASE_HEX, VALS(fr_nlpid_vals), 0x0,
+ "Frame Relay Encapsulated Protocol NLPID", HFILL }},
+
+ { &hf_fr_oui,
+ { "Organization Code", "fr.snap.oui",
+ FT_UINT24, BASE_HEX, VALS(oui_vals), 0x0,
+ NULL, HFILL }},
+
+ { &hf_fr_pid,
+ { "Protocol ID", "fr.snap.pid",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_fr_snaptype,
+ { "Type", "fr.snaptype",
+ FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
+ "Frame Relay SNAP Encapsulated Protocol", HFILL }},
+
+ { &hf_fr_chdlctype,
+ { "Type", "fr.chdlctype",
+ FT_UINT16, BASE_HEX, VALS(chdlc_vals), 0x0,
+ "Frame Relay Cisco HDLC Encapsulated Protocol", HFILL }},
+
};
/* Setup protocol subtree array */
@@ -910,9 +973,9 @@ void proto_register_fr(void)
proto_register_subtree_array(ett, array_length(ett));
fr_subdissector_table = register_dissector_table("fr.ietf",
- "Frame Relay NLPID", FT_UINT8, BASE_HEX);
+ "Frame Relay NLPID", FT_UINT8, BASE_HEX);
fr_osinl_subdissector_table = register_dissector_table("fr.osinl",
- "Frame Relay OSI NLPID", FT_UINT8, BASE_HEX);
+ "Frame Relay OSI NLPID", FT_UINT8, BASE_HEX);
register_dissector("fr_uncompressed", dissect_fr_uncompressed, proto_fr);
register_dissector("fr", dissect_fr, proto_fr);
@@ -928,11 +991,12 @@ void proto_register_fr(void)
* so that people dealing with GPRS can make gprs-ns the default.
*/
prefs_register_enum_preference(frencap_module, "encap", "Encapsulation",
- "Encapsulation", &fr_encap,
- fr_encap_options, FALSE);
+ "Encapsulation", &fr_encap,
+ fr_encap_options, FALSE);
}
-void proto_reg_handoff_fr(void)
+void
+proto_reg_handoff_fr(void)
{
dissector_handle_t fr_handle, fr_phdr_handle;
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c
index 307782ae94..83b001fd51 100644
--- a/epan/dissectors/packet-frame.c
+++ b/epan/dissectors/packet-frame.c
@@ -83,9 +83,9 @@ static dissector_handle_t data_handle;
static dissector_handle_t docsis_handle;
/* Preferences */
-static gboolean show_file_off = FALSE;
-static gboolean force_docsis_encap = FALSE;
-static gboolean generate_md5_hash = FALSE;
+static gboolean show_file_off = FALSE;
+static gboolean force_docsis_encap = FALSE;
+static gboolean generate_md5_hash = FALSE;
static gboolean generate_epoch_time = TRUE;
static gboolean generate_bits_field = TRUE;
@@ -123,11 +123,11 @@ call_frame_end_routine(gpointer routine, gpointer dummy _U_)
static void
dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
{
- proto_item *volatile ti = NULL, *comment_item;
- guint cap_len = 0, frame_len = 0;
- proto_tree *volatile tree;
+ proto_item *volatile ti = NULL, *comment_item;
+ guint cap_len = 0, frame_len = 0;
+ proto_tree *volatile tree;
proto_tree *comments_tree;
- proto_item *item;
+ proto_item *item;
const gchar *cap_plurality, *frame_plurality;
tree=parent_tree;
@@ -238,17 +238,20 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if (pinfo->fd->flags.has_if_id)
proto_tree_add_uint(fh_tree, hf_frame_interface_id, tvb, 0, 0, pinfo->fd->interface_id);
-
+
proto_tree_add_int(fh_tree, hf_frame_wtap_encap, tvb, 0, 0, pinfo->fd->lnk_t);
if (pinfo->fd->flags.has_ts) {
proto_tree_add_time(fh_tree, hf_frame_arrival_time, tvb,
0, 0, &(pinfo->fd->abs_ts));
if(pinfo->fd->abs_ts.nsecs < 0 || pinfo->fd->abs_ts.nsecs >= 1000000000) {
- item = proto_tree_add_none_format(fh_tree, hf_frame_time_invalid, tvb,
- 0, 0, "Arrival Time: Fractional second %09ld is invalid, the valid range is 0-1000000000", (long) pinfo->fd->abs_ts.nsecs);
+ item = proto_tree_add_none_format(fh_tree, hf_frame_time_invalid, tvb, 0, 0,
+ "Arrival Time: Fractional second %09ld is invalid,"
+ " the valid range is 0-1000000000",
+ (long) pinfo->fd->abs_ts.nsecs);
PROTO_ITEM_SET_GENERATED(item);
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "Arrival Time: Fractional second out of range (0-1000000000)");
+ expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN,
+ "Arrival Time: Fractional second out of range (0-1000000000)");
}
item = proto_tree_add_time(fh_tree, hf_frame_shift_offset, tvb,
0, 0, &(pinfo->fd->shift_offset));
@@ -290,9 +293,9 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if (generate_md5_hash) {
const guint8 *cp;
- md5_state_t md_ctx;
- md5_byte_t digest[16];
- gchar *digest_string;
+ md5_state_t md_ctx;
+ md5_byte_t digest[16];
+ gchar *digest_string;
cp = tvb_get_ptr(tvb, 0, cap_len);
@@ -369,8 +372,9 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
/* Portable Exception Handling to trap Wireshark specific exceptions like BoundsError exceptions */
TRY {
#ifdef _MSC_VER
- /* Win32: Visual-C Structured Exception Handling (SEH) to trap hardware exceptions like memory access violations */
- /* (a running debugger will be called before the except part below) */
+ /* Win32: Visual-C Structured Exception Handling (SEH) to trap hardware exceptions
+ like memory access violations.
+ (a running debugger will be called before the except part below) */
__try {
#endif
if ((force_docsis_encap) && (docsis_handle)) {
@@ -399,7 +403,8 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
case(STATUS_STACK_OVERFLOW):
show_exception(tvb, pinfo, parent_tree, DissectorError,
"STATUS_STACK_OVERFLOW: dissector overflowed the stack (e.g. endless loop)");
- /* XXX - this will have probably corrupted the stack, which makes problems later in the exception code */
+ /* XXX - this will have probably corrupted the stack,
+ which makes problems later in the exception code */
break;
/* XXX - add other hardware exception codes as required */
default:
@@ -429,7 +434,8 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if (have_postdissector()) {
TRY {
#ifdef _MSC_VER
- /* Win32: Visual-C Structured Exception Handling (SEH) to trap hardware exceptions like memory access violations */
+ /* Win32: Visual-C Structured Exception Handling (SEH)
+ to trap hardware exceptions like memory access violations */
/* (a running debugger will be called before the except part below) */
__try {
#endif
@@ -448,7 +454,8 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
case(STATUS_STACK_OVERFLOW):
show_exception(tvb, pinfo, parent_tree, DissectorError,
"STATUS_STACK_OVERFLOW: dissector overflowed the stack (e.g. endless loop)");
- /* XXX - this will have probably corrupted the stack, which makes problems later in the exception code */
+ /* XXX - this will have probably corrupted the stack,
+ which makes problems later in the exception code */
break;
/* XXX - add other hardware exception codes as required */
default:
@@ -575,99 +582,119 @@ proto_register_frame(void)
{
static hf_register_info hf[] = {
{ &hf_frame_arrival_time,
- { "Arrival Time", "frame.time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
- "Absolute time when this frame was captured", HFILL }},
+ { "Arrival Time", "frame.time",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
+ "Absolute time when this frame was captured", HFILL }},
{ &hf_frame_shift_offset,
- { "Time shift for this packet","frame.offset_shift", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
- "Time shift applied to this packet", HFILL }},
+ { "Time shift for this packet", "frame.offset_shift",
+ FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
+ "Time shift applied to this packet", HFILL }},
{ &hf_frame_arrival_time_epoch,
- { "Epoch Time", "frame.time_epoch", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
- "Epoch time when this frame was captured", HFILL }},
+ { "Epoch Time", "frame.time_epoch",
+ FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
+ "Epoch time when this frame was captured", HFILL }},
{ &hf_frame_time_invalid,
- { "Arrival Timestamp invalid", "frame.time_invalid", FT_NONE, BASE_NONE, NULL, 0x0,
- "The timestamp from the capture is out of the valid range", HFILL }},
+ { "Arrival Timestamp invalid", "frame.time_invalid",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ "The timestamp from the capture is out of the valid range", HFILL }},
{ &hf_frame_time_delta,
- { "Time delta from previous captured frame", "frame.time_delta", FT_RELATIVE_TIME, BASE_NONE, NULL,
- 0x0,
- NULL, HFILL }},
+ { "Time delta from previous captured frame", "frame.time_delta",
+ FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_frame_time_delta_displayed,
- { "Time delta from previous displayed frame", "frame.time_delta_displayed", FT_RELATIVE_TIME, BASE_NONE, NULL,
- 0x0,
- NULL, HFILL }},
+ { "Time delta from previous displayed frame", "frame.time_delta_displayed",
+ FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_frame_time_relative,
- { "Time since reference or first frame", "frame.time_relative", FT_RELATIVE_TIME, BASE_NONE, NULL,
- 0x0,
- "Time relative to time reference or first frame", HFILL }},
+ { "Time since reference or first frame", "frame.time_relative",
+ FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
+ "Time relative to time reference or first frame", HFILL }},
{ &hf_frame_time_reference,
- { "This is a Time Reference frame", "frame.ref_time", FT_NONE, BASE_NONE, NULL, 0x0,
- "This frame is a Time Reference frame", HFILL }},
+ { "This is a Time Reference frame", "frame.ref_time",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ "This frame is a Time Reference frame", HFILL }},
{ &hf_frame_number,
- { "Frame Number", "frame.number", FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Frame Number", "frame.number",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_frame_len,
- { "Frame length on the wire", "frame.len", FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Frame length on the wire", "frame.len",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_frame_capture_len,
- { "Frame length stored into the capture file", "frame.cap_len", FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Frame length stored into the capture file", "frame.cap_len",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_frame_md5_hash,
- { "Frame MD5 Hash", "frame.md5_hash", FT_STRING, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "Frame MD5 Hash", "frame.md5_hash",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_frame_p2p_dir,
- { "Point-to-Point Direction", "frame.p2p_dir", FT_INT8, BASE_DEC, VALS(p2p_dirs), 0x0,
- NULL, HFILL }},
+ { "Point-to-Point Direction", "frame.p2p_dir",
+ FT_INT8, BASE_DEC, VALS(p2p_dirs), 0x0,
+ NULL, HFILL }},
{ &hf_link_number,
- { "Link Number", "frame.link_nr", FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Link Number", "frame.link_nr",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_frame_file_off,
- { "File Offset", "frame.file_off", FT_INT64, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "File Offset", "frame.file_off",
+ FT_INT64, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_frame_marked,
- { "Frame is marked", "frame.marked", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
- "Frame is marked in the GUI", HFILL }},
+ { "Frame is marked", "frame.marked",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "Frame is marked in the GUI", HFILL }},
{ &hf_frame_ignored,
- { "Frame is ignored", "frame.ignored", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
- "Frame is ignored by the dissectors", HFILL }},
+ { "Frame is ignored", "frame.ignored",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "Frame is ignored by the dissectors", HFILL }},
{ &hf_frame_protocols,
- { "Protocols in frame", "frame.protocols", FT_STRING, BASE_NONE, NULL, 0x0,
- "Protocols carried by this frame", HFILL }},
+ { "Protocols in frame", "frame.protocols",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Protocols carried by this frame", HFILL }},
{ &hf_frame_color_filter_name,
- { "Coloring Rule Name", "frame.coloring_rule.name", FT_STRING, BASE_NONE, NULL, 0x0,
- "The frame matched the coloring rule with this name", HFILL }},
+ { "Coloring Rule Name", "frame.coloring_rule.name",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "The frame matched the coloring rule with this name", HFILL }},
{ &hf_frame_color_filter_text,
- { "Coloring Rule String", "frame.coloring_rule.string", FT_STRING, BASE_NONE, NULL, 0x0,
- "The frame matched this coloring rule string", HFILL }},
+ { "Coloring Rule String", "frame.coloring_rule.string",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "The frame matched this coloring rule string", HFILL }},
{ &hf_frame_interface_id,
- { "Interface id", "frame.interface_id", FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Interface id", "frame.interface_id",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_frame_wtap_encap,
- { "WTAP_ENCAP", "frame.dlt", FT_INT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "WTAP_ENCAP", "frame.dlt",
+ FT_INT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_comments_text,
- { "Comment", "comment", FT_STRING, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "Comment", "comment",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
};
static gint *ett[] = {
&ett_frame,
diff --git a/epan/dissectors/packet-fw1.c b/epan/dissectors/packet-fw1.c
index 8c8f5cbe8c..70cf60a93d 100644
--- a/epan/dissectors/packet-fw1.c
+++ b/epan/dissectors/packet-fw1.c
@@ -228,20 +228,24 @@ proto_register_fw1(void)
{
static hf_register_info hf[] = {
{ &hf_fw1_direction,
- { "Direction", "fw1.direction", FT_STRING, BASE_NONE, NULL, 0x0,
+ { "Direction", "fw1.direction", FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
+
{ &hf_fw1_chain,
- { "Chain Position", "fw1.chain", FT_STRING, BASE_NONE, NULL, 0x0,
+ { "Chain Position", "fw1.chain", FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
+
{ &hf_fw1_interface,
- { "Interface", "fw1.interface", FT_STRING, BASE_NONE, NULL, 0x0,
+ { "Interface", "fw1.interface", FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
+
{ &hf_fw1_uuid,
{ "UUID", "fw1.uuid", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
+
/* registered here but handled in ethertype.c */
{ &hf_fw1_type,
- { "Type", "fw1.type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
+ { "Type", "fw1.type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
NULL, HFILL }},
};
/* Setup protocol subtree array */