forked from osmocom/wireshark
a lot of warnings removed, most of them about pointer to int casts without using the appropriate GLib macros
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12832 f5534014-38df-0310-8fa8-9805f1628bb7
This commit is contained in:
parent
d946af6ef2
commit
fcda9bb26c
|
@ -44,8 +44,8 @@
|
||||||
|
|
||||||
static int proto_aim_oft = -1;
|
static int proto_aim_oft = -1;
|
||||||
|
|
||||||
static int ett_aim_recvfile = -1;
|
/*static int ett_aim_recvfile = -1;
|
||||||
static int ett_aim_sendfile = -1;
|
static int ett_aim_sendfile = -1;*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cookie (8 chars)
|
* cookie (8 chars)
|
||||||
|
|
|
@ -121,7 +121,7 @@ static int dissect_aim_snac_signon_signon_reply(tvbuff_t *tvb,
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dissect_aim_tlv_value_registration(proto_item *ti _U_, guint16 value_id _U_, tvbuff_t *tvb _U_, packet_info *pinfo)
|
static int dissect_aim_tlv_value_registration(proto_item *ti _U_, guint16 value_id _U_, tvbuff_t *tvb _U_, packet_info *pinfo _U_)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -190,7 +190,7 @@ static GHashTable *ata_cmd_matched;
|
||||||
static guint
|
static guint
|
||||||
ata_cmd_hash_matched(gconstpointer k)
|
ata_cmd_hash_matched(gconstpointer k)
|
||||||
{
|
{
|
||||||
return (guint)k;
|
return GPOINTER_TO_UINT(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
|
@ -267,12 +267,12 @@ dissect_ata_pdu(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset,
|
||||||
if(ata_info){
|
if(ata_info){
|
||||||
ata_info->response_frame=pinfo->fd->num;
|
ata_info->response_frame=pinfo->fd->num;
|
||||||
g_hash_table_remove(ata_cmd_unmatched, ata_info);
|
g_hash_table_remove(ata_cmd_unmatched, ata_info);
|
||||||
g_hash_table_insert(ata_cmd_matched, (void *)ata_info->request_frame, ata_info);
|
g_hash_table_insert(ata_cmd_matched, GUINT_TO_POINTER(ata_info->request_frame), ata_info);
|
||||||
g_hash_table_insert(ata_cmd_matched, (void *)ata_info->response_frame, ata_info);
|
g_hash_table_insert(ata_cmd_matched, GUINT_TO_POINTER(ata_info->response_frame), ata_info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ata_info=g_hash_table_lookup(ata_cmd_matched, (void *)pinfo->fd->num);
|
ata_info=g_hash_table_lookup(ata_cmd_matched, GUINT_TO_POINTER(pinfo->fd->num));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ata_info){
|
if(ata_info){
|
||||||
|
|
|
@ -303,10 +303,12 @@ static int dissect_filter(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, i
|
||||||
}
|
}
|
||||||
static int dissect_and_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
static int dissect_and_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
||||||
return dissect_cmip_CMISFilter(FALSE, tvb, offset, pinfo, tree, hf_cmip_and_item);
|
return dissect_cmip_CMISFilter(FALSE, tvb, offset, pinfo, tree, hf_cmip_and_item);
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
static int dissect_or_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
static int dissect_or_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
||||||
return dissect_cmip_CMISFilter(FALSE, tvb, offset, pinfo, tree, hf_cmip_or_item);
|
return dissect_cmip_CMISFilter(FALSE, tvb, offset, pinfo, tree, hf_cmip_or_item);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
static int dissect_not(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
static int dissect_not(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
||||||
return dissect_cmip_CMISFilter(FALSE, tvb, offset, pinfo, tree, hf_cmip_not);
|
return dissect_cmip_CMISFilter(FALSE, tvb, offset, pinfo, tree, hf_cmip_not);
|
||||||
}
|
}
|
||||||
|
@ -1848,14 +1850,16 @@ static const ber_sequence_t BaseManagedObjectId_sequence[] = {
|
||||||
{ BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_baseManagedObjectInstance },
|
{ BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_baseManagedObjectInstance },
|
||||||
{ 0, 0, 0, NULL }
|
{ 0, 0, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
static int
|
static int
|
||||||
dissect_cmip_BaseManagedObjectId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
|
dissect_cmip_BaseManagedObjectId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
|
||||||
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
|
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
|
||||||
BaseManagedObjectId_sequence, hf_index, ett_cmip_BaseManagedObjectId);
|
BaseManagedObjectId_sequence, hf_index, ett_cmip_BaseManagedObjectId);
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static const ber_sequence_t SET_OF_AttributeId_set_of[1] = {
|
static const ber_sequence_t SET_OF_AttributeId_set_of[1] = {
|
||||||
{ BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_attributeIdList_item },
|
{ BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_attributeIdList_item },
|
||||||
|
@ -2281,13 +2285,14 @@ static const value_string RejectProblem_vals[] = {
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
static int
|
static int
|
||||||
dissect_cmip_RejectProblem(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
|
dissect_cmip_RejectProblem(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
|
||||||
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
|
offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static const value_string RejectProb_vals[] = {
|
static const value_string RejectProb_vals[] = {
|
||||||
|
|
|
@ -268,9 +268,11 @@ static int dissect_hashAlg(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
|
||||||
static int dissect_certId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
static int dissect_certId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
||||||
return dissect_crmf_CertId(FALSE, tvb, offset, pinfo, tree, hf_cmp_certId);
|
return dissect_crmf_CertId(FALSE, tvb, offset, pinfo, tree, hf_cmp_certId);
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
static int dissect_caPubs_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
static int dissect_caPubs_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
||||||
return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_caPubs_item);
|
return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_caPubs_item);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
static int dissect_privateKey(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
static int dissect_privateKey(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
||||||
return dissect_crmf_EncryptedValue(FALSE, tvb, offset, pinfo, tree, hf_cmp_privateKey);
|
return dissect_crmf_EncryptedValue(FALSE, tvb, offset, pinfo, tree, hf_cmp_privateKey);
|
||||||
}
|
}
|
||||||
|
@ -285,10 +287,12 @@ static int dissect_encryptedCert(packet_info *pinfo, proto_tree *tree, tvbuff_t
|
||||||
}
|
}
|
||||||
static int dissect_newSigCert(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
static int dissect_newSigCert(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
||||||
return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_newSigCert);
|
return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_newSigCert);
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
static int dissect_caCerts_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
static int dissect_caCerts_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
||||||
return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_caCerts_item);
|
return dissect_pkix1explicit_Certificate(FALSE, tvb, offset, pinfo, tree, hf_cmp_caCerts_item);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
static int dissect_certDetails(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
static int dissect_certDetails(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
||||||
return dissect_crmf_CertTemplate(FALSE, tvb, offset, pinfo, tree, hf_cmp_certDetails);
|
return dissect_crmf_CertTemplate(FALSE, tvb, offset, pinfo, tree, hf_cmp_certDetails);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3256,7 +3256,7 @@ static int SpoolssGetPrinter_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
if (check_col(pinfo->cinfo, COL_INFO))
|
if (check_col(pinfo->cinfo, COL_INFO))
|
||||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
|
||||||
|
|
||||||
dcv->private_data = (void *)level;
|
dcv->private_data = GUINT_TO_POINTER(level);
|
||||||
|
|
||||||
offset = dissect_spoolss_buffer(
|
offset = dissect_spoolss_buffer(
|
||||||
tvb, offset, pinfo, tree, drep, NULL);
|
tvb, offset, pinfo, tree, drep, NULL);
|
||||||
|
@ -3275,7 +3275,7 @@ static int SpoolssGetPrinter_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
||||||
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
||||||
BUFFER buffer;
|
BUFFER buffer;
|
||||||
gint16 level = (guint32)dcv->private_data;
|
gint16 level = GPOINTER_TO_INT(dcv->private_data);
|
||||||
proto_item *item;
|
proto_item *item;
|
||||||
proto_tree *subtree = NULL;
|
proto_tree *subtree = NULL;
|
||||||
|
|
||||||
|
@ -3601,7 +3601,7 @@ static int SpoolssEnumForms_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
offset = dissect_ndr_uint32(
|
offset = dissect_ndr_uint32(
|
||||||
tvb, offset, pinfo, tree, drep, hf_level, &level);
|
tvb, offset, pinfo, tree, drep, hf_level, &level);
|
||||||
|
|
||||||
dcv->private_data = (void *)level;
|
dcv->private_data = GUINT_TO_POINTER(level);
|
||||||
|
|
||||||
if (check_col(pinfo->cinfo, COL_INFO))
|
if (check_col(pinfo->cinfo, COL_INFO))
|
||||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
|
||||||
|
@ -3621,7 +3621,7 @@ static int SpoolssEnumForms_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
||||||
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
||||||
BUFFER buffer;
|
BUFFER buffer;
|
||||||
guint32 level = (guint32)dcv->private_data, i, count;
|
guint32 level = GPOINTER_TO_UINT(dcv->private_data), i, count;
|
||||||
int buffer_offset;
|
int buffer_offset;
|
||||||
|
|
||||||
proto_tree_add_uint_hidden(
|
proto_tree_add_uint_hidden(
|
||||||
|
@ -4127,7 +4127,7 @@ static int SpoolssAddForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
|
|
||||||
/* Store info level to match with reply packet */
|
/* Store info level to match with reply packet */
|
||||||
|
|
||||||
dcv->private_data = (void *)level;
|
dcv->private_data = GUINT_TO_POINTER(level);
|
||||||
|
|
||||||
offset = dissect_FORM_CTR(tvb, offset, pinfo, tree, drep);
|
offset = dissect_FORM_CTR(tvb, offset, pinfo, tree, drep);
|
||||||
|
|
||||||
|
@ -4276,7 +4276,7 @@ static int SpoolssGetForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
offset = dissect_ndr_uint32(
|
offset = dissect_ndr_uint32(
|
||||||
tvb, offset, pinfo, tree, drep, hf_form_level, &level);
|
tvb, offset, pinfo, tree, drep, hf_form_level, &level);
|
||||||
|
|
||||||
dcv->private_data = (void *)level;
|
dcv->private_data = GUINT_TO_POINTER(level);
|
||||||
|
|
||||||
if (check_col(pinfo->cinfo, COL_INFO))
|
if (check_col(pinfo->cinfo, COL_INFO))
|
||||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d",
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d",
|
||||||
|
@ -4296,7 +4296,7 @@ static int SpoolssGetForm_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
||||||
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
||||||
BUFFER buffer;
|
BUFFER buffer;
|
||||||
guint32 level = (guint32)dcv->private_data;
|
guint32 level = GPOINTER_TO_UINT(dcv->private_data);
|
||||||
|
|
||||||
proto_tree_add_uint_hidden(
|
proto_tree_add_uint_hidden(
|
||||||
tree, hf_form, tvb, offset, 0, 1);
|
tree, hf_form, tvb, offset, 0, 1);
|
||||||
|
@ -4575,7 +4575,7 @@ static int SpoolssEnumJobs_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
offset = dissect_ndr_uint32(
|
offset = dissect_ndr_uint32(
|
||||||
tvb, offset, pinfo, tree, drep, hf_level, &level);
|
tvb, offset, pinfo, tree, drep, hf_level, &level);
|
||||||
|
|
||||||
dcv->private_data = (void *)level;
|
dcv->private_data = GUINT_TO_POINTER(level);
|
||||||
|
|
||||||
if (check_col(pinfo->cinfo, COL_INFO))
|
if (check_col(pinfo->cinfo, COL_INFO))
|
||||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
|
||||||
|
@ -4593,7 +4593,7 @@ static int SpoolssEnumJobs_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
{
|
{
|
||||||
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
||||||
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
||||||
gint16 level = (guint32)dcv->private_data;
|
gint16 level = GPOINTER_TO_UINT(dcv->private_data);
|
||||||
BUFFER buffer;
|
BUFFER buffer;
|
||||||
guint32 num_jobs, i;
|
guint32 num_jobs, i;
|
||||||
int buffer_offset;
|
int buffer_offset;
|
||||||
|
@ -4717,7 +4717,7 @@ static int SpoolssGetJob_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
offset = dissect_ndr_uint32(
|
offset = dissect_ndr_uint32(
|
||||||
tvb, offset, pinfo, tree, drep, hf_level, &level);
|
tvb, offset, pinfo, tree, drep, hf_level, &level);
|
||||||
|
|
||||||
dcv->private_data = (void *)level;
|
dcv->private_data = GUINT_TO_POINTER(level);
|
||||||
|
|
||||||
if (check_col(pinfo->cinfo, COL_INFO))
|
if (check_col(pinfo->cinfo, COL_INFO))
|
||||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d, jobid %d",
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d, jobid %d",
|
||||||
|
@ -4736,7 +4736,7 @@ static int SpoolssGetJob_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
{
|
{
|
||||||
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
||||||
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
||||||
gint32 level = (guint32)dcv->private_data;
|
gint32 level = GPOINTER_TO_UINT(dcv->private_data);
|
||||||
BUFFER buffer;
|
BUFFER buffer;
|
||||||
|
|
||||||
/* Parse packet */
|
/* Parse packet */
|
||||||
|
@ -5287,7 +5287,7 @@ static int SpoolssEnumPrinterDrivers_q(tvbuff_t *tvb, int offset,
|
||||||
offset = dissect_ndr_uint32(
|
offset = dissect_ndr_uint32(
|
||||||
tvb, offset, pinfo, tree, drep, hf_level, &level);
|
tvb, offset, pinfo, tree, drep, hf_level, &level);
|
||||||
|
|
||||||
dcv->private_data = (void *)level;
|
dcv->private_data = GUINT_TO_POINTER(level);
|
||||||
|
|
||||||
if (check_col(pinfo->cinfo, COL_INFO))
|
if (check_col(pinfo->cinfo, COL_INFO))
|
||||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
|
||||||
|
@ -5306,7 +5306,7 @@ static int SpoolssEnumPrinterDrivers_r(tvbuff_t *tvb, int offset,
|
||||||
{
|
{
|
||||||
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
||||||
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
||||||
guint32 level = (guint32)dcv->private_data, num_drivers, i;
|
guint32 level = GPOINTER_TO_UINT(dcv->private_data), num_drivers, i;
|
||||||
int buffer_offset;
|
int buffer_offset;
|
||||||
BUFFER buffer;
|
BUFFER buffer;
|
||||||
|
|
||||||
|
@ -5385,7 +5385,7 @@ static int SpoolssGetPrinterDriver2_q(tvbuff_t *tvb, int offset,
|
||||||
offset = dissect_ndr_uint32(
|
offset = dissect_ndr_uint32(
|
||||||
tvb, offset, pinfo, tree, drep, hf_level, &level);
|
tvb, offset, pinfo, tree, drep, hf_level, &level);
|
||||||
|
|
||||||
dcv->private_data = (void *)level;
|
dcv->private_data = GUINT_TO_POINTER(level);
|
||||||
|
|
||||||
if (check_col(pinfo->cinfo, COL_INFO))
|
if (check_col(pinfo->cinfo, COL_INFO))
|
||||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
|
col_append_fstr(pinfo->cinfo, COL_INFO, ", level %d", level);
|
||||||
|
@ -5410,7 +5410,7 @@ static int SpoolssGetPrinterDriver2_r(tvbuff_t *tvb, int offset,
|
||||||
{
|
{
|
||||||
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
|
||||||
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
||||||
guint32 level = (guint32)dcv->private_data;
|
guint32 level = GPOINTER_TO_UINT(dcv->private_data);
|
||||||
BUFFER buffer;
|
BUFFER buffer;
|
||||||
|
|
||||||
/* Parse packet */
|
/* Parse packet */
|
||||||
|
|
|
@ -270,7 +270,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
int colon_offset;
|
int colon_offset;
|
||||||
headers_t headers;
|
headers_t headers;
|
||||||
int datalen;
|
int datalen;
|
||||||
int reported_datalen;
|
int reported_datalen = -1;
|
||||||
dissector_handle_t handle;
|
dissector_handle_t handle;
|
||||||
gboolean dissected;
|
gboolean dissected;
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ dissect_ipdc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
tvbuff_t *q931_tvb;
|
tvbuff_t *q931_tvb;
|
||||||
|
|
||||||
char *des;
|
char *des;
|
||||||
char *enum_val;
|
char *enum_val = "";
|
||||||
char *tmp_str;
|
char *tmp_str;
|
||||||
char tmp_tag_text[IPDC_STR_LEN + 1];
|
char tmp_tag_text[IPDC_STR_LEN + 1];
|
||||||
const value_string *val_ptr;
|
const value_string *val_ptr;
|
||||||
|
|
|
@ -1944,9 +1944,7 @@ dissect_cmd_Set_Sensor_Thresholds(proto_tree *tree, proto_tree *ipmi_tree, packe
|
||||||
if (tree) {
|
if (tree) {
|
||||||
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_SensorNumber,
|
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_SensorNumber,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
}
|
/* Control Byte */
|
||||||
/* Control Byte */
|
|
||||||
if (tree) {
|
|
||||||
ControlByte = tvb_get_guint8(tvb, authtype ? 33 : 17) ;
|
ControlByte = tvb_get_guint8(tvb, authtype ? 33 : 17) ;
|
||||||
tf = proto_tree_add_text(ipmi_tree, tvb, *poffset, 1,
|
tf = proto_tree_add_text(ipmi_tree, tvb, *poffset, 1,
|
||||||
"Control Byte: %s0x%02x", " ", ControlByte);
|
"Control Byte: %s0x%02x", " ", ControlByte);
|
||||||
|
@ -1967,39 +1965,33 @@ dissect_cmd_Set_Sensor_Thresholds(proto_tree *tree, proto_tree *ipmi_tree, packe
|
||||||
proto_tree_add_item(field_tree, hf_SetSensorThresholds_datafield_ControlByte_Bit0,
|
proto_tree_add_item(field_tree, hf_SetSensorThresholds_datafield_ControlByte_Bit0,
|
||||||
tvb, *poffset, 1, TRUE);
|
tvb, *poffset, 1, TRUE);
|
||||||
(*poffset)++;
|
(*poffset)++;
|
||||||
}
|
|
||||||
/* lower non-critical threshold */
|
/* lower non-critical threshold */
|
||||||
if (tree) {
|
|
||||||
if(ControlByte&0x01)
|
if(ControlByte&0x01)
|
||||||
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_LowerNonCriticalThreshold,
|
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_LowerNonCriticalThreshold,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
}
|
|
||||||
/* lower critical threshold */
|
/* lower critical threshold */
|
||||||
if (tree) {
|
|
||||||
if(ControlByte&0x02)
|
if(ControlByte&0x02)
|
||||||
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_LowerCriticalThreshold,
|
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_LowerCriticalThreshold,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
}
|
|
||||||
/* lower non-recoverable threshold */
|
/* lower non-recoverable threshold */
|
||||||
if (tree) {
|
|
||||||
if(ControlByte&0x04)
|
if(ControlByte&0x04)
|
||||||
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_LowerNonRecoverableThreshold,
|
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_LowerNonRecoverableThreshold,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
}
|
|
||||||
/* upper non-critical threshold */
|
/* upper non-critical threshold */
|
||||||
if (tree) {
|
|
||||||
if(ControlByte&0x08)
|
if(ControlByte&0x08)
|
||||||
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_UpperNonCriticalThreshold,
|
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_UpperNonCriticalThreshold,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
}
|
|
||||||
/* upper critical threshold value */
|
/* upper critical threshold value */
|
||||||
if (tree) {
|
|
||||||
if(ControlByte&0x10)
|
if(ControlByte&0x10)
|
||||||
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_UpperCriticalThreshold,
|
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_UpperCriticalThreshold,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
}
|
|
||||||
/* upper non-recoverable threshold value */
|
/* upper non-recoverable threshold value */
|
||||||
if (tree) {
|
|
||||||
if(ControlByte&0x20)
|
if(ControlByte&0x20)
|
||||||
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_UpperNonRecoverableThreshold,
|
proto_tree_add_item(ipmi_tree, hf_SetSensorThresholds_datafield_UpperNonRecoverableThreshold,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
|
@ -2041,39 +2033,33 @@ dissect_cmd_Get_Sensor_Thresholds(proto_tree *tree, proto_tree *ipmi_tree, packe
|
||||||
proto_tree_add_item(field_tree, hf_GetSensorThresholds_datafield_ControlByte_Bit0,
|
proto_tree_add_item(field_tree, hf_GetSensorThresholds_datafield_ControlByte_Bit0,
|
||||||
tvb, *poffset, 1, TRUE);
|
tvb, *poffset, 1, TRUE);
|
||||||
(*poffset)++;
|
(*poffset)++;
|
||||||
}
|
|
||||||
/* lower non-critical threshold */
|
/* lower non-critical threshold */
|
||||||
if (tree) {
|
|
||||||
if(ControlByte&0x01)
|
if(ControlByte&0x01)
|
||||||
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_LowerNonCriticalThreshold,
|
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_LowerNonCriticalThreshold,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
}
|
|
||||||
/* lower critical threshold */
|
/* lower critical threshold */
|
||||||
if (tree) {
|
|
||||||
if(ControlByte&0x02)
|
if(ControlByte&0x02)
|
||||||
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_LowerCriticalThreshold,
|
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_LowerCriticalThreshold,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
}
|
|
||||||
/* lower non-recoverable threshold */
|
/* lower non-recoverable threshold */
|
||||||
if (tree) {
|
|
||||||
if(ControlByte&0x04)
|
if(ControlByte&0x04)
|
||||||
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_LowerNonRecoverableThreshold,
|
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_LowerNonRecoverableThreshold,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
}
|
|
||||||
/* upper non-critical threshold */
|
/* upper non-critical threshold */
|
||||||
if (tree) {
|
|
||||||
if(ControlByte&0x08)
|
if(ControlByte&0x08)
|
||||||
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_UpperNonCriticalThreshold,
|
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_UpperNonCriticalThreshold,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
}
|
|
||||||
/* upper critical threshold value */
|
/* upper critical threshold value */
|
||||||
if (tree) {
|
|
||||||
if(ControlByte&0x10)
|
if(ControlByte&0x10)
|
||||||
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_UpperCriticalThreshold,
|
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_UpperCriticalThreshold,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
}
|
|
||||||
/* upper non-recoverable threshold value */
|
/* upper non-recoverable threshold value */
|
||||||
if (tree) {
|
|
||||||
if(ControlByte&0x20)
|
if(ControlByte&0x20)
|
||||||
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_UpperNonRecoverableThreshold,
|
proto_tree_add_item(ipmi_tree, hf_GetSensorThresholds_datafield_UpperNonRecoverableThreshold,
|
||||||
tvb, (*poffset)++, 1, TRUE);
|
tvb, (*poffset)++, 1, TRUE);
|
||||||
|
|
|
@ -218,7 +218,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
* (ie none)
|
* (ie none)
|
||||||
*/
|
*/
|
||||||
if(tree) {
|
if(tree) {
|
||||||
int len, pad, encapsulated_protocol;
|
int len = 0, pad = 0, encapsulated_protocol = 0;
|
||||||
gboolean auth_decode_ok = FALSE;
|
gboolean auth_decode_ok = FALSE;
|
||||||
|
|
||||||
ti = proto_tree_add_item(tree, proto_esp, tvb, 0, -1, FALSE);
|
ti = proto_tree_add_item(tree, proto_esp, tvb, 0, -1, FALSE);
|
||||||
|
|
|
@ -217,7 +217,7 @@ llc_add_oui(guint32 oui, const char *table_name, char *table_ui_name,
|
||||||
oui_info_table = g_hash_table_new(g_direct_hash,
|
oui_info_table = g_hash_table_new(g_direct_hash,
|
||||||
g_direct_equal);
|
g_direct_equal);
|
||||||
}
|
}
|
||||||
g_hash_table_insert(oui_info_table, (gpointer)oui, new_info);
|
g_hash_table_insert(oui_info_table, GUINT_TO_POINTER(oui), new_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -570,7 +570,7 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
|
||||||
/*
|
/*
|
||||||
* Do we have information for this OUI?
|
* Do we have information for this OUI?
|
||||||
*/
|
*/
|
||||||
oui_info = g_hash_table_lookup(oui_info_table, (gpointer)oui);
|
oui_info = g_hash_table_lookup(oui_info_table, GUINT_TO_POINTER(oui));
|
||||||
if (oui_info != NULL) {
|
if (oui_info != NULL) {
|
||||||
/*
|
/*
|
||||||
* Yes - use it.
|
* Yes - use it.
|
||||||
|
|
|
@ -341,7 +341,7 @@ dissect_mtp3_sio(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_tree)
|
||||||
proto_tree_add_uint(sio_tree, hf_mtp3_service_indicator, tvb, SIO_OFFSET, SIO_LENGTH, sio);
|
proto_tree_add_uint(sio_tree, hf_mtp3_service_indicator, tvb, SIO_OFFSET, SIO_LENGTH, sio);
|
||||||
|
|
||||||
/* Store the SI so that subidissectors know what SI this msg is */
|
/* Store the SI so that subidissectors know what SI this msg is */
|
||||||
pinfo->private_data = (void *)(sio & SERVICE_INDICATOR_MASK);
|
pinfo->private_data = GUINT_TO_POINTER(sio & SERVICE_INDICATOR_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -454,15 +454,15 @@ nfs_fhandle_data_free_all(gpointer key_arg _U_, gpointer value, gpointer user_da
|
||||||
static gint
|
static gint
|
||||||
nfs_fhandle_frame_equal(gconstpointer k1, gconstpointer k2)
|
nfs_fhandle_frame_equal(gconstpointer k1, gconstpointer k2)
|
||||||
{
|
{
|
||||||
guint32 key1 = (guint32)k1;
|
guint32 key1 = GPOINTER_TO_UINT(k1);
|
||||||
guint32 key2 = (guint32)k2;
|
guint32 key2 = GPOINTER_TO_UINT(k2);
|
||||||
|
|
||||||
return key1==key2;
|
return key1==key2;
|
||||||
}
|
}
|
||||||
static guint
|
static guint
|
||||||
nfs_fhandle_frame_hash(gconstpointer k)
|
nfs_fhandle_frame_hash(gconstpointer k)
|
||||||
{
|
{
|
||||||
guint32 key = (guint32)k;
|
guint32 key = GPOINTER_TO_UINT(k);
|
||||||
|
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
@ -562,15 +562,15 @@ nfs_name_snoop_matched_hash(gconstpointer k)
|
||||||
static gint
|
static gint
|
||||||
nfs_name_snoop_unmatched_equal(gconstpointer k1, gconstpointer k2)
|
nfs_name_snoop_unmatched_equal(gconstpointer k1, gconstpointer k2)
|
||||||
{
|
{
|
||||||
guint32 key1 = (guint32)k1;
|
guint32 key1 = GPOINTER_TO_UINT(k1);
|
||||||
guint32 key2 = (guint32)k2;
|
guint32 key2 = GPOINTER_TO_UINT(k2);
|
||||||
|
|
||||||
return key1==key2;
|
return key1==key2;
|
||||||
}
|
}
|
||||||
static guint
|
static guint
|
||||||
nfs_name_snoop_unmatched_hash(gconstpointer k)
|
nfs_name_snoop_unmatched_hash(gconstpointer k)
|
||||||
{
|
{
|
||||||
guint32 key = (guint32)k;
|
guint32 key = GPOINTER_TO_UINT(k);
|
||||||
|
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
@ -699,7 +699,7 @@ nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len, i
|
||||||
nns->full_name=NULL;
|
nns->full_name=NULL;
|
||||||
|
|
||||||
/* remove any old entry for this */
|
/* remove any old entry for this */
|
||||||
old_nns=g_hash_table_lookup(nfs_name_snoop_unmatched, (gconstpointer)xid);
|
old_nns=g_hash_table_lookup(nfs_name_snoop_unmatched, GINT_TO_POINTER(xid));
|
||||||
if(old_nns){
|
if(old_nns){
|
||||||
/* if we haven't seen the reply yet, then there are no
|
/* if we haven't seen the reply yet, then there are no
|
||||||
matched entries for it, thus we can dealloc the arrays*/
|
matched entries for it, thus we can dealloc the arrays*/
|
||||||
|
@ -714,10 +714,10 @@ nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len, i
|
||||||
|
|
||||||
g_mem_chunk_free(nfs_name_snoop_chunk, old_nns);
|
g_mem_chunk_free(nfs_name_snoop_chunk, old_nns);
|
||||||
}
|
}
|
||||||
g_hash_table_remove(nfs_name_snoop_unmatched, (gconstpointer)xid);
|
g_hash_table_remove(nfs_name_snoop_unmatched, GINT_TO_POINTER(xid));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hash_table_insert(nfs_name_snoop_unmatched, (gpointer)xid, nns);
|
g_hash_table_insert(nfs_name_snoop_unmatched, GINT_TO_POINTER(xid), nns);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -728,7 +728,7 @@ nfs_name_snoop_add_fh(int xid, tvbuff_t *tvb, int fh_offset, int fh_length)
|
||||||
nfs_name_snoop_key_t *key;
|
nfs_name_snoop_key_t *key;
|
||||||
|
|
||||||
/* find which request we correspond to */
|
/* find which request we correspond to */
|
||||||
nns=g_hash_table_lookup(nfs_name_snoop_unmatched, (gconstpointer)xid);
|
nns=g_hash_table_lookup(nfs_name_snoop_unmatched, GINT_TO_POINTER(xid));
|
||||||
if(!nns){
|
if(!nns){
|
||||||
/* oops couldnt find matching request, bail out */
|
/* oops couldnt find matching request, bail out */
|
||||||
return;
|
return;
|
||||||
|
@ -756,7 +756,7 @@ nfs_name_snoop_add_fh(int xid, tvbuff_t *tvb, int fh_offset, int fh_length)
|
||||||
g_hash_table_remove(nfs_name_snoop_matched, key);
|
g_hash_table_remove(nfs_name_snoop_matched, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hash_table_remove(nfs_name_snoop_unmatched, (gconstpointer)xid);
|
g_hash_table_remove(nfs_name_snoop_unmatched, GINT_TO_POINTER(xid));
|
||||||
g_hash_table_insert(nfs_name_snoop_matched, key, nns);
|
g_hash_table_insert(nfs_name_snoop_matched, key, nns);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1503,7 +1503,7 @@ dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
not work properly with this feature
|
not work properly with this feature
|
||||||
*/
|
*/
|
||||||
g_hash_table_insert(nfs_fhandle_frame_table,
|
g_hash_table_insert(nfs_fhandle_frame_table,
|
||||||
(gpointer)pinfo->fd->num,
|
GINT_TO_POINTER(pinfo->fd->num),
|
||||||
(gpointer)old_fhd);
|
(gpointer)old_fhd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,7 @@ nlm_msg_res_unmatched_hash(gconstpointer k)
|
||||||
static guint
|
static guint
|
||||||
nlm_msg_res_matched_hash(gconstpointer k)
|
nlm_msg_res_matched_hash(gconstpointer k)
|
||||||
{
|
{
|
||||||
guint hash = (guint)k;
|
guint hash = GPOINTER_TO_UINT(k);
|
||||||
|
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
@ -173,8 +173,8 @@ nlm_msg_res_unmatched_equal(gconstpointer k1, gconstpointer k2)
|
||||||
static gint
|
static gint
|
||||||
nlm_msg_res_matched_equal(gconstpointer k1, gconstpointer k2)
|
nlm_msg_res_matched_equal(gconstpointer k1, gconstpointer k2)
|
||||||
{
|
{
|
||||||
guint mk1 = (guint)k1;
|
guint mk1 = GPOINTER_TO_UINT(k1);
|
||||||
guint mk2 = (guint)k2;
|
guint mk2 = GPOINTER_TO_UINT(k2);
|
||||||
|
|
||||||
return( mk1==mk2 );
|
return( mk1==mk2 );
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ nlm_print_msgres_reply(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb)
|
||||||
{
|
{
|
||||||
nlm_msg_res_matched_data *md;
|
nlm_msg_res_matched_data *md;
|
||||||
|
|
||||||
md=g_hash_table_lookup(nlm_msg_res_matched, (gconstpointer)pinfo->fd->num);
|
md=g_hash_table_lookup(nlm_msg_res_matched, GINT_TO_POINTER(pinfo->fd->num));
|
||||||
if(md){
|
if(md){
|
||||||
nstime_t ns;
|
nstime_t ns;
|
||||||
proto_tree_add_uint(tree, hf_nlm_request_in, tvb, 0, 0, md->req_frame);
|
proto_tree_add_uint(tree, hf_nlm_request_in, tvb, 0, 0, md->req_frame);
|
||||||
|
@ -224,7 +224,7 @@ nlm_print_msgres_request(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb)
|
||||||
{
|
{
|
||||||
nlm_msg_res_matched_data *md;
|
nlm_msg_res_matched_data *md;
|
||||||
|
|
||||||
md=g_hash_table_lookup(nlm_msg_res_matched, (gconstpointer)pinfo->fd->num);
|
md=g_hash_table_lookup(nlm_msg_res_matched, GINT_TO_POINTER(pinfo->fd->num));
|
||||||
if(md){
|
if(md){
|
||||||
proto_tree_add_uint(tree, hf_nlm_reply_in, tvb, 0, 0, md->rep_frame);
|
proto_tree_add_uint(tree, hf_nlm_reply_in, tvb, 0, 0, md->rep_frame);
|
||||||
}
|
}
|
||||||
|
@ -234,12 +234,12 @@ nlm_match_fhandle_reply(packet_info *pinfo, proto_tree *tree)
|
||||||
{
|
{
|
||||||
nlm_msg_res_matched_data *md;
|
nlm_msg_res_matched_data *md;
|
||||||
|
|
||||||
md=g_hash_table_lookup(nlm_msg_res_matched, (gconstpointer)pinfo->fd->num);
|
md=g_hash_table_lookup(nlm_msg_res_matched, GINT_TO_POINTER(pinfo->fd->num));
|
||||||
if(md && md->rep_frame){
|
if(md && md->rep_frame){
|
||||||
nfs_fhandle_data_t *fhd;
|
nfs_fhandle_data_t *fhd;
|
||||||
fhd=(nfs_fhandle_data_t *)g_hash_table_lookup(
|
fhd=(nfs_fhandle_data_t *)g_hash_table_lookup(
|
||||||
nfs_fhandle_frame_table,
|
nfs_fhandle_frame_table,
|
||||||
(gconstpointer)md->req_frame);
|
GINT_TO_POINTER(md->req_frame));
|
||||||
if(fhd){
|
if(fhd){
|
||||||
dissect_fhandle_hidden(pinfo,
|
dissect_fhandle_hidden(pinfo,
|
||||||
tree, fhd);
|
tree, fhd);
|
||||||
|
@ -251,12 +251,12 @@ nlm_match_fhandle_request(packet_info *pinfo, proto_tree *tree)
|
||||||
{
|
{
|
||||||
nlm_msg_res_matched_data *md;
|
nlm_msg_res_matched_data *md;
|
||||||
|
|
||||||
md=g_hash_table_lookup(nlm_msg_res_matched, (gconstpointer)pinfo->fd->num);
|
md=g_hash_table_lookup(nlm_msg_res_matched, GINT_TO_POINTER(pinfo->fd->num));
|
||||||
if(md && md->rep_frame){
|
if(md && md->rep_frame){
|
||||||
nfs_fhandle_data_t *fhd;
|
nfs_fhandle_data_t *fhd;
|
||||||
fhd=(nfs_fhandle_data_t *)g_hash_table_lookup(
|
fhd=(nfs_fhandle_data_t *)g_hash_table_lookup(
|
||||||
nfs_fhandle_frame_table,
|
nfs_fhandle_frame_table,
|
||||||
(gconstpointer)md->rep_frame);
|
GINT_TO_POINTER(md->rep_frame));
|
||||||
if(fhd){
|
if(fhd){
|
||||||
dissect_fhandle_hidden(pinfo,
|
dissect_fhandle_hidden(pinfo,
|
||||||
tree, fhd);
|
tree, fhd);
|
||||||
|
@ -282,8 +282,8 @@ nlm_register_unmatched_res(packet_info *pinfo, tvbuff_t *tvb, int offset)
|
||||||
md->req_frame=old_umd->req_frame;
|
md->req_frame=old_umd->req_frame;
|
||||||
md->rep_frame=pinfo->fd->num;
|
md->rep_frame=pinfo->fd->num;
|
||||||
md->ns=old_umd->ns;
|
md->ns=old_umd->ns;
|
||||||
g_hash_table_insert(nlm_msg_res_matched, (gpointer)md->req_frame, (gpointer)md);
|
g_hash_table_insert(nlm_msg_res_matched, GINT_TO_POINTER(md->req_frame), (gpointer)md);
|
||||||
g_hash_table_insert(nlm_msg_res_matched, (gpointer)md->rep_frame, (gpointer)md);
|
g_hash_table_insert(nlm_msg_res_matched, GINT_TO_POINTER(md->rep_frame), (gpointer)md);
|
||||||
|
|
||||||
g_hash_table_remove(nlm_msg_res_unmatched, (gconstpointer)old_umd);
|
g_hash_table_remove(nlm_msg_res_unmatched, (gconstpointer)old_umd);
|
||||||
g_free((gpointer)old_umd->cookie);
|
g_free((gpointer)old_umd->cookie);
|
||||||
|
|
|
@ -118,7 +118,7 @@ dissect_getport_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
|
||||||
if(!pinfo->fd->flags.visited){
|
if(!pinfo->fd->flags.visited){
|
||||||
rpc_call_info_value *rpc_call=pinfo->private_data;
|
rpc_call_info_value *rpc_call=pinfo->private_data;
|
||||||
/* only do this for UDP, TCP does not need anything like this */
|
/* only do this for UDP, TCP does not need anything like this */
|
||||||
if(rpc_call && ((int)rpc_call->private_data==PT_UDP) ){
|
if(rpc_call && (GPOINTER_TO_UINT(rpc_call->private_data)==PT_UDP) ){
|
||||||
guint32 port;
|
guint32 port;
|
||||||
port=tvb_get_ntohl(tvb, offset);
|
port=tvb_get_ntohl(tvb, offset);
|
||||||
if(port){
|
if(port){
|
||||||
|
|
|
@ -2589,7 +2589,7 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
if(rpc_call && rpc_call->rep_num){
|
if(rpc_call && rpc_call->rep_num){
|
||||||
fhd=(nfs_fhandle_data_t *)g_hash_table_lookup(
|
fhd=(nfs_fhandle_data_t *)g_hash_table_lookup(
|
||||||
nfs_fhandle_frame_table,
|
nfs_fhandle_frame_table,
|
||||||
(gconstpointer)rpc_call->rep_num);
|
GINT_TO_POINTER(rpc_call->rep_num));
|
||||||
if(fhd){
|
if(fhd){
|
||||||
dissect_fhandle_hidden(pinfo,
|
dissect_fhandle_hidden(pinfo,
|
||||||
ptree, fhd);
|
ptree, fhd);
|
||||||
|
@ -2600,7 +2600,7 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
if(rpc_call && rpc_call->req_num){
|
if(rpc_call && rpc_call->req_num){
|
||||||
fhd=(nfs_fhandle_data_t *)g_hash_table_lookup(
|
fhd=(nfs_fhandle_data_t *)g_hash_table_lookup(
|
||||||
nfs_fhandle_frame_table,
|
nfs_fhandle_frame_table,
|
||||||
(gconstpointer)rpc_call->req_num);
|
GINT_TO_POINTER(rpc_call->req_num));
|
||||||
if(fhd){
|
if(fhd){
|
||||||
dissect_fhandle_hidden(pinfo,
|
dissect_fhandle_hidden(pinfo,
|
||||||
ptree, fhd);
|
ptree, fhd);
|
||||||
|
|
|
@ -805,7 +805,7 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
* Process some headers specially.
|
* Process some headers specially.
|
||||||
*/
|
*/
|
||||||
#define HDR_MATCHES(header) \
|
#define HDR_MATCHES(header) \
|
||||||
(linelen > STRLEN_CONST(header) && \
|
( (size_t)linelen > STRLEN_CONST(header) && \
|
||||||
strncasecmp(line, (header), STRLEN_CONST(header)) == 0)
|
strncasecmp(line, (header), STRLEN_CONST(header)) == 0)
|
||||||
|
|
||||||
if (HDR_MATCHES(rtsp_transport)) {
|
if (HDR_MATCHES(rtsp_transport)) {
|
||||||
|
|
|
@ -1687,7 +1687,7 @@ dissect_udvm_reference_operand(tvbuff_t *udvm_tvb, proto_tree *sigcomp_udvm_tree
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
dissect_udvm_multitype_operand(tvbuff_t *udvm_tvb, proto_tree *sigcomp_udvm_tree,
|
dissect_udvm_multitype_operand(tvbuff_t *udvm_tvb, proto_tree *sigcomp_udvm_tree,
|
||||||
gint offset, gboolean is_addr, gint *start_offset, guint16 *value, gboolean *is_memory_address )
|
gint offset, gboolean is_addr _U_, gint *start_offset, guint16 *value, gboolean *is_memory_address )
|
||||||
{
|
{
|
||||||
guint bytecode;
|
guint bytecode;
|
||||||
guint display_bytecode;
|
guint display_bytecode;
|
||||||
|
|
|
@ -1531,7 +1531,7 @@ guint sip_is_packet_resend(packet_info *pinfo,
|
||||||
/* Return any answer stored from previous dissection */
|
/* Return any answer stored from previous dissection */
|
||||||
if (pinfo->fd->flags.visited)
|
if (pinfo->fd->flags.visited)
|
||||||
{
|
{
|
||||||
return (guint)(p_get_proto_data(pinfo->fd, proto_sip));
|
return GPOINTER_TO_UINT(p_get_proto_data(pinfo->fd, proto_sip));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No packet entry found, consult global hash table */
|
/* No packet entry found, consult global hash table */
|
||||||
|
@ -1637,7 +1637,7 @@ guint sip_is_packet_resend(packet_info *pinfo,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Store return value with this packet */
|
/* Store return value with this packet */
|
||||||
p_add_proto_data(pinfo->fd, proto_sip, (void*)result);
|
p_add_proto_data(pinfo->fd, proto_sip, GUINT_TO_POINTER(result));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,15 +147,15 @@ samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, vo
|
||||||
}
|
}
|
||||||
fi=gp->pdata[0];
|
fi=gp->pdata[0];
|
||||||
|
|
||||||
old_ctx=g_hash_table_lookup(ctx_handle_table, (gpointer)pinfo->fd->num);
|
old_ctx=g_hash_table_lookup(ctx_handle_table, GINT_TO_POINTER(pinfo->fd->num));
|
||||||
if(old_ctx){
|
if(old_ctx){
|
||||||
g_hash_table_remove(ctx_handle_table, (gpointer)pinfo->fd->num);
|
g_hash_table_remove(ctx_handle_table, GINT_TO_POINTER(pinfo->fd->num));
|
||||||
}
|
}
|
||||||
if(!old_ctx){
|
if(!old_ctx){
|
||||||
old_ctx=g_mem_chunk_alloc(ctx_handle_chunk);
|
old_ctx=g_mem_chunk_alloc(ctx_handle_chunk);
|
||||||
memcpy(old_ctx, fi->value.value.bytes->data, 20);
|
memcpy(old_ctx, fi->value.value.bytes->data, 20);
|
||||||
}
|
}
|
||||||
g_hash_table_insert(ctx_handle_table, (gpointer)pinfo->fd->num, old_ctx);
|
g_hash_table_insert(ctx_handle_table, GINT_TO_POINTER(pinfo->fd->num), old_ctx);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, vo
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
old_ctx=g_hash_table_lookup(ctx_handle_table, (gpointer)ri->call_data->req_frame);
|
old_ctx=g_hash_table_lookup(ctx_handle_table, GINT_TO_POINTER(ri->call_data->req_frame));
|
||||||
if(!old_ctx){
|
if(!old_ctx){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -313,8 +313,8 @@ free_all_ctx_handle(gpointer key_arg _U_, gpointer value _U_, gpointer user_data
|
||||||
static gint
|
static gint
|
||||||
ctx_handle_equal(gconstpointer k1, gconstpointer k2)
|
ctx_handle_equal(gconstpointer k1, gconstpointer k2)
|
||||||
{
|
{
|
||||||
int sn1 = (int)k1;
|
int sn1 = GPOINTER_TO_INT(k1);
|
||||||
int sn2 = (int)k2;
|
int sn2 = GPOINTER_TO_INT(k2);
|
||||||
|
|
||||||
return sn1==sn2;
|
return sn1==sn2;
|
||||||
}
|
}
|
||||||
|
@ -322,7 +322,7 @@ ctx_handle_equal(gconstpointer k1, gconstpointer k2)
|
||||||
static guint
|
static guint
|
||||||
ctx_handle_hash(gconstpointer k)
|
ctx_handle_hash(gconstpointer k)
|
||||||
{
|
{
|
||||||
int sn = (int)k;
|
int sn = GPOINTER_TO_INT(k);
|
||||||
|
|
||||||
return sn;
|
return sn;
|
||||||
}
|
}
|
||||||
|
|
|
@ -906,14 +906,14 @@ static int smb_saved_info_init_count = 200;
|
||||||
static gint
|
static gint
|
||||||
smb_saved_info_equal_unmatched(gconstpointer k1, gconstpointer k2)
|
smb_saved_info_equal_unmatched(gconstpointer k1, gconstpointer k2)
|
||||||
{
|
{
|
||||||
register guint32 key1 = (guint32)k1;
|
register guint32 key1 = GPOINTER_TO_UINT(k1);
|
||||||
register guint32 key2 = (guint32)k2;
|
register guint32 key2 = GPOINTER_TO_UINT(k2);
|
||||||
return key1==key2;
|
return key1==key2;
|
||||||
}
|
}
|
||||||
static guint
|
static guint
|
||||||
smb_saved_info_hash_unmatched(gconstpointer k)
|
smb_saved_info_hash_unmatched(gconstpointer k)
|
||||||
{
|
{
|
||||||
register guint32 key = (guint32)k;
|
register guint32 key = GPOINTER_TO_UINT(k);
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3259,7 +3259,7 @@ dissect_read_file_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
|
||||||
if (!pinfo->fd->flags.visited) {
|
if (!pinfo->fd->flags.visited) {
|
||||||
/* remember the FID for the processing of the response */
|
/* remember the FID for the processing of the response */
|
||||||
si = (smb_info_t *)pinfo->private_data;
|
si = (smb_info_t *)pinfo->private_data;
|
||||||
si->sip->extra_info=(void *)fid;
|
si->sip->extra_info=GUINT_TO_POINTER(fid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read count */
|
/* read count */
|
||||||
|
@ -3384,7 +3384,7 @@ dissect_read_file_response(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
|
||||||
/* If we have seen the request, then print which FID this refers to */
|
/* If we have seen the request, then print which FID this refers to */
|
||||||
/* first check if we have seen the request */
|
/* first check if we have seen the request */
|
||||||
if(si->sip != NULL && si->sip->frame_req>0){
|
if(si->sip != NULL && si->sip->frame_req>0){
|
||||||
fid=(int)si->sip->extra_info;
|
fid=GPOINTER_TO_INT(si->sip->extra_info);
|
||||||
add_fid(tvb, pinfo, tree, 0, 0, (guint16) fid);
|
add_fid(tvb, pinfo, tree, 0, 0, (guint16) fid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5189,7 +5189,7 @@ dissect_read_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
|
||||||
if (!pinfo->fd->flags.visited) {
|
if (!pinfo->fd->flags.visited) {
|
||||||
/* remember the FID for the processing of the response */
|
/* remember the FID for the processing of the response */
|
||||||
si = (smb_info_t *)pinfo->private_data;
|
si = (smb_info_t *)pinfo->private_data;
|
||||||
si->sip->extra_info=(void *)fid;
|
si->sip->extra_info=GUINT_TO_POINTER(fid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* offset */
|
/* offset */
|
||||||
|
@ -5299,7 +5299,7 @@ dissect_read_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
/* If we have seen the request, then print which FID this refers to */
|
/* If we have seen the request, then print which FID this refers to */
|
||||||
/* first check if we have seen the request */
|
/* first check if we have seen the request */
|
||||||
if(si->sip != NULL && si->sip->frame_req>0){
|
if(si->sip != NULL && si->sip->frame_req>0){
|
||||||
fid=(int)si->sip->extra_info;
|
fid=GPOINTER_TO_INT(si->sip->extra_info);
|
||||||
add_fid(tvb, pinfo, tree, 0, 0, (guint16) fid);
|
add_fid(tvb, pinfo, tree, 0, 0, (guint16) fid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5403,7 +5403,7 @@ dissect_write_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
offset += 2;
|
offset += 2;
|
||||||
if (!pinfo->fd->flags.visited) {
|
if (!pinfo->fd->flags.visited) {
|
||||||
/* remember the FID for the processing of the response */
|
/* remember the FID for the processing of the response */
|
||||||
si->sip->extra_info=(void *)fid;
|
si->sip->extra_info=GUINT_TO_POINTER(fid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* offset */
|
/* offset */
|
||||||
|
@ -5476,10 +5476,10 @@ dissect_write_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
so we know that future Read/Writes to this
|
so we know that future Read/Writes to this
|
||||||
TID is (probably) DCERPC.
|
TID is (probably) DCERPC.
|
||||||
*/
|
*/
|
||||||
if(g_hash_table_lookup(si->ct->tid_service, (void *)si->tid)){
|
if(g_hash_table_lookup(si->ct->tid_service, GUINT_TO_POINTER(si->tid))){
|
||||||
g_hash_table_remove(si->ct->tid_service, (void *)si->tid);
|
g_hash_table_remove(si->ct->tid_service, GUINT_TO_POINTER(si->tid));
|
||||||
}
|
}
|
||||||
g_hash_table_insert(si->ct->tid_service, (void *)si->tid, (void *)TID_IPC);
|
g_hash_table_insert(si->ct->tid_service, GUINT_TO_POINTER(si->tid), (void *)TID_IPC);
|
||||||
}
|
}
|
||||||
if(si->sip){
|
if(si->sip){
|
||||||
si->sip->flags|=SMB_SIF_TID_IS_IPC;
|
si->sip->flags|=SMB_SIF_TID_IS_IPC;
|
||||||
|
@ -6334,13 +6334,13 @@ dissect_tree_connect_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
||||||
this tree */
|
this tree */
|
||||||
if(!pinfo->fd->flags.visited){
|
if(!pinfo->fd->flags.visited){
|
||||||
/* Remove any previous entry for this TID */
|
/* Remove any previous entry for this TID */
|
||||||
if(g_hash_table_lookup(si->ct->tid_service, (void *)si->tid)){
|
if(g_hash_table_lookup(si->ct->tid_service, GUINT_TO_POINTER(si->tid))){
|
||||||
g_hash_table_remove(si->ct->tid_service, (void *)si->tid);
|
g_hash_table_remove(si->ct->tid_service, GUINT_TO_POINTER(si->tid));
|
||||||
}
|
}
|
||||||
if(strcmp(an,"IPC") == 0){
|
if(strcmp(an,"IPC") == 0){
|
||||||
g_hash_table_insert(si->ct->tid_service, (void *)si->tid, (void *)TID_IPC);
|
g_hash_table_insert(si->ct->tid_service, GUINT_TO_POINTER(si->tid), (void *)TID_IPC);
|
||||||
} else {
|
} else {
|
||||||
g_hash_table_insert(si->ct->tid_service, (void *)si->tid, (void *)TID_NORMAL);
|
g_hash_table_insert(si->ct->tid_service, GUINT_TO_POINTER(si->tid), (void *)TID_NORMAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11516,10 +11516,10 @@ dissect_transaction_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
so we know that future Read/Writes to this
|
so we know that future Read/Writes to this
|
||||||
TID is (probably) DCERPC.
|
TID is (probably) DCERPC.
|
||||||
*/
|
*/
|
||||||
if(g_hash_table_lookup(si->ct->tid_service, (void *)si->tid)){
|
if(g_hash_table_lookup(si->ct->tid_service, GUINT_TO_POINTER(si->tid))){
|
||||||
g_hash_table_remove(si->ct->tid_service, (void *)si->tid);
|
g_hash_table_remove(si->ct->tid_service, GUINT_TO_POINTER(si->tid));
|
||||||
}
|
}
|
||||||
g_hash_table_insert(si->ct->tid_service, (void *)si->tid, (void *)TID_IPC);
|
g_hash_table_insert(si->ct->tid_service, GUINT_TO_POINTER(si->tid), (void *)TID_IPC);
|
||||||
} else if(strncmp("\\MAILSLOT\\", an, 10) == 0){
|
} else if(strncmp("\\MAILSLOT\\", an, 10) == 0){
|
||||||
if (tri != NULL)
|
if (tri != NULL)
|
||||||
tri->subcmd=TRANSACTION_MAILSLOT;
|
tri->subcmd=TRANSACTION_MAILSLOT;
|
||||||
|
@ -14662,7 +14662,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
||||||
last seen MID matching ours is the right one.
|
last seen MID matching ours is the right one.
|
||||||
This can fail but is better than nothing
|
This can fail but is better than nothing
|
||||||
*/
|
*/
|
||||||
sip=g_hash_table_lookup(si->ct->unmatched, (void *)pid_mid);
|
sip=g_hash_table_lookup(si->ct->unmatched, GUINT_TO_POINTER(pid_mid));
|
||||||
if(sip!=NULL){
|
if(sip!=NULL){
|
||||||
new_key = g_mem_chunk_alloc(smb_saved_info_key_chunk);
|
new_key = g_mem_chunk_alloc(smb_saved_info_key_chunk);
|
||||||
new_key->frame = pinfo->fd->num;
|
new_key->frame = pinfo->fd->num;
|
||||||
|
@ -14724,7 +14724,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
||||||
/* first see if we find an unmatched smb "equal" to
|
/* first see if we find an unmatched smb "equal" to
|
||||||
the current one
|
the current one
|
||||||
*/
|
*/
|
||||||
sip=g_hash_table_lookup(si->ct->unmatched, (void *)pid_mid);
|
sip=g_hash_table_lookup(si->ct->unmatched, GUINT_TO_POINTER(pid_mid));
|
||||||
if(sip!=NULL){
|
if(sip!=NULL){
|
||||||
gboolean cmd_match=FALSE;
|
gboolean cmd_match=FALSE;
|
||||||
|
|
||||||
|
@ -14768,7 +14768,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
||||||
SMBs of different cmds but with identical MID and PID values and
|
SMBs of different cmds but with identical MID and PID values and
|
||||||
if ethereal lost the first reply and the second request.
|
if ethereal lost the first reply and the second request.
|
||||||
*/
|
*/
|
||||||
g_hash_table_remove(si->ct->unmatched, (void *)pid_mid);
|
g_hash_table_remove(si->ct->unmatched, GUINT_TO_POINTER(pid_mid));
|
||||||
sip=NULL; /* XXX should free it as well */
|
sip=NULL; /* XXX should free it as well */
|
||||||
} else {
|
} else {
|
||||||
/* we have found a response to some
|
/* we have found a response to some
|
||||||
|
@ -14803,7 +14803,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
||||||
* 4, <- Response MID:5
|
* 4, <- Response MID:5
|
||||||
* We DONT want #4 to be presented as a response to #1
|
* We DONT want #4 to be presented as a response to #1
|
||||||
*/
|
*/
|
||||||
g_hash_table_remove(si->ct->unmatched, (void *)pid_mid);
|
g_hash_table_remove(si->ct->unmatched, GUINT_TO_POINTER(pid_mid));
|
||||||
} else {
|
} else {
|
||||||
/* We have already seen another response to this MID.
|
/* We have already seen another response to this MID.
|
||||||
Since the MID in reality is only something like 10 bits
|
Since the MID in reality is only something like 10 bits
|
||||||
|
@ -14822,13 +14822,13 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
||||||
sip->req_time.secs=pinfo->fd->abs_secs;
|
sip->req_time.secs=pinfo->fd->abs_secs;
|
||||||
sip->req_time.nsecs=pinfo->fd->abs_usecs*1000;
|
sip->req_time.nsecs=pinfo->fd->abs_usecs*1000;
|
||||||
sip->flags = 0;
|
sip->flags = 0;
|
||||||
if(g_hash_table_lookup(si->ct->tid_service, (void *)si->tid)
|
if(g_hash_table_lookup(si->ct->tid_service, GUINT_TO_POINTER(si->tid))
|
||||||
== (void *)TID_IPC) {
|
== (void *)TID_IPC) {
|
||||||
sip->flags |= SMB_SIF_TID_IS_IPC;
|
sip->flags |= SMB_SIF_TID_IS_IPC;
|
||||||
}
|
}
|
||||||
sip->cmd = si->cmd;
|
sip->cmd = si->cmd;
|
||||||
sip->extra_info = NULL;
|
sip->extra_info = NULL;
|
||||||
g_hash_table_insert(si->ct->unmatched, (void *)pid_mid, sip);
|
g_hash_table_insert(si->ct->unmatched, GUINT_TO_POINTER(pid_mid), sip);
|
||||||
new_key = g_mem_chunk_alloc(smb_saved_info_key_chunk);
|
new_key = g_mem_chunk_alloc(smb_saved_info_key_chunk);
|
||||||
new_key->frame = sip->frame_req;
|
new_key->frame = sip->frame_req;
|
||||||
new_key->pid_mid = pid_mid;
|
new_key->pid_mid = pid_mid;
|
||||||
|
|
|
@ -436,14 +436,14 @@ scan_for_next_pdu(tvbuff_t *tvb, proto_tree *tcp_tree, packet_info *pinfo, int o
|
||||||
tnp->last_frame_time.secs=pinfo->fd->abs_secs;
|
tnp->last_frame_time.secs=pinfo->fd->abs_secs;
|
||||||
tnp->last_frame_time.nsecs=pinfo->fd->abs_usecs*1000;
|
tnp->last_frame_time.nsecs=pinfo->fd->abs_usecs*1000;
|
||||||
g_hash_table_insert(tcp_pdu_skipping_table,
|
g_hash_table_insert(tcp_pdu_skipping_table,
|
||||||
(void *)pinfo->fd->num, (void *)tnp);
|
GINT_TO_POINTER(pinfo->fd->num), (void *)tnp);
|
||||||
print_pdu_tracking_data(pinfo, tvb, tcp_tree, tnp);
|
print_pdu_tracking_data(pinfo, tvb, tcp_tree, tnp);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(seq<tnp->nxtpdu && nxtseq>tnp->nxtpdu){
|
if(seq<tnp->nxtpdu && nxtseq>tnp->nxtpdu){
|
||||||
g_hash_table_insert(tcp_pdu_tracking_table,
|
g_hash_table_insert(tcp_pdu_tracking_table,
|
||||||
(void *)pinfo->fd->num, (void *)tnp->nxtpdu);
|
GINT_TO_POINTER(pinfo->fd->num), (void *)tnp->nxtpdu);
|
||||||
offset+=tnp->nxtpdu-seq;
|
offset+=tnp->nxtpdu-seq;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -451,7 +451,7 @@ scan_for_next_pdu(tvbuff_t *tvb, proto_tree *tcp_tree, packet_info *pinfo, int o
|
||||||
} else {
|
} else {
|
||||||
guint32 pduseq;
|
guint32 pduseq;
|
||||||
|
|
||||||
tnp=(struct tcp_next_pdu *)g_hash_table_lookup(tcp_pdu_time_table, (void *)pinfo->fd->num);
|
tnp=(struct tcp_next_pdu *)g_hash_table_lookup(tcp_pdu_time_table, GINT_TO_POINTER(pinfo->fd->num));
|
||||||
if(tnp){
|
if(tnp){
|
||||||
proto_item *item;
|
proto_item *item;
|
||||||
nstime_t ns;
|
nstime_t ns;
|
||||||
|
@ -472,13 +472,13 @@ scan_for_next_pdu(tvbuff_t *tvb, proto_tree *tcp_tree, packet_info *pinfo, int o
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if this is a segment in the middle of a pdu */
|
/* check if this is a segment in the middle of a pdu */
|
||||||
tnp=(struct tcp_next_pdu *)g_hash_table_lookup(tcp_pdu_skipping_table, (void *)pinfo->fd->num);
|
tnp=(struct tcp_next_pdu *)g_hash_table_lookup(tcp_pdu_skipping_table, GINT_TO_POINTER(pinfo->fd->num));
|
||||||
if(tnp){
|
if(tnp){
|
||||||
print_pdu_tracking_data(pinfo, tvb, tcp_tree, tnp);
|
print_pdu_tracking_data(pinfo, tvb, tcp_tree, tnp);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pduseq=(guint32)g_hash_table_lookup(tcp_pdu_tracking_table, (void *)pinfo->fd->num);
|
pduseq=(guint32)g_hash_table_lookup(tcp_pdu_tracking_table, GINT_TO_POINTER(pinfo->fd->num));
|
||||||
if(pduseq){
|
if(pduseq){
|
||||||
offset+=pduseq-seq;
|
offset+=pduseq-seq;
|
||||||
}
|
}
|
||||||
|
@ -525,7 +525,7 @@ pdu_store_sequencenumber_of_next_pdu(packet_info *pinfo, guint32 seq, guint32 nx
|
||||||
Add check for ACKs and purge list of sequence numbers
|
Add check for ACKs and purge list of sequence numbers
|
||||||
already acked.
|
already acked.
|
||||||
*/
|
*/
|
||||||
g_hash_table_insert(tcp_pdu_time_table, (void *)pinfo->fd->num, (void *)tnp);
|
g_hash_table_insert(tcp_pdu_time_table, GINT_TO_POINTER(pinfo->fd->num), (void *)tnp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is called for SYN+ACK packets and the purpose is to verify that we
|
/* This is called for SYN+ACK packets and the purpose is to verify that we
|
||||||
|
@ -576,7 +576,7 @@ tcp_get_relative_seq_ack(guint32 frame, guint32 *seq, guint32 *ack, guint32 *win
|
||||||
{
|
{
|
||||||
struct tcp_rel_seq *trs;
|
struct tcp_rel_seq *trs;
|
||||||
|
|
||||||
trs=g_hash_table_lookup(tcp_rel_seq_table, (void *)frame);
|
trs=g_hash_table_lookup(tcp_rel_seq_table, GUINT_TO_POINTER(frame));
|
||||||
if(!trs){
|
if(!trs){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -593,7 +593,7 @@ tcp_analyze_get_acked_struct(guint32 frame, gboolean createflag)
|
||||||
{
|
{
|
||||||
struct tcp_acked *ta;
|
struct tcp_acked *ta;
|
||||||
|
|
||||||
ta=g_hash_table_lookup(tcp_analyze_acked_table, (void *)frame);
|
ta=g_hash_table_lookup(tcp_analyze_acked_table, GUINT_TO_POINTER(frame));
|
||||||
if((!ta) && createflag){
|
if((!ta) && createflag){
|
||||||
ta=g_mem_chunk_alloc(tcp_acked_chunk);
|
ta=g_mem_chunk_alloc(tcp_acked_chunk);
|
||||||
ta->frame_acked=0;
|
ta->frame_acked=0;
|
||||||
|
@ -602,7 +602,7 @@ tcp_analyze_get_acked_struct(guint32 frame, gboolean createflag)
|
||||||
ta->flags=0;
|
ta->flags=0;
|
||||||
ta->dupack_num=0;
|
ta->dupack_num=0;
|
||||||
ta->dupack_frame=0;
|
ta->dupack_frame=0;
|
||||||
g_hash_table_insert(tcp_analyze_acked_table, (void *)frame, ta);
|
g_hash_table_insert(tcp_analyze_acked_table, GUINT_TO_POINTER(frame), ta);
|
||||||
}
|
}
|
||||||
return ta;
|
return ta;
|
||||||
}
|
}
|
||||||
|
@ -1230,7 +1230,7 @@ ack_finished:
|
||||||
trs->seq_base=base_seq;
|
trs->seq_base=base_seq;
|
||||||
trs->ack_base=base_ack;
|
trs->ack_base=base_ack;
|
||||||
trs->win_scale=win_scale1;
|
trs->win_scale=win_scale1;
|
||||||
g_hash_table_insert(tcp_rel_seq_table, (void *)pinfo->fd->num, trs);
|
g_hash_table_insert(tcp_rel_seq_table, GINT_TO_POINTER(pinfo->fd->num), trs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1391,15 +1391,15 @@ free_all_acked(gpointer key_arg _U_, gpointer value _U_, gpointer user_data _U_)
|
||||||
static guint
|
static guint
|
||||||
tcp_acked_hash(gconstpointer k)
|
tcp_acked_hash(gconstpointer k)
|
||||||
{
|
{
|
||||||
guint32 frame = (guint32)k;
|
guint32 frame = GPOINTER_TO_UINT(k);
|
||||||
|
|
||||||
return frame;
|
return frame;
|
||||||
}
|
}
|
||||||
static gint
|
static gint
|
||||||
tcp_acked_equal(gconstpointer k1, gconstpointer k2)
|
tcp_acked_equal(gconstpointer k1, gconstpointer k2)
|
||||||
{
|
{
|
||||||
guint32 frame1 = (guint32)k1;
|
guint32 frame1 = GPOINTER_TO_UINT(k1);
|
||||||
guint32 frame2 = (guint32)k2;
|
guint32 frame2 = GPOINTER_TO_UINT(k2);
|
||||||
|
|
||||||
return frame1==frame2;
|
return frame1==frame2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1028,7 +1028,7 @@ dissect_tds_col_info_token(tvbuff_t *tvb, struct _netlib_data *nl_data, guint of
|
||||||
* TODO: check we don't go past end of the token
|
* TODO: check we don't go past end of the token
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
read_results_tds5(tvbuff_t *tvb, struct _netlib_data *nl_data, guint offset, guint len)
|
read_results_tds5(tvbuff_t *tvb, struct _netlib_data *nl_data, guint offset, guint len _U_)
|
||||||
{
|
{
|
||||||
guint name_len;
|
guint name_len;
|
||||||
guint cur;
|
guint cur;
|
||||||
|
@ -1206,7 +1206,7 @@ dissect_tds_env_chg(tvbuff_t *tvb, guint offset, guint token_sz,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dissect_tds_err_token(tvbuff_t *tvb, guint offset, guint token_sz, proto_tree *tree)
|
dissect_tds_err_token(tvbuff_t *tvb, guint offset, guint token_sz _U_, proto_tree *tree)
|
||||||
{
|
{
|
||||||
guint16 msg_len;
|
guint16 msg_len;
|
||||||
guint8 srvr_len, proc_len;
|
guint8 srvr_len, proc_len;
|
||||||
|
|
|
@ -2894,7 +2894,7 @@ static void dissect_x11_initial_conn(tvbuff_t *tvb, packet_info *pinfo,
|
||||||
* ...and we're expecting a reply to it.
|
* ...and we're expecting a reply to it.
|
||||||
*/
|
*/
|
||||||
state->sequencenumber = 0;
|
state->sequencenumber = 0;
|
||||||
g_hash_table_insert(state->seqtable, (int *)state->sequencenumber,
|
g_hash_table_insert(state->seqtable, GINT_TO_POINTER(state->sequencenumber),
|
||||||
(int *)INITIAL_CONN);
|
(int *)INITIAL_CONN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3013,13 +3013,13 @@ static void dissect_x11_request(tvbuff_t *tvb, packet_info *pinfo,
|
||||||
if (state->opcode_vals[i].strptr == NULL) {
|
if (state->opcode_vals[i].strptr == NULL) {
|
||||||
state->opcode_vals[i].strptr = name;
|
state->opcode_vals[i].strptr = name;
|
||||||
g_hash_table_insert(state->valtable,
|
g_hash_table_insert(state->valtable,
|
||||||
(int *)state->sequencenumber,
|
GINT_TO_POINTER(state->sequencenumber),
|
||||||
(int *)&state->opcode_vals[i]);
|
(int *)&state->opcode_vals[i]);
|
||||||
break;
|
break;
|
||||||
} else if (strcmp(state->opcode_vals[i].strptr,
|
} else if (strcmp(state->opcode_vals[i].strptr,
|
||||||
name) == 0) {
|
name) == 0) {
|
||||||
g_hash_table_insert(state->valtable,
|
g_hash_table_insert(state->valtable,
|
||||||
(int *)state->sequencenumber,
|
GINT_TO_POINTER(state->sequencenumber),
|
||||||
(int *)&state->opcode_vals[i]);
|
(int *)&state->opcode_vals[i]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3071,7 +3071,7 @@ static void dissect_x11_request(tvbuff_t *tvb, packet_info *pinfo,
|
||||||
* Those requests expect a reply.
|
* Those requests expect a reply.
|
||||||
*/
|
*/
|
||||||
g_hash_table_insert(state->seqtable,
|
g_hash_table_insert(state->seqtable,
|
||||||
(int *)state->sequencenumber,
|
GINT_TO_POINTER(state->sequencenumber),
|
||||||
(int *)opcode);
|
(int *)opcode);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -3082,7 +3082,7 @@ static void dissect_x11_request(tvbuff_t *tvb, packet_info *pinfo,
|
||||||
*/
|
*/
|
||||||
if (opcode >= X_FirstExtension && opcode <= X_LastExtension) {
|
if (opcode >= X_FirstExtension && opcode <= X_LastExtension) {
|
||||||
g_hash_table_insert(state->seqtable,
|
g_hash_table_insert(state->seqtable,
|
||||||
(int *)state->sequencenumber,
|
GINT_TO_POINTER(state->sequencenumber),
|
||||||
(int *)opcode);
|
(int *)opcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4168,7 +4168,7 @@ static void dissect_x11_requests(tvbuff_t *tvb, packet_info *pinfo,
|
||||||
|
|
||||||
if (state->iconn_frame == pinfo->fd->num ||
|
if (state->iconn_frame == pinfo->fd->num ||
|
||||||
(g_hash_table_lookup(state->seqtable,
|
(g_hash_table_lookup(state->seqtable,
|
||||||
(int *)state->sequencenumber) == (int *)NOTHING_SEEN &&
|
GINT_TO_POINTER(state->sequencenumber)) == (int *)NOTHING_SEEN &&
|
||||||
(opcode == 'B' || opcode == 'l') &&
|
(opcode == 'B' || opcode == 'l') &&
|
||||||
(plen == 11 || plen == 2816))) {
|
(plen == 11 || plen == 2816))) {
|
||||||
/*
|
/*
|
||||||
|
@ -4474,7 +4474,7 @@ dissect_x11_replies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
* - event (some event occured)
|
* - event (some event occured)
|
||||||
*/
|
*/
|
||||||
if (g_hash_table_lookup(state->seqtable,
|
if (g_hash_table_lookup(state->seqtable,
|
||||||
(int *)state->sequencenumber) == (int *)INITIAL_CONN
|
GINT_TO_POINTER(state->sequencenumber)) == (int *)INITIAL_CONN
|
||||||
|| (state->iconn_reply == pinfo->fd->num)) {
|
|| (state->iconn_reply == pinfo->fd->num)) {
|
||||||
/*
|
/*
|
||||||
* Either the connection is in the "initial
|
* Either the connection is in the "initial
|
||||||
|
@ -4567,7 +4567,7 @@ dissect_x11_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
|
|
||||||
sequence_number = VALUE16(tvb, offset + 2);
|
sequence_number = VALUE16(tvb, offset + 2);
|
||||||
opcode = (int)g_hash_table_lookup(state->seqtable,
|
opcode = (int)g_hash_table_lookup(state->seqtable,
|
||||||
(int *)sequence_number);
|
GINT_TO_POINTER(sequence_number));
|
||||||
|
|
||||||
if (state->iconn_frame == 0 && state->resync == FALSE) {
|
if (state->iconn_frame == 0 && state->resync == FALSE) {
|
||||||
|
|
||||||
|
@ -4618,12 +4618,12 @@ dissect_x11_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
}
|
}
|
||||||
|
|
||||||
vals_p = g_hash_table_lookup(state->valtable,
|
vals_p = g_hash_table_lookup(state->valtable,
|
||||||
(int *)sequence_number);
|
GINT_TO_POINTER(sequence_number));
|
||||||
if (vals_p != NULL) {
|
if (vals_p != NULL) {
|
||||||
major_opcode = VALUE8(tvb, offset + 9);
|
major_opcode = VALUE8(tvb, offset + 9);
|
||||||
vals_p->value = major_opcode;
|
vals_p->value = major_opcode;
|
||||||
g_hash_table_remove(state->valtable,
|
g_hash_table_remove(state->valtable,
|
||||||
(int *)sequence_number);
|
GINT_TO_POINTER(sequence_number));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ static guint h225ras_call_hash(gconstpointer k)
|
||||||
{
|
{
|
||||||
const h225ras_call_info_key* key = (const h225ras_call_info_key*) k;
|
const h225ras_call_info_key* key = (const h225ras_call_info_key*) k;
|
||||||
|
|
||||||
return key->reqSeqNum + (guint32)(key->conversation);
|
return key->reqSeqNum + GPOINTER_TO_UINT(key->conversation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -661,7 +661,7 @@ dissect_sdt(tvbuff_t *tvb, guint offset, proto_tree *tree, acn_pdu_history_t* pa
|
||||||
}
|
}
|
||||||
|
|
||||||
static guint
|
static guint
|
||||||
dissect_dmp(tvbuff_t *tvb, guint offset, proto_tree *tree, acn_pdu_history_t* parent_hist, guint max_size)
|
dissect_dmp(tvbuff_t *tvb _U_, guint offset _U_, proto_tree *tree _U_, acn_pdu_history_t* parent_hist _U_, guint max_size _U_)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1729,7 +1729,7 @@ parse_tt3(tvbuff_t *tvb, guint offset, guint size, guint level, GNode *ptr)
|
||||||
|
|
||||||
while(offset < eos) {
|
while(offset < eos) {
|
||||||
if (ptr) /* build pointer tree to all asn1 enteties */
|
if (ptr) /* build pointer tree to all asn1 enteties */
|
||||||
cur_node = g_node_append_data(ptr, (void *)offset);
|
cur_node = g_node_append_data(ptr, GUINT_TO_POINTER(offset));
|
||||||
|
|
||||||
asn1_open(&asn1, tvb, offset);
|
asn1_open(&asn1, tvb, offset);
|
||||||
ret = asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len);
|
ret = asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len);
|
||||||
|
@ -2171,10 +2171,10 @@ define_constraint(GNode *p, GNode *q)
|
||||||
|
|
||||||
p = g_node_first_child(p);
|
p = g_node_first_child(p);
|
||||||
|
|
||||||
range->from = get_asn1_int(0, (guint)p->data);
|
range->from = get_asn1_int(0, GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
|
|
||||||
range->to = get_asn1_int(1, (guint)p->data);
|
range->to = get_asn1_int(1, GPOINTER_TO_UINT(p->data));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2190,10 +2190,10 @@ define_namednumber(GNode *p, GNode *q)
|
||||||
|
|
||||||
p = g_node_first_child(p);
|
p = g_node_first_child(p);
|
||||||
|
|
||||||
num->name = get_asn1_string(0, (guint)p->data);
|
num->name = get_asn1_string(0, GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
|
|
||||||
num->value = get_asn1_int(1, (guint)p->data);
|
num->value = get_asn1_int(1, GPOINTER_TO_UINT(p->data));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2208,10 +2208,10 @@ define_typeref(GNode *p, GNode *q)
|
||||||
|
|
||||||
p = g_node_first_child(p);
|
p = g_node_first_child(p);
|
||||||
|
|
||||||
ref->typeDefId = get_asn1_uint((guint)p->data);
|
ref->typeDefId = get_asn1_uint(GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
|
|
||||||
ref->implicit = get_asn1_int(ASN1_BOL, (guint)p->data);
|
ref->implicit = get_asn1_int(ASN1_BOL, GPOINTER_TO_UINT(p->data));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2226,10 +2226,10 @@ define_tag(GNode *p, GNode *q)
|
||||||
|
|
||||||
p = g_node_first_child(p);
|
p = g_node_first_child(p);
|
||||||
|
|
||||||
type->tclass = get_asn1_int(ASN1_ENUM, (guint)p->data);
|
type->tclass = get_asn1_int(ASN1_ENUM, GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
|
|
||||||
type->code = get_asn1_int(ASN1_INT, (guint)p->data);
|
type->code = get_asn1_int(ASN1_INT, GPOINTER_TO_UINT(p->data));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2245,13 +2245,13 @@ define_type(GNode *p, GNode *q)
|
||||||
|
|
||||||
/* g_message("define_type %p, %p", p, q); */
|
/* g_message("define_type %p, %p", p, q); */
|
||||||
|
|
||||||
type->typeId = get_asn1_int(0, (guint)p->data);
|
type->typeId = get_asn1_int(0, GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
|
|
||||||
type->optional = get_asn1_int(1, (guint)p->data);
|
type->optional = get_asn1_int(1, GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
|
|
||||||
if (check_tag(2, (guint)p->data)) { /* optional, need empty node if not there ?*/
|
if (check_tag(2, GPOINTER_TO_UINT(p->data))) { /* optional, need empty node if not there ?*/
|
||||||
r = g_node_first_child(p);
|
r = g_node_first_child(p);
|
||||||
while (r) {
|
while (r) {
|
||||||
define_tag(r, t);
|
define_tag(r, t);
|
||||||
|
@ -2260,15 +2260,15 @@ define_type(GNode *p, GNode *q)
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!check_tag(3, (guint)p->data)) {
|
if (!check_tag(3, GPOINTER_TO_UINT(p->data))) {
|
||||||
g_warning("expect tag 3, ERROR");
|
g_warning("expect tag 3, ERROR");
|
||||||
}
|
}
|
||||||
r = g_node_first_child(p);
|
r = g_node_first_child(p);
|
||||||
/* a choice ... */
|
/* a choice ... */
|
||||||
type->content = TBLTYPETYPE_None;
|
type->content = TBLTYPETYPE_None;
|
||||||
if (check_tag(0, (guint)r->data)) type->content = TBLTYPETYPE_Primitive;
|
if (check_tag(0, GPOINTER_TO_UINT(r->data))) type->content = TBLTYPETYPE_Primitive;
|
||||||
if (check_tag(1, (guint)r->data)) type->content = TBLTYPETYPE_Elements;
|
if (check_tag(1, GPOINTER_TO_UINT(r->data))) type->content = TBLTYPETYPE_Elements;
|
||||||
if (check_tag(2, (guint)r->data)) type->content = TBLTYPETYPE_TypeRef;
|
if (check_tag(2, GPOINTER_TO_UINT(r->data))) type->content = TBLTYPETYPE_TypeRef;
|
||||||
switch(type->content) {
|
switch(type->content) {
|
||||||
case TBLTYPETYPE_Primitive:
|
case TBLTYPETYPE_Primitive:
|
||||||
break;
|
break;
|
||||||
|
@ -2290,21 +2290,21 @@ define_type(GNode *p, GNode *q)
|
||||||
|
|
||||||
type->fieldName = 0;
|
type->fieldName = 0;
|
||||||
type->anonymous = FALSE;
|
type->anonymous = FALSE;
|
||||||
if (p && check_tag(4, (guint)p->data)) {
|
if (p && check_tag(4, GPOINTER_TO_UINT(p->data))) {
|
||||||
type->fieldName = get_asn1_string(4, (guint)p->data);
|
type->fieldName = get_asn1_string(4, GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
} else {
|
} else {
|
||||||
type->anonymous = TRUE;
|
type->anonymous = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
type->constraint = FALSE;
|
type->constraint = FALSE;
|
||||||
if (p && check_tag(5, (guint)p->data)) {
|
if (p && check_tag(5, GPOINTER_TO_UINT(p->data))) {
|
||||||
type->constraint = TRUE;
|
type->constraint = TRUE;
|
||||||
define_constraint(p, t);
|
define_constraint(p, t);
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p && check_tag(6, (guint)p->data)) {
|
if (p && check_tag(6, GPOINTER_TO_UINT(p->data))) {
|
||||||
r = g_node_first_child(p);
|
r = g_node_first_child(p);
|
||||||
while(r) {
|
while(r) {
|
||||||
define_namednumber(r, t);
|
define_namednumber(r, t);
|
||||||
|
@ -2326,10 +2326,10 @@ define_typedef(GNode *p, GNode *q)
|
||||||
|
|
||||||
p = g_node_first_child(p);
|
p = g_node_first_child(p);
|
||||||
|
|
||||||
type_def->typeDefId = get_asn1_uint((guint)p->data);
|
type_def->typeDefId = get_asn1_uint(GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
|
|
||||||
type_def->typeName = get_asn1_string(ASN1_PRNSTR, (guint)p->data);
|
type_def->typeName = get_asn1_string(ASN1_PRNSTR, GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
|
|
||||||
define_type(g_node_first_child(p), t);
|
define_type(g_node_first_child(p), t);
|
||||||
|
@ -2351,16 +2351,16 @@ define_module(GNode *p, GNode *q)
|
||||||
|
|
||||||
p = g_node_first_child(p);
|
p = g_node_first_child(p);
|
||||||
|
|
||||||
module->name = get_asn1_string(0, (guint)p->data);
|
module->name = get_asn1_string(0, GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
|
|
||||||
module->id = 0;
|
module->id = 0;
|
||||||
if (check_tag(1, (guint)p->data)) { /* optional */
|
if (check_tag(1, GPOINTER_TO_UINT(p->data))) { /* optional */
|
||||||
module->id = get_asn1_oid(1, (guint)p->data);
|
module->id = get_asn1_oid(1, GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
module->isUseful = get_asn1_int(2, (guint)p->data);
|
module->isUseful = get_asn1_int(2, GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
|
|
||||||
p = g_node_first_child(p);
|
p = g_node_first_child(p);
|
||||||
|
@ -2527,17 +2527,17 @@ get_values(void) /* collect values from ASN.1 tree */
|
||||||
p = g_node_first_child(asn1_nodes); /* top of the data tree */
|
p = g_node_first_child(asn1_nodes); /* top of the data tree */
|
||||||
|
|
||||||
p = g_node_first_child(p);
|
p = g_node_first_child(p);
|
||||||
TT.totalNumModules = get_asn1_uint((guint)p->data);
|
TT.totalNumModules = get_asn1_uint(GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
TT.totalNumTypeDefs = get_asn1_uint((guint)p->data);
|
TT.totalNumTypeDefs = get_asn1_uint(GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
TT.totalNumTypes = get_asn1_uint((guint)p->data);
|
TT.totalNumTypes = get_asn1_uint(GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
TT.totalNumTags = get_asn1_uint((guint)p->data);
|
TT.totalNumTags = get_asn1_uint(GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
TT.totalNumStrings = get_asn1_uint((guint)p->data);
|
TT.totalNumStrings = get_asn1_uint(GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
TT.totalLenStrings = get_asn1_uint((guint)p->data);
|
TT.totalLenStrings = get_asn1_uint(GPOINTER_TO_UINT(p->data));
|
||||||
p = g_node_next_sibling(p);
|
p = g_node_next_sibling(p);
|
||||||
|
|
||||||
p = g_node_first_child(p);
|
p = g_node_first_child(p);
|
||||||
|
|
Loading…
Reference in New Issue