forked from osmocom/wireshark
add dissection of
SMB/SetFileInfo level 1023 SMB2/SetInfo/FILE_INFO level 0x17 FILE_PIPE_INFO infolevel svn path=/trunk/; revision=17195
This commit is contained in:
parent
b3adb51d07
commit
baed8f0888
|
@ -629,6 +629,7 @@ static int hf_smb_unix_find_file_nextoffset = -1;
|
|||
static int hf_smb_unix_find_file_resumekey = -1;
|
||||
static int hf_smb_network_unknown = -1;
|
||||
static int hf_smb_disposition_delete_on_close = -1;
|
||||
static int hf_smb_pipe_info_flag = -1;
|
||||
static int hf_smb_mode = -1;
|
||||
static int hf_smb_attribute = -1;
|
||||
static int hf_smb_reparse_tag = -1;
|
||||
|
@ -1297,6 +1298,11 @@ static const true_false_string tfs_disposition_delete_on_close = {
|
|||
"Normal access, do not delete on close"
|
||||
};
|
||||
|
||||
static const true_false_string tfs_pipe_info_flag = {
|
||||
"SET NAMED PIPE mode",
|
||||
"Clear NAMED PIPE mode"
|
||||
};
|
||||
|
||||
|
||||
static const value_string da_access_vals[] = {
|
||||
{ 0, "Open for reading"},
|
||||
|
@ -11178,6 +11184,23 @@ dissect_disposition_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
|
|||
return offset;
|
||||
}
|
||||
|
||||
int
|
||||
dissect_sfi_SMB_FILE_PIPE_INFO(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
||||
int offset, guint16 *bcp, gboolean *trunc)
|
||||
{
|
||||
smb_info_t *si = pinfo->private_data;
|
||||
|
||||
DISSECTOR_ASSERT(si);
|
||||
|
||||
/* pipe info flag */
|
||||
CHECK_BYTE_COUNT_SUBR(1);
|
||||
proto_tree_add_item(tree, hf_smb_pipe_info_flag, tvb, offset, 1, TRUE);
|
||||
COUNT_BYTES_SUBR(1);
|
||||
|
||||
*trunc = FALSE;
|
||||
return offset;
|
||||
}
|
||||
|
||||
/*dissect the data block for TRANS2_QUERY_PATH_INFORMATION and
|
||||
TRANS2_QUERY_FILE_INFORMATION*/
|
||||
static int
|
||||
|
@ -11366,11 +11389,14 @@ dissect_spi_loi_vals(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
|||
offset = dissect_disposition_info(tvb, pinfo, tree, offset, bcp,
|
||||
&trunc);
|
||||
break;
|
||||
case 1023: /* Set Pipe Info */
|
||||
offset = dissect_sfi_SMB_FILE_PIPE_INFO(tvb, pinfo, tree, offset, bcp,
|
||||
&trunc);
|
||||
break;
|
||||
case 1014:
|
||||
case 1016:
|
||||
case 1019:
|
||||
case 1020:
|
||||
case 1023:
|
||||
case 1025:
|
||||
case 1029:
|
||||
case 1032:
|
||||
|
@ -17776,6 +17802,10 @@ proto_register_smb(void)
|
|||
{ "Delete on close", "smb.disposition.delete_on_close", FT_BOOLEAN, 8,
|
||||
TFS(&tfs_disposition_delete_on_close), 0x01, "", HFILL }},
|
||||
|
||||
{ &hf_smb_pipe_info_flag,
|
||||
{ "Pipe Info", "smb.pipe_info_flag", FT_BOOLEAN, 8,
|
||||
TFS(&tfs_pipe_info_flag), 0x01, "", HFILL }},
|
||||
|
||||
};
|
||||
|
||||
static gint *ett[] = {
|
||||
|
|
|
@ -319,5 +319,6 @@ extern int dissect_qfi_SMB_FILE_ATTRIBUTE_TAG_INFO(tvbuff_t *tvb, packet_info *p
|
|||
extern int dissect_qfi_SMB_FILE_ALLOCATION_INFO(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, guint16 *bcp, gboolean *trunc);
|
||||
extern int dissect_qfi_SMB_FILE_ENDOFFILE_INFO(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, guint16 *bcp, gboolean *trunc);
|
||||
extern int dissect_nt_notify_completion_filter(tvbuff_t *tvb, proto_tree *parent_tree, int offset);
|
||||
extern int dissect_sfi_SMB_FILE_PIPE_INFO(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, guint16 *bcp, gboolean *trunc);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -126,6 +126,7 @@ static int hf_smb2_file_allocation_info = -1;
|
|||
static int hf_smb2_file_endoffile_info = -1;
|
||||
static int hf_smb2_file_alternate_name_info = -1;
|
||||
static int hf_smb2_file_stream_info = -1;
|
||||
static int hf_smb2_file_pipe_info = -1;
|
||||
static int hf_smb2_file_compression_info = -1;
|
||||
static int hf_smb2_file_network_open_info = -1;
|
||||
static int hf_smb2_file_attribute_tag_info = -1;
|
||||
|
@ -202,6 +203,7 @@ static gint ett_smb2_file_allocation_info = -1;
|
|||
static gint ett_smb2_file_endoffile_info = -1;
|
||||
static gint ett_smb2_file_alternate_name_info = -1;
|
||||
static gint ett_smb2_file_stream_info = -1;
|
||||
static gint ett_smb2_file_pipe_info = -1;
|
||||
static gint ett_smb2_file_compression_info = -1;
|
||||
static gint ett_smb2_file_network_open_info = -1;
|
||||
static gint ett_smb2_file_attribute_tag_info = -1;
|
||||
|
@ -267,6 +269,7 @@ static const value_string smb2_share_type_vals[] = {
|
|||
#define SMB2_FILE_ENDOFFILE_INFO 0x14
|
||||
#define SMB2_FILE_ALTERNATE_NAME_INFO 0x15
|
||||
#define SMB2_FILE_STREAM_INFO 0x16
|
||||
#define SMB2_FILE_PIPE_INFO 0x17
|
||||
#define SMB2_FILE_COMPRESSION_INFO 0x1c
|
||||
#define SMB2_FILE_NETWORK_OPEN_INFO 0x22
|
||||
#define SMB2_FILE_ATTRIBUTE_TAG_INFO 0x23
|
||||
|
@ -287,6 +290,7 @@ static const value_string smb2_file_info_levels[] = {
|
|||
{SMB2_FILE_ENDOFFILE_INFO, "SMB2_FILE_ENDOFFILE_INFO" },
|
||||
{SMB2_FILE_ALTERNATE_NAME_INFO, "SMB2_FILE_ALTERNATE_NAME_INFO" },
|
||||
{SMB2_FILE_STREAM_INFO, "SMB2_FILE_STREAM_INFO" },
|
||||
{SMB2_FILE_PIPE_INFO, "SMB2_FILE_PIPE_INFO" },
|
||||
{SMB2_FILE_COMPRESSION_INFO, "SMB2_FILE_COMPRESSION_INFO" },
|
||||
{SMB2_FILE_NETWORK_OPEN_INFO, "SMB2_FILE_NETWORK_OPEN_INFO" },
|
||||
{SMB2_FILE_ATTRIBUTE_TAG_INFO, "SMB2_FILE_ATTRIBUTE_TAG_INFO" },
|
||||
|
@ -1257,6 +1261,25 @@ dissect_smb2_file_stream_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
|
|||
return offset;
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_smb2_file_pipe_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree, int offset, smb2_info_t *si _U_)
|
||||
{
|
||||
proto_item *item=NULL;
|
||||
proto_tree *tree=NULL;
|
||||
guint16 bc;
|
||||
gboolean trunc;
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_item(parent_tree, hf_smb2_file_pipe_info, tvb, offset, -1, TRUE);
|
||||
tree = proto_item_add_subtree(item, ett_smb2_file_pipe_info);
|
||||
}
|
||||
|
||||
bc=tvb_length_remaining(tvb, offset);
|
||||
offset = dissect_sfi_SMB_FILE_PIPE_INFO(tvb, pinfo, tree, offset, &bc, &trunc);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_smb2_file_compression_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree, int offset, smb2_info_t *si _U_)
|
||||
{
|
||||
|
@ -2278,6 +2301,9 @@ dissect_smb2_infolevel(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
case SMB2_FILE_STREAM_INFO:
|
||||
dissect_smb2_file_stream_info(tvb, pinfo, tree, offset, si);
|
||||
break;
|
||||
case SMB2_FILE_PIPE_INFO:
|
||||
dissect_smb2_file_pipe_info(tvb, pinfo, tree, offset, si);
|
||||
break;
|
||||
case SMB2_FILE_COMPRESSION_INFO:
|
||||
dissect_smb2_file_compression_info(tvb, pinfo, tree, offset, si);
|
||||
break;
|
||||
|
@ -4488,6 +4514,10 @@ proto_register_smb2(void)
|
|||
{ "SMB2_FILE_STREAM_INFO", "smb2.smb2_file_stream_info", FT_NONE, BASE_NONE,
|
||||
NULL, 0, "SMB2_FILE_STREAM_INFO structure", HFILL }},
|
||||
|
||||
{ &hf_smb2_file_pipe_info,
|
||||
{ "SMB2_FILE_PIPE_INFO", "smb2.smb2_file_pipe_info", FT_NONE, BASE_NONE,
|
||||
NULL, 0, "SMB2_FILE_PIPE_INFO structure", HFILL }},
|
||||
|
||||
{ &hf_smb2_file_compression_info,
|
||||
{ "SMB2_FILE_COMPRESSION_INFO", "smb2.smb2_file_compression_info", FT_NONE, BASE_NONE,
|
||||
NULL, 0, "SMB2_FILE_COMPRESSION_INFO structure", HFILL }},
|
||||
|
@ -4793,6 +4823,7 @@ proto_register_smb2(void)
|
|||
&ett_smb2_file_endoffile_info,
|
||||
&ett_smb2_file_alternate_name_info,
|
||||
&ett_smb2_file_stream_info,
|
||||
&ett_smb2_file_pipe_info,
|
||||
&ett_smb2_file_compression_info,
|
||||
&ett_smb2_file_network_open_info,
|
||||
&ett_smb2_file_attribute_tag_info,
|
||||
|
|
Loading…
Reference in New Issue