diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
commit | 9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch) | |
tree | 2784370cda9bbf2da9114d70f05399c0b229d28c /epan/dissectors/asn1/tcap | |
parent | Adding debian version 4.2.6-1. (diff) | |
download | wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip |
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/asn1/tcap')
-rw-r--r-- | epan/dissectors/asn1/tcap/packet-tcap-template.c | 293 | ||||
-rw-r--r-- | epan/dissectors/asn1/tcap/packet-tcap-template.h | 94 | ||||
-rw-r--r-- | epan/dissectors/asn1/tcap/tcap.cnf | 30 |
3 files changed, 209 insertions, 208 deletions
diff --git a/epan/dissectors/asn1/tcap/packet-tcap-template.c b/epan/dissectors/asn1/tcap/packet-tcap-template.c index 97485493..d21938ed 100644 --- a/epan/dissectors/asn1/tcap/packet-tcap-template.c +++ b/epan/dissectors/asn1/tcap/packet-tcap-template.c @@ -21,6 +21,7 @@ #include <epan/address_types.h> #include <epan/strutil.h> #include <epan/show_exception.h> +#include <wsutil/array.h> #include "packet-ber.h" #include "packet-tcap.h" @@ -32,36 +33,36 @@ #define PFNAME "tcap" /* Initialize the protocol and registered fields */ -static int proto_tcap = -1; -static int hf_tcap_tag = -1; -static int hf_tcap_length = -1; -static int hf_tcap_data = -1; -static int hf_tcap_tid = -1; -static int hf_tcap_constructor_eoc=-1; - -int hf_tcapsrt_SessionId=-1; -int hf_tcapsrt_Duplicate=-1; -int hf_tcapsrt_BeginSession=-1; -int hf_tcapsrt_EndSession=-1; -int hf_tcapsrt_SessionTime=-1; +static int proto_tcap; +static int hf_tcap_tag; +static int hf_tcap_length; +static int hf_tcap_data; +static int hf_tcap_tid; +static int hf_tcap_constructor_eoc; + +int hf_tcapsrt_SessionId; +int hf_tcapsrt_Duplicate; +int hf_tcapsrt_BeginSession; +int hf_tcapsrt_EndSession; +int hf_tcapsrt_SessionTime; #include "packet-tcap-hf.c" /* Initialize the subtree pointers */ -static gint ett_tcap = -1; -static gint ett_param = -1; +static int ett_tcap; +static int ett_param; -static gint ett_otid = -1; -static gint ett_dtid = -1; -gint ett_tcap_stat = -1; +static int ett_otid; +static int ett_dtid; +int ett_tcap_stat; static struct tcapsrt_info_t * gp_tcapsrt_info; -static gboolean tcap_subdissector_used=FALSE; -static dissector_handle_t requested_subdissector_handle = NULL; +static bool tcap_subdissector_used=false; +static dissector_handle_t requested_subdissector_handle; static int ss7pc_address_type = -1; -static struct tcaphash_context_t * gp_tcap_context=NULL; +static struct tcaphash_context_t * gp_tcap_context; #include "packet-tcap-ett.c" @@ -78,27 +79,27 @@ static range_t *ssn_range; /* These two timeout (in second) are used when some message are lost, or when the same TCAP transcation identifier is reused */ -guint gtcap_RepetitionTimeout = 10; -guint gtcap_LostTimeout = 30; -gboolean gtcap_PersistentSRT=FALSE; -gboolean gtcap_DisplaySRT=FALSE; -gboolean gtcap_StatSRT=FALSE; +static unsigned gtcap_RepetitionTimeout = 10; +static unsigned gtcap_LostTimeout = 30; +static bool gtcap_PersistentSRT=false; +bool gtcap_DisplaySRT=false; +bool gtcap_StatSRT=false; /* Global hash tables*/ -static wmem_map_t *tcaphash_context = NULL; -static wmem_map_t *tcaphash_begin = NULL; -static wmem_map_t *tcaphash_cont = NULL; -static wmem_map_t *tcaphash_end = NULL; -static wmem_map_t *tcaphash_ansi = NULL; +static wmem_map_t *tcaphash_context; +static wmem_map_t *tcaphash_begin; +static wmem_map_t *tcaphash_cont; +static wmem_map_t *tcaphash_end; +static wmem_map_t *tcaphash_ansi; -static guint32 tcapsrt_global_SessionId=1; +static uint32_t tcapsrt_global_SessionId=1; -static dissector_handle_t tcap_handle = NULL; +static dissector_handle_t tcap_handle; static dissector_table_t ber_oid_dissector_table; static const char * cur_oid; static const char * tcapext_oid; -static proto_tree * tcap_top_tree=NULL; -static proto_tree * tcap_stat_tree=NULL; +static proto_tree * tcap_top_tree; +static proto_tree * tcap_stat_tree; static dissector_handle_t data_handle; static dissector_handle_t ansi_tcap_handle; @@ -106,35 +107,35 @@ static dissector_handle_t ansi_tcap_handle; static int dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset); static bool dissect_tcap_ITU_ComponentPDU(bool implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_); -static dissector_table_t ansi_sub_dissectors = NULL; -static dissector_table_t itu_sub_dissectors = NULL; +static dissector_table_t ansi_sub_dissectors; +static dissector_table_t itu_sub_dissectors; -extern void add_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) { +extern void add_ansi_tcap_subdissector(uint32_t ssn, dissector_handle_t dissector) { dissector_add_uint("ansi_tcap.ssn",ssn,dissector); dissector_add_uint("sccp.ssn",ssn,tcap_handle); } -extern void add_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) { +extern void add_itu_tcap_subdissector(uint32_t ssn, dissector_handle_t dissector) { dissector_add_uint("itu_tcap.ssn",ssn,dissector); dissector_add_uint("sccp.ssn",ssn,tcap_handle); } -extern void delete_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) { +extern void delete_ansi_tcap_subdissector(uint32_t ssn, dissector_handle_t dissector) { dissector_delete_uint("ansi_tcap.ssn",ssn,dissector); if (!get_itu_tcap_subdissector(ssn)) dissector_delete_uint("sccp.ssn",ssn,tcap_handle); } -extern void delete_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector _U_) { +extern void delete_itu_tcap_subdissector(uint32_t ssn, dissector_handle_t dissector _U_) { dissector_delete_uint("itu_tcap.ssn",ssn,dissector); if (!get_ansi_tcap_subdissector(ssn)) dissector_delete_uint("sccp.ssn", ssn,tcap_handle); } -dissector_handle_t get_ansi_tcap_subdissector(guint32 ssn) { +dissector_handle_t get_ansi_tcap_subdissector(uint32_t ssn) { return dissector_get_uint_handle(ansi_sub_dissectors, ssn); } -dissector_handle_t get_itu_tcap_subdissector(guint32 ssn) { +dissector_handle_t get_itu_tcap_subdissector(uint32_t ssn) { return dissector_get_uint_handle(itu_sub_dissectors, ssn); } @@ -149,10 +150,10 @@ dissector_handle_t get_itu_tcap_subdissector(guint32 ssn) { #ifdef DEBUG_TCAPSRT #include <stdio.h> #include <stdarg.h> -static guint debug_level = 99; +static unsigned debug_level = 99; static void -dbg(guint level, const char* fmt, ...) +dbg(unsigned level, const char* fmt, ...) { va_list ap; @@ -163,8 +164,8 @@ dbg(guint level, const char* fmt, ...) } #endif -static gint -tcaphash_context_equal(gconstpointer k1, gconstpointer k2) +static int +tcaphash_context_equal(const void *k1, const void *k2) { const struct tcaphash_context_key_t *key1 = (const struct tcaphash_context_key_t *) k1; const struct tcaphash_context_key_t *key2 = (const struct tcaphash_context_key_t *) k2; @@ -173,40 +174,40 @@ tcaphash_context_equal(gconstpointer k1, gconstpointer k2) } /* calculate a hash key */ -static guint -tcaphash_context_calchash(gconstpointer k) +static unsigned +tcaphash_context_calchash(const void *k) { const struct tcaphash_context_key_t *key = (const struct tcaphash_context_key_t *) k; return key->session_id; } -static gint -tcaphash_begin_equal(gconstpointer k1, gconstpointer k2) +static int +tcaphash_begin_equal(const void *k1, const void *k2) { const struct tcaphash_begin_info_key_t *key1 = (const struct tcaphash_begin_info_key_t *) k1; const struct tcaphash_begin_info_key_t *key2 = (const struct tcaphash_begin_info_key_t *) k2; if (key1->hashKey == key2->hashKey) { if ( (key1->pc_hash == key2->pc_hash) && (key1->tid == key2->tid) ) - return TRUE; + return true; } - return FALSE; + return false; } /* calculate a hash key */ -static guint -tcaphash_begin_calchash(gconstpointer k) +static unsigned +tcaphash_begin_calchash(const void *k) { const struct tcaphash_begin_info_key_t *key = (const struct tcaphash_begin_info_key_t *) k; - guint hashkey; + unsigned hashkey; /* hashkey = key->opc_hash<<16 + key->dpc_hash<<8 + key->src_tid; */ hashkey = key->tid; return hashkey; } -static gint -tcaphash_cont_equal(gconstpointer k1, gconstpointer k2) +static int +tcaphash_cont_equal(const void *k1, const void *k2) { const struct tcaphash_cont_info_key_t *key1 = (const struct tcaphash_cont_info_key_t *) k1; const struct tcaphash_cont_info_key_t *key2 = (const struct tcaphash_cont_info_key_t *) k2; @@ -217,31 +218,31 @@ tcaphash_cont_equal(gconstpointer k1, gconstpointer k2) (key1->dpc_hash == key2->dpc_hash) && (key1->src_tid == key2->src_tid) && (key1->dst_tid == key2->dst_tid) ) { - return TRUE; + return true; } else if ( (key1->opc_hash == key2->dpc_hash) && (key1->dpc_hash == key2->opc_hash) && (key1->src_tid == key2->dst_tid) && (key1->dst_tid == key2->src_tid) ) { - return TRUE; + return true; } } - return FALSE; + return false; } /* calculate a hash key */ -static guint -tcaphash_cont_calchash(gconstpointer k) +static unsigned +tcaphash_cont_calchash(const void *k) { const struct tcaphash_cont_info_key_t *key = (const struct tcaphash_cont_info_key_t *) k; - guint hashkey; + unsigned hashkey; hashkey = key->src_tid + key->dst_tid; return hashkey; } -static gint -tcaphash_end_equal(gconstpointer k1, gconstpointer k2) +static int +tcaphash_end_equal(const void *k1, const void *k2) { const struct tcaphash_end_info_key_t *key1 = (const struct tcaphash_end_info_key_t *) k1; const struct tcaphash_end_info_key_t *key2 = (const struct tcaphash_end_info_key_t *) k2; @@ -250,23 +251,23 @@ tcaphash_end_equal(gconstpointer k1, gconstpointer k2) if ( (key1->opc_hash == key2->opc_hash) && (key1->dpc_hash == key2->dpc_hash) && (key1->tid == key2->tid) ) - return TRUE; + return true; } - return FALSE; + return false; } /* calculate a hash key */ -static guint -tcaphash_end_calchash(gconstpointer k) +static unsigned +tcaphash_end_calchash(const void *k) { const struct tcaphash_end_info_key_t *key = (const struct tcaphash_end_info_key_t *) k; - guint hashkey; + unsigned hashkey; hashkey = key->tid; return hashkey; } -static gint -tcaphash_ansi_equal(gconstpointer k1, gconstpointer k2) +static int +tcaphash_ansi_equal(const void *k1, const void *k2) { const struct tcaphash_ansi_info_key_t *key1 = (const struct tcaphash_ansi_info_key_t *) k1; const struct tcaphash_ansi_info_key_t *key2 = (const struct tcaphash_ansi_info_key_t *) k2; @@ -281,17 +282,17 @@ tcaphash_ansi_equal(gconstpointer k1, gconstpointer k2) (key1->dpc_hash == key2->opc_hash) && (key1->tid == key2->tid) ) ) - return TRUE; + return true; } - return FALSE; + return false; } /* calculate a hash key */ -static guint -tcaphash_ansi_calchash(gconstpointer k) +static unsigned +tcaphash_ansi_calchash(const void *k) { const struct tcaphash_ansi_info_key_t *key = (const struct tcaphash_ansi_info_key_t *) k; - guint hashkey; + unsigned hashkey; /* hashkey = key->opc_hash<<16 + key->dpc_hash<<8 + key->src_tid; */ hashkey = key->tid; return hashkey; @@ -306,7 +307,7 @@ update_tcaphash_begincall(struct tcaphash_begincall_t *p_tcaphash_begincall, { p_tcaphash_begincall->context->first_frame = pinfo->num; p_tcaphash_begincall->context->last_frame = 0; - p_tcaphash_begincall->context->responded = FALSE; + p_tcaphash_begincall->context->responded = false; p_tcaphash_begincall->context->begin_time = pinfo->abs_ts; } @@ -331,7 +332,7 @@ append_tcaphash_begincall(struct tcaphash_begincall_t *prev_begincall, p_new_tcaphash_begincall->context->first_frame = pinfo->num; p_new_tcaphash_begincall->next_begincall=NULL; p_new_tcaphash_begincall->previous_begincall=prev_begincall; - p_new_tcaphash_begincall->father=FALSE; + p_new_tcaphash_begincall->father=false; #ifdef DEBUG_TCAPSRT dbg(10,"+B%d ", p_new_tcaphash_begincall->context->session_id); @@ -356,7 +357,7 @@ update_tcaphash_ansicall(struct tcaphash_ansicall_t *p_tcaphash_ansicall, { p_tcaphash_ansicall->context->first_frame = pinfo->num; p_tcaphash_ansicall->context->last_frame = 0; - p_tcaphash_ansicall->context->responded = FALSE; + p_tcaphash_ansicall->context->responded = false; p_tcaphash_ansicall->context->begin_time = pinfo->abs_ts; } @@ -381,7 +382,7 @@ append_tcaphash_ansicall(struct tcaphash_ansicall_t *prev_ansicall, p_new_tcaphash_ansicall->context->first_frame = pinfo->num; p_new_tcaphash_ansicall->next_ansicall=NULL; p_new_tcaphash_ansicall->previous_ansicall=prev_ansicall; - p_new_tcaphash_ansicall->father=FALSE; + p_new_tcaphash_ansicall->father=false; #ifdef DEBUG_TCAPSRT dbg(10,"+A%d ", p_new_tcaphash_ansicall->context->session_id); @@ -413,7 +414,7 @@ append_tcaphash_contcall(struct tcaphash_contcall_t *prev_contcall, p_new_tcaphash_contcall->contkey=prev_contcall->contkey; p_new_tcaphash_contcall->next_contcall=NULL; p_new_tcaphash_contcall->previous_contcall=prev_contcall; - p_new_tcaphash_contcall->father=FALSE; + p_new_tcaphash_contcall->father=false; #ifdef DEBUG_TCAPSRT dbg(10,"+C%d ", p_new_tcaphash_contcall->context->session_id); @@ -439,7 +440,7 @@ append_tcaphash_endcall(struct tcaphash_endcall_t *prev_endcall, p_new_tcaphash_endcall->endkey=prev_endcall->endkey; p_new_tcaphash_endcall->next_endcall=NULL; p_new_tcaphash_endcall->previous_endcall=prev_endcall; - p_new_tcaphash_endcall->father=FALSE; + p_new_tcaphash_endcall->father=false; #ifdef DEBUG_TCAPSRT dbg(10,"+E%d ", p_new_tcaphash_endcall->context->session_id); @@ -455,7 +456,7 @@ append_tcaphash_endcall(struct tcaphash_endcall_t *prev_endcall, */ static struct tcaphash_begincall_t * find_tcaphash_begin(struct tcaphash_begin_info_key_t *p_tcaphash_begin_key, - packet_info *pinfo, gboolean isBegin) + packet_info *pinfo, bool isBegin) { struct tcaphash_begincall_t *p_tcaphash_begincall = NULL; p_tcaphash_begincall = (struct tcaphash_begincall_t *)wmem_map_lookup(tcaphash_begin, p_tcaphash_begin_key); @@ -541,7 +542,7 @@ find_tcaphash_cont(struct tcaphash_cont_info_key_t *p_tcaphash_cont_key, static struct tcaphash_endcall_t * find_tcaphash_end(struct tcaphash_end_info_key_t *p_tcaphash_end_key, - packet_info *pinfo, gboolean isEnd) + packet_info *pinfo, bool isEnd) { struct tcaphash_endcall_t *p_tcaphash_endcall = NULL; p_tcaphash_endcall = (struct tcaphash_endcall_t *)wmem_map_lookup(tcaphash_end, p_tcaphash_end_key); @@ -637,7 +638,7 @@ new_tcaphash_begin(struct tcaphash_begin_info_key_t *p_tcaphash_begin_key, p_new_tcaphash_begincall->beginkey=p_new_tcaphash_begin_key; p_new_tcaphash_begincall->context=p_tcaphash_context; p_tcaphash_context->begincall=p_new_tcaphash_begincall; - p_new_tcaphash_begincall->father=TRUE; + p_new_tcaphash_begincall->father=true; p_new_tcaphash_begincall->next_begincall=NULL; p_new_tcaphash_begincall->previous_begincall=NULL; @@ -676,7 +677,7 @@ new_tcaphash_cont(struct tcaphash_cont_info_key_t *p_tcaphash_cont_key, p_new_tcaphash_contcall->contkey=p_new_tcaphash_cont_key; p_new_tcaphash_contcall->context=p_tcaphash_context; p_tcaphash_context->contcall=p_new_tcaphash_contcall; - p_new_tcaphash_contcall->father=TRUE; + p_new_tcaphash_contcall->father=true; p_new_tcaphash_contcall->next_contcall=NULL; p_new_tcaphash_contcall->previous_contcall=NULL; @@ -713,7 +714,7 @@ new_tcaphash_end(struct tcaphash_end_info_key_t *p_tcaphash_end_key, p_new_tcaphash_endcall->endkey=p_new_tcaphash_end_key; p_new_tcaphash_endcall->context=p_tcaphash_context; p_tcaphash_context->endcall=p_new_tcaphash_endcall; - p_new_tcaphash_endcall->father=TRUE; + p_new_tcaphash_endcall->father=true; p_new_tcaphash_endcall->next_endcall=NULL; p_new_tcaphash_endcall->previous_endcall=NULL; @@ -748,7 +749,7 @@ new_tcaphash_ansi(struct tcaphash_ansi_info_key_t *p_tcaphash_ansi_key, p_new_tcaphash_ansicall->ansikey=p_new_tcaphash_ansi_key; p_new_tcaphash_ansicall->context=p_tcaphash_context; p_tcaphash_context->ansicall=p_new_tcaphash_ansicall; - p_new_tcaphash_ansicall->father=TRUE; + p_new_tcaphash_ansicall->father=true; p_new_tcaphash_ansicall->next_ansicall=NULL; p_new_tcaphash_ansicall->previous_ansicall=NULL; @@ -888,11 +889,11 @@ tcaphash_begin_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, and this request occurred after the timeout for message lost */ if ( ( p_tcaphash_begincall->context->last_frame != 0 && pinfo->num > p_tcaphash_begincall->context->first_frame - && (guint) pinfo->abs_ts.secs > (guint)(p_tcaphash_begincall->context->begin_time.secs + gtcap_RepetitionTimeout) + && (unsigned) pinfo->abs_ts.secs > (unsigned)(p_tcaphash_begincall->context->begin_time.secs + gtcap_RepetitionTimeout) ) || ( p_tcaphash_begincall->context->last_frame == 0 && pinfo->num > p_tcaphash_begincall->context->first_frame - && (guint)pinfo->abs_ts.secs > (guint)(p_tcaphash_begincall->context->begin_time.secs + gtcap_LostTimeout) + && (unsigned)pinfo->abs_ts.secs > (unsigned)(p_tcaphash_begincall->context->begin_time.secs + gtcap_LostTimeout) ) ) { @@ -1026,7 +1027,7 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *pi; proto_item *stat_item=NULL; proto_tree *stat_tree=NULL; - gboolean use_dst = FALSE; + bool use_dst = false; #ifdef DEBUG_TCAPSRT dbg(51,"src %s srcTid %lx dst %s dstTid %lx ", address_to_str(pinfo->pool, &pinfo->src), p_tcapsrt_info->src_tid, address_to_str(pinfo->pool, &pinfo->dst), p_tcapsrt_info->dst_tid); @@ -1080,7 +1081,7 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, dbg(51,"addr %s ", address_to_str(pinfo->pool, &pinfo->dst)); dbg(51,"Tid %lx \n",tcaphash_begin_key.tid); #endif - p_tcaphash_begincall = find_tcaphash_begin(&tcaphash_begin_key, pinfo, FALSE); + p_tcaphash_begincall = find_tcaphash_begin(&tcaphash_begin_key, pinfo, false); if(!p_tcaphash_begincall){ try_src: /* can this actually happen? */ @@ -1088,7 +1089,7 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, dbg(12,"BNotFound trying stid,src"); #endif /* Do we have a continue from the same source? (stid,src) */ - use_dst = TRUE; + use_dst = true; tcaphash_begin_key.tid = p_tcapsrt_info->src_tid; if (pinfo->src.type == ss7pc_address_type && pinfo->dst.type == ss7pc_address_type) { @@ -1104,7 +1105,7 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, dbg(51,"addr %s ", address_to_str(pinfo->pool, &pinfo->src)); dbg(51,"Tid %lx \n",tcaphash_begin_key.tid); #endif - p_tcaphash_begincall = find_tcaphash_begin(&tcaphash_begin_key, pinfo,FALSE); + p_tcaphash_begincall = find_tcaphash_begin(&tcaphash_begin_key, pinfo,false); } if(p_tcaphash_begincall && !p_tcaphash_begincall->context->contcall ) { @@ -1112,7 +1113,7 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, dbg(12,"BFound \n"); #endif p_tcaphash_context=p_tcaphash_begincall->context; - p_tcaphash_context->responded=TRUE; + p_tcaphash_context->responded=true; #ifdef DEBUG_TCAPSRT dbg(10,"New Ckey %lx ",tcaphash_cont_key.hashKey); @@ -1217,7 +1218,7 @@ tcaphash_end_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, dbg(11,"addr %s ", address_to_str(pinfo->pool, &pinfo->dst)); dbg(51,"Tid %lx ",tcaphash_end_key.tid); #endif - p_tcaphash_endcall = find_tcaphash_end(&tcaphash_end_key, pinfo,TRUE); + p_tcaphash_endcall = find_tcaphash_end(&tcaphash_end_key, pinfo,true); if(!p_tcaphash_endcall) { #ifdef DEBUG_TCAPSRT @@ -1239,7 +1240,7 @@ tcaphash_end_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, dbg(51,"addr %s ", address_to_str(pinfo->pool, &pinfo->dst)); dbg(51,"Tid %lx ",tcaphash_begin_key.tid); #endif - p_tcaphash_begincall = find_tcaphash_begin(&tcaphash_begin_key, pinfo,FALSE); + p_tcaphash_begincall = find_tcaphash_begin(&tcaphash_begin_key, pinfo,false); if(!p_tcaphash_begincall) { #ifdef DEBUG_TCAPSRT dbg(12,"BnotFound "); @@ -1314,7 +1315,7 @@ tcaphash_ansi_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, struct tcaphash_ansi_info_key_t tcaphash_ansi_key; proto_item *pi; nstime_t delta; - gboolean isResponse=FALSE; + bool isResponse=false; proto_tree * stat_tree=NULL; proto_item * stat_item=NULL; @@ -1351,7 +1352,7 @@ tcaphash_ansi_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, #ifdef DEBUG_TCAPSRT dbg(22,"Request already seen "); #endif - isResponse=FALSE; + isResponse=false; p_tcaphash_context=p_tcaphash_ansicall->context; break; } @@ -1362,7 +1363,7 @@ tcaphash_ansi_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, #ifdef DEBUG_TCAPSRT dbg(22,"Response already seen "); #endif - isResponse=TRUE; + isResponse=true; p_tcaphash_context=p_tcaphash_ansicall->context; break; } @@ -1377,10 +1378,10 @@ tcaphash_ansi_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, dbg(12,"Update key %lx ",tcaphash_ansi_key.hashKey); #endif p_tcaphash_ansicall->context->last_frame = pinfo->num; - p_tcaphash_ansicall->context->responded = TRUE; - p_tcaphash_ansicall->context->closed = TRUE; + p_tcaphash_ansicall->context->responded = true; + p_tcaphash_ansicall->context->closed = true; p_tcaphash_context=p_tcaphash_ansicall->context; - isResponse=TRUE; + isResponse=true; if (gtcap_DisplaySRT && tree) { stat_tree = proto_tree_add_subtree(tree, tvb, 0, -1, ett_tcap_stat, &stat_item, "Stat"); @@ -1421,11 +1422,11 @@ tcaphash_ansi_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, and this request occurred after the timeout for message lost */ if ( ( p_tcaphash_ansicall->context->last_frame != 0 && pinfo->num > p_tcaphash_ansicall->context->first_frame - && (guint) pinfo->abs_ts.secs > (guint)(p_tcaphash_ansicall->context->begin_time.secs + gtcap_RepetitionTimeout) + && (unsigned) pinfo->abs_ts.secs > (unsigned)(p_tcaphash_ansicall->context->begin_time.secs + gtcap_RepetitionTimeout) ) || ( p_tcaphash_ansicall->context->last_frame == 0 && pinfo->num > p_tcaphash_ansicall->context->first_frame - && (guint)pinfo->abs_ts.secs > (guint)(p_tcaphash_ansicall->context->begin_time.secs + gtcap_LostTimeout) + && (unsigned)pinfo->abs_ts.secs > (unsigned)(p_tcaphash_ansicall->context->begin_time.secs + gtcap_LostTimeout) ) ) { @@ -1675,10 +1676,10 @@ tcapsrt_close(struct tcaphash_context_t *p_tcaphash_context, dbg(60,"Force close "); #endif if (p_tcaphash_context) { - p_tcaphash_context->responded=TRUE; + p_tcaphash_context->responded=true; p_tcaphash_context->last_frame = pinfo->num; p_tcaphash_context->end_time = pinfo->abs_ts; - p_tcaphash_context->closed=TRUE; + p_tcaphash_context->closed=true; /* If the endkey is present */ if (p_tcaphash_context->endcall @@ -1822,9 +1823,9 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d struct tcaphash_context_t * p_tcap_context; dissector_handle_t subdissector_handle; asn1_ctx_t asn1_ctx; - gint8 ber_class; + int8_t ber_class; bool pc; - gint tag; + int tag; struct tcap_private_t *p_tcap_private; /* Check if ANSI TCAP and call the ANSI TCAP dissector if that's the case @@ -1859,7 +1860,7 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d } /* ITU TCAP */ - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); tcap_top_tree = parent_tree; tcap_stat_tree = NULL; @@ -1878,9 +1879,9 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d p_tcap_private = wmem_new0(pinfo->pool, struct tcap_private_t); asn1_ctx.value_ptr = p_tcap_private; gp_tcapsrt_info=tcapsrt_razinfo(); - tcap_subdissector_used=FALSE; + tcap_subdissector_used=false; gp_tcap_context=NULL; - dissect_tcap_TCMessage(FALSE, tvb, 0, &asn1_ctx, tree, -1); + dissect_tcap_TCMessage(false, tvb, 0, &asn1_ctx, tree, -1); if (!tcap_subdissector_used ) { p_tcap_context=tcapsrt_call_matching(tvb, pinfo, tcap_stat_tree, gp_tcapsrt_info); @@ -1892,14 +1893,14 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d if ( p_tcap_context && cur_oid && !p_tcap_context->oid_present ) { /* Save the application context and the sub dissector */ (void) g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid)); - p_tcap_context->oid_present=TRUE; + p_tcap_context->oid_present=true; if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) { p_tcap_context->subdissector_handle=subdissector_handle; - p_tcap_context->subdissector_present=TRUE; + p_tcap_context->subdissector_present=true; } } if (p_tcap_context && p_tcap_context->callback) { - /* Callback fonction for the upper layer */ + /* Callback function for the upper layer */ (p_tcap_context->callback)(tvb, pinfo, tcap_stat_tree, p_tcap_context); } } @@ -1993,7 +1994,7 @@ proto_register_tcap(void) }; /* Setup protocol subtree array */ - static gint *ett[] = { + static int *ett[] = { &ett_tcap, &ett_param, &ett_otid, @@ -2025,7 +2026,7 @@ proto_register_tcap(void) #if 0 prefs_register_enum_preference(tcap_module, "standard", "ITU TCAP standard", "The SS7 standard used in ITU TCAP packets", - &tcap_standard, tcap_options, FALSE); + &tcap_standard, tcap_options, false); #else prefs_register_obsolete_preference(tcap_module, "standard"); #endif @@ -2077,14 +2078,14 @@ proto_register_tcap(void) } -static void range_delete_callback(guint32 ssn, gpointer ptr _U_) +static void range_delete_callback(uint32_t ssn, void *ptr _U_) { if ( ssn && !get_ansi_tcap_subdissector(ssn) && !get_itu_tcap_subdissector(ssn) ) { dissector_delete_uint("sccp.ssn", ssn, tcap_handle); } } -static void range_add_callback(guint32 ssn, gpointer ptr _U_) +static void range_add_callback(uint32_t ssn, void *ptr _U_) { if (ssn && !get_ansi_tcap_subdissector(ssn) && !get_itu_tcap_subdissector(ssn) ) { dissector_add_uint("sccp.ssn", ssn, tcap_handle); @@ -2117,15 +2118,15 @@ static int // NOLINTNEXTLINE(misc-no-recursion) dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset) { - gint tag_offset, saved_offset, len_offset; + int tag_offset, saved_offset, len_offset; tvbuff_t *next_tvb; proto_tree *subtree; - gint8 ber_class; + int8_t ber_class; bool pc; - gint32 tag; - guint32 len; - guint32 tag_length; - guint32 len_length; + int32_t tag; + uint32_t len; + uint32_t tag_length; + uint32_t len_length; bool ind_field; while (tvb_reported_length_remaining(tvb, offset) > 0) @@ -2154,9 +2155,9 @@ dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset proto_tree_add_uint(subtree, hf_tcap_length, tvb, tag_offset, len_length, len); - if (len-(2*ind_field)) /*should always be positive unless we get an empty contructor pointless? */ + if (len - (ind_field ? 2 : 0)) /*should always be positive unless we get an empty constructor pointless? */ { - next_tvb = tvb_new_subset_length(tvb, offset, len-(2*ind_field)); + next_tvb = tvb_new_subset_length(tvb, offset, len - (ind_field ? 2 : 0)); increment_dissection_depth(actx->pinfo); dissect_tcap_param(actx, subtree,next_tvb,0); decrement_dissection_depth(actx->pinfo); @@ -2182,7 +2183,7 @@ dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset if (len) /* check for NULLS */ { next_tvb = tvb_new_subset_length(tvb, offset, len); - dissect_ber_octet_string(TRUE, actx, tree, next_tvb, 0, + dissect_ber_octet_string(true, actx, tree, next_tvb, 0, hf_tcap_data, NULL); } @@ -2199,7 +2200,7 @@ static bool dissect_tcap_ITU_ComponentPDU(bool implicit_tag _U_, tvbuff_t *tvb, int offset _U_, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) { dissector_handle_t subdissector_handle=NULL; - gboolean is_subdissector=FALSE; + bool is_subdissector=false; struct tcaphash_context_t * p_tcap_context=NULL; struct tcap_private_t *p_tcap_private = (struct tcap_private_t*)actx->value_ptr; @@ -2212,7 +2213,7 @@ dissect_tcap_ITU_ComponentPDU(bool implicit_tag _U_, tvbuff_t *tvb, int offset _ */ if (!tcap_subdissector_used) { p_tcap_context=tcapsrt_call_matching(tvb, actx->pinfo, tcap_stat_tree, gp_tcapsrt_info); - tcap_subdissector_used=TRUE; + tcap_subdissector_used=false; gp_tcap_context=p_tcap_context; p_tcap_private->context=p_tcap_context; } else { @@ -2232,24 +2233,24 @@ dissect_tcap_ITU_ComponentPDU(bool implicit_tag _U_, tvbuff_t *tvb, int offset _ (void) g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid)); if ((subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid))) { p_tcap_context->subdissector_handle = subdissector_handle; - p_tcap_context->subdissector_present = TRUE; + p_tcap_context->subdissector_present = true; } } } else { /* We do not have the OID in the TCAP context, so store it */ (void) g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid)); - p_tcap_context->oid_present = TRUE; + p_tcap_context->oid_present = true; /* Try to find a subdissector according to OID */ if ((subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid))) { p_tcap_context->subdissector_handle = subdissector_handle; - p_tcap_context->subdissector_present = TRUE; + p_tcap_context->subdissector_present = true; } else { /* Not found, so try to find a subdissector according to SSN */ if ((subdissector_handle = get_itu_tcap_subdissector(actx->pinfo->match_uint))) { /* Found according to SSN */ p_tcap_context->subdissector_handle = subdissector_handle; - p_tcap_context->subdissector_present = TRUE; + p_tcap_context->subdissector_present = true; } } } /* context OID */ @@ -2257,7 +2258,7 @@ dissect_tcap_ITU_ComponentPDU(bool implicit_tag _U_, tvbuff_t *tvb, int offset _ /* Copy the OID from the TCAP context to the current oid */ if (p_tcap_context->oid_present) { p_tcap_private->oid = (void*)p_tcap_context->oid; - p_tcap_private->acv = TRUE; + p_tcap_private->acv = true; } } /* no OID */ } /* no TCAP context */ @@ -2267,12 +2268,12 @@ dissect_tcap_ITU_ComponentPDU(bool implicit_tag _U_, tvbuff_t *tvb, int offset _ && p_tcap_context->subdissector_present) { /* Take the subdissector from the context */ subdissector_handle = p_tcap_context->subdissector_handle; - is_subdissector = TRUE; + is_subdissector = true; } /* Have SccpUsersTable protocol taking precedence over sccp.ssn table */ if (!is_subdissector && requested_subdissector_handle) { - is_subdissector = TRUE; + is_subdissector = true; subdissector_handle = requested_subdissector_handle; } @@ -2288,27 +2289,27 @@ dissect_tcap_ITU_ComponentPDU(bool implicit_tag _U_, tvbuff_t *tvb, int offset _ if ((subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid))) { /* found */ - is_subdissector = TRUE; + is_subdissector = true; } else { /* Search if we can found the sub protocol according to the SSN table */ if ((subdissector_handle = get_itu_tcap_subdissector(actx->pinfo->match_uint))) { /* Found according to SSN */ - is_subdissector = TRUE; + is_subdissector = true; } else { /* Nothing found, take the Data handler */ subdissector_handle = data_handle; - is_subdissector = TRUE; + is_subdissector = true; } /* SSN */ } /* ACN */ } else { /* There is no A.C.N for this transaction, so search in the SSN table */ if ((subdissector_handle = get_itu_tcap_subdissector(actx->pinfo->match_uint))) { /* Found according to SSN */ - is_subdissector = TRUE; + is_subdissector = true; } else { subdissector_handle = data_handle; - is_subdissector = TRUE; + is_subdissector = true; } } /* OID */ } else { @@ -2317,13 +2318,13 @@ dissect_tcap_ITU_ComponentPDU(bool implicit_tag _U_, tvbuff_t *tvb, int offset _ /* Call the sub dissector if present, and not already called */ if (is_subdissector) { - gboolean is_active = call_dissector_only(subdissector_handle, tvb, actx->pinfo, tree, actx->value_ptr); + bool is_active = call_dissector_only(subdissector_handle, tvb, actx->pinfo, tree, actx->value_ptr); col_set_fence(actx->pinfo->cinfo, COL_INFO); if(!is_active){ - return FALSE; + return false; } } - return TRUE; + return true; } void diff --git a/epan/dissectors/asn1/tcap/packet-tcap-template.h b/epan/dissectors/asn1/tcap/packet-tcap-template.h index 8e3a6ccd..abd2faef 100644 --- a/epan/dissectors/asn1/tcap/packet-tcap-template.h +++ b/epan/dissectors/asn1/tcap/packet-tcap-template.h @@ -49,13 +49,13 @@ #define TC_ANSI_ALL 6 struct tcap_private_t { - gboolean acv; /* Is the Application Context Version present */ + bool acv; /* Is the Application Context Version present */ const void * oid; - guint32 session_id; + uint32_t session_id; void * context; - gchar *TransactionID_str; - guint32 src_tid; - guint32 dst_tid; + char *TransactionID_str; + uint32_t src_tid; + uint32_t dst_tid; }; /** @file @@ -66,17 +66,17 @@ struct tcap_private_t { #define LENGTH_OID 23 struct tcaphash_context_t { struct tcaphash_context_key_t * key; - guint32 session_id; - guint32 first_frame; - guint32 last_frame; + uint32_t session_id; + uint32_t first_frame; + uint32_t last_frame; nstime_t begin_time; /**< time of arrival of TC_BEGIN */ nstime_t end_time; /**< time of closing message */ - gboolean responded; /**< true, if request has been responded */ - gboolean closed; - gboolean upper_dissector; - gboolean oid_present; - gchar oid[LENGTH_OID+1]; - gboolean subdissector_present; + bool responded; /**< true, if request has been responded */ + bool closed; + bool upper_dissector; + bool oid_present; + char oid[LENGTH_OID+1]; + bool subdissector_present; dissector_handle_t subdissector_handle; void (* callback) (tvbuff_t *,packet_info *, proto_tree *, struct tcaphash_context_t *); struct tcaphash_begincall_t * begincall; @@ -88,7 +88,7 @@ struct tcaphash_context_t { struct tcaphash_begincall_t { struct tcaphash_begin_info_key_t * beginkey; struct tcaphash_context_t * context; - gboolean father; + bool father; struct tcaphash_begincall_t * next_begincall; struct tcaphash_begincall_t * previous_begincall; }; @@ -96,7 +96,7 @@ struct tcaphash_begincall_t { struct tcaphash_contcall_t { struct tcaphash_cont_info_key_t * contkey; struct tcaphash_context_t * context; - gboolean father; + bool father; struct tcaphash_contcall_t * next_contcall; struct tcaphash_contcall_t * previous_contcall; }; @@ -104,7 +104,7 @@ struct tcaphash_contcall_t { struct tcaphash_endcall_t { struct tcaphash_end_info_key_t * endkey; struct tcaphash_context_t * context; - gboolean father; + bool father; struct tcaphash_endcall_t * next_endcall; struct tcaphash_endcall_t * previous_endcall; }; @@ -112,7 +112,7 @@ struct tcaphash_endcall_t { struct tcaphash_ansicall_t { struct tcaphash_ansi_info_key_t * ansikey; struct tcaphash_context_t * context; - gboolean father; + bool father; struct tcaphash_ansicall_t * next_ansicall; struct tcaphash_ansicall_t * previous_ansicall; }; @@ -121,44 +121,44 @@ struct tcaphash_ansicall_t { of the TC_BEGIN containing the InitialDP */ struct tcaphash_context_key_t { - guint32 session_id; + uint32_t session_id; }; struct tcaphash_begin_info_key_t { - guint32 hashKey; - guint32 tid; - guint32 pc_hash; + uint32_t hashKey; + uint32_t tid; + uint32_t pc_hash; }; struct tcaphash_cont_info_key_t { - guint32 hashKey; - guint32 src_tid; - guint32 dst_tid; - guint32 opc_hash; - guint32 dpc_hash; + uint32_t hashKey; + uint32_t src_tid; + uint32_t dst_tid; + uint32_t opc_hash; + uint32_t dpc_hash; }; struct tcaphash_end_info_key_t { - guint32 hashKey; - guint32 tid; - guint32 opc_hash; - guint32 dpc_hash; + uint32_t hashKey; + uint32_t tid; + uint32_t opc_hash; + uint32_t dpc_hash; }; struct tcaphash_ansi_info_key_t { - guint32 hashKey; - guint32 tid; - guint32 opc_hash; - guint32 dpc_hash; + uint32_t hashKey; + uint32_t tid; + uint32_t opc_hash; + uint32_t dpc_hash; }; /** List of infos to store for the analyse */ struct tcapsrt_info_t { - guint32 tcap_session_id; - guint32 src_tid; - guint32 dst_tid; - guint8 ope; + uint32_t tcap_session_id; + uint32_t src_tid; + uint32_t dst_tid; + uint8_t ope; }; /** @@ -190,22 +190,22 @@ struct tcaphash_context_t * tcapsrt_call_matching(tvbuff_t *tvb, proto_tree *tree, struct tcapsrt_info_t * p_tcap_info); -WS_DLL_PUBLIC gboolean gtcap_StatSRT; +WS_DLL_PUBLIC bool gtcap_StatSRT; -extern gint tcap_standard; +extern int tcap_standard; extern const value_string tcap_component_type_str[]; void proto_reg_handoff_tcap(void); void proto_register_tcap(void); -extern dissector_handle_t get_itu_tcap_subdissector(guint32 ssn); -dissector_handle_t get_ansi_tcap_subdissector(guint32 ssn); +extern dissector_handle_t get_itu_tcap_subdissector(uint32_t ssn); +dissector_handle_t get_ansi_tcap_subdissector(uint32_t ssn); -extern void add_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); -WS_DLL_PUBLIC void add_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); +extern void add_ansi_tcap_subdissector(uint32_t ssn, dissector_handle_t dissector); +WS_DLL_PUBLIC void add_itu_tcap_subdissector(uint32_t ssn, dissector_handle_t dissector); -extern void delete_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); -WS_DLL_PUBLIC void delete_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); +extern void delete_ansi_tcap_subdissector(uint32_t ssn, dissector_handle_t dissector); +WS_DLL_PUBLIC void delete_itu_tcap_subdissector(uint32_t ssn, dissector_handle_t dissector); extern void call_tcap_dissector(dissector_handle_t, tvbuff_t*, packet_info*, proto_tree*); diff --git a/epan/dissectors/asn1/tcap/tcap.cnf b/epan/dissectors/asn1/tcap/tcap.cnf index 7e52d38c..3b8abe51 100644 --- a/epan/dissectors/asn1/tcap/tcap.cnf +++ b/epan/dissectors/asn1/tcap/tcap.cnf @@ -60,7 +60,7 @@ ABRT-apdu/_untag/user-information abrt_user_information #---------------------------------------------------------------------------------------- #.FN_BODY DialogueOC - offset = dissect_tcap_ExternalPDU(FALSE /*implicit_tag*/, tvb, offset, actx, tree, -1); + offset = dissect_tcap_ExternalPDU(false /*implicit_tag*/, tvb, offset, actx, tree, -1); #---------------------------------------------------------------------------------------- #.FN_BODY ExternalPDU @@ -70,7 +70,7 @@ ABRT-apdu/_untag/user-information abrt_user_information #---------------------------------------------------------------------------------------- #.FN_BODY Dialog1 - offset = dissect_tcap_DialoguePDU(TRUE, tvb, offset, actx, tree, -1); + offset = dissect_tcap_DialoguePDU(true, tvb, offset, actx, tree, -1); #---------------------------------------------------------------------------------------- #.FN_BODY Parameter @@ -80,11 +80,11 @@ ABRT-apdu/_untag/user-information abrt_user_information #---------------------------------------------------------------------------------------- #.FN_BODY Component tvbuff_t *next_tvb; - gint8 ber_class; + int8_t ber_class; bool pc; - gint tag; - guint32 len, comp_offset; - volatile guint32 _offset; + int tag; + uint32_t len, comp_offset; + volatile uint32_t _offset; bool ind_field; comp_offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag); @@ -118,7 +118,7 @@ ABRT-apdu/_untag/user-information abrt_user_information %(DEFAULT_BODY)s if (p_tcap_private) { p_tcap_private->oid= (const void*) cur_oid; - p_tcap_private->acv=TRUE; + p_tcap_private->acv=true; } #---------------------------------------------------------------------------------------- #.FN_BODY AARQ-apdu/_untag/application-context-name FN_VARIANT = _str VAL_PTR = &cur_oid @@ -126,7 +126,7 @@ ABRT-apdu/_untag/user-information abrt_user_information %(DEFAULT_BODY)s if (p_tcap_private) { p_tcap_private->oid= (const void*) cur_oid; - p_tcap_private->acv=TRUE; + p_tcap_private->acv=true; } #---------------------------------------------------------------------------------------- #.FN_BODY AARE-apdu/_untag/application-context-name FN_VARIANT = _str VAL_PTR = &cur_oid @@ -134,12 +134,12 @@ ABRT-apdu/_untag/user-information abrt_user_information %(DEFAULT_BODY)s if (p_tcap_private) { p_tcap_private->oid= (const void*) cur_oid; - p_tcap_private->acv=TRUE; + p_tcap_private->acv=true; } #---------------------------------------------------------------------------------------- #.FN_BODY OrigTransactionID tvbuff_t *parameter_tvb; - guint8 len, i; + uint8_t len, i; proto_tree *subtree; int saved_offset; struct tcap_private_t *p_tcap_private = (struct tcap_private_t*)actx->value_ptr; @@ -158,7 +158,7 @@ ABRT-apdu/_untag/user-information abrt_user_information len = tvb_reported_length_remaining(parameter_tvb, 0); switch(len) { case 1: - gp_tcapsrt_info->src_tid=tvb_get_guint8(parameter_tvb, 0); + gp_tcapsrt_info->src_tid=tvb_get_uint8(parameter_tvb, 0); break; case 2: gp_tcapsrt_info->src_tid=tvb_get_ntohs(parameter_tvb, 0); @@ -179,7 +179,7 @@ ABRT-apdu/_untag/user-information abrt_user_information if (len) { col_append_str(actx->pinfo->cinfo, COL_INFO, "otid("); for (i = 0; i < len; i++) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%02x",tvb_get_guint8(parameter_tvb,i)); + col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%02x",tvb_get_uint8(parameter_tvb,i)); } col_append_str(actx->pinfo->cinfo, COL_INFO, ") "); } @@ -188,7 +188,7 @@ ABRT-apdu/_untag/user-information abrt_user_information #---------------------------------------------------------------------------------------- #.FN_BODY DestTransactionID tvbuff_t *parameter_tvb; - guint8 len , i; + uint8_t len , i; proto_tree *subtree; int saved_offset; struct tcap_private_t *p_tcap_private = (struct tcap_private_t*)actx->value_ptr; @@ -207,7 +207,7 @@ ABRT-apdu/_untag/user-information abrt_user_information len = tvb_reported_length_remaining(parameter_tvb, 0); switch(len) { case 1: - gp_tcapsrt_info->dst_tid=tvb_get_guint8(parameter_tvb, 0); + gp_tcapsrt_info->dst_tid=tvb_get_uint8(parameter_tvb, 0); break; case 2: gp_tcapsrt_info->dst_tid=tvb_get_ntohs(parameter_tvb, 0); @@ -228,7 +228,7 @@ ABRT-apdu/_untag/user-information abrt_user_information if (len) { col_append_str(actx->pinfo->cinfo, COL_INFO, "dtid("); for(i = 0; i < len; i++) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%02x",tvb_get_guint8(parameter_tvb,i)); + col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%02x",tvb_get_uint8(parameter_tvb,i)); } col_append_str(actx->pinfo->cinfo, COL_INFO, ") "); } |