aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-01-25 09:42:21 +0000
committerGuy Harris <guy@alum.mit.edu>2002-01-25 09:42:21 +0000
commit42a38685cddcba3a2567d18025b75aee6c508f56 (patch)
tree154b86cc6e0ed9d547e95dc068944c44fd708387
parent55bed21e4598765fa32e12086dedcb9cc1fc4c7d (diff)
In the "Announce change to UAS or SAM" NETLOGON message, dissect the
"Large Serial Number" as a 64-bit little-endian integer, and dissect the "NT Date/Time" as a FILETIME by calling "dissect_smb_64bit_time()". Export "dissect_smb_64bit_time()" so that we can do so. svn path=/trunk/; revision=4609
-rw-r--r--packet-smb-common.h6
-rw-r--r--packet-smb-logon.c15
-rw-r--r--packet-smb.c4
3 files changed, 12 insertions, 13 deletions
diff --git a/packet-smb-common.h b/packet-smb-common.h
index b9430ac69f..5102b97b7b 100644
--- a/packet-smb-common.h
+++ b/packet-smb-common.h
@@ -1,8 +1,8 @@
/* packet-smb-common.h
- * Routines for smb packet dissection
+ * Routines for SMB packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-smb-common.h,v 1.6 2002/01/25 08:02:01 guy Exp $
+ * $Id: packet-smb-common.h,v 1.7 2002/01/25 09:42:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -58,6 +58,8 @@ int display_unicode_string(tvbuff_t *tvb, packet_info *pinfo,
int display_ms_string(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int hf_index);
+int dissect_smb_64bit_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, char *str, int hf_date);
+
int dissect_nt_sid(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *parent_tree, char *name);
#endif
diff --git a/packet-smb-logon.c b/packet-smb-logon.c
index 4e01d04b97..0a24135716 100644
--- a/packet-smb-logon.c
+++ b/packet-smb-logon.c
@@ -2,7 +2,7 @@
* Routines for SMB net logon packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-smb-logon.c,v 1.23 2002/01/25 08:02:01 guy Exp $
+ * $Id: packet-smb-logon.c,v 1.24 2002/01/25 09:42:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -465,12 +465,11 @@ dissect_announce_change(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
offset += 4;
proto_tree_add_item(info_tree, hf_large_serial, tvb, offset, 8,
- FALSE);
+ TRUE);
offset += 8;
- proto_tree_add_item(info_tree, hf_nt_date_time, tvb, offset, 8,
- FALSE);
- offset += 8;
+ offset = dissect_smb_64bit_time(tvb, pinfo, info_tree, offset,
+ "NT Date/Time", hf_nt_date_time);
info_count--;
}
@@ -979,14 +978,12 @@ proto_register_smb_logon( void)
{ "Database Index", "netlogon.db_index", FT_UINT32, BASE_DEC,
NULL, 0, "NETLOGON Database Index", HFILL }},
- /* XXX - 64-bit integer? */
{ &hf_large_serial,
- { "Large Serial Number", "netlogon.large_serial", FT_BYTES, BASE_NONE,
+ { "Large Serial Number", "netlogon.large_serial", FT_UINT64, BASE_DEC,
NULL, 0, "NETLOGON Large Serial Number", HFILL }},
- /* XXX - 64-bit FILETIME */
{ &hf_nt_date_time,
- { "NT Date/Time", "netlogon.nt_date_time", FT_BYTES, BASE_NONE,
+ { "NT Date/Time", "netlogon.nt_date_time", FT_ABSOLUTE_TIME, BASE_NONE,
NULL, 0, "NETLOGON NT Date/Time", HFILL }},
};
diff --git a/packet-smb.c b/packet-smb.c
index 6e0bfab950..00c71ac25c 100644
--- a/packet-smb.c
+++ b/packet-smb.c
@@ -3,7 +3,7 @@
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
* 2001 Rewrite by Ronnie Sahlberg and Guy Harris
*
- * $Id: packet-smb.c,v 1.198 2002/01/25 08:02:01 guy Exp $
+ * $Id: packet-smb.c,v 1.199 2002/01/25 09:42:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1097,7 +1097,7 @@ dissect_smb_UTIME(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offse
return offset;
}
-static int
+int
dissect_smb_64bit_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, char *str, int hf_date)
{
proto_item *item = NULL;