From b8289288e85f21c738cf00d27d0f5a33062dbcab Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 18 Mar 2001 03:23:30 +0000 Subject: Correctly handle Interim responses to TRANSACTION requests. Move the declaration of routines exported from "packet-smb-mailslot.c" into a "packet-smb-mailslot.h" header file, and have modules that import those routines include "packet-smb-mailslot.h" rather than declaring the routines themselves; do the same for routines exported from "packet-smb-pipe.c". Make routines not exported static, and make routines that return a true/false return value "gboolean" rather than "guint32". svn path=/trunk/; revision=3146 --- packet-smb-mailslot.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'packet-smb-mailslot.c') diff --git a/packet-smb-mailslot.c b/packet-smb-mailslot.c index 46396cb496..c0a96adca9 100644 --- a/packet-smb-mailslot.c +++ b/packet-smb-mailslot.c @@ -1,8 +1,8 @@ /* packet-smb-mailslot.c - * Routines for smb mailslot packet dissection + * Routines for SMB mailslot packet dissection * Copyright 2000, Jeffrey C. Foster * - * $Id: packet-smb-mailslot.c,v 1.9 2001/01/03 06:55:32 guy Exp $ + * $Id: packet-smb-mailslot.c,v 1.10 2001/03/18 03:23:30 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -27,6 +27,8 @@ #include "packet-smb-common.h" +#include "packet-smb-mailslot.h" +#include "packet-smb-pipe.h" static int proto_smb_msp = -1; @@ -41,12 +43,6 @@ dissect_mailslot_browse(const u_char *pd, int offset, frame_data *fd, int SMB_offset, int errcode, int dirn, const u_char *command, int DataOffset, int DataCount); -extern guint32 -dissect_pipe_lanman(const u_char *pd, int offset, frame_data *fd, - proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, - int SMB_offset, int errcode, int dirn, const u_char *command, - int DataOffset, int DataCount, int ParameterOffset, int ParameterCount); - extern guint32 dissect_smb_ntlogon(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, @@ -62,7 +58,7 @@ dissect_smb_logon(const u_char *pd, int offset, frame_data *fd, -guint32 +gboolean dissect_mailslot_smb(const u_char *pd, int offset, frame_data *fd, proto_tree *parent, proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int errcode, int dirn, const u_char *command, @@ -78,17 +74,23 @@ dissect_mailslot_smb(const u_char *pd, int offset, frame_data *fd, const char *StrPtr; if (!proto_is_protocol_enabled(proto_smb_msp)) - return 0; + return FALSE; + if (check_col(fd, COL_PROTOCOL)) + col_set_str(fd, COL_PROTOCOL, "SMB Mailslot"); + + if (DataOffset < 0) { + /* Interim reply */ + col_set_str(fd, COL_INFO, "Interim reply"); + return TRUE; + } + /* do the Op code field */ Temp16 = GSHORT(pd, offset); /* get Op code */ - if (check_col(fd, COL_PROTOCOL)) - col_set_str(fd, COL_PROTOCOL, "SMB Mailslot"); - if (check_col(fd, COL_INFO)) - col_add_fstr(fd, COL_INFO, "%s", + col_set_str(fd, COL_INFO, ( Temp16 == 1 ? "Write Mail slot" : "Unknown")); @@ -169,7 +171,7 @@ dissect_mailslot_smb(const u_char *pd, int offset, frame_data *fd, command, DataOffset, DataCount); } - return 1; + return TRUE; } -- cgit v1.2.3