aboutsummaryrefslogtreecommitdiffstats
path: root/packet-smb-mailslot.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-11-19 10:06:42 +0000
committerGuy Harris <guy@alum.mit.edu>2001-11-19 10:06:42 +0000
commit853aa01c6e9f89d00c71734dc4f6f0d59b243dc5 (patch)
tree8afc917d0cdbcc3b9397562fcc16bbee5dd9ec0a /packet-smb-mailslot.c
parent8c358fd83e99d639629718279e42a752a9a5edc2 (diff)
Pass, as the first tvbuff argument to "dissect_mailslot_smb()" and
"dissect_pipe_smb()", a tvbuff containing the setup words and the pipe/mailslot pathname, as those are arguably the part of the packet that contains the "mailslot protocol" and the "pipe protocol", as opposed to the protocol running atop mailslots or pipes. Pass a setup tvbuff to "dissect_pipe_smb()" for it to pass on to the MSRPC-over-named-pipe dissector, and have the setup tvbuff passed to it and "dissect_mailslot_smb()" contain *only* the setup words; don't extract anything other than the setup words from it. Declare "register_proto_smb_mailslot()" in "packet-smb-mailslot.h" rather than "packet-smb.c", and declare "register_proto_smb_pipe()" in "packet-smb-pipe.h" rather than "packet-smb.c". Add a protocol for MSRPC-over-named-pipes. Move the stuff to handle the FID in the setup words of MSRPC-over-named-pipe transactions out of the SMB Transaction dissector into the MSRPC dissector. Add a routine to "packet-smb.c", callable from outside "packet-smb.c", to put an "smb.fid" field into the protocol tree, and to add ", FID: XXXX" to the Info column, for use by the MSRPC-over-named-pipe dissector; use it in the SMB dissector as well, in all the places where we put a FID into the protocol tree. Move the stuff to check whether the LANMAN protocol is enabled, and to set "pinfo->current_proto" to "LANMAN" if it is, into the LANMAN API-over-named-pipe dissector out of the named pipe protocol dissector. If we didn't dissect a Transaction request or reply as a named pipe or mailslot message, put any setup words, parameters, and data it has into the protocol tree as separate items. Don't put a "Response in" item into the protocol tree for an NT Cancel request, as there are no responses to NT Cancel requests. svn path=/trunk/; revision=4221
Diffstat (limited to 'packet-smb-mailslot.c')
-rw-r--r--packet-smb-mailslot.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/packet-smb-mailslot.c b/packet-smb-mailslot.c
index 4d5004198f..83558d0f1f 100644
--- a/packet-smb-mailslot.c
+++ b/packet-smb-mailslot.c
@@ -2,7 +2,7 @@
* Routines for SMB mailslot packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-smb-mailslot.c,v 1.22 2001/11/18 02:51:19 guy Exp $
+ * $Id: packet-smb-mailslot.c,v 1.23 2001/11/19 10:06:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -68,9 +68,9 @@ static const value_string class_vals[] = {
*/
gboolean
-dissect_mailslot_smb(tvbuff_t *total_tvb, tvbuff_t *setup_tvb,
- tvbuff_t *tvb, const char *mailslot,
- packet_info *pinfo, proto_tree *parent_tree)
+dissect_mailslot_smb(tvbuff_t *mshdr_tvb, tvbuff_t *setup_tvb,
+ tvbuff_t *tvb, const char *mailslot, packet_info *pinfo,
+ proto_tree *parent_tree)
{
smb_info_t *smb_info;
smb_transact_info_t *tri;
@@ -130,10 +130,12 @@ dissect_mailslot_smb(tvbuff_t *total_tvb, tvbuff_t *setup_tvb,
}
if (parent_tree) {
- item = proto_tree_add_item(parent_tree, proto_smb_msp, total_tvb,
- 0, tvb_length(total_tvb), FALSE);
+ item = proto_tree_add_item(parent_tree, proto_smb_msp, mshdr_tvb,
+ 0, tvb_length(mshdr_tvb), FALSE);
tree = proto_item_add_subtree(item, ett_smb_msp);
+ /* These are in the setup words; use "setup_tvb". */
+
/* opcode */
proto_tree_add_uint(tree, hf_opcode, setup_tvb, offset, 2,
opcode);
@@ -148,15 +150,16 @@ dissect_mailslot_smb(tvbuff_t *total_tvb, tvbuff_t *setup_tvb,
proto_tree_add_item(tree, hf_class, setup_tvb, offset, 2, TRUE);
offset += 2;
+ /* These are in the rest of the data; use "mshdr_tvb", which
+ starts at the same place "setup_tvb" does. */
+
/* size */
- proto_tree_add_item(tree, hf_size, setup_tvb, offset, 2, TRUE);
+ proto_tree_add_item(tree, hf_size, mshdr_tvb, offset, 2, TRUE);
offset += 2;
/* mailslot name */
- len = tvb_strsize(setup_tvb, offset);
- proto_tree_add_item(tree, hf_name, setup_tvb, offset, len,
- TRUE);
- offset += len;
+ len = tvb_strsize(mshdr_tvb, offset);
+ proto_tree_add_item(tree, hf_name, mshdr_tvb, offset, len, TRUE);
}
dissected = FALSE;