diff options
Diffstat (limited to 'asn1/h248')
-rw-r--r-- | asn1/h248/h248.cnf | 23 | ||||
-rw-r--r-- | asn1/h248/packet-h248-template.h | 5 |
2 files changed, 23 insertions, 5 deletions
diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf index ee1afdb022..5c1ade583b 100644 --- a/asn1/h248/h248.cnf +++ b/asn1/h248/h248.cnf @@ -330,23 +330,36 @@ AuditReplyV1/auditResult audit_result #.FN_BODY TerminationID/id tvbuff_t* new_tvb; + h248_term_info_t term_info; + + term_info.wild_card = wild_card; + term_info.str = NULL; + offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb); if (new_tvb) { curr_info.term->len = tvb_length(new_tvb); curr_info.term->type = 0; /* unknown */ + if (h248_term_handle) { + call_dissector_with_data(h248_term_handle, new_tvb, actx->pinfo, tree, &term_info); + wild_card = 0xFF; + } + if (curr_info.term->len) { curr_info.term->buffer = (guint8 *)tvb_memdup(wmem_packet_scope(),new_tvb,0,curr_info.term->len); - curr_info.term->str = bytes_to_ep_str(curr_info.term->buffer,curr_info.term->len); + if(term_info.str){ + curr_info.term->str = wmem_strdup_printf(wmem_packet_scope(), "%s %s", + bytestring_to_str(wmem_packet_scope(),curr_info.term->buffer,curr_info.term->len, 0), + term_info.str); + }else{ + curr_info.term->str = bytestring_to_str(wmem_packet_scope(),curr_info.term->buffer,curr_info.term->len, 0); + } } + curr_info.term = gcp_cmd_add_term(curr_info.msg, curr_info.trx, curr_info.cmd, curr_info.term, wild_term, keep_persistent_data); - if (h248_term_handle) { - call_dissector_with_data(h248_term_handle, new_tvb, actx->pinfo, tree, &wild_card); - wild_card = 0xFF; - } } else { curr_info.term->len = 0; curr_info.term->buffer = (guint8*)wmem_strdup(wmem_packet_scope(), ""); diff --git a/asn1/h248/packet-h248-template.h b/asn1/h248/packet-h248-template.h index c87ed51ab9..1783bf27c9 100644 --- a/asn1/h248/packet-h248-template.h +++ b/asn1/h248/packet-h248-template.h @@ -112,6 +112,11 @@ struct _h248_curr_info_t { const h248_pkg_param_t* par; }; +typedef struct h248_term_info { + guint8 wild_card; + gchar *str; +} h248_term_info_t; + WS_DLL_PUBLIC void h248_register_package(h248_package_t* pkg, pkg_reg_action reg_action); |