aboutsummaryrefslogtreecommitdiffstats
path: root/packet-smb.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-05-11 00:28:18 +0000
committerGuy Harris <guy@alum.mit.edu>1999-05-11 00:28:18 +0000
commit3cc7edbb3296fe30cccfaa00bfb9752cdc0f5aec (patch)
tree17ef0339682329a1428ed6d322e10dab849ba2de /packet-smb.c
parent1fe86270145278765c351330b8f2a90c9b99a2e5 (diff)
Some of my fixes did get lost - put 'em back.
Fix the "proto_tree_add_item()" used when the server didn't support any of the dialects the client offered not to print the dialect index. In the "Core to LANMAN 2.1" "negotiate protocol" decode, show the time zone as minutes from UTC, just as is done for the "post-LANMAN 2.1" decode. svn path=/trunk/; revision=272
Diffstat (limited to 'packet-smb.c')
-rw-r--r--packet-smb.c43
1 files changed, 34 insertions, 9 deletions
diff --git a/packet-smb.c b/packet-smb.c
index ecb875afb3..0fc018a991 100644
--- a/packet-smb.c
+++ b/packet-smb.c
@@ -2,7 +2,7 @@
* Routines for smb packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-smb.c,v 1.6 1999/05/11 00:00:40 sharpe Exp $
+ * $Id: packet-smb.c,v 1.7 1999/05/11 00:28:18 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -632,7 +632,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tr
if (dialect == 0xFFFF) { /* Server didn't like them dialects */
- proto_tree_add_item(tree, offset, 2, "Dialect Index: %u, Supplied dialects not recognized");
+ proto_tree_add_item(tree, offset, 2, "Supplied dialects not recognized");
}
else {
@@ -659,7 +659,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tr
if (tree) {
- proto_tree_add_item(tree, offset, 2, "Dialect Index: %d, Greater than CORE PROTOCOL and up to LANMAN2.1", GSHORT(pd, offset));
+ proto_tree_add_item(tree, offset, 2, "Dialect Index: %u, Greater than CORE PROTOCOL and up to LANMAN2.1", GSHORT(pd, offset));
}
@@ -667,7 +667,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tr
offset += 2;
- mode = GBYTE(pd, offset);
+ mode = GSHORT(pd, offset);
if (tree) {
@@ -685,11 +685,19 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tr
}
- offset += 1;
+ offset += 2;
+
+ if (tree) {
+
+ proto_tree_add_item(tree, offset, 2, "Max buffer size: %u", GSHORT(pd, offset));
+
+ }
+
+ offset += 2;
if (tree) {
- proto_tree_add_item(tree, offset, 2, "Max multiplex count: %d", GSHORT(pd, offset));
+ proto_tree_add_item(tree, offset, 2, "Max multiplex count: %u", GSHORT(pd, offset));
}
@@ -697,7 +705,7 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tr
if (tree) {
- proto_tree_add_item(tree, offset, 2, "Max vcs: %d", GSHORT(pd, offset));
+ proto_tree_add_item(tree, offset, 2, "Max vcs: %u", GSHORT(pd, offset));
}
@@ -723,6 +731,14 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tr
offset += 2;
+ if (tree) {
+
+ proto_tree_add_item(tree, offset, 4, "Session key: %08x", GWORD(pd, offset));
+
+ }
+
+ offset += 4;
+
/* Now the server time, two short parameters ... */
if (tree) {
@@ -730,11 +746,20 @@ dissect_negprot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *tr
proto_tree_add_item(tree, offset, 2, "Server Time: 0x%04x", GSHORT(pd, offset));
proto_tree_add_item(tree, offset + 2, 2, "Server Date: 0x%04x", GSHORT(pd, offset + 2));
- proto_tree_add_item(tree, offset + 4, 2, "Server Time Zone: 0x%04x", GSHORT(pd, offset + 4));
+ }
+
+ offset += 4;
+
+ /* Server Time Zone, SHORT */
+
+ if (tree) {
+
+ proto_tree_add_item(tree, offset, 2, "Server time zone: %i min from UTC",
+ (signed)GSSHORT(pd, offset));
}
- offset += 6;
+ offset += 2;
/* Encryption Key Length, should be zero */