From beroset:
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48429
This commit is contained in:
parent
b848149964
commit
7c56677cf9
|
@ -236,7 +236,7 @@ find_saved_invokedata(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U
|
|||
}
|
||||
|
||||
/* The hash string needs to contain src and dest to distiguish differnt flows */
|
||||
buf = ep_alloc(MAX_TID_STR_LEN);
|
||||
buf = (char *)ep_alloc(MAX_TID_STR_LEN);
|
||||
buf[0] = '\0';
|
||||
/* Reverse order to invoke */
|
||||
g_snprintf(buf, MAX_TID_STR_LEN, "%s%s%s",
|
||||
|
|
|
@ -336,10 +336,10 @@ dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn
|
|||
opcode = 0;
|
||||
application_context_version = 0;
|
||||
if (actx->pinfo->private_data != NULL){
|
||||
p_private_tcap=actx->pinfo->private_data;
|
||||
p_private_tcap=(struct tcap_private_t *)actx->pinfo->private_data;
|
||||
|
||||
if (p_private_tcap->acv==TRUE ){
|
||||
version_ptr = strrchr(p_private_tcap->oid,'.');
|
||||
version_ptr = strrchr((char *)p_private_tcap->oid,'.');
|
||||
if (version_ptr)
|
||||
application_context_version = atoi(version_ptr+1);
|
||||
}
|
||||
|
|
|
@ -544,11 +544,11 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
|
|||
%(ACTX)s->value_ptr = &guid_tvb;
|
||||
%(DEFAULT_BODY)s
|
||||
if (guid_tvb)
|
||||
tvb_get_ntohguid(guid_tvb, 0, call_id_guid = ep_alloc(sizeof(e_guid_t)));
|
||||
tvb_get_ntohguid(guid_tvb, 0, call_id_guid = ep_new(e_guid_t));
|
||||
%(ACTX)s->value_ptr = NULL;
|
||||
#.END
|
||||
#----------------------------------------------------------------------------------------
|
||||
#.FN_PARS GloballyUniqueID VAL_PTR = %(ACTX)s->value_ptr
|
||||
#.FN_PARS GloballyUniqueID VAL_PTR = (tvbuff_t **)%(ACTX)s->value_ptr
|
||||
#----------------------------------------------------------------------------------------
|
||||
#.FN_PARS RequestSeqNum VAL_PTR = &(h225_pi->requestSeqNum)
|
||||
#----------------------------------------------------------------------------------------
|
||||
|
|
|
@ -339,7 +339,7 @@ AuditReplyV1/auditResult audit_result
|
|||
curr_info.term->type = 0; /* unknown */
|
||||
|
||||
if (curr_info.term->len) {
|
||||
curr_info.term->buffer = ep_tvb_memdup(new_tvb,0,curr_info.term->len);
|
||||
curr_info.term->buffer = (guint8 *)ep_tvb_memdup(new_tvb,0,curr_info.term->len);
|
||||
curr_info.term->str = bytes_to_str(curr_info.term->buffer,curr_info.term->len);
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@ static gcp_hf_ett_t h248_arrel = {{-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1}};
|
|||
|
||||
#include "packet-h248-ett.c"
|
||||
|
||||
static dissector_handle_t h248_term_handle;
|
||||
static dissector_table_t subdissector_table;
|
||||
|
||||
static emem_tree_t* msgs = NULL;
|
||||
|
@ -877,7 +876,7 @@ static int dissect_h248_ctx_id(gboolean implicit_tag, packet_info *pinfo, proto_
|
|||
|
||||
s_h248_package_t *s_find_package_id(guint16 pkgid) {
|
||||
s_h248_package_t *s_pkg = NULL;
|
||||
s_pkg = g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid)));
|
||||
s_pkg = (s_h248_package_t *)g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid)));
|
||||
return s_pkg;
|
||||
}
|
||||
|
||||
|
@ -894,7 +893,7 @@ static gint32 comparePkgID(gconstpointer a, gconstpointer b) {
|
|||
|
||||
gboolean is_pkg_default(guint16 pkgid) {
|
||||
s_h248_package_t *s_pkg = NULL;
|
||||
s_pkg = g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid)));
|
||||
s_pkg = (s_h248_package_t *)g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid)));
|
||||
if(! s_pkg ) return TRUE;
|
||||
return s_pkg->is_default;
|
||||
}
|
||||
|
@ -912,7 +911,7 @@ void h248_register_package(const h248_package_t* pkg, pkg_reg_action reg_action)
|
|||
while (base_package_name_vals[i].strptr != NULL) {
|
||||
pkg_found = g_new0(h248_package_t, 1); /* create a h248 package structure */
|
||||
pkg_found->id = base_package_name_vals[i].value;
|
||||
vst = wmem_alloc0(wmem_epan_scope(), sizeof(value_string)*2);
|
||||
vst = (value_string *)wmem_alloc0(wmem_epan_scope(), sizeof(value_string)*2);
|
||||
vst[0].strptr = base_package_name_vals[i].strptr;
|
||||
pkg_found->param_names = vst;
|
||||
pkg_found->hfid = &hf_h248_pkg_name;
|
||||
|
@ -925,7 +924,7 @@ void h248_register_package(const h248_package_t* pkg, pkg_reg_action reg_action)
|
|||
j++;
|
||||
};
|
||||
if (idx < j) {
|
||||
vst = wmem_alloc0(wmem_epan_scope(), sizeof(value_string)*(j-idx+1));
|
||||
vst = (value_string *)wmem_alloc0(wmem_epan_scope(), sizeof(value_string)*(j-idx+1));
|
||||
for (k=0;idx<j;k++) {
|
||||
vst[k].strptr = base_event_name_vals[idx].strptr;
|
||||
vst[k].value = (base_event_name_vals[idx].value & 0xffff);
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
gef_ctx_t* gef_ctx_alloc(gef_ctx_t *parent, const gchar *type) {
|
||||
gef_ctx_t *gefx;
|
||||
|
||||
gefx = ep_alloc0(sizeof(gef_ctx_t));
|
||||
gefx = ep_new0(gef_ctx_t);
|
||||
gefx->signature = GEF_CTX_SIGNATURE;
|
||||
gefx->parent = parent;
|
||||
gefx->type = type;
|
||||
|
@ -62,7 +62,7 @@ gef_ctx_t* gef_ctx_get(void *ptr) {
|
|||
actx = NULL;
|
||||
|
||||
if (actx)
|
||||
gefx = actx->private_data;
|
||||
gefx = (gef_ctx_t *)actx->private_data;
|
||||
|
||||
if (!gef_ctx_check_signature(gefx))
|
||||
gefx = NULL;
|
||||
|
|
|
@ -843,18 +843,13 @@ g_warning("woohoo decrypted keytype:%d in frame:%u\n", keytype, pinfo->fd->num);
|
|||
#define KRB5_TD_REQ_NONCE 107
|
||||
#define KRB5_TD_REQ_SEQ 108
|
||||
/* preauthentication types >127 (i.e. negative ones) are app specific.
|
||||
Hopefully there will be no collisions here or we will have to
|
||||
come up with something better.
|
||||
XXX: Although KRB5_PA_PAC_REQUEST is " >127 " and thus presumably
|
||||
would be encoded as a negative number, various captures seen all
|
||||
have this pa-data-type encoded as a positive number (0x0080).
|
||||
We'll assume that KRB5_PA_S4U2SELF is also encoded as a positive number.
|
||||
however since Microsoft is the dominant(only?) user of types in this range
|
||||
we also treat the type as unsigned.
|
||||
*/
|
||||
#define KRB5_PA_PAC_REQUEST 128 /* (Microsoft extension) */
|
||||
#define KRB5_PA_S4U2SELF 129 /* Impersonation (Microsoft extension) */
|
||||
#define KRB5_PA_FOR_USER 129 /* Impersonation (Microsoft extension) See [MS-SFU] */
|
||||
|
||||
#define KRB5_PA_PROV_SRV_LOCATION 0xffffffff /* (gint32)0xFF) packetcable stuff */
|
||||
|
||||
/* Principal name-type */
|
||||
#define KRB5_NT_UNKNOWN 0
|
||||
#define KRB5_NT_PRINCIPAL 1
|
||||
|
@ -1095,7 +1090,7 @@ static const value_string krb5_preauthentication_types[] = {
|
|||
{ KRB5_TD_REQ_NONCE , "TD-REQ-NONCE" },
|
||||
{ KRB5_TD_REQ_SEQ , "TD-REQ-SEQ" },
|
||||
{ KRB5_PA_PAC_REQUEST , "PA-PAC-REQUEST" },
|
||||
{ KRB5_PA_S4U2SELF , "PA-S4U2SELF" },
|
||||
{ KRB5_PA_FOR_USER , "PA-FOR-USER" },
|
||||
{ KRB5_PA_PROV_SRV_LOCATION , "PA-PROV-SRV-LOCATION" },
|
||||
{ 0 , NULL },
|
||||
};
|
||||
|
|
|
@ -35,12 +35,12 @@ ServiceLocator B "1.3.6.1.5.5.7.48.1.7" "id-pkix-ocsp-service-locator"
|
|||
FN_VARIANT = _str HF_INDEX = hf_ocsp_responseType_id VAL_PTR = &responseType_id
|
||||
|
||||
#.FN_BODY ResponseBytes/response
|
||||
gint8 class;
|
||||
gint8 appclass;
|
||||
gboolean pc, ind;
|
||||
gint32 tag;
|
||||
guint32 len;
|
||||
/* skip past the T and L */
|
||||
offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
|
||||
offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &appclass, &pc, &tag);
|
||||
offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
|
||||
offset=call_ber_oid_callback(responseType_id, tvb, offset, actx->pinfo, tree);
|
||||
|
||||
|
|
|
@ -53,12 +53,12 @@ ASIdentifiers B "1.3.6.1.5.5.7.1.8" "id-pe-autonomousSysIds"
|
|||
FN_VARIANT = _str HF_INDEX = hf_pkix1explicit_object_identifier_id VAL_PTR = &object_identifier_id
|
||||
|
||||
#.FN_BODY Extension/extnValue
|
||||
gint8 class;
|
||||
gint8 appclass;
|
||||
gboolean pc, ind;
|
||||
gint32 tag;
|
||||
guint32 len;
|
||||
/* skip past the T and L */
|
||||
offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
|
||||
offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &appclass, &pc, &tag);
|
||||
offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
|
||||
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, const char *oid)
|
|||
return;
|
||||
}
|
||||
|
||||
pco=se_alloc(sizeof(pres_ctx_oid_t));
|
||||
pco=se_new(pres_ctx_oid_t);
|
||||
pco->ctx_id=idx;
|
||||
pco->oid=se_strdup(oid);
|
||||
conversation=find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst,
|
||||
|
@ -203,8 +203,8 @@ find_oid_by_pres_ctx_id(packet_info *pinfo, guint32 idx)
|
|||
static void *
|
||||
pres_copy_cb(void *dest, const void *orig, size_t len _U_)
|
||||
{
|
||||
pres_user_t *u = dest;
|
||||
const pres_user_t *o = orig;
|
||||
pres_user_t *u = (pres_user_t *)dest;
|
||||
const pres_user_t *o = (const pres_user_t *)orig;
|
||||
|
||||
u->ctx_id = o->ctx_id;
|
||||
u->oid = g_strdup(o->oid);
|
||||
|
@ -215,7 +215,7 @@ pres_copy_cb(void *dest, const void *orig, size_t len _U_)
|
|||
static void
|
||||
pres_free_cb(void *r)
|
||||
{
|
||||
pres_user_t *u = r;
|
||||
pres_user_t *u = (pres_user_t *)r;
|
||||
|
||||
g_free(u->oid);
|
||||
}
|
||||
|
@ -411,7 +411,7 @@ void proto_register_pres(void) {
|
|||
sizeof(pres_user_t),
|
||||
"pres_context_list",
|
||||
TRUE,
|
||||
(void*) &pres_users,
|
||||
(void**) &pres_users,
|
||||
&num_pres_users,
|
||||
UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */
|
||||
"ChPresContextList",
|
||||
|
|
|
@ -135,7 +135,7 @@ static const value_string str_nd[] = {
|
|||
/*--- dissect_q932_facility_ie -------------------------------------------------------*/
|
||||
/*static*/ void
|
||||
dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) {
|
||||
gint8 class;
|
||||
gint8 appclass;
|
||||
gboolean pc;
|
||||
gint32 tag;
|
||||
guint32 len;
|
||||
|
@ -148,11 +148,11 @@ dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
|
|||
offset++;
|
||||
while (offset < ie_end) {
|
||||
hoffset = offset;
|
||||
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
||||
offset = get_ber_identifier(tvb, offset, &appclass, &pc, &tag);
|
||||
offset = get_ber_length(tvb, offset, &len, NULL);
|
||||
eoffset = offset + len;
|
||||
next_tvb = tvb_new_subset(tvb, hoffset, eoffset - hoffset, eoffset - hoffset);
|
||||
switch (class) {
|
||||
switch (appclass) {
|
||||
case BER_CLASS_CON:
|
||||
switch (tag) {
|
||||
case 10 : /* Network Facility Extension */
|
||||
|
|
|
@ -387,7 +387,7 @@ dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
opcode = rctx->d.code_local;
|
||||
op_ptr = get_op(opcode);
|
||||
} else if (rctx->d.code == 1) { /* global */
|
||||
op_ptr = g_hash_table_lookup(qsig_oid2op_hashtable, rctx->d.code_global);
|
||||
op_ptr = (qsig_op_t *)g_hash_table_lookup(qsig_oid2op_hashtable, rctx->d.code_global);
|
||||
if (op_ptr) opcode = op_ptr->opcode;
|
||||
} else {
|
||||
return offset;
|
||||
|
@ -603,7 +603,7 @@ static void qsig_init_tables(void) {
|
|||
for (i=0; i<array_length(qsig_op_tab); i++) {
|
||||
opcode = qsig_op_tab[i].opcode;
|
||||
oid = g_strdup_printf("1.3.12.9.%d", opcode);
|
||||
key = g_malloc(sizeof(gint));
|
||||
key = (gint *)g_malloc(sizeof(gint));
|
||||
*key = opcode;
|
||||
g_hash_table_insert(qsig_opcode2oid_hashtable, key, oid);
|
||||
g_hash_table_insert(qsig_oid2op_hashtable, g_strdup(oid), (gpointer)&qsig_op_tab[i]);
|
||||
|
@ -692,7 +692,7 @@ void proto_reg_handoff_qsig(void) {
|
|||
dissector_add_uint("q932.ros.local.arg", qsig_op_tab[i].opcode, qsig_arg_handle);
|
||||
dissector_add_uint("q932.ros.local.res", qsig_op_tab[i].opcode, qsig_res_handle);
|
||||
key = qsig_op_tab[i].opcode;
|
||||
oid = g_hash_table_lookup(qsig_opcode2oid_hashtable, &key);
|
||||
oid = (const gchar *)g_hash_table_lookup(qsig_opcode2oid_hashtable, &key);
|
||||
if (oid) {
|
||||
dissector_add_string("q932.ros.global.arg", oid, qsig_arg_handle);
|
||||
dissector_add_string("q932.ros.global.res", oid, qsig_res_handle);
|
||||
|
|
|
@ -118,7 +118,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = {
|
||||
{ "lowerBound", ASN1_PAR_INTEGER },
|
||||
{ "upperBound", ASN1_PAR_INTEGER },
|
||||
{ NULL, 0 }
|
||||
{ NULL, (asn1_par_type)0 }
|
||||
};
|
||||
asn1_stack_frame_check(actx, "ProtocolIE-ContainerList", ProtocolIE_ContainerList_pars);
|
||||
#.END
|
||||
|
@ -134,7 +134,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
static const asn1_par_def_t ProtocolIE_ContainerPairList_pars[] = {
|
||||
{ "lowerBound", ASN1_PAR_INTEGER },
|
||||
{ "upperBound", ASN1_PAR_INTEGER },
|
||||
{ NULL, 0 }
|
||||
{ NULL, (asn1_par_type)0 }
|
||||
};
|
||||
asn1_stack_frame_check(actx, "ProtocolIE-ContainerPairList", ProtocolIE_ContainerPairList_pars);
|
||||
#.END
|
||||
|
@ -201,7 +201,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
&& ! actx->pinfo->sccp_info->data.co.assoc->calling_party ) {
|
||||
|
||||
guint len = tvb_length(imsi_tvb);
|
||||
guint8* bytes = ep_tvb_memdup(imsi_tvb,0,len);
|
||||
guint8* bytes = (guint8 *)ep_tvb_memdup(imsi_tvb,0,len);
|
||||
|
||||
actx->pinfo->sccp_info->data.co.assoc->calling_party =
|
||||
se_strdup_printf("IMSI: %%s", bytes_to_str(bytes, len) );
|
||||
|
|
|
@ -193,7 +193,7 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
struct rrc_info *rrcinf;
|
||||
|
||||
top_tree = tree;
|
||||
rrcinf = p_get_proto_data(pinfo->fd, proto_rrc);
|
||||
rrcinf = (struct rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc);
|
||||
|
||||
/* make entry in the Protocol column on summary display */
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC");
|
||||
|
|
|
@ -131,7 +131,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = {
|
||||
{ "lowerBound", ASN1_PAR_INTEGER },
|
||||
{ "upperBound", ASN1_PAR_INTEGER },
|
||||
{ NULL, 0 }
|
||||
{ NULL, (asn1_par_type)0 }
|
||||
};
|
||||
asn1_stack_frame_check(actx, "ProtocolIE-ContainerList", ProtocolIE_ContainerList_pars);
|
||||
#.END
|
||||
|
|
|
@ -327,7 +327,7 @@ find_saved_invokedata(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U
|
|||
}
|
||||
|
||||
/* The hash string needs to contain src and dest to distiguish differnt flows */
|
||||
buf = ep_alloc(MAX_TID_STR_LEN);
|
||||
buf = (char *)ep_alloc(MAX_TID_STR_LEN);
|
||||
buf[0] = '\0';
|
||||
/* Reverse order to invoke */
|
||||
g_snprintf(buf, MAX_TID_STR_LEN, "%s%s%s",
|
||||
|
|
|
@ -7232,10 +7232,10 @@ dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn
|
|||
opcode = 0;
|
||||
application_context_version = 0;
|
||||
if (actx->pinfo->private_data != NULL){
|
||||
p_private_tcap=actx->pinfo->private_data;
|
||||
p_private_tcap=(struct tcap_private_t *)actx->pinfo->private_data;
|
||||
|
||||
if (p_private_tcap->acv==TRUE ){
|
||||
version_ptr = strrchr(p_private_tcap->oid,'.');
|
||||
version_ptr = strrchr((char *)p_private_tcap->oid,'.');
|
||||
if (version_ptr)
|
||||
application_context_version = atoi(version_ptr+1);
|
||||
}
|
||||
|
|
|
@ -2767,7 +2767,7 @@ dissect_h225_SEQUENCE_OF_CallReferenceValue(tvbuff_t *tvb _U_, int offset _U_, a
|
|||
int
|
||||
dissect_h225_GloballyUniqueID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
16, 16, FALSE, actx->value_ptr);
|
||||
16, 16, FALSE, (tvbuff_t **)actx->value_ptr);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -2882,7 +2882,7 @@ dissect_h225_T_guid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro
|
|||
offset = dissect_h225_GloballyUniqueID(tvb, offset, actx, tree, hf_index);
|
||||
|
||||
if (guid_tvb)
|
||||
tvb_get_ntohguid(guid_tvb, 0, call_id_guid = ep_alloc(sizeof(e_guid_t)));
|
||||
tvb_get_ntohguid(guid_tvb, 0, call_id_guid = ep_new(e_guid_t));
|
||||
actx->value_ptr = NULL;
|
||||
|
||||
|
||||
|
|
|
@ -563,7 +563,6 @@ static gint ett_h248_SigParameterV1 = -1;
|
|||
/*--- End of included file: packet-h248-ett.c ---*/
|
||||
#line 90 "../../asn1/h248/packet-h248-template.c"
|
||||
|
||||
static dissector_handle_t h248_term_handle;
|
||||
static dissector_table_t subdissector_table;
|
||||
|
||||
static emem_tree_t* msgs = NULL;
|
||||
|
@ -1352,7 +1351,7 @@ static int dissect_h248_ctx_id(gboolean implicit_tag, packet_info *pinfo, proto_
|
|||
|
||||
s_h248_package_t *s_find_package_id(guint16 pkgid) {
|
||||
s_h248_package_t *s_pkg = NULL;
|
||||
s_pkg = g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid)));
|
||||
s_pkg = (s_h248_package_t *)g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid)));
|
||||
return s_pkg;
|
||||
}
|
||||
|
||||
|
@ -1369,7 +1368,7 @@ static gint32 comparePkgID(gconstpointer a, gconstpointer b) {
|
|||
|
||||
gboolean is_pkg_default(guint16 pkgid) {
|
||||
s_h248_package_t *s_pkg = NULL;
|
||||
s_pkg = g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid)));
|
||||
s_pkg = (s_h248_package_t *)g_tree_lookup(packages, GUINT_TO_POINTER((guint32)(pkgid)));
|
||||
if(! s_pkg ) return TRUE;
|
||||
return s_pkg->is_default;
|
||||
}
|
||||
|
@ -1387,7 +1386,7 @@ void h248_register_package(const h248_package_t* pkg, pkg_reg_action reg_action)
|
|||
while (base_package_name_vals[i].strptr != NULL) {
|
||||
pkg_found = g_new0(h248_package_t, 1); /* create a h248 package structure */
|
||||
pkg_found->id = base_package_name_vals[i].value;
|
||||
vst = wmem_alloc0(wmem_epan_scope(), sizeof(value_string)*2);
|
||||
vst = (value_string *)wmem_alloc0(wmem_epan_scope(), sizeof(value_string)*2);
|
||||
vst[0].strptr = base_package_name_vals[i].strptr;
|
||||
pkg_found->param_names = vst;
|
||||
pkg_found->hfid = &hf_h248_pkg_name;
|
||||
|
@ -1400,7 +1399,7 @@ void h248_register_package(const h248_package_t* pkg, pkg_reg_action reg_action)
|
|||
j++;
|
||||
};
|
||||
if (idx < j) {
|
||||
vst = wmem_alloc0(wmem_epan_scope(), sizeof(value_string)*(j-idx+1));
|
||||
vst = (value_string *)wmem_alloc0(wmem_epan_scope(), sizeof(value_string)*(j-idx+1));
|
||||
for (k=0;idx<j;k++) {
|
||||
vst[k].strptr = base_event_name_vals[idx].strptr;
|
||||
vst[k].value = (base_event_name_vals[idx].value & 0xffff);
|
||||
|
@ -2227,7 +2226,7 @@ dissect_h248_T_terminationId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
|
|||
curr_info.term->type = 0; /* unknown */
|
||||
|
||||
if (curr_info.term->len) {
|
||||
curr_info.term->buffer = ep_tvb_memdup(new_tvb,0,curr_info.term->len);
|
||||
curr_info.term->buffer = (guint8 *)ep_tvb_memdup(new_tvb,0,curr_info.term->len);
|
||||
curr_info.term->str = bytes_to_str(curr_info.term->buffer,curr_info.term->len);
|
||||
}
|
||||
|
||||
|
@ -5366,7 +5365,7 @@ dissect_h248_ValueV1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
|
|||
|
||||
|
||||
/*--- End of included file: packet-h248-fn.c ---*/
|
||||
#line 1409 "../../asn1/h248/packet-h248-template.c"
|
||||
#line 1408 "../../asn1/h248/packet-h248-template.c"
|
||||
|
||||
static void dissect_h248_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
||||
dissect_tpkt_encap(tvb, pinfo, tree, h248_desegment, h248_handle);
|
||||
|
@ -6785,7 +6784,7 @@ void proto_register_h248(void) {
|
|||
NULL, HFILL }},
|
||||
|
||||
/*--- End of included file: packet-h248-hfarr.c ---*/
|
||||
#line 1571 "../../asn1/h248/packet-h248-template.c"
|
||||
#line 1570 "../../asn1/h248/packet-h248-template.c"
|
||||
|
||||
GCP_HF_ARR_ELEMS("h248",h248_arrel)
|
||||
|
||||
|
@ -6951,7 +6950,7 @@ void proto_register_h248(void) {
|
|||
&ett_h248_SigParameterV1,
|
||||
|
||||
/*--- End of included file: packet-h248-ettarr.c ---*/
|
||||
#line 1589 "../../asn1/h248/packet-h248-template.c"
|
||||
#line 1588 "../../asn1/h248/packet-h248-template.c"
|
||||
};
|
||||
|
||||
module_t *h248_module;
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
gef_ctx_t* gef_ctx_alloc(gef_ctx_t *parent, const gchar *type) {
|
||||
gef_ctx_t *gefx;
|
||||
|
||||
gefx = ep_alloc0(sizeof(gef_ctx_t));
|
||||
gefx = ep_new0(gef_ctx_t);
|
||||
gefx->signature = GEF_CTX_SIGNATURE;
|
||||
gefx->parent = parent;
|
||||
gefx->type = type;
|
||||
|
@ -70,7 +70,7 @@ gef_ctx_t* gef_ctx_get(void *ptr) {
|
|||
actx = NULL;
|
||||
|
||||
if (actx)
|
||||
gefx = actx->private_data;
|
||||
gefx = (gef_ctx_t *)actx->private_data;
|
||||
|
||||
if (!gef_ctx_check_signature(gefx))
|
||||
gefx = NULL;
|
||||
|
|
|
@ -320,12 +320,12 @@ dissect_ocsp_T_responseType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
|
|||
static int
|
||||
dissect_ocsp_T_response(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 38 "../../asn1/ocsp/ocsp.cnf"
|
||||
gint8 class;
|
||||
gint8 appclass;
|
||||
gboolean pc, ind;
|
||||
gint32 tag;
|
||||
guint32 len;
|
||||
/* skip past the T and L */
|
||||
offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
|
||||
offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &appclass, &pc, &tag);
|
||||
offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
|
||||
offset=call_ber_oid_callback(responseType_id, tvb, offset, actx->pinfo, tree);
|
||||
|
||||
|
|
|
@ -284,12 +284,12 @@ dissect_pkix1explicit_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
static int
|
||||
dissect_pkix1explicit_T_extnValue(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 56 "../../asn1/pkix1explicit/pkix1explicit.cnf"
|
||||
gint8 class;
|
||||
gint8 appclass;
|
||||
gboolean pc, ind;
|
||||
gint32 tag;
|
||||
guint32 len;
|
||||
/* skip past the T and L */
|
||||
offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
|
||||
offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &appclass, &pc, &tag);
|
||||
offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
|
||||
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
|
||||
|
||||
|
|
|
@ -271,7 +271,7 @@ register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, const char *oid)
|
|||
return;
|
||||
}
|
||||
|
||||
pco=se_alloc(sizeof(pres_ctx_oid_t));
|
||||
pco=se_new(pres_ctx_oid_t);
|
||||
pco->ctx_id=idx;
|
||||
pco->oid=se_strdup(oid);
|
||||
conversation=find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst,
|
||||
|
@ -335,8 +335,8 @@ find_oid_by_pres_ctx_id(packet_info *pinfo, guint32 idx)
|
|||
static void *
|
||||
pres_copy_cb(void *dest, const void *orig, size_t len _U_)
|
||||
{
|
||||
pres_user_t *u = dest;
|
||||
const pres_user_t *o = orig;
|
||||
pres_user_t *u = (pres_user_t *)dest;
|
||||
const pres_user_t *o = (const pres_user_t *)orig;
|
||||
|
||||
u->ctx_id = o->ctx_id;
|
||||
u->oid = g_strdup(o->oid);
|
||||
|
@ -347,7 +347,7 @@ pres_copy_cb(void *dest, const void *orig, size_t len _U_)
|
|||
static void
|
||||
pres_free_cb(void *r)
|
||||
{
|
||||
pres_user_t *u = r;
|
||||
pres_user_t *u = (pres_user_t *)r;
|
||||
|
||||
g_free(u->oid);
|
||||
}
|
||||
|
@ -1901,7 +1901,7 @@ void proto_register_pres(void) {
|
|||
sizeof(pres_user_t),
|
||||
"pres_context_list",
|
||||
TRUE,
|
||||
(void*) &pres_users,
|
||||
(void**) &pres_users,
|
||||
&num_pres_users,
|
||||
UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */
|
||||
"ChPresContextList",
|
||||
|
|
|
@ -649,7 +649,7 @@ static void dissect_InterpretationComponent_PDU(tvbuff_t *tvb _U_, packet_info *
|
|||
/*--- dissect_q932_facility_ie -------------------------------------------------------*/
|
||||
/*static*/ void
|
||||
dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) {
|
||||
gint8 class;
|
||||
gint8 appclass;
|
||||
gboolean pc;
|
||||
gint32 tag;
|
||||
guint32 len;
|
||||
|
@ -662,11 +662,11 @@ dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
|
|||
offset++;
|
||||
while (offset < ie_end) {
|
||||
hoffset = offset;
|
||||
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
||||
offset = get_ber_identifier(tvb, offset, &appclass, &pc, &tag);
|
||||
offset = get_ber_length(tvb, offset, &len, NULL);
|
||||
eoffset = offset + len;
|
||||
next_tvb = tvb_new_subset(tvb, hoffset, eoffset - hoffset, eoffset - hoffset);
|
||||
switch (class) {
|
||||
switch (appclass) {
|
||||
case BER_CLASS_CON:
|
||||
switch (tag) {
|
||||
case 10 : /* Network Facility Extension */
|
||||
|
|
|
@ -12395,7 +12395,7 @@ dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
opcode = rctx->d.code_local;
|
||||
op_ptr = get_op(opcode);
|
||||
} else if (rctx->d.code == 1) { /* global */
|
||||
op_ptr = g_hash_table_lookup(qsig_oid2op_hashtable, rctx->d.code_global);
|
||||
op_ptr = (qsig_op_t *)g_hash_table_lookup(qsig_oid2op_hashtable, rctx->d.code_global);
|
||||
if (op_ptr) opcode = op_ptr->opcode;
|
||||
} else {
|
||||
return offset;
|
||||
|
@ -12611,7 +12611,7 @@ static void qsig_init_tables(void) {
|
|||
for (i=0; i<array_length(qsig_op_tab); i++) {
|
||||
opcode = qsig_op_tab[i].opcode;
|
||||
oid = g_strdup_printf("1.3.12.9.%d", opcode);
|
||||
key = g_malloc(sizeof(gint));
|
||||
key = (gint *)g_malloc(sizeof(gint));
|
||||
*key = opcode;
|
||||
g_hash_table_insert(qsig_opcode2oid_hashtable, key, oid);
|
||||
g_hash_table_insert(qsig_oid2op_hashtable, g_strdup(oid), (gpointer)&qsig_op_tab[i]);
|
||||
|
@ -16381,7 +16381,7 @@ void proto_reg_handoff_qsig(void) {
|
|||
dissector_add_uint("q932.ros.local.arg", qsig_op_tab[i].opcode, qsig_arg_handle);
|
||||
dissector_add_uint("q932.ros.local.res", qsig_op_tab[i].opcode, qsig_res_handle);
|
||||
key = qsig_op_tab[i].opcode;
|
||||
oid = g_hash_table_lookup(qsig_opcode2oid_hashtable, &key);
|
||||
oid = (const gchar *)g_hash_table_lookup(qsig_opcode2oid_hashtable, &key);
|
||||
if (oid) {
|
||||
dissector_add_string("q932.ros.global.arg", oid, qsig_arg_handle);
|
||||
dissector_add_string("q932.ros.global.res", oid, qsig_res_handle);
|
||||
|
|
|
@ -2074,7 +2074,7 @@ dissect_ranap_ProtocolIE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_c
|
|||
static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = {
|
||||
{ "lowerBound", ASN1_PAR_INTEGER },
|
||||
{ "upperBound", ASN1_PAR_INTEGER },
|
||||
{ NULL, 0 }
|
||||
{ NULL, (asn1_par_type)0 }
|
||||
};
|
||||
asn1_stack_frame_check(actx, "ProtocolIE-ContainerList", ProtocolIE_ContainerList_pars);
|
||||
|
||||
|
@ -2096,7 +2096,7 @@ dissect_ranap_ProtocolIE_ContainerPairList(tvbuff_t *tvb _U_, int offset _U_, as
|
|||
static const asn1_par_def_t ProtocolIE_ContainerPairList_pars[] = {
|
||||
{ "lowerBound", ASN1_PAR_INTEGER },
|
||||
{ "upperBound", ASN1_PAR_INTEGER },
|
||||
{ NULL, 0 }
|
||||
{ NULL, (asn1_par_type)0 }
|
||||
};
|
||||
asn1_stack_frame_check(actx, "ProtocolIE-ContainerPairList", ProtocolIE_ContainerPairList_pars);
|
||||
|
||||
|
@ -4776,7 +4776,7 @@ dissect_ranap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
|
|||
&& ! actx->pinfo->sccp_info->data.co.assoc->calling_party ) {
|
||||
|
||||
guint len = tvb_length(imsi_tvb);
|
||||
guint8* bytes = ep_tvb_memdup(imsi_tvb,0,len);
|
||||
guint8* bytes = (guint8 *)ep_tvb_memdup(imsi_tvb,0,len);
|
||||
|
||||
actx->pinfo->sccp_info->data.co.assoc->calling_party =
|
||||
se_strdup_printf("IMSI: %s", bytes_to_str(bytes, len) );
|
||||
|
|
|
@ -141632,7 +141632,7 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
struct rrc_info *rrcinf;
|
||||
|
||||
top_tree = tree;
|
||||
rrcinf = p_get_proto_data(pinfo->fd, proto_rrc);
|
||||
rrcinf = (struct rrc_info *)p_get_proto_data(pinfo->fd, proto_rrc);
|
||||
|
||||
/* make entry in the Protocol column on summary display */
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC");
|
||||
|
|
|
@ -1509,7 +1509,7 @@ dissect_s1ap_ProtocolIE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ct
|
|||
static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = {
|
||||
{ "lowerBound", ASN1_PAR_INTEGER },
|
||||
{ "upperBound", ASN1_PAR_INTEGER },
|
||||
{ NULL, 0 }
|
||||
{ NULL, (asn1_par_type)0 }
|
||||
};
|
||||
asn1_stack_frame_check(actx, "ProtocolIE-ContainerList", ProtocolIE_ContainerList_pars);
|
||||
|
||||
|
|
Loading…
Reference in New Issue