2 * Defines for SMB2 packet dissection
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998, 1999 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #ifndef __PACKET_SMB2_H__
26 #define __PACKET_SMB2_H__
28 /* SMB2 command codes. With MSVC and a
29 * libwireshark.dll, we need a special declaration.
31 WS_VAR_IMPORT const value_string smb2_cmd_vals[];
33 /* Structure to keep track of information specific to a single
34 * SMB2 transaction. Here we store things we need to remember between
35 * a specific request and a specific response.
37 * There is no guarantee we will have this structure available for all
38 * SMB2 packets so a dissector must check this pointer for NULL
39 * before dereferencing it.
41 * private data is set to NULL when the structure is created. It is used
42 * for communications between the Request and the Response packets.
44 typedef struct _smb2_saved_info_t {
49 guint32 frame_req, frame_res;
53 typedef struct _smb2_tid_info_t {
55 guint32 connect_frame;
60 typedef struct _smb2_uid_info_t {
69 /* Structure to keep track of conversations and the hash tables.
70 * There is one such structure for each conversation.
72 typedef struct _smb2_conv_info_t {
73 /* these two tables are used to match requests with responses */
74 GHashTable *unmatched;
79 /* This structure contains information from the SMB2 header
80 * as well as pointers to the conversation and the transaction specific
83 #define SMB2_FLAGS_RESPONSE 0x00000001
84 #define SMB2_FLAGS_PID_VALID 0x00000002
85 #define SMB2_FLAGS_SIGNATURE 0x00000008
86 typedef struct _smb2_info_t {
88 guint32 ioctl_function;
94 smb2_conv_info_t *conv;
95 smb2_saved_info_t *saved;
96 smb2_tid_info_t *tree;
97 smb2_uid_info_t *session;
102 int dissect_smb2_FILE_OBJECTID_BUFFER(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset);