aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-h245.c
diff options
context:
space:
mode:
authorMichal Pazdera <michal.pazdera@gmail.com>2015-06-26 15:32:29 +0200
committerAnders Broman <a.broman58@gmail.com>2015-06-26 17:42:02 +0000
commit51d2eefc9532094f385b604c692ef24f09706f64 (patch)
treee3bd38b02b458dba1a32b2ffe8993293d5d9f15c /epan/dissectors/packet-h245.c
parent2c9a9aff5a61789fba87a92fe566e6018db318ae (diff)
Added option in h245 preferences to print h245 messages content
into Information column in typical fashion (append) instead of just in reversed order (prepand) Change-Id: Id78c307fc6d34a378ac7b9335ac1e578837b08a6 Reviewed-on: https://code.wireshark.org/review/9170 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-h245.c')
-rw-r--r--epan/dissectors/packet-h245.c222
1 files changed, 105 insertions, 117 deletions
diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c
index 13098dd798..e2f54fc5a3 100644
--- a/epan/dissectors/packet-h245.c
+++ b/epan/dissectors/packet-h245.c
@@ -88,6 +88,7 @@ h245_packet_info *h245_pi=NULL;
static gboolean h245_reassembly = TRUE;
static gboolean h245_shorttypes = FALSE;
+static gboolean info_col_fmt_prepend = FALSE;
/*--- Included file: packet-h245-val.h ---*/
@@ -212,7 +213,7 @@ typedef enum _IndicationMessage_enum {
} IndicationMessage_enum;
/*--- End of included file: packet-h245-val.h ---*/
-#line 85 "../../asn1/h245/packet-h245-template.c"
+#line 86 "../../asn1/h245/packet-h245-template.c"
static const value_string h245_RequestMessage_short_vals[] = {
{ RequestMessage_nonStandard , "NSM" },
@@ -508,6 +509,26 @@ static void h245_setup_channels(packet_info *pinfo, channel_info_t *upcoming_cha
}
}
+/* Prints formated information column of h245 messages. Note that global variables
+ * "h245_shorttypes" and "info_col_fmt_prepend" are used to decide formating preferences */
+static void print_info_column(column_info *cinfo, const gint32 *value,
+ const value_string *msg_vals, const value_string *short_msg_vals)
+{
+ const value_string *vals;
+
+ if (h245_shorttypes == FALSE || short_msg_vals == NULL) {
+ vals = msg_vals;
+ } else {
+ vals = short_msg_vals;
+ }
+
+ if (info_col_fmt_prepend == FALSE) {
+ col_append_fstr(cinfo, COL_INFO, "%s ", val_to_str(*value, vals, "<unknown>"));
+ } else {
+ col_prepend_fstr(cinfo, COL_INFO, "%s ", val_to_str(*value, vals, "<unknown>"));
+ }
+}
+
/* Initialize the protocol and registered fields */
static int proto_h245 = -1;
@@ -1917,7 +1938,7 @@ static int hf_h245_encrypted = -1; /* OCTET_STRING */
static int hf_h245_encryptedAlphanumeric = -1; /* EncryptedAlphanumeric */
/*--- End of included file: packet-h245-hf.c ---*/
-#line 383 "../../asn1/h245/packet-h245-template.c"
+#line 404 "../../asn1/h245/packet-h245-template.c"
/* Initialize the subtree pointers */
static int ett_h245 = -1;
@@ -2418,7 +2439,7 @@ static gint ett_h245_FlowControlIndication = -1;
static gint ett_h245_MobileMultilinkReconfigurationIndication = -1;
/*--- End of included file: packet-h245-ett.c ---*/
-#line 388 "../../asn1/h245/packet-h245-template.c"
+#line 409 "../../asn1/h245/packet-h245-template.c"
/* Forward declarations */
static int dissect_h245_MultimediaSystemControlMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
@@ -2506,7 +2527,7 @@ static const per_sequence_t H221NonStandardID_sequence[] = {
static int
dissect_h245_H221NonStandardID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 982 "../../asn1/h245/h245.cnf"
+#line 945 "../../asn1/h245/h245.cnf"
t35CountryCode = 0;
t35Extension = 0;
manufacturerCode = 0;
@@ -2514,7 +2535,7 @@ dissect_h245_H221NonStandardID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_H221NonStandardID, H221NonStandardID_sequence);
-#line 986 "../../asn1/h245/h245.cnf"
+#line 949 "../../asn1/h245/h245.cnf"
h221NonStandard = ((t35CountryCode * 256) + t35Extension) * 65536 + manufacturerCode;
proto_tree_add_uint(tree, hf_h245Manufacturer, tvb, (offset>>3)-4, 4, h221NonStandard);
@@ -2536,7 +2557,7 @@ static const per_choice_t NonStandardIdentifier_choice[] = {
static int
dissect_h245_NonStandardIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 963 "../../asn1/h245/h245.cnf"
+#line 926 "../../asn1/h245/h245.cnf"
gint32 value;
nsiOID = "";
@@ -2565,7 +2586,7 @@ dissect_h245_NonStandardIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
static int
dissect_h245_T_nsd_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 997 "../../asn1/h245/h245.cnf"
+#line 960 "../../asn1/h245/h245.cnf"
tvbuff_t *next_tvb = NULL;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
@@ -2588,7 +2609,7 @@ static const per_sequence_t NonStandardParameter_sequence[] = {
static int
dissect_h245_NonStandardParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 995 "../../asn1/h245/h245.cnf"
+#line 958 "../../asn1/h245/h245.cnf"
nsp_handle = NULL;
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -2643,7 +2664,7 @@ dissect_h245_MasterSlaveDetermination(tvbuff_t *tvb _U_, int offset _U_, asn1_ct
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_MasterSlaveDetermination, MasterSlaveDetermination_sequence);
-#line 572 "../../asn1/h245/h245.cnf"
+#line 535 "../../asn1/h245/h245.cnf"
if (h245_pi != NULL)
h245_pi->msg_type = H245_MastSlvDet;
@@ -3541,7 +3562,7 @@ dissect_h245_T_t38fax(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p
static int
dissect_h245_T_standardOid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 730 "../../asn1/h245/h245.cnf"
+#line 693 "../../asn1/h245/h245.cnf"
const gchar *standard_oid_str = NULL;
gef_ctx_t *gefx;
@@ -3601,7 +3622,7 @@ static const per_choice_t CapabilityIdentifier_choice[] = {
static int
dissect_h245_CapabilityIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 715 "../../asn1/h245/h245.cnf"
+#line 678 "../../asn1/h245/h245.cnf"
gef_ctx_t *gefx;
proto_item* ti;
@@ -3610,7 +3631,7 @@ dissect_h245_CapabilityIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
ett_h245_CapabilityIdentifier, CapabilityIdentifier_choice,
NULL);
-#line 719 "../../asn1/h245/h245.cnf"
+#line 682 "../../asn1/h245/h245.cnf"
gef_ctx_update_key(gef_ctx_get(actx->private_data));
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
@@ -3637,7 +3658,7 @@ dissect_h245_INTEGER_0_4294967295(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
static int
dissect_h245_T_standard(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 761 "../../asn1/h245/h245.cnf"
+#line 724 "../../asn1/h245/h245.cnf"
guint32 value_int = (guint32)-1;
gef_ctx_t *gefx;
@@ -3670,7 +3691,7 @@ static const per_choice_t ParameterIdentifier_choice[] = {
static int
dissect_h245_ParameterIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 747 "../../asn1/h245/h245.cnf"
+#line 710 "../../asn1/h245/h245.cnf"
gef_ctx_t *gefx;
proto_item* ti;
@@ -3678,7 +3699,7 @@ dissect_h245_ParameterIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *
ett_h245_ParameterIdentifier, ParameterIdentifier_choice,
NULL);
-#line 750 "../../asn1/h245/h245.cnf"
+#line 713 "../../asn1/h245/h245.cnf"
gef_ctx_update_key(gef_ctx_get(actx->private_data));
gefx = gef_ctx_get(actx->private_data);
if (gefx) {
@@ -3695,7 +3716,7 @@ dissect_h245_ParameterIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *
static int
dissect_h245_T_booleanArray(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 770 "../../asn1/h245/h245.cnf"
+#line 733 "../../asn1/h245/h245.cnf"
guint32 value;
guint8 *buf;
tvbuff_t *value_tvb;
@@ -3724,7 +3745,7 @@ dissect_h245_T_booleanArray(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
static int
dissect_h245_T_unsignedMin(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 789 "../../asn1/h245/h245.cnf"
+#line 752 "../../asn1/h245/h245.cnf"
guint32 value;
guint8 *buf;
tvbuff_t *value_tvb;
@@ -3753,7 +3774,7 @@ dissect_h245_T_unsignedMin(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
static int
dissect_h245_T_unsignedMax(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 808 "../../asn1/h245/h245.cnf"
+#line 771 "../../asn1/h245/h245.cnf"
guint32 value;
guint8 *buf;
tvbuff_t *value_tvb;
@@ -3782,7 +3803,7 @@ dissect_h245_T_unsignedMax(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
static int
dissect_h245_T_unsigned32Min(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 827 "../../asn1/h245/h245.cnf"
+#line 790 "../../asn1/h245/h245.cnf"
guint32 value;
guint8 *buf;
tvbuff_t *value_tvb;
@@ -3811,7 +3832,7 @@ dissect_h245_T_unsigned32Min(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
static int
dissect_h245_T_unsigned32Max(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 846 "../../asn1/h245/h245.cnf"
+#line 809 "../../asn1/h245/h245.cnf"
guint32 value;
guint8 *buf;
tvbuff_t *value_tvb;
@@ -3840,7 +3861,7 @@ dissect_h245_T_unsigned32Max(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
static int
dissect_h245_T_octetString(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 865 "../../asn1/h245/h245.cnf"
+#line 828 "../../asn1/h245/h245.cnf"
tvbuff_t *value_tvb;
gef_ctx_t *gefx;
proto_item* ti;
@@ -3939,7 +3960,7 @@ dissect_h245_GenericParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
static int
dissect_h245_T_collapsing_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 670 "../../asn1/h245/h245.cnf"
+#line 633 "../../asn1/h245/h245.cnf"
gef_ctx_t *parent_gefx;
parent_gefx = gef_ctx_get(actx->private_data);
@@ -3947,7 +3968,7 @@ dissect_h245_T_collapsing_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac
offset = dissect_h245_GenericParameter(tvb, offset, actx, tree, hf_index);
-#line 675 "../../asn1/h245/h245.cnf"
+#line 638 "../../asn1/h245/h245.cnf"
actx->private_data = parent_gefx;
return offset;
@@ -3970,7 +3991,7 @@ dissect_h245_T_collapsing(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
static int
dissect_h245_T_nonCollapsing_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 679 "../../asn1/h245/h245.cnf"
+#line 642 "../../asn1/h245/h245.cnf"
gef_ctx_t *parent_gefx;
parent_gefx = gef_ctx_get(actx->private_data);
@@ -3978,7 +3999,7 @@ dissect_h245_T_nonCollapsing_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
offset = dissect_h245_GenericParameter(tvb, offset, actx, tree, hf_index);
-#line 684 "../../asn1/h245/h245.cnf"
+#line 647 "../../asn1/h245/h245.cnf"
actx->private_data = parent_gefx;
return offset;
@@ -4001,7 +4022,7 @@ dissect_h245_T_nonCollapsing(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
static int
dissect_h245_T_nonCollapsingRaw(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 688 "../../asn1/h245/h245.cnf"
+#line 651 "../../asn1/h245/h245.cnf"
tvbuff_t *value_tvb;
gef_ctx_t *parent_gefx;
gef_ctx_t *gefx;
@@ -4037,14 +4058,14 @@ static const per_sequence_t GenericCapability_sequence[] = {
static int
dissect_h245_GenericCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 663 "../../asn1/h245/h245.cnf"
+#line 626 "../../asn1/h245/h245.cnf"
void *priv_data = actx->private_data;
actx->private_data = gef_ctx_alloc(NULL, "GenericCapability");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_GenericCapability, GenericCapability_sequence);
-#line 666 "../../asn1/h245/h245.cnf"
+#line 629 "../../asn1/h245/h245.cnf"
actx->private_data = priv_data;
return offset;
@@ -4089,7 +4110,7 @@ static const per_choice_t Application_choice[] = {
static int
dissect_h245_Application(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 502 "../../asn1/h245/h245.cnf"
+#line 465 "../../asn1/h245/h245.cnf"
gint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -4233,7 +4254,7 @@ dissect_h245_T_payloadDescriptor(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *
static int
dissect_h245_T_rtpPayloadType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 948 "../../asn1/h245/h245.cnf"
+#line 911 "../../asn1/h245/h245.cnf"
unsigned int pt;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
@@ -4257,7 +4278,7 @@ static const per_sequence_t RTPPayloadType_sequence[] = {
static int
dissect_h245_RTPPayloadType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 940 "../../asn1/h245/h245.cnf"
+#line 903 "../../asn1/h245/h245.cnf"
rfc_number = 0;
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -5746,7 +5767,7 @@ static const per_choice_t VideoCapability_choice[] = {
static int
dissect_h245_VideoCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 494 "../../asn1/h245/h245.cnf"
+#line 457 "../../asn1/h245/h245.cnf"
gint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -6064,7 +6085,7 @@ static const per_choice_t AudioCapability_choice[] = {
static int
dissect_h245_AudioCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 487 "../../asn1/h245/h245.cnf"
+#line 450 "../../asn1/h245/h245.cnf"
gint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -6643,7 +6664,7 @@ dissect_h245_SET_SIZE_1_256_OF_CapabilityDescriptor(tvbuff_t *tvb _U_, int offse
static int
dissect_h245_T_subMessageIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 619 "../../asn1/h245/h245.cnf"
+#line 582 "../../asn1/h245/h245.cnf"
guint32 subMessageIdentifer;
gef_ctx_t *gefx;
@@ -6678,7 +6699,7 @@ dissect_h245_T_subMessageIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_
static int
dissect_h245_T_messageContent_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 645 "../../asn1/h245/h245.cnf"
+#line 608 "../../asn1/h245/h245.cnf"
gef_ctx_t *parent_gefx;
parent_gefx = gef_ctx_get(actx->private_data);
@@ -6686,7 +6707,7 @@ dissect_h245_T_messageContent_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
offset = dissect_h245_GenericParameter(tvb, offset, actx, tree, hf_index);
-#line 650 "../../asn1/h245/h245.cnf"
+#line 613 "../../asn1/h245/h245.cnf"
actx->private_data = parent_gefx;
return offset;
@@ -6715,7 +6736,7 @@ static const per_sequence_t GenericMessage_sequence[] = {
static int
dissect_h245_GenericMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 605 "../../asn1/h245/h245.cnf"
+#line 568 "../../asn1/h245/h245.cnf"
void *priv_data = actx->private_data;
gef_ctx_t *gefx;
@@ -6729,7 +6750,7 @@ dissect_h245_GenericMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_GenericMessage, GenericMessage_sequence);
-#line 615 "../../asn1/h245/h245.cnf"
+#line 578 "../../asn1/h245/h245.cnf"
actx->private_data = priv_data;
return offset;
@@ -6739,13 +6760,13 @@ dissect_h245_GenericMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
static int
dissect_h245_GenericInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 655 "../../asn1/h245/h245.cnf"
+#line 618 "../../asn1/h245/h245.cnf"
void *priv_data = actx->private_data;
actx->private_data = gef_ctx_alloc(NULL, "GenericInformation");
offset = dissect_h245_GenericMessage(tvb, offset, actx, tree, hf_index);
-#line 658 "../../asn1/h245/h245.cnf"
+#line 621 "../../asn1/h245/h245.cnf"
actx->private_data = priv_data;
return offset;
@@ -6780,7 +6801,7 @@ dissect_h245_TerminalCapabilitySet(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_TerminalCapabilitySet, TerminalCapabilitySet_sequence);
-#line 590 "../../asn1/h245/h245.cnf"
+#line 553 "../../asn1/h245/h245.cnf"
if (h245_pi != NULL)
h245_pi->msg_type = H245_TermCapSet;
@@ -7244,7 +7265,7 @@ static const per_choice_t DataType_choice[] = {
static int
dissect_h245_DataType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1023 "../../asn1/h245/h245.cnf"
+#line 986 "../../asn1/h245/h245.cnf"
gint choice_index;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -7982,7 +8003,7 @@ dissect_h245_V76LogicalChannelParameters(tvbuff_t *tvb _U_, int offset _U_, asn1
static int
dissect_h245_Ipv4_network(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 882 "../../asn1/h245/h245.cnf"
+#line 845 "../../asn1/h245/h245.cnf"
tvbuff_t *value_tvb;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
@@ -8002,7 +8023,7 @@ dissect_h245_Ipv4_network(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
static int
dissect_h245_TsapIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 893 "../../asn1/h245/h245.cnf"
+#line 856 "../../asn1/h245/h245.cnf"
guint32 tsapIdentifier;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
@@ -8259,13 +8280,13 @@ dissect_h245_TransportAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
static int
dissect_h245_T_mediaChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 912 "../../asn1/h245/h245.cnf"
+#line 875 "../../asn1/h245/h245.cnf"
if (upcoming_channel)
upcoming_channel->upcoming_addr = &upcoming_channel->media_addr;
offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index);
-#line 916 "../../asn1/h245/h245.cnf"
+#line 879 "../../asn1/h245/h245.cnf"
if (upcoming_channel)
upcoming_channel->upcoming_addr = NULL;
@@ -8276,13 +8297,13 @@ dissect_h245_T_mediaChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
static int
dissect_h245_T_mediaControlChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 930 "../../asn1/h245/h245.cnf"
+#line 893 "../../asn1/h245/h245.cnf"
if (upcoming_channel)
upcoming_channel->upcoming_addr = &upcoming_channel->media_control_addr;
offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index);
-#line 934 "../../asn1/h245/h245.cnf"
+#line 897 "../../asn1/h245/h245.cnf"
if (upcoming_channel)
upcoming_channel->upcoming_addr = NULL;
@@ -8674,14 +8695,14 @@ static const per_sequence_t EncryptionSync_sequence[] = {
static int
dissect_h245_EncryptionSync(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 707 "../../asn1/h245/h245.cnf"
+#line 670 "../../asn1/h245/h245.cnf"
void *priv_data = actx->private_data;
actx->private_data = gef_ctx_alloc(NULL, "EncryptionSync");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_EncryptionSync, EncryptionSync_sequence);
-#line 710 "../../asn1/h245/h245.cnf"
+#line 673 "../../asn1/h245/h245.cnf"
actx->private_data = priv_data;
return offset;
@@ -8800,7 +8821,7 @@ dissect_h245_CloseLogicalChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_CloseLogicalChannel, CloseLogicalChannel_sequence);
-#line 548 "../../asn1/h245/h245.cnf"
+#line 511 "../../asn1/h245/h245.cnf"
if (h245_pi != NULL)
h245_pi->msg_type = H245_CloseLogChn;
@@ -9298,7 +9319,7 @@ static const per_choice_t VideoMode_choice[] = {
static int
dissect_h245_VideoMode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 516 "../../asn1/h245/h245.cnf"
+#line 479 "../../asn1/h245/h245.cnf"
gint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -9624,7 +9645,7 @@ static const per_choice_t AudioMode_choice[] = {
static int
dissect_h245_AudioMode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 509 "../../asn1/h245/h245.cnf"
+#line 472 "../../asn1/h245/h245.cnf"
gint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -9691,7 +9712,7 @@ static const per_choice_t DataModeApplication_choice[] = {
static int
dissect_h245_DataModeApplication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 523 "../../asn1/h245/h245.cnf"
+#line 486 "../../asn1/h245/h245.cnf"
gint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -10685,16 +10706,7 @@ dissect_h245_RequestMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
ett_h245_RequestMessage, RequestMessage_choice,
&value);
- if ( h245_shorttypes == TRUE )
- {
- col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, h245_RequestMessage_short_vals, "<unknown>"));
- }
- else
- {
- col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, h245_RequestMessage_vals, "<unknown>"));
- }
+ print_info_column(actx->pinfo->cinfo, &value, h245_RequestMessage_vals, h245_RequestMessage_short_vals);
if (( codec_type != NULL ) && ( value == RequestMessage_openLogicalChannel) ){
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%s) ", codec_type );
@@ -10757,7 +10769,7 @@ dissect_h245_MasterSlaveDeterminationAck(tvbuff_t *tvb _U_, int offset _U_, asn1
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_MasterSlaveDeterminationAck, MasterSlaveDeterminationAck_sequence);
-#line 530 "../../asn1/h245/h245.cnf"
+#line 493 "../../asn1/h245/h245.cnf"
if (h245_pi != NULL)
h245_pi->msg_type = H245_MastSlvDetAck;
@@ -10796,7 +10808,7 @@ dissect_h245_MasterSlaveDeterminationReject(tvbuff_t *tvb _U_, int offset _U_, a
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_MasterSlaveDeterminationReject, MasterSlaveDeterminationReject_sequence);
-#line 536 "../../asn1/h245/h245.cnf"
+#line 499 "../../asn1/h245/h245.cnf"
if (h245_pi != NULL)
h245_pi->msg_type = H245_MastSlvDetRjc;
@@ -10816,7 +10828,7 @@ dissect_h245_TerminalCapabilitySetAck(tvbuff_t *tvb _U_, int offset _U_, asn1_ct
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_TerminalCapabilitySetAck, TerminalCapabilitySetAck_sequence);
-#line 566 "../../asn1/h245/h245.cnf"
+#line 529 "../../asn1/h245/h245.cnf"
if (h245_pi != NULL)
h245_pi->msg_type = H245_TermCapSetAck;
@@ -10885,7 +10897,7 @@ dissect_h245_TerminalCapabilitySetReject(tvbuff_t *tvb _U_, int offset _U_, asn1
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_TerminalCapabilitySetReject, TerminalCapabilitySetReject_sequence);
-#line 578 "../../asn1/h245/h245.cnf"
+#line 541 "../../asn1/h245/h245.cnf"
if (h245_pi != NULL)
h245_pi->msg_type = H245_TermCapSetRjc;
@@ -10961,13 +10973,13 @@ dissect_h245_OLC_ack_reverseLogicalChannelParameters(tvbuff_t *tvb _U_, int offs
static int
dissect_h245_Ack_mediaChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 903 "../../asn1/h245/h245.cnf"
+#line 866 "../../asn1/h245/h245.cnf"
if (upcoming_channel)
upcoming_channel->upcoming_addr = &upcoming_channel->media_addr;
offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index);
-#line 907 "../../asn1/h245/h245.cnf"
+#line 870 "../../asn1/h245/h245.cnf"
if (upcoming_channel)
upcoming_channel->upcoming_addr = NULL;
@@ -10978,13 +10990,13 @@ dissect_h245_Ack_mediaChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
static int
dissect_h245_Ack_mediaControlChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 921 "../../asn1/h245/h245.cnf"
+#line 884 "../../asn1/h245/h245.cnf"
if (upcoming_channel)
upcoming_channel->upcoming_addr = &upcoming_channel->media_control_addr;
offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index);
-#line 925 "../../asn1/h245/h245.cnf"
+#line 888 "../../asn1/h245/h245.cnf"
if (upcoming_channel)
upcoming_channel->upcoming_addr = NULL;
@@ -11176,7 +11188,7 @@ dissect_h245_OpenLogicalChannelReject(tvbuff_t *tvb _U_, int offset _U_, asn1_ct
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_OpenLogicalChannelReject, OpenLogicalChannelReject_sequence);
-#line 542 "../../asn1/h245/h245.cnf"
+#line 505 "../../asn1/h245/h245.cnf"
if (h245_pi != NULL)
h245_pi->msg_type = H245_OpenLogChnRjc;
@@ -11195,7 +11207,7 @@ dissect_h245_CloseLogicalChannelAck(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_CloseLogicalChannelAck, CloseLogicalChannelAck_sequence);
-#line 554 "../../asn1/h245/h245.cnf"
+#line 517 "../../asn1/h245/h245.cnf"
if (h245_pi != NULL)
h245_pi->msg_type = H245_CloseLogChnAck;
@@ -12319,24 +12331,14 @@ static const per_choice_t ResponseMessage_choice[] = {
static int
dissect_h245_ResponseMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 407 "../../asn1/h245/h245.cnf"
+#line 398 "../../asn1/h245/h245.cnf"
gint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
ett_h245_ResponseMessage, ResponseMessage_choice,
&value);
- if ( h245_shorttypes == TRUE )
- {
- col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, h245_ResponseMessage_short_vals, "<unknown>"));
- }
- else
- {
- col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, h245_ResponseMessage_vals, "<unknown>"));
- }
-
+ print_info_column(actx->pinfo->cinfo, &value, h245_ResponseMessage_vals, h245_ResponseMessage_short_vals);
col_set_fence(actx->pinfo->cinfo,COL_INFO);
if (h245_pi != NULL){
@@ -13361,25 +13363,16 @@ static const per_choice_t CommandMessage_choice[] = {
static int
dissect_h245_CommandMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 461 "../../asn1/h245/h245.cnf"
+#line 433 "../../asn1/h245/h245.cnf"
gint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
ett_h245_CommandMessage, CommandMessage_choice,
&value);
- if ( h245_shorttypes == TRUE )
- {
- col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, h245_CommandMessage_short_vals, "<unknown>"));
- }
- else
- {
- col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, h245_CommandMessage_vals, "<unknown>"));
- }
-
+ print_info_column(actx->pinfo->cinfo, &value, h245_CommandMessage_vals, h245_CommandMessage_short_vals);
col_set_fence(actx->pinfo->cinfo,COL_INFO);
+
/* Add to packet info */
if (h245_pi != NULL){
if ( strlen(h245_pi->frame_label) == 0 ){
@@ -13427,7 +13420,7 @@ dissect_h245_MasterSlaveDeterminationRelease(tvbuff_t *tvb _U_, int offset _U_,
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_MasterSlaveDeterminationRelease, MasterSlaveDeterminationRelease_sequence);
-#line 584 "../../asn1/h245/h245.cnf"
+#line 547 "../../asn1/h245/h245.cnf"
if (h245_pi != NULL)
h245_pi->msg_type = H245_MastSlvDetRls;
@@ -13446,7 +13439,7 @@ dissect_h245_TerminalCapabilitySetRelease(tvbuff_t *tvb _U_, int offset _U_, asn
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_TerminalCapabilitySetRelease, TerminalCapabilitySetRelease_sequence);
-#line 596 "../../asn1/h245/h245.cnf"
+#line 559 "../../asn1/h245/h245.cnf"
if (h245_pi != NULL)
h245_pi->msg_type = H245_TermCapSetRls;
@@ -13466,7 +13459,7 @@ dissect_h245_OpenLogicalChannelConfirm(tvbuff_t *tvb _U_, int offset _U_, asn1_c
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_OpenLogicalChannelConfirm, OpenLogicalChannelConfirm_sequence);
-#line 560 "../../asn1/h245/h245.cnf"
+#line 523 "../../asn1/h245/h245.cnf"
if (h245_pi != NULL)
h245_pi->msg_type = H245_OpenLogChnCnf;
@@ -14239,7 +14232,7 @@ dissect_h245_FunctionNotSupportedCause(tvbuff_t *tvb _U_, int offset _U_, asn1_c
static int
dissect_h245_T_returnedFunction(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1006 "../../asn1/h245/h245.cnf"
+#line 969 "../../asn1/h245/h245.cnf"
tvbuff_t *next_tvb = NULL;
proto_item *item;
proto_tree *subtree;
@@ -14431,25 +14424,16 @@ static const per_choice_t IndicationMessage_choice[] = {
static int
dissect_h245_IndicationMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 434 "../../asn1/h245/h245.cnf"
+#line 415 "../../asn1/h245/h245.cnf"
gint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
ett_h245_IndicationMessage, IndicationMessage_choice,
&value);
- if ( h245_shorttypes == TRUE )
- {
- col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, h245_IndicationMessage_short_vals, "<unknown>"));
- }
- else
- {
- col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(value, h245_IndicationMessage_vals, "<unknown>"));
- }
-
+ print_info_column(actx->pinfo->cinfo, &value, h245_IndicationMessage_vals, h245_IndicationMessage_short_vals);
col_set_fence(actx->pinfo->cinfo,COL_INFO);
+
/* Add to packet info */
if (h245_pi !=NULL){
if ( strlen(h245_pi->frame_label) == 0 ){
@@ -14503,7 +14487,7 @@ static int dissect_OpenLogicalChannel_PDU(tvbuff_t *tvb _U_, packet_info *pinfo
/*--- End of included file: packet-h245-fn.c ---*/
-#line 397 "../../asn1/h245/packet-h245-template.c"
+#line 418 "../../asn1/h245/packet-h245-template.c"
static void
dissect_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
@@ -20200,7 +20184,7 @@ void proto_register_h245(void) {
NULL, HFILL }},
/*--- End of included file: packet-h245-hfarr.c ---*/
-#line 481 "../../asn1/h245/packet-h245-template.c"
+#line 502 "../../asn1/h245/packet-h245-template.c"
};
/* List of subtrees */
@@ -20703,7 +20687,7 @@ void proto_register_h245(void) {
&ett_h245_MobileMultilinkReconfigurationIndication,
/*--- End of included file: packet-h245-ettarr.c ---*/
-#line 488 "../../asn1/h245/packet-h245-template.c"
+#line 509 "../../asn1/h245/packet-h245-template.c"
};
module_t *h245_module;
@@ -20726,6 +20710,10 @@ void proto_register_h245(void) {
"Show short message types",
"Whether the dissector should show short names or the long names from the standard",
&h245_shorttypes);
+ prefs_register_bool_preference(h245_module, "prepand",
+ "Show h245 info in reversed order",
+ "Whether the dissector should print items of h245 Info column in reversed order",
+ &info_col_fmt_prepend);
register_dissector("h245dg", dissect_h245_h245, proto_h245);
register_dissector("h245", dissect_h245, proto_h245);