diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-11-12 04:23:52 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-11-12 04:23:52 +0000 |
commit | 9ca683a249affbe4a461c79bb58688578fd65dad (patch) | |
tree | adcabc1637cff9ce338e79c1bafe0d851ce731ed /epan/dissectors/packet-smb2.h | |
parent | 9f6c2b3ed56ea7e033a6b5bb92ae72c84d234464 (diff) |
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
Diffstat (limited to 'epan/dissectors/packet-smb2.h')
-rw-r--r-- | epan/dissectors/packet-smb2.h | 28 |
1 files changed, 25 insertions, 3 deletions
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 |