aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-11-20 08:59:19 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-11-20 08:59:19 +0000
commit42b44648c89781aa449d3add9dcb3348ffb53513 (patch)
tree4c1a556bd566020b428a6c6664dcd0fcbfed1238
parent56903273cc78a604fc1b90b1cba4c17eda290dd3 (diff)
Get rid of Warnings.
svn path=/trunk/; revision=39954
-rw-r--r--asn1/ldap/ldap.cnf22
-rw-r--r--asn1/ldap/packet-ldap-template.c40
-rw-r--r--asn1/pkcs12/packet-pkcs12-template.c8
-rw-r--r--asn1/snmp/packet-snmp-template.c32
-rw-r--r--asn1/t125/packet-t125-template.c12
-rw-r--r--asn1/tcap/packet-tcap-template.c16
-rw-r--r--asn1/tcap/tcap.cnf4
-rw-r--r--asn1/tetra/packet-tetra-template.h1
-rw-r--r--epan/dissectors/packet-amqp.c50
-rw-r--r--epan/dissectors/packet-ldap.c62
-rw-r--r--epan/dissectors/packet-per.c6
-rw-r--r--epan/dissectors/packet-pkcs12.c8
-rw-r--r--epan/dissectors/packet-sgsap.c2
-rw-r--r--epan/dissectors/packet-sip.c4
-rw-r--r--epan/dissectors/packet-snmp.c32
-rw-r--r--epan/dissectors/packet-tcap.c20
-rw-r--r--epan/dissectors/packet-tetra.h41
17 files changed, 201 insertions, 159 deletions
diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf
index 2955f5b133..fce9fb7aa7 100644
--- a/asn1/ldap/ldap.cnf
+++ b/asn1/ldap/ldap.cnf
@@ -214,7 +214,7 @@ char *mechanism = NULL;
tvbuff_t *parameter_tvb;
ldap_conv_info_t *ldap_info;
-gint8 class;
+gint8 ber_class;
gboolean pc;
gint32 tag;
@@ -224,10 +224,10 @@ gint32 tag;
return offset;
ldap_info = actx->pinfo->private_data;
- get_ber_identifier(parameter_tvb, 0, &class, &pc, &tag);
+ get_ber_identifier(parameter_tvb, 0, &ber_class, &pc, &tag);
- /*if ((ldap_info->auth_mech != NULL) && (strcmp(ldap_info->auth_mech, "GSS-SPNEGO") == 0) && (class==BER_CLASS_CON)) {*/
- if ((ldap_info->auth_mech != NULL) && (class==BER_CLASS_CON)) {
+ /*if ((ldap_info->auth_mech != NULL) && (strcmp(ldap_info->auth_mech, "GSS-SPNEGO") == 0) && (ber_class==BER_CLASS_CON)) {*/
+ if ((ldap_info->auth_mech != NULL) && (ber_class==BER_CLASS_CON)) {
/*
* This is a GSS-API token ancapsulated within GSS-SPNEGO.
* We need to check the first byte to check whether the blob
@@ -238,8 +238,8 @@ gint32 tag;
if (parameter_tvb && (tvb_length(parameter_tvb) > 0))
call_dissector(spnego_handle, parameter_tvb, actx->pinfo, tree);
}
- /*if ((ldap_info->auth_mech != NULL) && ((strcmp(ldap_info->auth_mech, "GSSAPI") == 0) || (class==BER_CLASS_APP))) {*/
- if ((ldap_info->auth_mech != NULL) && (class==BER_CLASS_APP)) {
+ /*if ((ldap_info->auth_mech != NULL) && ((strcmp(ldap_info->auth_mech, "GSSAPI") == 0) || (ber_class==BER_CLASS_APP))) {*/
+ if ((ldap_info->auth_mech != NULL) && (ber_class==BER_CLASS_APP)) {
/*
* This is a raw GSS-API token.
*/
@@ -258,7 +258,7 @@ ldap_conv_info_t *ldap_info;
%(DEFAULT_BODY)s
if (!parameter_tvb)
return offset;
- ldap_info = actx->pinfo->private_data;
+ ldap_info = (ldap_conv_info_t *)actx->pinfo->private_data;
switch (ldap_info->auth_type) {
/* For Kerberos V4, dissect it as a ticket. */
@@ -732,14 +732,14 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v
return offset;
#.FN_BODY Control/controlValue
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind;
gint32 tag;
guint32 len;
if((object_identifier_id != NULL) && oid_has_dissector(object_identifier_id)) {
/* remove the OCTET STRING encoding */
- offset=dissect_ber_identifier(actx->pinfo, NULL, tvb, offset, &class, &pc, &tag);
+ offset=dissect_ber_identifier(actx->pinfo, NULL, tvb, offset, &ber_class, &pc, &tag);
offset=dissect_ber_length(actx->pinfo, NULL, tvb, offset, &len, &ind);
call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
@@ -776,7 +776,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v
}
#.FN_BODY DirSyncFlags
- gint8 class;
+ gint8 ber_class;
gboolean pc;
gint32 tag;
guint32 len;
@@ -785,7 +785,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v
int otheroffset = offset;
if(!implicit_tag){
- otheroffset=dissect_ber_identifier(actx->pinfo, tree, tvb, otheroffset, &class, &pc, &tag);
+ otheroffset=dissect_ber_identifier(actx->pinfo, tree, tvb, otheroffset, &ber_class, &pc, &tag);
otheroffset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, NULL);
} else {
gint32 remaining=tvb_length_remaining(tvb, offset);
diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c
index dda3d153b9..63b06789cb 100644
--- a/asn1/ldap/packet-ldap-template.c
+++ b/asn1/ldap/packet-ldap-template.c
@@ -301,7 +301,7 @@ static ldap_conv_info_t *ldap_info_items;
static guint
ldap_info_hash_matched(gconstpointer k)
{
- const ldap_call_response_t *key = k;
+ const ldap_call_response_t *key = (const ldap_call_response_t *)k;
return key->messageId;
}
@@ -309,8 +309,8 @@ ldap_info_hash_matched(gconstpointer k)
static gint
ldap_info_equal_matched(gconstpointer k1, gconstpointer k2)
{
- const ldap_call_response_t *key1 = k1;
- const ldap_call_response_t *key2 = k2;
+ const ldap_call_response_t *key1 = (const ldap_call_response_t*)k1;
+ const ldap_call_response_t *key2 = (const ldap_call_response_t*)k2;
if( key1->req_frame && key2->req_frame && (key1->req_frame!=key2->req_frame) ){
return 0;
@@ -327,7 +327,7 @@ ldap_info_equal_matched(gconstpointer k1, gconstpointer k2)
static guint
ldap_info_hash_unmatched(gconstpointer k)
{
- const ldap_call_response_t *key = k;
+ const ldap_call_response_t *key = (const ldap_call_response_t*)k;
return key->messageId;
}
@@ -335,8 +335,8 @@ ldap_info_hash_unmatched(gconstpointer k)
static gint
ldap_info_equal_unmatched(gconstpointer k1, gconstpointer k2)
{
- const ldap_call_response_t *key1 = k1;
- const ldap_call_response_t *key2 = k2;
+ const ldap_call_response_t *key1 = (const ldap_call_response_t*)k1;
+ const ldap_call_response_t *key2 = (const ldap_call_response_t*)k2;
return key1->messageId==key2->messageId;
}
@@ -454,14 +454,14 @@ static char *ldapvalue_string=NULL;
static int
dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index)
{
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind, is_ascii;
gint32 tag;
guint32 len, i;
const guchar *str;
if(!implicit_tag){
- offset=get_ber_identifier(tvb, offset, &class, &pc, &tag);
+ offset=get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
offset=get_ber_length(tvb, offset, &len, &ind);
} else {
len=tvb_length_remaining(tvb,offset);
@@ -646,7 +646,7 @@ ldap_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
lcr.rep_frame=pinfo->fd->num;
break;
}
- lcrp=g_hash_table_lookup(ldap_info->matched, &lcr);
+ lcrp=(ldap_call_response_t *)g_hash_table_lookup(ldap_info->matched, &lcr);
if(lcrp){
@@ -672,7 +672,7 @@ ldap_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
unmatched list and if so remove it */
lcr.messageId=messageId;
- lcrp=g_hash_table_lookup(ldap_info->unmatched, &lcr);
+ lcrp=(ldap_call_response_t *)g_hash_table_lookup(ldap_info->unmatched, &lcr);
if(lcrp){
g_hash_table_remove(ldap_info->unmatched, lcrp);
}
@@ -704,7 +704,7 @@ ldap_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
/* this is a result - it should be in our unmatched list */
lcr.messageId=messageId;
- lcrp=g_hash_table_lookup(ldap_info->unmatched, &lcr);
+ lcrp=(ldap_call_response_t *)g_hash_table_lookup(ldap_info->unmatched, &lcr);
if(lcrp){
@@ -755,7 +755,7 @@ dissect_ldap_payload(tvbuff_t *tvb, packet_info *pinfo,
guint headerLength = 0;
guint length = 0;
tvbuff_t *msg_tvb = NULL;
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind = 0;
gint32 ber_tag;
@@ -772,13 +772,13 @@ one_more_pdu:
* OK, try to read the "Sequence Of" header; this gets the total
* length of the LDAP message.
*/
- messageOffset = get_ber_identifier(tvb, offset, &class, &pc, &ber_tag);
+ messageOffset = get_ber_identifier(tvb, offset, &ber_class, &pc, &ber_tag);
messageOffset = get_ber_length(tvb, messageOffset, &msg_len, &ind);
/* sanity check */
if((msg_len<4) || (msg_len>10000000)) return;
- if ( (class==BER_CLASS_UNI) && (ber_tag==BER_UNI_TAG_SEQUENCE) ) {
+ if ( (ber_class==BER_CLASS_UNI) && (ber_tag==BER_UNI_TAG_SEQUENCE) ) {
/*
* Add the length of the "Sequence Of" header to the message
* length.
@@ -868,7 +868,7 @@ dissect_ldap_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean i
/*
* Do we already have a type and mechanism?
*/
- ldap_info = conversation_get_proto_data(conversation, proto_ldap);
+ ldap_info = (ldap_conv_info_t *)conversation_get_proto_data(conversation, proto_ldap);
if (ldap_info == NULL) {
/* No. Attach that information to the conversation, and add
* it to the list of information structures.
@@ -1647,7 +1647,7 @@ dissect_ldap_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pinfo->ptype, pinfo->srcport,
pinfo->destport, 0);
if(conversation){
- ldap_info = conversation_get_proto_data(conversation, proto_ldap);
+ ldap_info = (ldap_conv_info_t *)conversation_get_proto_data(conversation, proto_ldap);
}
ldm_tree = NULL;
@@ -1801,18 +1801,18 @@ ldap_reinit(void)
}
void
-register_ldap_name_dissector_handle(const char *attr_type, dissector_handle_t dissector)
+register_ldap_name_dissector_handle(const char *attr_type_p, dissector_handle_t dissector)
{
- dissector_add_string("ldap.name", attr_type, dissector);
+ dissector_add_string("ldap.name", attr_type_p, dissector);
}
void
-register_ldap_name_dissector(const char *attr_type, dissector_t dissector, int proto)
+register_ldap_name_dissector(const char *attr_type_p, dissector_t dissector, int proto)
{
dissector_handle_t dissector_handle;
dissector_handle=create_dissector_handle(dissector, proto);
- register_ldap_name_dissector_handle(attr_type, dissector_handle);
+ register_ldap_name_dissector_handle(attr_type_p, dissector_handle);
}
diff --git a/asn1/pkcs12/packet-pkcs12-template.c b/asn1/pkcs12/packet-pkcs12-template.c
index 9b320690bf..2be750a8f5 100644
--- a/asn1/pkcs12/packet-pkcs12-template.c
+++ b/asn1/pkcs12/packet-pkcs12-template.c
@@ -90,7 +90,7 @@ static void append_oid(proto_tree *tree, const char *oid)
#ifdef HAVE_LIBGCRYPT
-int
+static int
generate_key_or_iv(unsigned int id, tvbuff_t *salt_tvb, unsigned int iter,
const char *pw, unsigned int req_keylen, char * keybuf)
{
@@ -383,7 +383,7 @@ int PBE_decrypt_data(const char *object_identifier_id _U_, tvbuff_t *encrypted_t
static int strip_octet_string(tvbuff_t *tvb)
{
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind;
gint32 tag;
guint32 len;
@@ -393,10 +393,10 @@ static int strip_octet_string(tvbuff_t *tvb)
/* if we use CMS (rather than PKCS#7) - which we are - we need to strip the OCTET STRING tag */
/* before proceeding */
- offset = get_ber_identifier(tvb, 0, &class, &pc, &tag);
+ offset = get_ber_identifier(tvb, 0, &ber_class, &pc, &tag);
offset = get_ber_length(tvb, offset, &len, &ind);
- if((class == BER_CLASS_UNI) && (tag == BER_UNI_TAG_OCTETSTRING))
+ if((ber_class == BER_CLASS_UNI) && (tag == BER_UNI_TAG_OCTETSTRING))
return offset;
return 0;
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index 959724e69f..6aad3ff278 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -1501,17 +1501,17 @@ gboolean
check_ScopedPdu(tvbuff_t* tvb)
{
int offset;
- gint8 class;
+ gint8 ber_class;
gboolean pc;
gint32 tag;
int hoffset, eoffset;
guint32 len;
- offset = get_ber_identifier(tvb, 0, &class, &pc, &tag);
+ offset = get_ber_identifier(tvb, 0, &ber_class, &pc, &tag);
offset = get_ber_length(tvb, offset, NULL, NULL);
- if ( ! (((class!=BER_CLASS_APP) && (class!=BER_CLASS_PRI) )
- && ( (!pc) || (class!=BER_CLASS_UNI) || (tag!=BER_UNI_TAG_ENUMERATED) )
+ if ( ! (((ber_class!=BER_CLASS_APP) && (ber_class!=BER_CLASS_PRI) )
+ && ( (!pc) || (ber_class!=BER_CLASS_UNI) || (tag!=BER_UNI_TAG_ENUMERATED) )
)) return FALSE;
if((tvb_get_guint8(tvb, offset)==0)&&(tvb_get_guint8(tvb, offset+1)==0))
@@ -1519,14 +1519,14 @@ check_ScopedPdu(tvbuff_t* tvb)
hoffset = offset;
- offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
+ offset = get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
offset = get_ber_length(tvb, offset, &len, NULL);
eoffset = offset + len;
if (eoffset <= hoffset) return FALSE;
- if ((class!=BER_CLASS_APP)&&(class!=BER_CLASS_PRI))
- if( (class!=BER_CLASS_UNI)
+ if ((ber_class!=BER_CLASS_APP)&&(ber_class!=BER_CLASS_PRI))
+ if( (ber_class!=BER_CLASS_UNI)
||((tag<BER_UNI_TAG_NumericString)&&(tag!=BER_UNI_TAG_OCTETSTRING)&&(tag!=BER_UNI_TAG_UTF8String)) )
return FALSE;
@@ -1543,7 +1543,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
guint length_remaining;
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind = 0;
gint32 tag;
guint32 len;
@@ -1628,7 +1628,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
* length of the SNMP message.
*/
/* Set tree to 0 to not display internal BER fields if option used.*/
- offset = dissect_ber_identifier(pinfo, 0, tvb, offset, &class, &pc, &tag);
+ offset = dissect_ber_identifier(pinfo, 0, tvb, offset, &ber_class, &pc, &tag);
/*Get the total octet length of the SNMP data*/
offset = dissect_ber_length(pinfo, 0, tvb, offset, &len, &ind);
message_length = len + 2;
@@ -1940,8 +1940,8 @@ process_prefs(void)
static void*
snmp_users_copy_cb(void* dest, const void* orig, size_t len _U_)
{
- const snmp_ue_assoc_t* o = orig;
- snmp_ue_assoc_t* d = dest;
+ const snmp_ue_assoc_t* o = (const snmp_ue_assoc_t*)orig;
+ snmp_ue_assoc_t* d = (snmp_ue_assoc_t*)dest;
d->auth_model = o->auth_model;
d->user.authModel = auth_models[o->auth_model];
@@ -1975,7 +1975,7 @@ snmp_users_copy_cb(void* dest, const void* orig, size_t len _U_)
static void
snmp_users_free_cb(void* p)
{
- snmp_ue_assoc_t* ue = p;
+ snmp_ue_assoc_t* ue = (snmp_ue_assoc_t*)p;
g_free(ue->user.userName.data);
g_free(ue->user.authPassword.data);
g_free(ue->user.privPassword.data);
@@ -1987,7 +1987,7 @@ snmp_users_free_cb(void* p)
static void
snmp_users_update_cb(void* p _U_, const char** err)
{
- snmp_ue_assoc_t* ue = p;
+ snmp_ue_assoc_t* ue = (snmp_ue_assoc_t*)p;
GString* es = g_string_new("");
unsigned i;
@@ -2048,8 +2048,8 @@ UAT_VS_DEF(snmp_users,priv_proto,snmp_ue_assoc_t,0,"DES")
static void *
snmp_specific_trap_copy_cb(void *dest, const void *orig, size_t len _U_)
{
- snmp_st_assoc_t *u = dest;
- const snmp_st_assoc_t *o = orig;
+ snmp_st_assoc_t *u = (snmp_st_assoc_t *)dest;
+ const snmp_st_assoc_t *o = (const snmp_st_assoc_t *)orig;
u->enterprise = g_strdup(o->enterprise);
u->trap = o->trap;
@@ -2061,7 +2061,7 @@ snmp_specific_trap_copy_cb(void *dest, const void *orig, size_t len _U_)
static void
snmp_specific_trap_free_cb(void *r)
{
- snmp_st_assoc_t *u = r;
+ snmp_st_assoc_t *u = (snmp_st_assoc_t *)r;
g_free(u->enterprise);
g_free(u->desc);
diff --git a/asn1/t125/packet-t125-template.c b/asn1/t125/packet-t125-template.c
index c2ab2f7e90..b9da7642ce 100644
--- a/asn1/t125/packet-t125-template.c
+++ b/asn1/t125/packet-t125-template.c
@@ -64,7 +64,7 @@ dissect_t125(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
{
proto_item *item = NULL;
proto_tree *tree = NULL;
- gint8 class;
+ gint8 ber_class;
gboolean pc;
gint32 tag;
@@ -76,9 +76,9 @@ dissect_t125(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
item = proto_tree_add_item(parent_tree, proto_t125, tvb, 0, tvb_length(tvb), ENC_NA);
tree = proto_item_add_subtree(item, ett_t125);
- get_ber_identifier(tvb, 0, &class, &pc, &tag);
+ get_ber_identifier(tvb, 0, &ber_class, &pc, &tag);
- if ( (class==BER_CLASS_APP) && (tag>=101) && (tag<=104) ){
+ if ( (ber_class==BER_CLASS_APP) && (tag>=101) && (tag<=104) ){
dissect_ConnectMCSPDU_PDU(tvb, pinfo, tree);
} else {
t124_set_top_tree(top_tree);
@@ -91,7 +91,7 @@ dissect_t125(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
static gboolean
dissect_t125_heur(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
{
- gint8 class;
+ gint8 ber_class;
gboolean pc;
gint32 tag;
guint32 choice_index = 100;
@@ -100,14 +100,14 @@ dissect_t125_heur(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree
asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
/* could be BER */
- get_ber_identifier(tvb, 0, &class, &pc, &tag);
+ get_ber_identifier(tvb, 0, &ber_class, &pc, &tag);
/* or PER */
dissect_per_constrained_integer(tvb, 0, &asn1_ctx,
NULL, hf_t125_heur, 0, 42,
&choice_index, FALSE);
/* is this strong enough ? */
- if ( ((class==BER_CLASS_APP) && ((tag>=101) && (tag<=104))) ||
+ if ( ((ber_class==BER_CLASS_APP) && ((tag>=101) && (tag<=104))) ||
(choice_index <=42)) {
dissect_t125(tvb, pinfo, parent_tree);
diff --git a/asn1/tcap/packet-tcap-template.c b/asn1/tcap/packet-tcap-template.c
index be3dbf431d..aa61ab9731 100644
--- a/asn1/tcap/packet-tcap-template.c
+++ b/asn1/tcap/packet-tcap-template.c
@@ -129,11 +129,11 @@ extern void delete_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissect
}
dissector_handle_t get_ansi_tcap_subdissector(guint32 ssn) {
- return g_hash_table_lookup(ansi_sub_dissectors,GUINT_TO_POINTER(ssn));
+ return (dissector_handle_t)g_hash_table_lookup(ansi_sub_dissectors,GUINT_TO_POINTER(ssn));
}
dissector_handle_t get_itu_tcap_subdissector(guint32 ssn) {
- return g_hash_table_lookup(itu_sub_dissectors,GUINT_TO_POINTER(ssn));
+ return (dissector_handle_t)g_hash_table_lookup(itu_sub_dissectors,GUINT_TO_POINTER(ssn));
}
@@ -160,7 +160,7 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
struct tcaphash_context_t * p_tcap_context;
dissector_handle_t subdissector_handle;
asn1_ctx_t asn1_ctx;
- gint8 class;
+ gint8 ber_class;
gboolean pc;
gint tag;
@@ -176,9 +176,9 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
*
*
*/
- get_ber_identifier(tvb, 0, &class, &pc, &tag);
+ get_ber_identifier(tvb, 0, &ber_class, &pc, &tag);
- if(class == BER_CLASS_PRI){
+ if(ber_class == BER_CLASS_PRI){
switch(tag){
case 1:
case 2:
@@ -431,7 +431,7 @@ dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset
tvbuff_t *next_tvb;
proto_tree *subtree;
proto_item *pi;
- gint8 class;
+ gint8 ber_class;
gboolean pc;
gint32 tag;
guint32 len;
@@ -443,7 +443,7 @@ dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset
{
saved_offset = offset;
- offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
+ offset = get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
tag_offset = offset;
offset = get_ber_length(tvb, offset, &len, &ind_field);
len_offset = offset;
@@ -461,7 +461,7 @@ dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset
saved_offset, tag_length, tag,
"CONSTRUCTOR Tag");
proto_tree_add_uint(subtree, hf_tcap_tag, tvb, saved_offset,
- tag_length, class);
+ tag_length, ber_class);
proto_tree_add_uint(subtree, hf_tcap_length, tvb, tag_offset,
len_length, len);
diff --git a/asn1/tcap/tcap.cnf b/asn1/tcap/tcap.cnf
index 731d7e25af..675eb26b99 100644
--- a/asn1/tcap/tcap.cnf
+++ b/asn1/tcap/tcap.cnf
@@ -77,13 +77,13 @@ ABRT-apdu/_untag/user-information abrt_user_information
#----------------------------------------------------------------------------------------
#.FN_BODY Component
tvbuff_t *next_tvb;
-gint8 class;
+gint8 ber_class;
gboolean pc;
gint tag;
guint32 len, comp_offset;
gint ind_field;
-comp_offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
+comp_offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag);
comp_offset = dissect_ber_length(actx->pinfo, tree, tvb, comp_offset, &len, &ind_field);
/* we can believe the length now */
next_tvb = tvb_new_subset(tvb, offset, len+comp_offset-offset, len+comp_offset-offset);
diff --git a/asn1/tetra/packet-tetra-template.h b/asn1/tetra/packet-tetra-template.h
index 5654b5063b..425ba83774 100644
--- a/asn1/tetra/packet-tetra-template.h
+++ b/asn1/tetra/packet-tetra-template.h
@@ -51,4 +51,5 @@ enum {
void tetra_dissect_pdu(int channel_type, int dir, tvbuff_t *pdu, proto_tree *head, packet_info *pinfo);
+#include "packet-tetra-exp.h"
#endif /* PACKET_TETRA_H */
diff --git a/epan/dissectors/packet-amqp.c b/epan/dissectors/packet-amqp.c
index dfd2917ebc..c4885f1ef4 100644
--- a/epan/dissectors/packet-amqp.c
+++ b/epan/dissectors/packet-amqp.c
@@ -850,7 +850,7 @@ typedef int (*type_formatter)(tvbuff_t *tvb,
const char **value); /* Receive formatted val */
struct amqp_typeinfo {
guint8 typecode; /* From AMQP 0-10 spec */
- const char *typename;
+ const char *amqp_typename;
type_formatter formatter;
guint known_size;
};
@@ -1868,7 +1868,7 @@ dissect_amqp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Find (or build) conversation to remember the protocol version */
conv = find_or_create_conversation(pinfo);
- conn = conversation_get_proto_data(conv, proto_amqp);
+ conn = (amqp_conv *)conversation_get_proto_data(conv, proto_amqp);
if (conn == NULL) {
conn = se_alloc0(sizeof(amqp_conv));
conversation_add_proto_data(conv, proto_amqp, conn);
@@ -1989,7 +1989,7 @@ dissect_amqp_0_9_field_table(tvbuff_t *tvb, packet_info *pinfo, int offset, guin
guint namelen, vallen;
guint8 type;
const char *name;
- const char *typename;
+ const char *amqp_typename;
const char *value;
int field_start;
proto_item *ti;
@@ -2013,7 +2013,7 @@ dissect_amqp_0_9_field_table(tvbuff_t *tvb, packet_info *pinfo, int offset, guin
length -= 1;
switch (type) {
case 'S':
- typename = "string";
+ amqp_typename = "string";
if (length < 4)
goto too_short;
vallen = tvb_get_ntohl(tvb, offset);
@@ -2026,7 +2026,7 @@ dissect_amqp_0_9_field_table(tvbuff_t *tvb, packet_info *pinfo, int offset, guin
length -= vallen;
break;
case 'I':
- typename = "integer";
+ amqp_typename = "integer";
if (length < 4)
goto too_short;
value = ep_strdup_printf("%d", tvb_get_ntohl(tvb, offset));
@@ -2034,7 +2034,7 @@ dissect_amqp_0_9_field_table(tvbuff_t *tvb, packet_info *pinfo, int offset, guin
length -= 4;
break;
case 'D':
- typename = "decimal";
+ amqp_typename = "decimal";
if (length < 5)
goto too_short;
value = "...";
@@ -2042,7 +2042,7 @@ dissect_amqp_0_9_field_table(tvbuff_t *tvb, packet_info *pinfo, int offset, guin
length -= 5;
break;
case 'T':
- typename = "timestamp";
+ amqp_typename = "timestamp";
if (length < 8)
goto too_short;
value = "...";
@@ -2051,7 +2051,7 @@ dissect_amqp_0_9_field_table(tvbuff_t *tvb, packet_info *pinfo, int offset, guin
break;
case 'F':
/* TODO: make it recursive here */
- typename = "field table";
+ amqp_typename = "field table";
if (length < 4)
goto too_short;
vallen = tvb_get_ntohl(tvb, offset);
@@ -2064,11 +2064,11 @@ dissect_amqp_0_9_field_table(tvbuff_t *tvb, packet_info *pinfo, int offset, guin
length -= vallen;
break;
case 'V':
- typename = "void";
+ amqp_typename = "void";
value = "";
break;
default:
- typename = "";
+ amqp_typename = "";
value = NULL;
break;
}
@@ -2076,7 +2076,7 @@ dissect_amqp_0_9_field_table(tvbuff_t *tvb, packet_info *pinfo, int offset, guin
if (value != NULL)
proto_tree_add_none_format(field_table_tree, hf_amqp_field, tvb,
field_start, offset - field_start,
- "%s (%s): %s", name, typename,
+ "%s (%s): %s", name, amqp_typename,
value);
else
proto_tree_add_none_format(field_table_tree, hf_amqp_field, tvb,
@@ -2109,7 +2109,7 @@ dissect_amqp_0_10_map(tvbuff_t *tvb,
guint namelen, size;
guint8 type;
const char *name;
- const char *typename;
+ const char *amqp_typename;
const char *value;
gint field_start, field_length;
guint32 field_count;
@@ -2132,7 +2132,7 @@ dissect_amqp_0_10_map(tvbuff_t *tvb,
type = tvb_get_guint8(tvb, offset);
AMQP_INCREMENT(offset, 1, bound);
length -= 1;
- if (get_amqp_0_10_type_formatter(type, &typename, &formatter, &size)) {
+ if (get_amqp_0_10_type_formatter(type, &amqp_typename, &formatter, &size)) {
field_length = formatter(tvb, offset, bound, size, &value);
proto_tree_add_none_format(map_tree,
hf_amqp_field,
@@ -2140,7 +2140,7 @@ dissect_amqp_0_10_map(tvbuff_t *tvb,
field_start,
field_length,
"%s (%s): %s",
- name, typename, value);
+ name, amqp_typename, value);
AMQP_INCREMENT(offset, field_length, bound);
length -= field_length;
}
@@ -2159,7 +2159,7 @@ dissect_amqp_0_10_map(tvbuff_t *tvb,
break;
default:
- typename = "unimplemented";
+ amqp_typename = "unimplemented";
if ((type & 0x80) == 0) {
field_length = 2 ^ ((type & 0x70) >> 4);
}
@@ -2182,18 +2182,18 @@ dissect_amqp_0_10_map(tvbuff_t *tvb,
break;
default:
field_length = 1; /* Reserved... skip 1 */
- typename = "reserved";
+ amqp_typename = "reserved";
break;
}
}
else {
field_length = 1; /* Reserved... skip 1 */
- typename = "reserved";
+ amqp_typename = "reserved";
}
proto_tree_add_none_format(map_tree, hf_amqp_field,
tvb, field_start, field_length,
"%s (%s): %d bytes",
- name, typename, field_length);
+ name, amqp_typename, field_length);
AMQP_INCREMENT(offset, field_length, bound);
length -= field_length;
}
@@ -2216,7 +2216,7 @@ dissect_amqp_0_10_array(tvbuff_t *tvb,
proto_item *sub;
guint8 type;
guint16 len16;
- const char *typename;
+ const char *amqp_typename;
const char *value;
int element_start;
int externally_formatted;
@@ -2238,7 +2238,7 @@ dissect_amqp_0_10_array(tvbuff_t *tvb,
externally_formatted = 0;
switch (type) {
case AMQP_0_10_TYPE_STR16:
- typename = "str16";
+ amqp_typename = "str16";
len16 = tvb_get_ntohs(tvb, offset);
AMQP_INCREMENT(offset, 2, bound);
length -= 2;
@@ -2248,7 +2248,7 @@ dissect_amqp_0_10_array(tvbuff_t *tvb,
break;
case AMQP_0_10_TYPE_STRUCT32:
- typename = "struct32";
+ amqp_typename = "struct32";
value = "structure";
externally_formatted = 1;
struct_length = tvb_get_ntohl(tvb, offset);
@@ -2263,7 +2263,7 @@ dissect_amqp_0_10_array(tvbuff_t *tvb,
sub = proto_tree_add_none_format(array_tree, hf_amqp_field, tvb,
element_start,
offset - element_start,
- "(%s): ", typename);
+ "(%s): ", amqp_typename);
dissect_amqp_0_10_struct32(tvb, sub, offset, struct_length);
AMQP_INCREMENT(offset, struct_length, bound);
length -= struct_length;
@@ -2291,11 +2291,11 @@ dissect_amqp_0_10_array(tvbuff_t *tvb,
element_start,
offset - element_start,
"(%s): %s",
- typename,
+ amqp_typename,
value);
}
else {
- proto_item_append_text(item, ": (%s): %s", typename, value);
+ proto_item_append_text(item, ": (%s): %s", amqp_typename, value);
}
}
}
@@ -8548,7 +8548,7 @@ get_amqp_0_10_type_formatter(guint8 code,
table = amqp_0_10_fixed_types;
for (i = 0; table[i].typecode != 0xff; ++i) {
if (table[i].typecode == code) {
- *name = ep_strdup(table[i].typename);
+ *name = ep_strdup(table[i].amqp_typename);
*formatter = table[i].formatter;
*length_size = table[i].known_size;
return 1;
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c
index 3b9137d7d8..c958af1725 100644
--- a/epan/dissectors/packet-ldap.c
+++ b/epan/dissectors/packet-ldap.c
@@ -520,7 +520,7 @@ static ldap_conv_info_t *ldap_info_items;
static guint
ldap_info_hash_matched(gconstpointer k)
{
- const ldap_call_response_t *key = k;
+ const ldap_call_response_t *key = (const ldap_call_response_t *)k;
return key->messageId;
}
@@ -528,8 +528,8 @@ ldap_info_hash_matched(gconstpointer k)
static gint
ldap_info_equal_matched(gconstpointer k1, gconstpointer k2)
{
- const ldap_call_response_t *key1 = k1;
- const ldap_call_response_t *key2 = k2;
+ const ldap_call_response_t *key1 = (const ldap_call_response_t*)k1;
+ const ldap_call_response_t *key2 = (const ldap_call_response_t*)k2;
if( key1->req_frame && key2->req_frame && (key1->req_frame!=key2->req_frame) ){
return 0;
@@ -546,7 +546,7 @@ ldap_info_equal_matched(gconstpointer k1, gconstpointer k2)
static guint
ldap_info_hash_unmatched(gconstpointer k)
{
- const ldap_call_response_t *key = k;
+ const ldap_call_response_t *key = (const ldap_call_response_t*)k;
return key->messageId;
}
@@ -554,8 +554,8 @@ ldap_info_hash_unmatched(gconstpointer k)
static gint
ldap_info_equal_unmatched(gconstpointer k1, gconstpointer k2)
{
- const ldap_call_response_t *key1 = k1;
- const ldap_call_response_t *key2 = k2;
+ const ldap_call_response_t *key1 = (const ldap_call_response_t*)k1;
+ const ldap_call_response_t *key2 = (const ldap_call_response_t*)k2;
return key1->messageId==key2->messageId;
}
@@ -673,14 +673,14 @@ static char *ldapvalue_string=NULL;
static int
dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index)
{
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind, is_ascii;
gint32 tag;
guint32 len, i;
const guchar *str;
if(!implicit_tag){
- offset=get_ber_identifier(tvb, offset, &class, &pc, &tag);
+ offset=get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
offset=get_ber_length(tvb, offset, &len, &ind);
} else {
len=tvb_length_remaining(tvb,offset);
@@ -865,7 +865,7 @@ ldap_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
lcr.rep_frame=pinfo->fd->num;
break;
}
- lcrp=g_hash_table_lookup(ldap_info->matched, &lcr);
+ lcrp=(ldap_call_response_t *)g_hash_table_lookup(ldap_info->matched, &lcr);
if(lcrp){
@@ -891,7 +891,7 @@ ldap_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
unmatched list and if so remove it */
lcr.messageId=messageId;
- lcrp=g_hash_table_lookup(ldap_info->unmatched, &lcr);
+ lcrp=(ldap_call_response_t *)g_hash_table_lookup(ldap_info->unmatched, &lcr);
if(lcrp){
g_hash_table_remove(ldap_info->unmatched, lcrp);
}
@@ -923,7 +923,7 @@ ldap_match_call_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
/* this is a result - it should be in our unmatched list */
lcr.messageId=messageId;
- lcrp=g_hash_table_lookup(ldap_info->unmatched, &lcr);
+ lcrp=(ldap_call_response_t *)g_hash_table_lookup(ldap_info->unmatched, &lcr);
if(lcrp){
@@ -1183,7 +1183,7 @@ dissect_ldap_Credentials(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse
tvbuff_t *parameter_tvb;
ldap_conv_info_t *ldap_info;
-gint8 class;
+gint8 ber_class;
gboolean pc;
gint32 tag;
@@ -1195,10 +1195,10 @@ gint32 tag;
return offset;
ldap_info = actx->pinfo->private_data;
- get_ber_identifier(parameter_tvb, 0, &class, &pc, &tag);
+ get_ber_identifier(parameter_tvb, 0, &ber_class, &pc, &tag);
- /*if ((ldap_info->auth_mech != NULL) && (strcmp(ldap_info->auth_mech, "GSS-SPNEGO") == 0) && (class==BER_CLASS_CON)) {*/
- if ((ldap_info->auth_mech != NULL) && (class==BER_CLASS_CON)) {
+ /*if ((ldap_info->auth_mech != NULL) && (strcmp(ldap_info->auth_mech, "GSS-SPNEGO") == 0) && (ber_class==BER_CLASS_CON)) {*/
+ if ((ldap_info->auth_mech != NULL) && (ber_class==BER_CLASS_CON)) {
/*
* This is a GSS-API token ancapsulated within GSS-SPNEGO.
* We need to check the first byte to check whether the blob
@@ -1209,8 +1209,8 @@ gint32 tag;
if (parameter_tvb && (tvb_length(parameter_tvb) > 0))
call_dissector(spnego_handle, parameter_tvb, actx->pinfo, tree);
}
- /*if ((ldap_info->auth_mech != NULL) && ((strcmp(ldap_info->auth_mech, "GSSAPI") == 0) || (class==BER_CLASS_APP))) {*/
- if ((ldap_info->auth_mech != NULL) && (class==BER_CLASS_APP)) {
+ /*if ((ldap_info->auth_mech != NULL) && ((strcmp(ldap_info->auth_mech, "GSSAPI") == 0) || (ber_class==BER_CLASS_APP))) {*/
+ if ((ldap_info->auth_mech != NULL) && (ber_class==BER_CLASS_APP)) {
/*
* This is a raw GSS-API token.
*/
@@ -1497,7 +1497,7 @@ ldap_conv_info_t *ldap_info;
if (!parameter_tvb)
return offset;
- ldap_info = actx->pinfo->private_data;
+ ldap_info = (ldap_conv_info_t *)actx->pinfo->private_data;
switch (ldap_info->auth_type) {
/* For Kerberos V4, dissect it as a ticket. */
@@ -3112,14 +3112,14 @@ dissect_ldap_ControlType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse
static int
dissect_ldap_T_controlValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 735 "../../asn1/ldap/ldap.cnf"
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind;
gint32 tag;
guint32 len;
if((object_identifier_id != NULL) && oid_has_dissector(object_identifier_id)) {
/* remove the OCTET STRING encoding */
- offset=dissect_ber_identifier(actx->pinfo, NULL, tvb, offset, &class, &pc, &tag);
+ offset=dissect_ber_identifier(actx->pinfo, NULL, tvb, offset, &ber_class, &pc, &tag);
offset=dissect_ber_length(actx->pinfo, NULL, tvb, offset, &len, &ind);
call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
@@ -3297,7 +3297,7 @@ dissect_ldap_DirSyncFlagsSubEntry(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
static int
dissect_ldap_DirSyncFlags(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 779 "../../asn1/ldap/ldap.cnf"
- gint8 class;
+ gint8 ber_class;
gboolean pc;
gint32 tag;
guint32 len;
@@ -3306,7 +3306,7 @@ dissect_ldap_DirSyncFlags(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs
int otheroffset = offset;
if(!implicit_tag){
- otheroffset=dissect_ber_identifier(actx->pinfo, tree, tvb, otheroffset, &class, &pc, &tag);
+ otheroffset=dissect_ber_identifier(actx->pinfo, tree, tvb, otheroffset, &ber_class, &pc, &tag);
otheroffset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, NULL);
} else {
gint32 remaining=tvb_length_remaining(tvb, offset);
@@ -3719,7 +3719,7 @@ dissect_ldap_payload(tvbuff_t *tvb, packet_info *pinfo,
guint headerLength = 0;
guint length = 0;
tvbuff_t *msg_tvb = NULL;
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind = 0;
gint32 ber_tag;
@@ -3736,13 +3736,13 @@ one_more_pdu:
* OK, try to read the "Sequence Of" header; this gets the total
* length of the LDAP message.
*/
- messageOffset = get_ber_identifier(tvb, offset, &class, &pc, &ber_tag);
+ messageOffset = get_ber_identifier(tvb, offset, &ber_class, &pc, &ber_tag);
messageOffset = get_ber_length(tvb, messageOffset, &msg_len, &ind);
/* sanity check */
if((msg_len<4) || (msg_len>10000000)) return;
- if ( (class==BER_CLASS_UNI) && (ber_tag==BER_UNI_TAG_SEQUENCE) ) {
+ if ( (ber_class==BER_CLASS_UNI) && (ber_tag==BER_UNI_TAG_SEQUENCE) ) {
/*
* Add the length of the "Sequence Of" header to the message
* length.
@@ -3832,7 +3832,7 @@ dissect_ldap_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean i
/*
* Do we already have a type and mechanism?
*/
- ldap_info = conversation_get_proto_data(conversation, proto_ldap);
+ ldap_info = (ldap_conv_info_t *)conversation_get_proto_data(conversation, proto_ldap);
if (ldap_info == NULL) {
/* No. Attach that information to the conversation, and add
* it to the list of information structures.
@@ -4611,7 +4611,7 @@ dissect_ldap_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pinfo->ptype, pinfo->srcport,
pinfo->destport, 0);
if(conversation){
- ldap_info = conversation_get_proto_data(conversation, proto_ldap);
+ ldap_info = (ldap_conv_info_t *)conversation_get_proto_data(conversation, proto_ldap);
}
ldm_tree = NULL;
@@ -4765,18 +4765,18 @@ ldap_reinit(void)
}
void
-register_ldap_name_dissector_handle(const char *attr_type, dissector_handle_t dissector)
+register_ldap_name_dissector_handle(const char *attr_type_p, dissector_handle_t dissector)
{
- dissector_add_string("ldap.name", attr_type, dissector);
+ dissector_add_string("ldap.name", attr_type_p, dissector);
}
void
-register_ldap_name_dissector(const char *attr_type, dissector_t dissector, int proto)
+register_ldap_name_dissector(const char *attr_type_p, dissector_t dissector, int proto)
{
dissector_handle_t dissector_handle;
dissector_handle=create_dissector_handle(dissector, proto);
- register_ldap_name_dissector_handle(attr_type, dissector_handle);
+ register_ldap_name_dissector_handle(attr_type_p, dissector_handle);
}
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c
index c5b8302cba..2ac545ccee 100644
--- a/epan/dissectors/packet-per.c
+++ b/epan/dissectors/packet-per.c
@@ -944,7 +944,7 @@ dissect_per_object_identifier_str(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *act
/* this function reads a single bit */
guint32
-dissect_per_boolean(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index, gboolean *bool)
+dissect_per_boolean(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index, gboolean *bool_val)
{
guint8 ch, mask;
gboolean value;
@@ -979,8 +979,8 @@ DEBUG_ENTRY("dissect_per_boolean");
actx->created_item = NULL;
}
- if(bool){
- *bool=value;
+ if(bool_val){
+ *bool_val=value;
}
return offset+1;
}
diff --git a/epan/dissectors/packet-pkcs12.c b/epan/dissectors/packet-pkcs12.c
index 8b7ef856d3..c7d026637d 100644
--- a/epan/dissectors/packet-pkcs12.c
+++ b/epan/dissectors/packet-pkcs12.c
@@ -182,7 +182,7 @@ static void append_oid(proto_tree *tree, const char *oid)
#ifdef HAVE_LIBGCRYPT
-int
+static int
generate_key_or_iv(unsigned int id, tvbuff_t *salt_tvb, unsigned int iter,
const char *pw, unsigned int req_keylen, char * keybuf)
{
@@ -1130,7 +1130,7 @@ static void dissect_PBMAC1Params_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
static int strip_octet_string(tvbuff_t *tvb)
{
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind;
gint32 tag;
guint32 len;
@@ -1140,10 +1140,10 @@ static int strip_octet_string(tvbuff_t *tvb)
/* if we use CMS (rather than PKCS#7) - which we are - we need to strip the OCTET STRING tag */
/* before proceeding */
- offset = get_ber_identifier(tvb, 0, &class, &pc, &tag);
+ offset = get_ber_identifier(tvb, 0, &ber_class, &pc, &tag);
offset = get_ber_length(tvb, offset, &len, &ind);
- if((class == BER_CLASS_UNI) && (tag == BER_UNI_TAG_OCTETSTRING))
+ if((ber_class == BER_CLASS_UNI) && (tag == BER_UNI_TAG_OCTETSTRING))
return offset;
return 0;
diff --git a/epan/dissectors/packet-sgsap.c b/epan/dissectors/packet-sgsap.c
index 0e2b4e4944..9fb49ae377 100644
--- a/epan/dissectors/packet-sgsap.c
+++ b/epan/dissectors/packet-sgsap.c
@@ -1364,7 +1364,7 @@ static void (*sgsap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pin
NULL, /* NONE */
};
-void get_sgsap_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn)
+static void get_sgsap_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn)
{
gint idx;
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c
index 5cf18d3643..c4cb473a1e 100644
--- a/epan/dissectors/packet-sip.c
+++ b/epan/dissectors/packet-sip.c
@@ -888,8 +888,8 @@ typedef struct
/* Equal keys */
static gint sip_equal(gconstpointer v, gconstpointer v2)
{
- const sip_hash_key* val1 = (sip_hash_key*)v;
- const sip_hash_key* val2 = (sip_hash_key*)v2;
+ const sip_hash_key* val1 = (const sip_hash_key*)v;
+ const sip_hash_key* val2 = (const sip_hash_key*)v2;
/* Call id must match */
if (strcmp(val1->call_id, val2->call_id) != 0)
diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c
index 759468b684..b809a9cda6 100644
--- a/epan/dissectors/packet-snmp.c
+++ b/epan/dissectors/packet-snmp.c
@@ -1603,17 +1603,17 @@ gboolean
check_ScopedPdu(tvbuff_t* tvb)
{
int offset;
- gint8 class;
+ gint8 ber_class;
gboolean pc;
gint32 tag;
int hoffset, eoffset;
guint32 len;
- offset = get_ber_identifier(tvb, 0, &class, &pc, &tag);
+ offset = get_ber_identifier(tvb, 0, &ber_class, &pc, &tag);
offset = get_ber_length(tvb, offset, NULL, NULL);
- if ( ! (((class!=BER_CLASS_APP) && (class!=BER_CLASS_PRI) )
- && ( (!pc) || (class!=BER_CLASS_UNI) || (tag!=BER_UNI_TAG_ENUMERATED) )
+ if ( ! (((ber_class!=BER_CLASS_APP) && (ber_class!=BER_CLASS_PRI) )
+ && ( (!pc) || (ber_class!=BER_CLASS_UNI) || (tag!=BER_UNI_TAG_ENUMERATED) )
)) return FALSE;
if((tvb_get_guint8(tvb, offset)==0)&&(tvb_get_guint8(tvb, offset+1)==0))
@@ -1621,14 +1621,14 @@ check_ScopedPdu(tvbuff_t* tvb)
hoffset = offset;
- offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
+ offset = get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
offset = get_ber_length(tvb, offset, &len, NULL);
eoffset = offset + len;
if (eoffset <= hoffset) return FALSE;
- if ((class!=BER_CLASS_APP)&&(class!=BER_CLASS_PRI))
- if( (class!=BER_CLASS_UNI)
+ if ((ber_class!=BER_CLASS_APP)&&(ber_class!=BER_CLASS_PRI))
+ if( (ber_class!=BER_CLASS_UNI)
||((tag<BER_UNI_TAG_NumericString)&&(tag!=BER_UNI_TAG_OCTETSTRING)&&(tag!=BER_UNI_TAG_UTF8String)) )
return FALSE;
@@ -2767,7 +2767,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
guint length_remaining;
- gint8 class;
+ gint8 ber_class;
gboolean pc, ind = 0;
gint32 tag;
guint32 len;
@@ -2852,7 +2852,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
* length of the SNMP message.
*/
/* Set tree to 0 to not display internal BER fields if option used.*/
- offset = dissect_ber_identifier(pinfo, 0, tvb, offset, &class, &pc, &tag);
+ offset = dissect_ber_identifier(pinfo, 0, tvb, offset, &ber_class, &pc, &tag);
/*Get the total octet length of the SNMP data*/
offset = dissect_ber_length(pinfo, 0, tvb, offset, &len, &ind);
message_length = len + 2;
@@ -3164,8 +3164,8 @@ process_prefs(void)
static void*
snmp_users_copy_cb(void* dest, const void* orig, size_t len _U_)
{
- const snmp_ue_assoc_t* o = orig;
- snmp_ue_assoc_t* d = dest;
+ const snmp_ue_assoc_t* o = (const snmp_ue_assoc_t*)orig;
+ snmp_ue_assoc_t* d = (snmp_ue_assoc_t*)dest;
d->auth_model = o->auth_model;
d->user.authModel = auth_models[o->auth_model];
@@ -3199,7 +3199,7 @@ snmp_users_copy_cb(void* dest, const void* orig, size_t len _U_)
static void
snmp_users_free_cb(void* p)
{
- snmp_ue_assoc_t* ue = p;
+ snmp_ue_assoc_t* ue = (snmp_ue_assoc_t*)p;
g_free(ue->user.userName.data);
g_free(ue->user.authPassword.data);
g_free(ue->user.privPassword.data);
@@ -3211,7 +3211,7 @@ snmp_users_free_cb(void* p)
static void
snmp_users_update_cb(void* p _U_, const char** err)
{
- snmp_ue_assoc_t* ue = p;
+ snmp_ue_assoc_t* ue = (snmp_ue_assoc_t*)p;
GString* es = g_string_new("");
unsigned i;
@@ -3272,8 +3272,8 @@ UAT_VS_DEF(snmp_users,priv_proto,snmp_ue_assoc_t,0,"DES")
static void *
snmp_specific_trap_copy_cb(void *dest, const void *orig, size_t len _U_)
{
- snmp_st_assoc_t *u = dest;
- const snmp_st_assoc_t *o = orig;
+ snmp_st_assoc_t *u = (snmp_st_assoc_t *)dest;
+ const snmp_st_assoc_t *o = (const snmp_st_assoc_t *)orig;
u->enterprise = g_strdup(o->enterprise);
u->trap = o->trap;
@@ -3285,7 +3285,7 @@ snmp_specific_trap_copy_cb(void *dest, const void *orig, size_t len _U_)
static void
snmp_specific_trap_free_cb(void *r)
{
- snmp_st_assoc_t *u = r;
+ snmp_st_assoc_t *u = (snmp_st_assoc_t *)r;
g_free(u->enterprise);
g_free(u->desc);
diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c
index c901b003c8..4ddfb6b4e6 100644
--- a/epan/dissectors/packet-tcap.c
+++ b/epan/dissectors/packet-tcap.c
@@ -248,11 +248,11 @@ extern void delete_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissect
}
dissector_handle_t get_ansi_tcap_subdissector(guint32 ssn) {
- return g_hash_table_lookup(ansi_sub_dissectors,GUINT_TO_POINTER(ssn));
+ return (dissector_handle_t)g_hash_table_lookup(ansi_sub_dissectors,GUINT_TO_POINTER(ssn));
}
dissector_handle_t get_itu_tcap_subdissector(guint32 ssn) {
- return g_hash_table_lookup(itu_sub_dissectors,GUINT_TO_POINTER(ssn));
+ return (dissector_handle_t)g_hash_table_lookup(itu_sub_dissectors,GUINT_TO_POINTER(ssn));
}
@@ -655,13 +655,13 @@ static int
dissect_tcap_Component(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 79 "../../asn1/tcap/tcap.cnf"
tvbuff_t *next_tvb;
-gint8 class;
+gint8 ber_class;
gboolean pc;
gint tag;
guint32 len, comp_offset;
gint ind_field;
-comp_offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
+comp_offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag);
comp_offset = dissect_ber_length(actx->pinfo, tree, tvb, comp_offset, &len, &ind_field);
/* we can believe the length now */
next_tvb = tvb_new_subset(tvb, offset, len+comp_offset-offset, len+comp_offset-offset);
@@ -1445,7 +1445,7 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
struct tcaphash_context_t * p_tcap_context;
dissector_handle_t subdissector_handle;
asn1_ctx_t asn1_ctx;
- gint8 class;
+ gint8 ber_class;
gboolean pc;
gint tag;
@@ -1461,9 +1461,9 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
*
*
*/
- get_ber_identifier(tvb, 0, &class, &pc, &tag);
+ get_ber_identifier(tvb, 0, &ber_class, &pc, &tag);
- if(class == BER_CLASS_PRI){
+ if(ber_class == BER_CLASS_PRI){
switch(tag){
case 1:
case 2:
@@ -2032,7 +2032,7 @@ dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset
tvbuff_t *next_tvb;
proto_tree *subtree;
proto_item *pi;
- gint8 class;
+ gint8 ber_class;
gboolean pc;
gint32 tag;
guint32 len;
@@ -2044,7 +2044,7 @@ dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset
{
saved_offset = offset;
- offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
+ offset = get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
tag_offset = offset;
offset = get_ber_length(tvb, offset, &len, &ind_field);
len_offset = offset;
@@ -2062,7 +2062,7 @@ dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset
saved_offset, tag_length, tag,
"CONSTRUCTOR Tag");
proto_tree_add_uint(subtree, hf_tcap_tag, tvb, saved_offset,
- tag_length, class);
+ tag_length, ber_class);
proto_tree_add_uint(subtree, hf_tcap_length, tvb, tag_offset,
len_length, len);
diff --git a/epan/dissectors/packet-tetra.h b/epan/dissectors/packet-tetra.h
index eb9648f90c..c083b5f493 100644
--- a/epan/dissectors/packet-tetra.h
+++ b/epan/dissectors/packet-tetra.h
@@ -59,4 +59,45 @@ enum {
void tetra_dissect_pdu(int channel_type, int dir, tvbuff_t *pdu, proto_tree *head, packet_info *pinfo);
+
+/*--- Included file: packet-tetra-exp.h ---*/
+#line 1 "../../asn1/tetra/packet-tetra-exp.h"
+int dissect_tetra_D_LOCATION_UPDATE_ACCEPT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_LOCATION_UPDATE_REJECT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_MM_STATUS(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_MM_STATUS(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_RELEASE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_SDS_DATA(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_STATUS(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_INFO(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_SDS_DATA(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_STATUS(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_DISCONNECT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_INFO(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_TX_WAIT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_TX_CONTINUE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_LOCATION_UPDATE_DEMAND(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_ATTACH_DETACH_GROUP_IDENTITY(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_ATTACH_DETACH_GROUP_IDENTITY_ACK(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_SETUP(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_ALERT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_CONNECT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_TX_CEASED(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_TX_DEMAND(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_DISCONNECT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_U_CALL_RESTORE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_SETUP(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_CALL_PROCEEDING(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_ALERT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_CONNECT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_CONNECT_ACK(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_RELEASE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_CALL_RESTORE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_TX_CEASED(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_TX_GRANTED(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_ATTACH_DETACH_GROUP_IDENTITY(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+int dissect_tetra_D_ATTACH_DETACH_GROUP_IDENTITY_ACK(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+
+/*--- End of included file: packet-tetra-exp.h ---*/
+#line 55 "../../asn1/tetra/packet-tetra-template.h"
#endif /* PACKET_TETRA_H */