aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2009-08-07 00:15:35 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2009-08-07 00:15:35 +0000
commitbdbdecf21533eb3fb1c4f7f8be06310d7b476ae2 (patch)
tree65bab47c5eceb6a0875a602db7a726d919ce8bee /epan/dissectors
parent4ec31fe7d8cb331d652bd2c6713b2806a5fc6f7d (diff)
Clean up the last two DIRTY_DISSECTOR_SRC entries.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29321 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/Makefile.am1
-rw-r--r--epan/dissectors/Makefile.common10
-rw-r--r--epan/dissectors/packet-nbd.c36
-rw-r--r--epan/dissectors/packet-scsi-osd.c11
4 files changed, 24 insertions, 34 deletions
diff --git a/epan/dissectors/Makefile.am b/epan/dissectors/Makefile.am
index dafc009fff..21862d5e7a 100644
--- a/epan/dissectors/Makefile.am
+++ b/epan/dissectors/Makefile.am
@@ -28,7 +28,6 @@ INCLUDES = -I$(srcdir)/../.. -I$(srcdir)/.. \
include Makefile.common
libdirtydissectors_la_SOURCES = \
- $(DIRTY_DISSECTOR_SRC) \
$(DIRTY_ASN1_DISSECTOR_SRC) \
$(DIRTY_PIDL_DISSECTOR_SRC)
diff --git a/epan/dissectors/Makefile.common b/epan/dissectors/Makefile.common
index 88ed9dbca9..3937397488 100644
--- a/epan/dissectors/Makefile.common
+++ b/epan/dissectors/Makefile.common
@@ -649,6 +649,7 @@ DISSECTOR_SRC = \
packet-nas_eps.c \
packet-nasdaq-itch.c \
packet-nat-pmp.c \
+ packet-nbd.c \
packet-nbipx.c \
packet-nbns.c \
packet-ncp.c \
@@ -781,6 +782,7 @@ DISSECTOR_SRC = \
packet-sccpmg.c \
packet-scsi.c \
packet-scsi-mmc.c \
+ packet-scsi-osd.c \
packet-scsi-sbc.c \
packet-scsi-smc.c \
packet-scsi-ssc.c \
@@ -934,13 +936,6 @@ DISSECTOR_SRC = \
packet-zrtp.c
#
-# Dissectors with warnings.
-#
-DIRTY_DISSECTOR_SRC = \
- packet-nbd.c \
- packet-scsi-osd.c
-
-#
# Headers for dissectors.
#
DISSECTOR_INCLUDES = \
@@ -1296,7 +1291,6 @@ noinst_HEADERS = \
ALL_DISSECTORS_SRC = \
$(DISSECTOR_SRC) \
- $(DIRTY_DISSECTOR_SRC) \
$(PIDL_DISSECTOR_SRC) \
$(DIRTY_PIDL_DISSECTOR_SRC) \
$(ASN1_DISSECTOR_SRC) \
diff --git a/epan/dissectors/packet-nbd.c b/epan/dissectors/packet-nbd.c
index a294fa54de..cfefea2203 100644
--- a/epan/dissectors/packet-nbd.c
+++ b/epan/dissectors/packet-nbd.c
@@ -96,7 +96,7 @@ get_nbd_tcp_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset)
nbd_conv_info_t *nbd_info;
nbd_transaction_t *nbd_trans=NULL;
emem_tree_key_t hkey[3];
- guint64 handle;
+ guint32 handle[2];
magic=tvb_get_ntohl(tvb, offset);
@@ -133,9 +133,10 @@ get_nbd_tcp_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset)
/*
* Do we have a state structure for this transaction
*/
- handle=tvb_get_ntoh64(tvb, offset+8);
+ handle[0]=tvb_get_ntohl(tvb, offset+8);
+ handle[1]=tvb_get_ntohl(tvb, offset+12);
hkey[0].length=2;
- hkey[0].key=(guint32 *)&handle;
+ hkey[0].key=handle;
hkey[1].length=0;
nbd_trans=se_tree_lookup32_array(nbd_info->unacked_pdus, hkey);
if(!nbd_trans){
@@ -146,12 +147,13 @@ get_nbd_tcp_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset)
/*
* Do we have a state structure for this transaction
*/
- handle=tvb_get_ntoh64(tvb, offset+8);
+ handle[0]=tvb_get_ntohl(tvb, offset+8);
+ handle[1]=tvb_get_ntohl(tvb, offset+12);
packet=pinfo->fd->num;
hkey[0].length=1;
hkey[0].key=&packet;
hkey[1].length=2;
- hkey[1].key=(guint32 *)&handle;
+ hkey[1].key=handle;
hkey[2].length=0;
nbd_trans=se_tree_lookup32_array(nbd_info->acked_pdus, hkey);
if(!nbd_trans){
@@ -179,7 +181,8 @@ static void
dissect_nbd_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
{
guint32 magic, error, packet;
- guint64 handle=0, from;
+ guint32 handle[2];
+ guint64 from;
int offset=0;
proto_tree *tree=NULL;
proto_item *item=NULL;
@@ -208,10 +211,9 @@ dissect_nbd_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
/* grab what we need to do the request/response matching */
switch(magic){
case NBD_REQUEST_MAGIC:
- handle=tvb_get_ntoh64(tvb, offset+4);
- break;
case NBD_RESPONSE_MAGIC:
- handle=tvb_get_ntoh64(tvb, offset+4);
+ handle[0]=tvb_get_ntohl(tvb, offset+4);
+ handle[1]=tvb_get_ntohl(tvb, offset+8);
break;
default:
return;
@@ -256,13 +258,13 @@ dissect_nbd_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
nbd_trans->datalen=tvb_get_ntohl(tvb, offset+20);
hkey[0].length=2;
- hkey[0].key=(guint32 *)&handle;
+ hkey[0].key=handle;
hkey[1].length=0;
se_tree_insert32_array(nbd_info->unacked_pdus, hkey, (void *)nbd_trans);
} else if(magic==NBD_RESPONSE_MAGIC){
hkey[0].length=2;
- hkey[0].key=(guint32 *)&handle;
+ hkey[0].key=handle;
hkey[1].length=0;
nbd_trans=se_tree_lookup32_array(nbd_info->unacked_pdus, hkey);
@@ -272,13 +274,13 @@ dissect_nbd_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
hkey[0].length=1;
hkey[0].key=&nbd_trans->rep_frame;
hkey[1].length=2;
- hkey[1].key=(guint32 *)&handle;
+ hkey[1].key=handle;
hkey[2].length=0;
se_tree_insert32_array(nbd_info->acked_pdus, hkey, (void *)nbd_trans);
hkey[0].length=1;
hkey[0].key=&nbd_trans->req_frame;
hkey[1].length=2;
- hkey[1].key=(guint32 *)&handle;
+ hkey[1].key=handle;
hkey[2].length=0;
se_tree_insert32_array(nbd_info->acked_pdus, hkey, (void *)nbd_trans);
}
@@ -288,7 +290,7 @@ dissect_nbd_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
hkey[0].length=1;
hkey[0].key=&packet;
hkey[1].length=2;
- hkey[1].key=(guint32 *)&handle;
+ hkey[1].key=handle;
hkey[2].length=0;
nbd_trans=se_tree_lookup32_array(nbd_info->acked_pdus, hkey);
@@ -343,7 +345,6 @@ dissect_nbd_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
proto_tree_add_item(tree, hf_nbd_type, tvb, offset, 4, FALSE);
offset+=4;
- handle=tvb_get_ntoh64(tvb, offset);
proto_tree_add_item(tree, hf_nbd_handle, tvb, offset, 8, FALSE);
offset+=8;
@@ -380,7 +381,6 @@ dissect_nbd_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
proto_tree_add_item(tree, hf_nbd_error, tvb, offset, 4, FALSE);
offset+=4;
- handle=tvb_get_ntoh64(tvb, offset);
proto_tree_add_item(tree, hf_nbd_handle, tvb, offset, 8, FALSE);
offset+=8;
@@ -401,7 +401,6 @@ static gboolean
dissect_nbd_tcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint32 magic, type;
- guint64 handle, from;
/* We need at least this much to tell whether this is NBD or not */
if(tvb_length(tvb)<4){
@@ -426,9 +425,6 @@ dissect_nbd_tcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
default:
return FALSE;
}
-
- handle=tvb_get_ntoh64(tvb, 8);
- from=tvb_get_ntoh64(tvb, 16);
tcp_dissect_pdus(tvb, pinfo, tree, nbd_desegment, 28, get_nbd_tcp_pdu_len, dissect_nbd_tcp_pdu);
return TRUE;
diff --git a/epan/dissectors/packet-scsi-osd.c b/epan/dissectors/packet-scsi-osd.c
index 53ba32df3c..1b6a51536f 100644
--- a/epan/dissectors/packet-scsi-osd.c
+++ b/epan/dissectors/packet-scsi-osd.c
@@ -873,12 +873,13 @@ static void
dissect_osd_partition_id(packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tree *tree, int hf_index, scsi_osd_lun_info_t *lun_info, gboolean is_created, gboolean is_removed)
{
proto_item *item=NULL;
- guint64 partition_id;
+ guint32 partition_id[2];
/* partition id */
item=proto_tree_add_item(tree, hf_index, tvb, offset, 8, 0);
- partition_id=tvb_get_ntoh64(tvb, offset);
- if(!partition_id){
+ partition_id[0]=tvb_get_ntohl(tvb, offset);
+ partition_id[1]=tvb_get_ntohl(tvb, offset+4);
+ if(!partition_id[0] && !partition_id[1]){
proto_item_append_text(item, " (ROOT partition)");
} else {
partition_info_t *part_info;
@@ -886,7 +887,7 @@ dissect_osd_partition_id(packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tr
proto_tree *partition_tree=NULL;
pikey[0].length=2;
- pikey[0].key=(guint32 *)&partition_id;
+ pikey[0].key=partition_id;
pikey[1].length=0;
part_info=se_tree_lookup32_array(lun_info->partitions, &pikey[0]);
if(!part_info){
@@ -895,7 +896,7 @@ dissect_osd_partition_id(packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tr
part_info->removed_in=0;
pikey[0].length=2;
- pikey[0].key=(guint32 *)&partition_id;
+ pikey[0].key=partition_id;
pikey[1].length=0;
se_tree_insert32_array(lun_info->partitions, &pikey[0], part_info);
}