aboutsummaryrefslogtreecommitdiffstats
path: root/packet-srvloc.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-08-04 22:56:27 +0000
committerGuy Harris <guy@alum.mit.edu>2000-08-04 22:56:27 +0000
commitffc1f0a6a29e0cda6a0ec53a49a747b565999b27 (patch)
tree54ca4f1654717f3c546070decfc4c3ae04798e42 /packet-srvloc.c
parent1239d0e5d25adea04b5478c49f7155a4946bf070 (diff)
Fix to the SRVLOC dissector to correctly handle the error field of the
Service Reply (i.e., treat it as the 16-bit field that it is), from Peter Kjellerstedt. svn path=/trunk/; revision=2207
Diffstat (limited to 'packet-srvloc.c')
-rw-r--r--packet-srvloc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/packet-srvloc.c b/packet-srvloc.c
index 839570e313..e7d0e3d5cb 100644
--- a/packet-srvloc.c
+++ b/packet-srvloc.c
@@ -6,7 +6,7 @@
* In particular I have not had an opportunity to see how it
* responds to SRVLOC over TCP.
*
- * $Id: packet-srvloc.c,v 1.10 2000/08/04 07:38:13 guy Exp $
+ * $Id: packet-srvloc.c,v 1.11 2000/08/04 22:56:18 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -248,7 +248,7 @@ dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "Service Reply");
if (!BYTES_ARE_IN_FRAME(offset, 2))
break;
- proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);
+ proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pntohs(&pd[offset]));
offset += 2;
if (!BYTES_ARE_IN_FRAME(offset, 2))
break;
@@ -335,7 +335,7 @@ dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "Service Acknowledge");
if (!BYTES_ARE_IN_FRAME(offset, 2))
break;
- proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);
+ proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pntohs(&pd[offset]));
offset += 2;
break;
@@ -383,7 +383,7 @@ dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "Attribute Reply");
if (!BYTES_ARE_IN_FRAME(offset, 2))
break;
- proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);
+ proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pntohs(&pd[offset]));
offset += 2;
if (!BYTES_ARE_IN_FRAME(offset, 2))
break;
@@ -402,7 +402,7 @@ dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "DA Advertisement");
if (!BYTES_ARE_IN_FRAME(offset, 2))
break;
- proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);
+ proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pntohs(&pd[offset]));
offset += 2;
if (!BYTES_ARE_IN_FRAME(offset, 2))
break;
@@ -459,7 +459,7 @@ dissect_srvloc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
proto_tree_add_text(srvloc_tree, NullTVB, offset, 0, "Service Type Reply");
if (!BYTES_ARE_IN_FRAME(offset, 2))
break;
- proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pd[offset]);
+ proto_tree_add_uint(srvloc_tree, hf_srvloc_error, NullTVB, offset, 2, pntohs(&pd[offset]));
offset += 2;
if (!BYTES_ARE_IN_FRAME(offset, 2))
break;
@@ -514,7 +514,7 @@ proto_register_srvloc(void)
{&hf_srvloc_error,
{"Error Code", "srvloc.err",
- FT_UINT8, BASE_DEC, VALS(srvloc_errs), 0x0,
+ FT_UINT16, BASE_DEC, VALS(srvloc_errs), 0x0,
""}
},
};