summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-smb2.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-smb2.h
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-smb2.h')
-rw-r--r--epan/dissectors/packet-smb2.h106
1 files changed, 54 insertions, 52 deletions
diff --git a/epan/dissectors/packet-smb2.h b/epan/dissectors/packet-smb2.h
index 3bed2013..f944cd7d 100644
--- a/epan/dissectors/packet-smb2.h
+++ b/epan/dissectors/packet-smb2.h
@@ -34,20 +34,20 @@ WS_DLL_PUBLIC value_string_ext smb2_cmd_vals_ext;
/* extra info needed by export object smb */
typedef struct _smb2_eo_file_info_t {
- guint32 attr_mask;
- gint64 end_of_file;
+ uint32_t attr_mask;
+ int64_t end_of_file;
} smb2_eo_file_info_t;
typedef struct _smb2_fid_info_t {
- guint64 fid_persistent;
- guint64 fid_volatile;
- guint64 sesid; /* *host* byte order - not necessarily little-endian! */
- guint32 tid;
+ uint64_t fid_persistent;
+ uint64_t fid_volatile;
+ uint64_t sesid; /* *host* byte order - not necessarily little-endian! */
+ uint32_t tid;
/* only used for key lookup in equal func, must be zero when inserting */
- guint32 frame_key;
+ uint32_t frame_key;
/* first and last frame nums this FID is valid */
- guint32 frame_beg;
- guint32 frame_end;
+ uint32_t frame_beg;
+ uint32_t frame_end;
/* file name used to open this FID */
char *name;
} smb2_fid_info_t;
@@ -59,25 +59,25 @@ typedef enum {
SMB2_EI_FINDPATTERN /* find tracking char * */
} smb2_extra_info_t;
typedef struct _smb2_saved_info_t {
- guint8 smb2_class;
- guint8 infolevel;
- guint64 msg_id;
- guint32 frame_req, frame_res;
+ uint8_t smb2_class;
+ uint8_t infolevel;
+ uint64_t msg_id;
+ uint32_t frame_req, frame_res;
nstime_t req_time;
- guint8 *preauth_hash_req, *preauth_hash_res;
+ uint8_t *preauth_hash_req, *preauth_hash_res;
smb2_fid_info_t *file;
e_ctx_hnd policy_hnd; /* for eo_smb tracking */
smb_eo_t *eo_info_t; /* for storing eo_smb infos */
- guint64 file_offset; /* needed file_offset for eo_smb */
- guint32 bytes_moved; /* needed for eo_smb */
+ uint64_t file_offset; /* needed file_offset for eo_smb */
+ uint32_t bytes_moved; /* needed for eo_smb */
void *extra_info;
smb2_extra_info_t extra_info_type;
} smb2_saved_info_t;
typedef struct _smb2_tid_info_t {
- guint32 tid;
- guint32 connect_frame;
- guint8 share_type;
+ uint32_t tid;
+ uint32_t connect_frame;
+ uint8_t share_type;
char *name;
} smb2_tid_info_t;
@@ -85,25 +85,27 @@ typedef struct _smb2_tid_info_t {
#define AES_KEY_SIZE 16
typedef struct _smb2_sesid_info_t {
- guint64 sesid; /* *host* byte order - not necessarily little-endian! */
- guint32 auth_frame;
+ uint64_t sesid; /* *host* byte order - not necessarily little-endian! */
+ uint32_t auth_frame;
char *acct_name;
char *domain_name;
char *host_name;
- guint16 server_port;
- guint8 session_key[NTLMSSP_KEY_LEN];
- guint8 signing_key[NTLMSSP_KEY_LEN];
- guint8 client_decryption_key16[AES_KEY_SIZE];
- guint8 server_decryption_key16[AES_KEY_SIZE];
- guint8 client_decryption_key32[AES_KEY_SIZE*2];
- guint8 server_decryption_key32[AES_KEY_SIZE*2];
+ uint16_t server_port;
+ uint32_t session_key_frame;
+ unsigned session_key_len;
+ uint8_t session_key[NTLMSSP_KEY_LEN*2];
+ uint8_t signing_key[NTLMSSP_KEY_LEN];
+ uint8_t client_decryption_key16[AES_KEY_SIZE];
+ uint8_t server_decryption_key16[AES_KEY_SIZE];
+ uint8_t client_decryption_key32[AES_KEY_SIZE*2];
+ uint8_t server_decryption_key32[AES_KEY_SIZE*2];
wmem_map_t *tids;
wmem_map_t *fids;
/* table to store some infos for smb export object */
wmem_map_t *files;
- guint8 preauth_hash[SMB2_PREAUTH_HASH_SIZE];
+ uint8_t preauth_hash[SMB2_PREAUTH_HASH_SIZE];
} smb2_sesid_info_t;
/* Structure to keep track of conversations and the hash tables.
@@ -113,14 +115,14 @@ typedef struct _smb2_conv_info_t {
/* these two tables are used to match requests with responses */
GHashTable *unmatched;
GHashTable *matched;
- guint16 dialect;
- guint16 sign_alg;
- guint16 enc_alg;
+ uint16_t dialect;
+ uint16_t sign_alg;
+ uint16_t enc_alg;
/* preauth hash before session setup */
- guint8 *preauth_hash_current;
- guint8 preauth_hash_con[SMB2_PREAUTH_HASH_SIZE];
- guint8 preauth_hash_ses[SMB2_PREAUTH_HASH_SIZE];
+ uint8_t *preauth_hash_current;
+ uint8_t preauth_hash_con[SMB2_PREAUTH_HASH_SIZE];
+ uint8_t preauth_hash_ses[SMB2_PREAUTH_HASH_SIZE];
} smb2_conv_info_t;
@@ -161,7 +163,7 @@ typedef struct _smb2_conv_info_t {
#define SMB2_FLAGS_ATTR_HIDDEN 0x00000002
#define SMB2_FLAGS_ATTR_READONLY 0x00000001
-/* SMB2 FILE TYPES ASIGNED TO EXPORT OBJECTS */
+/* SMB2 FILE TYPES ASSIGNED TO EXPORT OBJECTS */
#define SMB2_FID_TYPE_UNKNOWN 0
#define SMB2_FID_TYPE_FILE 1
#define SMB2_FID_TYPE_DIR 2
@@ -190,13 +192,13 @@ typedef struct _smb2_conv_info_t {
#define SMB2_COM_BREAK 0x12
typedef struct _smb2_info_t {
- guint16 opcode;
- guint32 ioctl_function;
- guint32 status;
- guint32 tid;
- guint64 sesid; /* *host* byte order - not necessarily little-endian! */
- guint64 msg_id;
- guint32 flags;
+ uint16_t opcode;
+ uint32_t ioctl_function;
+ uint32_t status;
+ uint32_t tid;
+ uint64_t sesid; /* *host* byte order - not necessarily little-endian! */
+ uint64_t msg_id;
+ uint32_t flags;
smb2_eo_file_info_t *eo_file_info; /* eo_smb extra info */
smb2_conv_info_t *conv;
smb2_saved_info_t *saved;
@@ -209,26 +211,26 @@ typedef struct _smb2_info_t {
/* for transform content information */
typedef struct _smb2_transform_info_t {
- guint8 nonce[16];
- guint32 size;
- guint16 flags;
- guint64 sesid; /* *host* byte order - not necessarily little-endian! */
+ uint8_t nonce[16];
+ uint32_t size;
+ uint16_t flags;
+ uint64_t sesid; /* *host* byte order - not necessarily little-endian! */
smb2_conv_info_t *conv;
smb2_sesid_info_t *session;
} smb2_transform_info_t;
typedef struct _smb2_comp_transform_info_t {
- guint orig_size;
- guint alg;
- guint comp_offset;
+ unsigned orig_size;
+ unsigned alg;
+ unsigned comp_offset;
smb2_conv_info_t *conv;
smb2_sesid_info_t *session;
} smb2_comp_transform_info_t;
int dissect_smb2_FILE_OBJECTID_BUFFER(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset);
-int dissect_smb2_ioctl_function(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, guint32 *ioctl_function);
-void dissect_smb2_ioctl_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *top_tree, guint32 ioctl_function, gboolean data_in, void *private_data);
+int dissect_smb2_ioctl_function(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, uint32_t *ioctl_function);
+void dissect_smb2_ioctl_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *top_tree, uint32_t ioctl_function, bool data_in, void *private_data);
#endif