diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-11-12 04:23:52 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-11-12 04:23:52 +0000 |
commit | 230c83e69604eb305fb22edc9be56b478b5976e2 (patch) | |
tree | adcabc1637cff9ce338e79c1bafe0d851ce731ed /epan/dissectors/packet-smb2.h | |
parent | 5374044f19044950076af6b9d883d5af6c2ae715 (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16482 f5534014-38df-0310-8fa8-9805f1628bb7
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 |