PIDL (DCERPC lsa): enhance dissector

* Fix -Wunused-function (Add functions to lsa.cnf with NOEMIT)
* Remove also some MANUAL function (no unused too..)
* Remove dissector DCERPC lsa from DIRTY list

Change-Id: I7b7f924f244757207f378b8650b8dd30e739da08
Reviewed-on: https://code.wireshark.org/review/4325
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Alexis La Goutte 2014-09-28 17:49:58 +02:00 committed by Michael Mann
parent 1633724997
commit 938008eb89
4 changed files with 15 additions and 69 deletions

View File

@ -173,6 +173,7 @@ set(PIDL_DISSECTOR_SRC
dissectors/packet-dcerpc-eventlog.c
dissectors/packet-dcerpc-frstrans.c
dissectors/packet-dcerpc-initshutdown.c
dissectors/packet-dcerpc-lsa.c
dissectors/packet-dcerpc-nspi.c
dissectors/packet-dcerpc-rfr.c
dissectors/packet-dcerpc-srvsvc.c
@ -182,7 +183,6 @@ set(PIDL_DISSECTOR_SRC
)
set(DIRTY_PIDL_DISSECTOR_SRC
dissectors/packet-dcerpc-dfs.c
dissectors/packet-dcerpc-lsa.c
dissectors/packet-dcerpc-mapi.c
dissectors/packet-dcerpc-mdssvc.c
dissectors/packet-dcerpc-misc.c

View File

@ -54,6 +54,7 @@ PIDL_DISSECTOR_SRC = \
packet-dcerpc-eventlog.c \
packet-dcerpc-frstrans.c \
packet-dcerpc-initshutdown.c \
packet-dcerpc-lsa.c \
packet-dcerpc-nspi.c \
packet-dcerpc-rfr.c \
packet-dcerpc-srvsvc.c \
@ -68,7 +69,6 @@ PIDL_DISSECTOR_SRC = \
DIRTY_PIDL_DISSECTOR_SRC = \
packet-dcerpc-dfs.c \
packet-dcerpc-drsuapi.c \
packet-dcerpc-lsa.c \
packet-dcerpc-mapi.c \
packet-dcerpc-mdssvc.c \
packet-dcerpc-misc.c

View File

@ -643,12 +643,10 @@ static int lsarpc_dissect_element_lsa_String_length(tvbuff_t *tvb _U_, int offse
static int lsarpc_dissect_element_lsa_String_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_String_string(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_String_string_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_String_string__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_StringLarge_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_StringLarge_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_StringLarge_string(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_StringLarge_string_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_StringLarge_string__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_Strings_count(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_Strings_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_Strings_names_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
@ -932,7 +930,6 @@ static int lsarpc_dissect_element_lsa_DomainInfoKerberos_unknown6(tvbuff_t *tvb
static int lsarpc_dissect_element_lsa_DomainInfoEfs_blob_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_DomainInfoEfs_efs_blob(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_DomainInfoEfs_efs_blob_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_DomainInfoEfs_efs_blob__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
const value_string lsarpc_lsa_DomainInfoEnum_vals[] = {
{ LSA_DOMAIN_INFO_POLICY_QOS, "LSA_DOMAIN_INFO_POLICY_QOS" },
{ LSA_DOMAIN_INFO_POLICY_EFS, "LSA_DOMAIN_INFO_POLICY_EFS" },
@ -1059,7 +1056,6 @@ static int lsarpc_dissect_element_lsa_LookupNames_handle(tvbuff_t *tvb _U_, int
static int lsarpc_dissect_element_lsa_LookupNames_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames_num_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames_names_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames_domains(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames_domains_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames_sids(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
@ -1272,7 +1268,6 @@ static int lsarpc_dissect_element_lsa_LookupNames2_handle(tvbuff_t *tvb _U_, int
static int lsarpc_dissect_element_lsa_LookupNames2_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames2_num_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames2_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames2_names_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames2_domains(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames2_domains_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames2_sids(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
@ -1317,7 +1312,6 @@ static int lsarpc_dissect_element_lsa_LookupSids3_unknown1(tvbuff_t *tvb _U_, in
static int lsarpc_dissect_element_lsa_LookupSids3_unknown2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames4_num_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames4_names(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames4_names_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames4_domains(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames4_domains_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int lsarpc_dissect_element_lsa_LookupNames4_sids(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
@ -1475,9 +1469,9 @@ cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
}
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
hf_lsarpc_sec_desc_buf_len, &len);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
cnf_dissect_sec_desc_buf_, NDR_POINTER_UNIQUE,
"LSA SECURITY DESCRIPTOR data:", -1);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
cnf_dissect_sec_desc_buf_, NDR_POINTER_UNIQUE,
"LSA SECURITY DESCRIPTOR data:", -1);
return offset;
}
int
@ -1538,11 +1532,6 @@ lsarpc_dissect_element_lsa_LookupNames4_names(tvbuff_t *tvb _U_, int offset _U_,
return offset;
}
static int
lsarpc_dissect_element_lsa_String_string__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
return offset;
}
static int
lsarpc_dissect_element_lsa_String_string_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_)
{
char *data;
@ -1551,11 +1540,6 @@ lsarpc_dissect_element_lsa_String_string_(tvbuff_t *tvb _U_, int offset _U_, pac
return offset;
}
static int
lsarpc_dissect_element_lsa_StringLarge_string__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
return offset;
}
static int
lsarpc_dissect_element_lsa_StringLarge_string_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_)
{
char *data;
@ -5582,14 +5566,6 @@ lsarpc_dissect_element_lsa_DomainInfoEfs_efs_blob(tvbuff_t *tvb _U_, int offset
return offset;
}
static int
lsarpc_dissect_element_lsa_DomainInfoEfs_efs_blob__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, hf_lsarpc_lsa_DomainInfoEfs_efs_blob, 0);
return offset;
}
int
lsarpc_dissect_struct_lsa_DomainInfoEfs(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
{
@ -7504,14 +7480,6 @@ lsarpc_dissect_element_lsa_LookupNames_num_names(tvbuff_t *tvb _U_, int offset _
return offset;
}
static int
lsarpc_dissect_element_lsa_LookupNames_names_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
offset = lsarpc_dissect_struct_lsa_String(tvb,offset,pinfo,tree,di,drep,hf_lsarpc_lsa_LookupNames_names,0);
return offset;
}
static int
lsarpc_dissect_element_lsa_LookupNames_domains(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
@ -10702,14 +10670,6 @@ lsarpc_dissect_element_lsa_LookupNames2_num_names(tvbuff_t *tvb _U_, int offset
return offset;
}
static int
lsarpc_dissect_element_lsa_LookupNames2_names_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
offset = lsarpc_dissect_struct_lsa_String(tvb,offset,pinfo,tree,di,drep,hf_lsarpc_lsa_LookupNames2_names,0);
return offset;
}
static int
lsarpc_dissect_element_lsa_LookupNames2_domains(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
@ -11626,14 +11586,6 @@ lsarpc_dissect_element_lsa_LookupNames4_num_names(tvbuff_t *tvb _U_, int offset
return offset;
}
static int
lsarpc_dissect_element_lsa_LookupNames4_names_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
offset = lsarpc_dissect_struct_lsa_String(tvb,offset,pinfo,tree,di,drep,hf_lsarpc_lsa_LookupNames4_names,0);
return offset;
}
static int
lsarpc_dissect_element_lsa_LookupNames4_domains(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{

View File

@ -43,9 +43,14 @@ MANUAL lsarpc_dissect_element_lsa_LookupNames2_names
MANUAL lsarpc_dissect_element_lsa_LookupNames3_names
MANUAL lsarpc_dissect_element_lsa_LookupNames4_names
MANUAL lsarpc_dissect_element_lsa_String_string_
MANUAL lsarpc_dissect_element_lsa_String_string__
MANUAL lsarpc_dissect_element_lsa_StringLarge_string_
MANUAL lsarpc_dissect_element_lsa_StringLarge_string__
NOEMIT lsarpc_dissect_element_lsa_String_string__
NOEMIT lsarpc_dissect_element_lsa_StringLarge_string__
NOEMIT lsarpc_dissect_element_lsa_DomainInfoEfs_efs_blob__
NOEMIT lsarpc_dissect_element_lsa_LookupNames_names_
NOEMIT lsarpc_dissect_element_lsa_LookupNames2_names_
NOEMIT lsarpc_dissect_element_lsa_LookupNames4_names_
ETT_FIELD ett_lsarpc_names
HF_FIELD hf_lsarpc_names "Names" "lsarpc.lookup.names" FT_NONE BASE_NONE NULL 0 "" "" ""
@ -228,9 +233,9 @@ cnf_dissect_sec_desc_buf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
hf_lsarpc_sec_desc_buf_len, &len);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
cnf_dissect_sec_desc_buf_, NDR_POINTER_UNIQUE,
"LSA SECURITY DESCRIPTOR data:", -1);
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
cnf_dissect_sec_desc_buf_, NDR_POINTER_UNIQUE,
"LSA SECURITY DESCRIPTOR data:", -1);
return offset;
}
@ -312,11 +317,6 @@ lsarpc_dissect_element_lsa_LookupNames4_names(tvbuff_t *tvb _U_, int offset _U_,
}
static int
lsarpc_dissect_element_lsa_String_string__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
return offset;
}
static int
lsarpc_dissect_element_lsa_String_string_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_)
@ -329,12 +329,6 @@ lsarpc_dissect_element_lsa_String_string_(tvbuff_t *tvb _U_, int offset _U_, pac
return offset;
}
static int
lsarpc_dissect_element_lsa_StringLarge_string__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
return offset;
}
static int
lsarpc_dissect_element_lsa_StringLarge_string_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di, guint8 *drep _U_)
{