From 9ca683a249affbe4a461c79bb58688578fd65dad Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sat, 12 Nov 2005 04:23:52 +0000 Subject: start separating things out into structures we can regenerate from the header we need to remember between request/response we need on a per conersation bases to reduce the amount of data we store in the per req/resp pair since there will be many of them and we want that struct as small as possible. svn path=/trunk/; revision=16482 --- epan/dissectors/packet-smb2.h | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'epan/dissectors/packet-smb2.h') diff --git a/epan/dissectors/packet-smb2.h b/epan/dissectors/packet-smb2.h index ee1143dcbd..7cc81bce93 100644 --- a/epan/dissectors/packet-smb2.h +++ b/epan/dissectors/packet-smb2.h @@ -30,21 +30,43 @@ */ ETH_VAR_IMPORT const value_string smb2_cmd_vals[]; +/* Structure to keep track of information specific to a single + * SMB2 transaction. Here we store things we need to remember between + * a specific request and a specific response. + * + * There is no guarantee we will have this structure available for all + * SMB2 packets so a dissector must check this pointer for NULL + * before dereferencing it. + */ typedef struct _smb2_saved_info_t { guint8 class; guint8 infolevel; guint64 seqnum; char *create_name; - gboolean response; /* is this a response ? */ guint32 frame_req, frame_res; nstime_t req_time; } smb2_saved_info_t; -/* structure to keep track of conversations and the hash tables. */ -typedef struct _smb2_info_t { +/* Structure to keep track of conversations and the hash tables. + * There is one such structure for each conversation. + */ +typedef struct _smb2_conv_info_t { /* these two tables are used to match requests with responses */ GHashTable *unmatched; GHashTable *matched; +} smb2_conv_info_t; + +/* This structure contains information from the SMB2 header + * as well as pointers to the conversation and the transaction specific + * structures. + */ +typedef struct _smb2_info_t { + guint16 opcode; + guint32 status; + guint64 seqnum; + gboolean response; /* is this a response ? */ + smb2_conv_info_t *conv; + smb2_saved_info_t *saved; } smb2_info_t; #endif -- cgit v1.2.3