aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2022-04-12 08:33:36 +0200
committerAnders Broman <anders.broman@ericsson.com>2022-04-12 08:33:36 +0200
commit096947337e4c999912d5a5547e03383006ed55b6 (patch)
treec707be1085d77f4d8a509543c722cf0548b54b52
parent09696f17629a89349b40d2cdb2908bdb0cae365c (diff)
PER:Add function to add "PER encoded lable" to the tree.
-rw-r--r--epan/dissectors/asn1/nrppa/nrppa.cnf1
-rw-r--r--epan/dissectors/packet-nrppa.c3
-rw-r--r--epan/dissectors/packet-per.c15
-rw-r--r--epan/dissectors/packet-per.h2
-rw-r--r--packaging/debian/libwireshark0.symbols1
5 files changed, 20 insertions, 2 deletions
diff --git a/epan/dissectors/asn1/nrppa/nrppa.cnf b/epan/dissectors/asn1/nrppa/nrppa.cnf
index a6acb051d9..db7bcb5e1a 100644
--- a/epan/dissectors/asn1/nrppa/nrppa.cnf
+++ b/epan/dissectors/asn1/nrppa/nrppa.cnf
@@ -62,6 +62,7 @@ ProtocolExtensionField/id ext_id
#.FN_HDR NRPPA-PDU
proto_tree_add_item(tree, proto_nrppa, tvb, 0, -1, ENC_NA);
+ add_per_encoded_label(tvb, actx->pinfo, tree);
col_append_sep_str(actx->pinfo->cinfo, COL_PROTOCOL, "/", "NRPPa");
#.END
diff --git a/epan/dissectors/packet-nrppa.c b/epan/dissectors/packet-nrppa.c
index 97e8c7af44..a7b05f5d45 100644
--- a/epan/dissectors/packet-nrppa.c
+++ b/epan/dissectors/packet-nrppa.c
@@ -1479,6 +1479,7 @@ dissect_nrppa_NRPPA_PDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
#line 63 "./asn1/nrppa/nrppa.cnf"
proto_tree_add_item(tree, proto_nrppa, tvb, 0, -1, ENC_NA);
+ add_per_encoded_label(tvb, actx->pinfo, tree);
col_append_sep_str(actx->pinfo->cinfo, COL_PROTOCOL, "/", "NRPPa");
@@ -4174,7 +4175,7 @@ dissect_nrppa_DLPRSResourceCoordinates(tvbuff_t *tvb _U_, int offset _U_, asn1_c
static int
dissect_nrppa_TAC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 72 "./asn1/nrppa/nrppa.cnf"
+#line 73 "./asn1/nrppa/nrppa.cnf"
tvbuff_t *parameter_tvb = NULL;
offset = dissect_per_octet_string(tvb, offset, actx, tree, -1,
3, 3, FALSE, &parameter_tvb);
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c
index c6f97f015f..7eedcf5cca 100644
--- a/epan/dissectors/packet-per.c
+++ b/epan/dissectors/packet-per.c
@@ -61,6 +61,7 @@ static int hf_per_internal_range = -1;
static int hf_per_internal_num_bits = -1;
static int hf_per_internal_min = -1;
static int hf_per_internal_value = -1;
+static int hf_per_encoding_boiler_plate = -1;
static gint ett_per_open_type = -1;
static gint ett_per_containing = -1;
@@ -109,6 +110,15 @@ static const true_false_string tfs_small_number_bit = {
"The number is large, >63"
};
+void
+add_per_encoded_label(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree)
+{
+ proto_item* ti;
+
+ ti = proto_tree_add_item(tree, hf_per_encoding_boiler_plate, tvb, 0, -1, ENC_NA);
+ proto_item_set_generated(ti);
+
+}
#define BYTE_ALIGN_OFFSET(offset) if(offset&0x07){offset=(offset&0xfffffff8)+8;}
@@ -2850,6 +2860,11 @@ proto_register_per(void)
{ "Bits", "per.internal.value",
FT_UINT64, BASE_DEC, NULL, 0,
NULL, HFILL }},
+ { &hf_per_encoding_boiler_plate,
+ { "PER encoded protocol, to see PER internal fields set protocol PER preferences", "per.encoding_boiler_plate",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL } },
+
};
static gint *ett[] = {
diff --git a/epan/dissectors/packet-per.h b/epan/dissectors/packet-per.h
index a2278c1d73..64a894d043 100644
--- a/epan/dissectors/packet-per.h
+++ b/epan/dissectors/packet-per.h
@@ -119,5 +119,5 @@ extern guint32 dissect_per_length_determinant(tvbuff_t *tvb, guint32 offset, asn
WS_DLL_PUBLIC int call_per_oid_callback(const char *oid, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, asn1_ctx_t *actx, int hf_index);
WS_DLL_PUBLIC void register_per_oid_dissector(const char *oid, dissector_t dissector, int proto, const char *name);
-
+WS_DLL_PUBLIC void add_per_encoded_label(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree);
#endif /* __PACKET_PER_H__ */
diff --git a/packaging/debian/libwireshark0.symbols b/packaging/debian/libwireshark0.symbols
index fc5eac224b..a13e1a89fd 100644
--- a/packaging/debian/libwireshark0.symbols
+++ b/packaging/debian/libwireshark0.symbols
@@ -31,6 +31,7 @@ libwireshark.so.0 libwireshark0 #MINVER#
add_ipv6_name@Base 1.9.1
add_itu_tcap_subdissector@Base 1.9.1
add_new_data_source@Base 1.9.1
+ add_per_encoded_label@Base 3.7.0
add_srt_table_data@Base 1.99.8
address_to_bytes@Base 2.1.1
address_to_display@Base 1.99.2