aboutsummaryrefslogtreecommitdiffstats
path: root/packet-srvloc.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-01-23 10:25:32 +0000
committerGuy Harris <guy@alum.mit.edu>2003-01-23 10:25:32 +0000
commite80c38cbd8f1dd1250560a3ab14dd81eb8720231 (patch)
tree907e40c6431273f3930fbb1bba42eb0913a9b318 /packet-srvloc.c
parent2942cb3927cfba39d38f0fcf9fcefc3873ddd0ca (diff)
From Brad Hards: fix to handle the special case where the length of the
Naming Authrority is set to 0xFFFF to indicate that all service types should be returned regardless of the naming authority, and no naming authority is supplied in the message. svn path=/trunk/; revision=6990
Diffstat (limited to 'packet-srvloc.c')
-rw-r--r--packet-srvloc.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/packet-srvloc.c b/packet-srvloc.c
index 0d3a03694c..9f482e4872 100644
--- a/packet-srvloc.c
+++ b/packet-srvloc.c
@@ -7,7 +7,7 @@
* In particular I have not had an opportunity to see how it
* responds to SRVLOC over TCP.
*
- * $Id: packet-srvloc.c,v 1.34 2002/10/02 08:57:32 sahlberg Exp $
+ * $Id: packet-srvloc.c,v 1.35 2003/01/23 10:25:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -109,6 +109,7 @@ static int hf_srvloc_attrrply_attrauthcount = -1;
static int hf_srvloc_srvtypereq_prlistlen = -1;
static int hf_srvloc_srvtypereq_prlist = -1;
static int hf_srvloc_srvtypereq_authlistlen = -1;
+static int hf_srvloc_srvtypereq_authlistlenall = -1;
static int hf_srvloc_srvtypereq_authlist = -1;
static int hf_srvloc_srvtypereq_scopelistlen = -1;
static int hf_srvloc_srvtypereq_scopelist = -1;
@@ -884,10 +885,15 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(srvloc_tree, hf_srvloc_srvtypereq_prlist, tvb, offset, length, TRUE);
offset += length;
length = tvb_get_ntohs(tvb, offset);
- proto_tree_add_uint(srvloc_tree, hf_srvloc_srvtypereq_authlistlen, tvb, offset, 2, length);
- offset += 2;
- proto_tree_add_item(srvloc_tree, hf_srvloc_srvtypereq_authlist, tvb, offset, length, TRUE);
- offset += length;
+ if (0xFFFF == length) {
+ proto_tree_add_uint(srvloc_tree, hf_srvloc_srvtypereq_authlistlenall, tvb, offset, 2, length);
+ offset += 2;
+ } else {
+ proto_tree_add_uint(srvloc_tree, hf_srvloc_srvtypereq_authlistlen, tvb, offset, 2, length);
+ offset += 2;
+ proto_tree_add_item(srvloc_tree, hf_srvloc_srvtypereq_authlist, tvb, offset, length, TRUE);
+ offset += length;
+ }
length = tvb_get_ntohs(tvb, offset);
proto_tree_add_uint(srvloc_tree, hf_srvloc_srvtypereq_scopelistlen, tvb, offset, 2, length);
offset += 2;
@@ -1270,6 +1276,10 @@ proto_register_srvloc(void)
{ "Naming Authority List Length", "srvloc.srvtypereq.nameauthlistlen", FT_UINT16, BASE_DEC, NULL, 0x0,
"Length of the Naming Authority List", HFILL}
},
+ { &hf_srvloc_srvtypereq_authlistlenall,
+ { "Naming Authority List Length (All Naming Authorities)", "srvloc.srvtypereq.nameauthlistlen", FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Length of the Naming Authority List", HFILL}
+ },
{ &hf_srvloc_srvtypereq_authlist,
{ "Naming Authority List", "srvloc.srvtypereq.nameauthlist", FT_STRING, BASE_DEC, NULL, 0x0,
"", HFILL}