diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
commit | a86c5f7cae7ec9a3398300555a0b644689d946a1 (patch) | |
tree | 39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/asn1/ieee1609dot2 | |
parent | Releasing progress-linux version 4.2.6-1~progress7.99u1. (diff) | |
download | wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip |
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/asn1/ieee1609dot2')
3 files changed, 24 insertions, 23 deletions
diff --git a/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf b/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf index 50e47b86..0c7c49a6 100644 --- a/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf +++ b/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf @@ -93,11 +93,11 @@ SspRange/opaque ABBREV=srRange.opaque ieee1609_private_data_t *my_private_data = (ieee1609_private_data_t*)actx->private_data; offset = dissect_oer_octet_string(tvb, offset, actx, tree, hf_index, - NO_BOUND, NO_BOUND, FALSE, &my_private_data->unsecured_data); + NO_BOUND, NO_BOUND, false, &my_private_data->unsecured_data); if (my_private_data->unsecured_data) { // psid may also be provided in HeaderInfo - guint32 psid = GPOINTER_TO_UINT(p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_ieee1609dot2, 0)); + uint32_t psid = GPOINTER_TO_UINT(p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_ieee1609dot2, 0)); if (psid) { /* Call next dissector here */ dissector_try_uint(unsecured_data_subdissector_table, psid, my_private_data->unsecured_data, actx->pinfo, tree); @@ -109,15 +109,15 @@ SspRange/opaque ABBREV=srRange.opaque #.END #.FN_BODY HeaderInfo/psid - guint64 psid; + uint64_t psid; ieee1609_private_data_t *my_private_data = (ieee1609_private_data_t*)actx->private_data; offset = dissect_oer_constrained_integer_64b_no_ub(tvb, offset, actx, tree, hf_index, - 0U, NO_BOUND, &psid, FALSE); + 0U, NO_BOUND, &psid, false); if ((my_private_data != NULL) && (my_private_data->unsecured_data != NULL)) { /* Call next dissector here */ - ieee1609dot2_set_next_default_psid(actx->pinfo, (guint32)psid); - dissector_try_uint(unsecured_data_subdissector_table, (guint32) psid, my_private_data->unsecured_data, actx->pinfo, tree); + ieee1609dot2_set_next_default_psid(actx->pinfo, (uint32_t)psid); + dissector_try_uint(unsecured_data_subdissector_table, (uint32_t) psid, my_private_data->unsecured_data, actx->pinfo, tree); my_private_data->unsecured_data = NULL; } @@ -125,19 +125,19 @@ SspRange/opaque ABBREV=srRange.opaque #.FN_BODY PsidSsp/psid offset = dissect_oer_constrained_integer_64b_no_ub(tvb, offset, actx, tree, hf_index, - 0U, NO_BOUND, &((ieee1609_private_data_t*)actx->private_data)->psidssp, FALSE); + 0U, NO_BOUND, &((ieee1609_private_data_t*)actx->private_data)->psidssp, false); #.FN_BODY ServiceSpecificPermissions/opaque tvbuff_t *ssp; ieee1609_private_data_t *my_private_data = (ieee1609_private_data_t*)actx->private_data; offset = dissect_oer_octet_string(tvb, offset, actx, tree, hf_index, - 0, NO_BOUND, FALSE, &ssp); + 0, NO_BOUND, false, &ssp); if (ssp) { // Create subtree proto_tree *subtree = proto_item_add_subtree(actx->created_item, ett_ieee1609dot2_ssp); /* Call next dissector here */ - dissector_try_uint(ssp_subdissector_table, (guint32) my_private_data->psidssp, ssp, actx->pinfo, subtree); + dissector_try_uint(ssp_subdissector_table, (uint32_t) my_private_data->psidssp, ssp, actx->pinfo, subtree); } #.END diff --git a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c index 6a2c4cdb..85ae09cf 100644 --- a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c +++ b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c @@ -23,6 +23,7 @@ #include <epan/oids.h> #include <epan/asn1.h> #include <epan/proto_data.h> +#include <wsutil/array.h> #include "packet-oer.h" #include "packet-ieee1609dot2.h" @@ -35,12 +36,12 @@ void proto_register_ieee1609dot2(void); void proto_reg_handoff_ieee1609dot2(void); /* Initialize the protocol and registered fields */ -int proto_ieee1609dot2 = -1; -dissector_handle_t proto_ieee1609dot2_handle = NULL; +int proto_ieee1609dot2; +dissector_handle_t proto_ieee1609dot2_handle; #include "packet-ieee1609dot2-hf.c" /* Initialize the subtree pointers */ -static int ett_ieee1609dot2_ssp = -1; +static int ett_ieee1609dot2_ssp; #include "packet-ieee1609dot2-ett.c" static dissector_table_t unsecured_data_subdissector_table; @@ -48,11 +49,11 @@ static dissector_table_t ssp_subdissector_table; typedef struct ieee1609_private_data { tvbuff_t *unsecured_data; - guint64 psidssp; // psid for Service Specific Permissions + uint64_t psidssp; // psid for Service Specific Permissions } ieee1609_private_data_t; void -ieee1609dot2_set_next_default_psid(packet_info *pinfo, guint32 psid) +ieee1609dot2_set_next_default_psid(packet_info *pinfo, uint32_t psid) { p_add_proto_data(wmem_file_scope(), pinfo, proto_ieee1609dot2, 0, GUINT_TO_POINTER(psid)); } @@ -61,9 +62,9 @@ ieee1609dot2_set_next_default_psid(packet_info *pinfo, guint32 psid) static void -ieee1609dot2_NinetyDegreeInt_fmt(gchar *s, guint32 v) +ieee1609dot2_NinetyDegreeInt_fmt(char *s, uint32_t v) { - gint32 lat = (gint32)v; + int32_t lat = (int32_t)v; if (lat == 900000001) { snprintf(s, ITEM_LABEL_LENGTH, "unavailable(%d)", lat); } else { @@ -77,9 +78,9 @@ ieee1609dot2_NinetyDegreeInt_fmt(gchar *s, guint32 v) } static void -ieee1609dot2_OneEightyDegreeInt_fmt(gchar *s, guint32 v) +ieee1609dot2_OneEightyDegreeInt_fmt(char *s, uint32_t v) { - gint32 lng = (gint32)v; + int32_t lng = (int32_t)v; if (lng == 1800000001) { snprintf(s, ITEM_LABEL_LENGTH, "unavailable(%d)", lng); } else { @@ -94,7 +95,7 @@ ieee1609dot2_OneEightyDegreeInt_fmt(gchar *s, guint32 v) static void -ieee1609dot2_Time32_fmt(gchar *s, guint32 v) +ieee1609dot2_Time32_fmt(char *s, uint32_t v) { time_t secs = v + 1072915200 - 5; struct tm *tm = gmtime(&secs); @@ -104,10 +105,10 @@ ieee1609dot2_Time32_fmt(gchar *s, guint32 v) } static void -ieee1609dot2_Time64_fmt(gchar *s, guint64 v) +ieee1609dot2_Time64_fmt(char *s, uint64_t v) { time_t secs = v / 1000000 + 1072915200 - 5; - guint32 usecs = v % 1000000; + uint32_t usecs = v % 1000000; struct tm *tm = gmtime(&secs); snprintf(s, ITEM_LABEL_LENGTH, "%u-%02u-%02u %02u:%02u:%02u.%06u (%" PRIu64 ")", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, usecs, v @@ -123,7 +124,7 @@ void proto_register_ieee1609dot2(void) { }; /* List of subtrees */ - static gint *ett[] = { + static int *ett[] = { #include "packet-ieee1609dot2-ettarr.c" &ett_ieee1609dot2_ssp, }; diff --git a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.h b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.h index f64075d7..eedf90ab 100644 --- a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.h +++ b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.h @@ -25,7 +25,7 @@ * structure. */ WS_DLL_PUBLIC -void ieee1609dot2_set_next_default_psid(packet_info *pinfo, guint32 psid); +void ieee1609dot2_set_next_default_psid(packet_info *pinfo, uint32_t psid); #include "packet-ieee1609dot2-exp.h" |