aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorChristophe GUERBER <christophe.guerber@gmail.com>2018-12-29 15:17:41 +0100
committerAnders Broman <a.broman58@gmail.com>2018-12-31 14:25:14 +0000
commit19c5a005f111ae60b95234c703d3967df4251fe0 (patch)
tree2a5f5c6ae7d34ee8d1c3e3e79cc2e09bd0217e80 /epan
parent5016cd478e4f09bc2e9521f4b4e67a93f3ff0bdf (diff)
Export ITS-AppId/psId names from IEEE1609
PsId and ITS-AID are defined in several documents and listed in ieee1609.12. Put these definitions in ieee1609.2 ASN1 definition and export it so that GeoNetworking and wsmp dissectors may use it. Change-Id: Ia3ac181a4c9092b555decb3ee7c5e78adcece5c0 Reviewed-on: https://code.wireshark.org/review/31236 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/CMakeLists.txt1
-rw-r--r--epan/dissectors/asn1/ieee1609dot2/CMakeLists.txt2
-rw-r--r--epan/dissectors/asn1/ieee1609dot2/IEEE1609dot12.asn99
-rw-r--r--epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf61
-rw-r--r--epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c5
-rw-r--r--epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.h34
-rw-r--r--epan/dissectors/packet-geonw.c3
-rw-r--r--epan/dissectors/packet-ieee1609dot2.c91
-rw-r--r--epan/dissectors/packet-ieee1609dot2.h122
-rw-r--r--epan/dissectors/packet-wsmp.c92
10 files changed, 414 insertions, 96 deletions
diff --git a/epan/dissectors/CMakeLists.txt b/epan/dissectors/CMakeLists.txt
index 331bf75c21..dd3188dd5d 100644
--- a/epan/dissectors/CMakeLists.txt
+++ b/epan/dissectors/CMakeLists.txt
@@ -385,6 +385,7 @@ set(DISSECTOR_PUBLIC_HEADERS
packet-icmp.h
packet-idmp.h
packet-idp.h
+ packet-ieee1609dot2.h
packet-ieee80211.h
packet-ieee80211-radio.h
packet-ieee80211-radiotap-iter.h
diff --git a/epan/dissectors/asn1/ieee1609dot2/CMakeLists.txt b/epan/dissectors/asn1/ieee1609dot2/CMakeLists.txt
index 91855941a1..728e03a340 100644
--- a/epan/dissectors/asn1/ieee1609dot2/CMakeLists.txt
+++ b/epan/dissectors/asn1/ieee1609dot2/CMakeLists.txt
@@ -18,11 +18,13 @@ set( EXT_ASN_FILE_LIST
set( ASN_FILE_LIST
IEEE1609dot2BaseTypes.asn
IEEE1609dot2DataTypes.asn
+ IEEE1609dot12.asn
)
set( EXTRA_DIST
${ASN_FILE_LIST}
packet-${PROTOCOL_NAME}-template.c
+ packet-${PROTOCOL_NAME}-template.h
${PROTOCOL_NAME}.cnf
)
diff --git a/epan/dissectors/asn1/ieee1609dot2/IEEE1609dot12.asn b/epan/dissectors/asn1/ieee1609dot2/IEEE1609dot12.asn
new file mode 100644
index 0000000000..1534772ec1
--- /dev/null
+++ b/epan/dissectors/asn1/ieee1609dot2/IEEE1609dot12.asn
@@ -0,0 +1,99 @@
+IEEE1609dot12
+
+DEFINITIONS AUTOMATIC TAGS ::= BEGIN
+ IMPORTS
+ Psid
+ FROM IEEE1609dot2BaseTypes {iso(1) identified-organization(3) ieee(111)
+ standards-association-numbered-series-standards(2) wave-stds(1609)
+ dot2(2) base(1) base-types(2)}
+ ;
+psid-system Psid ::= 0 -- ISO-15628a
+psid-electronic-fee-collection Psid ::= 1 -- ISO-14906
+psid-freight-fleet-management Psid ::= 2 -- ISO-15628
+psid-public-transport Psid ::= 3 -- ISO-15628
+psid-traffic-traveller-information Psid ::= 4 -- ISO-15628
+psid-traffic-control Psid ::= 5 -- ISO-15628
+psid-parking-management Psid ::= 6 -- ISO-15628
+psid-geographic-road-database Psid ::= 7 -- ISO-15628
+psid-medium-range-preinformation Psid ::= 8 -- ISO-15628
+psid-man-machine-interface Psid ::= 9 -- ISO-15628
+psid-intersystem-interface Psid ::= 10 -- ISO-15628
+psid-automatic-vehicle-identification Psid ::= 11 -- ISO-17264
+psid-emergency-warning Psid ::= 12 -- ISO-15628
+psid-private Psid ::= 13 -- ISO-15628
+psid-multi-purpose-payment Psid ::= 14 -- ISO-15628
+psid-dsrc-resource-manager Psid ::= 15 -- ISO-15628
+psid-after-theft-systems Psid ::= 16 -- ISO-15628
+psid-cruise-assist-highway-system Psid ::= 17 -- ISO-15628
+psid-multi-purpose-information-system Psid ::= 18 -- ISO-15628
+psid-multi-mobile-information-system Psid ::= 19 -- ISO-15628
+psid-efc-compliance-check-communication-applications Psid ::= 20 -- ISO-TS-12813
+psid-efc-localisation-augmentation-communication-applications Psid ::= 21 -- ISO-TS-13141
+psid-iso-cen-dsrc-applications-0x16 Psid ::= 22 -- ISO 15628
+psid-iso-cen-dsrc-applications-0x17 Psid ::= 23 -- ISO 15628
+psid-iso-cen-dsrc-applications-0x18 Psid ::= 24 -- ISO 15628
+psid-iso-cen-dsrc-applications-0x19 Psid ::= 25 -- ISO 15628
+psid-iso-cen-dsrc-applications-0x1a Psid ::= 26 -- ISO 15628
+psid-iso-cen-dsrc-applications-0x1b Psid ::= 27 -- ISO 15628
+psid-iso-cen-dsrc-applications-0x1c Psid ::= 28 -- ISO 15628
+psid-private-use-0x1d Psid ::= 29 -- IISO 15628
+psid-private-use-0x1e Psid ::= 30 -- IISO 15628
+psid-iso-cen-dsrc-applications-0x1f Psid ::= 31 -- IISO 15628
+psid-vehicle-to-vehicle-safety-and-awarenesss Psid ::= 32 -- SAE-J2735
+psid-limited-sensor-vehicle-to-vehicle-safety-and-awarenesss Psid ::= 33 -- SAE-J2735
+psid-tracked-vehicle-safety-and-awarenesss Psid ::= 34 -- SAE-J2735
+psid-wave-security-managements Psid ::= 35 -- IEEE-Std-1609.2
+psid-ca-basic-services Psid ::= 36 -- ETSI-EN-302-637_2
+psid-den-basic-services Psid ::= 37 -- ETSI-EN-302-637_3
+psid-misbehavior-reporting-for-common-applications Psid ::= 38 -- CAMP
+psid-vulnerable-road-users-safety-applications Psid ::= 39 -- SAE-DSRC-TC
+-- 0x28 to 0x7E 0p28 to 0p7E Not allocated
+psid-testings Psid ::= 127 -- IEEE-P1609-WG
+psid-differential-gps-corrections-uncompressed Psid ::= 128 -- SAE-J2735
+psid-differential-gps-corrections-compressed Psid ::= 129 -- SAE-J2735
+psid-intersection-safety-and-awareness Psid ::= 130 -- SAE-J2735
+psid-traveller-information-and-roadside-signage Psid ::= 131 -- SAE-J2735
+psid-mobile-probe-exchanges Psid ::= 132 -- SAE-J2735
+psid-emergency-and-erratic-vehicles-present-in-roadway Psid ::= 133 -- SAE-J2735
+psid-remote-management-protocol-execution Psid ::= 134 -- ISO-24102-2
+psid-wave-service-advertisement Psid ::= 135 -- IEEE-Std-1609.3
+psid-peer-to-peer-distribution-of-security-management-information Psid ::= 136 -- CAMP
+psid-traffic-light-manoeuver-service Psid ::= 137 -- ISO-19091-ETSI-TS-103-301
+psid-road-and-lane-topology-service Psid ::= 138 -- ISO-19091-ETSI-TS-103-301
+psid-infrastructure-to-vehicle-information-service Psid ::= 139 -- ISO-19321-ETSI-TS-103-301
+psid-traffic-light-control-service Psid ::= 140 -- ISO-19091-ETSI-TS-103-301
+psid-geonetworking-management-communications Psid ::= 141 -- ETSI-EN-302-636-4-1
+
+-- 0x8e to 0xFF 0p80-09 to 0p80-7F Not allocated
+
+psid-certificate-revocation-list-application Psid ::= 256 -- CAMP
+
+-- 0x01-01 to 0x3E-7F 0p80-81 to 0pBD-FF Not allocated
+-- 0x3E-80 to 0x40-1F 0pBE-00 to 0pBF-9F Reserved IEEE P1609 WG 416
+-- 0x40-20 to 0x40-5F 0pBF-A0 to 0pBF-DF Private used IEEE P1609 WG 64
+-- 0x40-60 to 0x40-7F 0pBF-E0 to 0pBF-FF Testing IEEE P1609 WG 32
+-- 16 384 total 2-octet p-encoded values
+
+-- 0x40-80 0pC0-00-00 Cooperative Awareness Message (CAM) processor(deprecated) ETSI deprecated
+-- 0x40-81 0pC0-00-01 Decentralized Environmental Notification Message(DENM) processor(deprecated) ETSI deprecated
+
+psid-vehicle-initiated-distress-notivication Psid ::= 16514 -- Wyoming DOT
+-- 0x40-83 to 0x08-40-80 0pc0-00-03 to 0pc8-00-03 Reserved for future assignments by the IEEE registrar
+-- 0x08-40-81 to 0x10-40-7e 0pc8-00-01 to 0pcf-ff-fe Reserved for future assignments by the CEN registrar
+-- 0x10-40-7f to 0x20-40-7d 0pcf-ff-ff to 0pdf-ff-fd Reserved for future assignments by the ISO registrar
+-- 0x20-40-7e 0pdf-ff-fe IPv6 Routing deprecated
+-- 0x20-40-7f 0pdf-ff-ff Reserved for future assignments by the ISO registrar
+-- 2 097 152 total 3-octet p-encoded values
+
+psid-fast-service-advertisement-protocol Psid ::= 2113664 -- ISO-24102-5
+psid-its-station-internal-management-communications-protocol Psid ::= 2113665 -- ISO-24102-4
+psid-veniam-delay-tolerant-networking Psid ::= 2113666 -- Venicam.com
+psid-transcore-software-update Psid ::= 2113667 -- Transcore, Inc.
+psid-sra-private-applications-0x204084 Psid ::= 2113668 -- SRA, Inc,
+psid-sra-private-applications-0x204085 Psid ::= 2113669 -- SRA, Inc,
+psid-sra-private-applications-0x204086 Psid ::= 2113670 -- SRA, Inc,
+psid-sra-private-applications-0x204087 Psid ::= 2113671 -- SRA, Inc,
+psid-ipv6-routing Psid ::= 270549118 -- IEEE-Std-1609-3
+-- >4 bytes long its-aid/psid Not suported
+
+END
diff --git a/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf b/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf
index 5aa1c38d1c..9b6635d661 100644
--- a/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf
+++ b/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf
@@ -8,7 +8,11 @@ OER
#.MODULE
#.MODULE_IMPORT
-#.EXPORTS
+#.EXPORTS ONLY_VALS WS_DLL
+Psid
+
+#.MAKE_ENUM
+Psid
#.REGISTER
@@ -53,3 +57,58 @@ tvbuff_t *parameter_tvb=NULL;
#.END
+#.ASSIGN_VALUE_TO_TYPE
+psid-system Psid
+psid-electronic-fee-collection Psid
+psid-freight-fleet-management Psid
+psid-public-transport Psid
+psid-traffic-traveller-information Psid
+psid-traffic-control Psid
+psid-parking-management Psid
+psid-geographic-road-database Psid
+psid-medium-range-preinformation Psid
+psid-man-machine-interface Psid
+psid-intersystem-interface Psid
+psid-automatic-vehicle-identification Psid
+psid-emergency-warning Psid
+psid-private Psid
+psid-multi-purpose-payment Psid
+psid-dsrc-resource-manager Psid
+psid-after-theft-systems Psid
+psid-cruise-assist-highway-system Psid
+psid-multi-purpose-information-system Psid
+psid-multi-mobile-information-system Psid
+psid-efc-compliance-check-communication-applications Psid
+psid-efc-localisation-augmentation-communication-applications Psid
+psid-vehicle-to-vehicle-safety-and-awarenesss Psid
+psid-limited-sensor-vehicle-to-vehicle-safety-and-awarenesss Psid
+psid-tracked-vehicle-safety-and-awarenesss Psid
+psid-wave-security-managements Psid
+psid-ca-basic-services Psid
+psid-den-basic-services Psid
+psid-misbehavior-reporting-for-common-applications Psid
+psid-vulnerable-road-users-safety-applications Psid
+psid-testings Psid
+psid-differential-gps-corrections-uncompressed Psid
+psid-differential-gps-corrections-compressed Psid
+psid-intersection-safety-and-awareness Psid
+psid-traveller-information-and-roadside-signage Psid
+psid-mobile-probe-exchanges Psid
+psid-emergency-and-erratic-vehicles-present-in-roadway Psid
+psid-remote-management-protocol-execution Psid
+psid-wave-service-advertisement Psid
+psid-peer-to-peer-distribution-of-security-management-information Psid
+psid-traffic-light-manoeuver-service Psid
+psid-road-and-lane-topology-service Psid
+psid-infrastructure-to-vehicle-information-service Psid
+psid-traffic-light-control-service Psid
+psid-geonetworking-management-communications Psid
+psid-certificate-revocation-list-application Psid
+psid-vehicle-initiated-distress-notivication Psid
+psid-fast-service-advertisement-protocol Psid
+psid-its-station-internal-management-communications-protocol Psid
+psid-veniam-delay-tolerant-networking Psid
+psid-transcore-software-update Psid
+psid-ipv6-routing Psid
+#.END
+
diff --git a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c
index b351436fd7..99b075fb3b 100644
--- a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c
+++ b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c
@@ -9,6 +9,10 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
+/* Also contains IEEE std 1609.12
+ * section 4.1.3 PSID allocations
+ */
+
#include "config.h"
#include <epan/packet.h>
@@ -17,6 +21,7 @@
#include <epan/asn1.h>
#include "packet-oer.h"
+#include "packet-ieee1609dot2.h"
#define PNAME "IEEE1609dot2"
#define PSNAME "IEEE1609dot2"
diff --git a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.h b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.h
new file mode 100644
index 0000000000..1ccbb34d51
--- /dev/null
+++ b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.h
@@ -0,0 +1,34 @@
+/* packet-IEEE1609dot2.h
+ * Routines for IEEE 1609.2
+ * Copyright 2018, Anders Broman <anders.broman@ericsson.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef _IEEE1609DOT2_H_
+#define _IEEE1609DOT2_H_
+
+#include "ws_symbol_export.h"
+
+#include "packet-ieee1609dot2-val.h"
+
+#include "packet-ieee1609dot2-exp.h"
+
+#endif /* _IEEE1609DOT2_H_ */
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-geonw.c b/epan/dissectors/packet-geonw.c
index 045cfcb314..3d30f09517 100644
--- a/epan/dissectors/packet-geonw.c
+++ b/epan/dissectors/packet-geonw.c
@@ -71,6 +71,7 @@
#include <wsutil/ws_printf.h>
#include "packet-e164.h"
+#include "packet-ieee1609dot2.h"
#include "packet-geonw.h"
/*
@@ -1261,7 +1262,7 @@ dissect_sec_intx(tvbuff_t *tvb, gint *offset, packet_info *pinfo, proto_tree *tr
}
else {
proto_tree_add_uint_bits_format_value(subtree, hf, tvb, (start << 3) + (*offset) - start,
- (((*offset) - start) << 3) - ((*offset) - start), (guint32)tmp_val, "%u", (guint32)tmp_val);
+ (((*offset) - start) << 3) - ((*offset) - start), (guint32)tmp_val, "%s(%u)", val64_to_str_const(tmp_val, ieee1609dot2_Psid_vals, "Unknown") , (guint32)tmp_val);
}
// The encoding of the length shall use at most 7 bits set to 1.
if (!mask)
diff --git a/epan/dissectors/packet-ieee1609dot2.c b/epan/dissectors/packet-ieee1609dot2.c
index e5ce5087f0..a6e35c1c57 100644
--- a/epan/dissectors/packet-ieee1609dot2.c
+++ b/epan/dissectors/packet-ieee1609dot2.c
@@ -1,7 +1,7 @@
/* Do not modify this file. Changes will be overwritten. */
/* Generated automatically by the ASN.1 to Wireshark dissector compiler */
/* packet-ieee1609dot2.c */
-/* asn2wrs.py -p ieee1609dot2 -c ./ieee1609dot2.cnf -s ./packet-ieee1609dot2-template -D . -O ../.. IEEE1609dot2BaseTypes.asn IEEE1609dot2DataTypes.asn */
+/* asn2wrs.py -p ieee1609dot2 -c ./ieee1609dot2.cnf -s ./packet-ieee1609dot2-template -D . -O ../.. IEEE1609dot2BaseTypes.asn IEEE1609dot2DataTypes.asn IEEE1609dot12.asn */
/* Input file: packet-ieee1609dot2-template.c */
@@ -17,6 +17,10 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
+/* Also contains IEEE std 1609.12
+ * section 4.1.3 PSID allocations
+ */
+
#include "config.h"
#include <epan/packet.h>
@@ -25,6 +29,7 @@
#include <epan/asn1.h>
#include "packet-oer.h"
+#include "packet-ieee1609dot2.h"
#define PNAME "IEEE1609dot2"
#define PSNAME "IEEE1609dot2"
@@ -186,7 +191,7 @@ static int hf_ieee1609dot2_EndEntityType_app = -1;
static int hf_ieee1609dot2_EndEntityType_enrol = -1;
/*--- End of included file: packet-ieee1609dot2-hf.c ---*/
-#line 31 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
+#line 36 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
/* Initialize the subtree pointers */
@@ -257,7 +262,7 @@ static gint ett_ieee1609dot2_SubjectPermissions = -1;
static gint ett_ieee1609dot2_VerificationKeyIndicator = -1;
/*--- End of included file: packet-ieee1609dot2-ett.c ---*/
-#line 34 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
+#line 39 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
static dissector_handle_t j2735_handle;
@@ -976,6 +981,76 @@ dissect_ieee1609dot2_PublicVerificationKey(tvbuff_t *tvb _U_, int offset _U_, as
}
+const val64_string ieee1609dot2_Psid_vals[] = {
+ { psid_system, "psid-system" },
+ { psid_electronic_fee_collection, "psid-electronic-fee-collection" },
+ { psid_freight_fleet_management, "psid-freight-fleet-management" },
+ { psid_public_transport, "psid-public-transport" },
+ { psid_traffic_traveller_information, "psid-traffic-traveller-information" },
+ { psid_traffic_control, "psid-traffic-control" },
+ { psid_parking_management, "psid-parking-management" },
+ { psid_geographic_road_database, "psid-geographic-road-database" },
+ { psid_medium_range_preinformation, "psid-medium-range-preinformation" },
+ { psid_man_machine_interface, "psid-man-machine-interface" },
+ { psid_intersystem_interface, "psid-intersystem-interface" },
+ { psid_automatic_vehicle_identification, "psid-automatic-vehicle-identification" },
+ { psid_emergency_warning, "psid-emergency-warning" },
+ { psid_private, "psid-private" },
+ { psid_multi_purpose_payment, "psid-multi-purpose-payment" },
+ { psid_dsrc_resource_manager, "psid-dsrc-resource-manager" },
+ { psid_after_theft_systems, "psid-after-theft-systems" },
+ { psid_cruise_assist_highway_system, "psid-cruise-assist-highway-system" },
+ { psid_multi_purpose_information_system, "psid-multi-purpose-information-system" },
+ { psid_multi_mobile_information_system, "psid-multi-mobile-information-system" },
+ { psid_efc_compliance_check_communication_applications, "psid-efc-compliance-check-communication-applications" },
+ { psid_efc_localisation_augmentation_communication_applications, "psid-efc-localisation-augmentation-communication-applications" },
+ { psid_iso_cen_dsrc_applications_0x16, "psid-iso-cen-dsrc-applications-0x16" },
+ { psid_iso_cen_dsrc_applications_0x17, "psid-iso-cen-dsrc-applications-0x17" },
+ { psid_iso_cen_dsrc_applications_0x18, "psid-iso-cen-dsrc-applications-0x18" },
+ { psid_iso_cen_dsrc_applications_0x19, "psid-iso-cen-dsrc-applications-0x19" },
+ { psid_iso_cen_dsrc_applications_0x1a, "psid-iso-cen-dsrc-applications-0x1a" },
+ { psid_iso_cen_dsrc_applications_0x1b, "psid-iso-cen-dsrc-applications-0x1b" },
+ { psid_iso_cen_dsrc_applications_0x1c, "psid-iso-cen-dsrc-applications-0x1c" },
+ { psid_private_use_0x1d, "psid-private-use-0x1d" },
+ { psid_private_use_0x1e, "psid-private-use-0x1e" },
+ { psid_iso_cen_dsrc_applications_0x1f, "psid-iso-cen-dsrc-applications-0x1f" },
+ { psid_vehicle_to_vehicle_safety_and_awarenesss, "psid-vehicle-to-vehicle-safety-and-awarenesss" },
+ { psid_limited_sensor_vehicle_to_vehicle_safety_and_awarenesss, "psid-limited-sensor-vehicle-to-vehicle-safety-and-awarenesss" },
+ { psid_tracked_vehicle_safety_and_awarenesss, "psid-tracked-vehicle-safety-and-awarenesss" },
+ { psid_wave_security_managements, "psid-wave-security-managements" },
+ { psid_ca_basic_services, "psid-ca-basic-services" },
+ { psid_den_basic_services, "psid-den-basic-services" },
+ { psid_misbehavior_reporting_for_common_applications, "psid-misbehavior-reporting-for-common-applications" },
+ { psid_vulnerable_road_users_safety_applications, "psid-vulnerable-road-users-safety-applications" },
+ { psid_testings, "psid-testings" },
+ { psid_differential_gps_corrections_uncompressed, "psid-differential-gps-corrections-uncompressed" },
+ { psid_differential_gps_corrections_compressed, "psid-differential-gps-corrections-compressed" },
+ { psid_intersection_safety_and_awareness, "psid-intersection-safety-and-awareness" },
+ { psid_traveller_information_and_roadside_signage, "psid-traveller-information-and-roadside-signage" },
+ { psid_mobile_probe_exchanges, "psid-mobile-probe-exchanges" },
+ { psid_emergency_and_erratic_vehicles_present_in_roadway, "psid-emergency-and-erratic-vehicles-present-in-roadway" },
+ { psid_remote_management_protocol_execution, "psid-remote-management-protocol-execution" },
+ { psid_wave_service_advertisement, "psid-wave-service-advertisement" },
+ { psid_peer_to_peer_distribution_of_security_management_information, "psid-peer-to-peer-distribution-of-security-management-information" },
+ { psid_traffic_light_manoeuver_service, "psid-traffic-light-manoeuver-service" },
+ { psid_road_and_lane_topology_service, "psid-road-and-lane-topology-service" },
+ { psid_infrastructure_to_vehicle_information_service, "psid-infrastructure-to-vehicle-information-service" },
+ { psid_traffic_light_control_service, "psid-traffic-light-control-service" },
+ { psid_geonetworking_management_communications, "psid-geonetworking-management-communications" },
+ { psid_certificate_revocation_list_application, "psid-certificate-revocation-list-application" },
+ { psid_vehicle_initiated_distress_notivication, "psid-vehicle-initiated-distress-notivication" },
+ { psid_fast_service_advertisement_protocol, "psid-fast-service-advertisement-protocol" },
+ { psid_its_station_internal_management_communications_protocol, "psid-its-station-internal-management-communications-protocol" },
+ { psid_veniam_delay_tolerant_networking, "psid-veniam-delay-tolerant-networking" },
+ { psid_transcore_software_update, "psid-transcore-software-update" },
+ { psid_sra_private_applications_0x204084, "psid-sra-private-applications-0x204084" },
+ { psid_sra_private_applications_0x204085, "psid-sra-private-applications-0x204085" },
+ { psid_sra_private_applications_0x204086, "psid-sra-private-applications-0x204086" },
+ { psid_sra_private_applications_0x204087, "psid-sra-private-applications-0x204087" },
+ { psid_ipv6_routing, "psid-ipv6-routing" },
+ { 0, NULL }
+};
+
static int
dissect_ieee1609dot2_Psid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
@@ -1194,7 +1269,7 @@ dissect_ieee1609dot2_GroupLinkageValue(tvbuff_t *tvb _U_, int offset _U_, asn1_c
static int
dissect_ieee1609dot2_T_unsecuredData(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 43 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
+#line 47 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
tvbuff_t *parameter_tvb=NULL;
@@ -1800,7 +1875,7 @@ static int dissect_Ieee1609Dot2Data_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U
/*--- End of included file: packet-ieee1609dot2-fn.c ---*/
-#line 38 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
+#line 43 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
/*--- proto_register_ieee1609dot2 ----------------------------------------------*/
@@ -2045,7 +2120,7 @@ void proto_register_ieee1609dot2(void) {
"OCTET_STRING_SIZE_16", HFILL }},
{ &hf_ieee1609dot2_psid,
{ "psid", "ieee1609dot2.psid",
- FT_UINT64, BASE_DEC, NULL, 0,
+ FT_UINT64, BASE_DEC|BASE_VAL64_STRING, VALS64(ieee1609dot2_Psid_vals), 0,
NULL, HFILL }},
{ &hf_ieee1609dot2_ssp,
{ "ssp", "ieee1609dot2.ssp",
@@ -2393,7 +2468,7 @@ void proto_register_ieee1609dot2(void) {
NULL, HFILL }},
/*--- End of included file: packet-ieee1609dot2-hfarr.c ---*/
-#line 46 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
+#line 51 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
};
/* List of subtrees */
@@ -2466,7 +2541,7 @@ void proto_register_ieee1609dot2(void) {
&ett_ieee1609dot2_VerificationKeyIndicator,
/*--- End of included file: packet-ieee1609dot2-ettarr.c ---*/
-#line 51 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
+#line 56 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
};
/* Register protocol */
diff --git a/epan/dissectors/packet-ieee1609dot2.h b/epan/dissectors/packet-ieee1609dot2.h
new file mode 100644
index 0000000000..e97a0b3307
--- /dev/null
+++ b/epan/dissectors/packet-ieee1609dot2.h
@@ -0,0 +1,122 @@
+/* Do not modify this file. Changes will be overwritten. */
+/* Generated automatically by the ASN.1 to Wireshark dissector compiler */
+/* packet-ieee1609dot2.h */
+/* asn2wrs.py -p ieee1609dot2 -c ./ieee1609dot2.cnf -s ./packet-ieee1609dot2-template -D . -O ../.. IEEE1609dot2BaseTypes.asn IEEE1609dot2DataTypes.asn IEEE1609dot12.asn */
+
+/* Input file: packet-ieee1609dot2-template.h */
+
+#line 1 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.h"
+/* packet-IEEE1609dot2.h
+ * Routines for IEEE 1609.2
+ * Copyright 2018, Anders Broman <anders.broman@ericsson.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef _IEEE1609DOT2_H_
+#define _IEEE1609DOT2_H_
+
+#include "ws_symbol_export.h"
+
+
+/*--- Included file: packet-ieee1609dot2-val.h ---*/
+#line 1 "./asn1/ieee1609dot2/packet-ieee1609dot2-val.h"
+
+typedef enum _Psid_enum {
+ psid_system = 0,
+ psid_electronic_fee_collection = 1,
+ psid_freight_fleet_management = 2,
+ psid_public_transport = 3,
+ psid_traffic_traveller_information = 4,
+ psid_traffic_control = 5,
+ psid_parking_management = 6,
+ psid_geographic_road_database = 7,
+ psid_medium_range_preinformation = 8,
+ psid_man_machine_interface = 9,
+ psid_intersystem_interface = 10,
+ psid_automatic_vehicle_identification = 11,
+ psid_emergency_warning = 12,
+ psid_private = 13,
+ psid_multi_purpose_payment = 14,
+ psid_dsrc_resource_manager = 15,
+ psid_after_theft_systems = 16,
+ psid_cruise_assist_highway_system = 17,
+ psid_multi_purpose_information_system = 18,
+ psid_multi_mobile_information_system = 19,
+ psid_efc_compliance_check_communication_applications = 20,
+ psid_efc_localisation_augmentation_communication_applications = 21,
+ psid_iso_cen_dsrc_applications_0x16 = 22,
+ psid_iso_cen_dsrc_applications_0x17 = 23,
+ psid_iso_cen_dsrc_applications_0x18 = 24,
+ psid_iso_cen_dsrc_applications_0x19 = 25,
+ psid_iso_cen_dsrc_applications_0x1a = 26,
+ psid_iso_cen_dsrc_applications_0x1b = 27,
+ psid_iso_cen_dsrc_applications_0x1c = 28,
+ psid_private_use_0x1d = 29,
+ psid_private_use_0x1e = 30,
+ psid_iso_cen_dsrc_applications_0x1f = 31,
+ psid_vehicle_to_vehicle_safety_and_awarenesss = 32,
+ psid_limited_sensor_vehicle_to_vehicle_safety_and_awarenesss = 33,
+ psid_tracked_vehicle_safety_and_awarenesss = 34,
+ psid_wave_security_managements = 35,
+ psid_ca_basic_services = 36,
+ psid_den_basic_services = 37,
+ psid_misbehavior_reporting_for_common_applications = 38,
+ psid_vulnerable_road_users_safety_applications = 39,
+ psid_testings = 127,
+ psid_differential_gps_corrections_uncompressed = 128,
+ psid_differential_gps_corrections_compressed = 129,
+ psid_intersection_safety_and_awareness = 130,
+ psid_traveller_information_and_roadside_signage = 131,
+ psid_mobile_probe_exchanges = 132,
+ psid_emergency_and_erratic_vehicles_present_in_roadway = 133,
+ psid_remote_management_protocol_execution = 134,
+ psid_wave_service_advertisement = 135,
+ psid_peer_to_peer_distribution_of_security_management_information = 136,
+ psid_traffic_light_manoeuver_service = 137,
+ psid_road_and_lane_topology_service = 138,
+ psid_infrastructure_to_vehicle_information_service = 139,
+ psid_traffic_light_control_service = 140,
+ psid_geonetworking_management_communications = 141,
+ psid_certificate_revocation_list_application = 256,
+ psid_vehicle_initiated_distress_notivication = 16514,
+ psid_fast_service_advertisement_protocol = 2113664,
+ psid_its_station_internal_management_communications_protocol = 2113665,
+ psid_veniam_delay_tolerant_networking = 2113666,
+ psid_transcore_software_update = 2113667,
+ psid_sra_private_applications_0x204084 = 2113668,
+ psid_sra_private_applications_0x204085 = 2113669,
+ psid_sra_private_applications_0x204086 = 2113670,
+ psid_sra_private_applications_0x204087 = 2113671,
+ psid_ipv6_routing = 270549118
+} Psid_enum;
+
+/*--- End of included file: packet-ieee1609dot2-val.h ---*/
+#line 18 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.h"
+
+
+/*--- Included file: packet-ieee1609dot2-exp.h ---*/
+#line 1 "./asn1/ieee1609dot2/packet-ieee1609dot2-exp.h"
+WS_DLL_PUBLIC const val64_string ieee1609dot2_Psid_vals[];
+
+/*--- End of included file: packet-ieee1609dot2-exp.h ---*/
+#line 20 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.h"
+
+#endif /* _IEEE1609DOT2_H_ */
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-wsmp.c b/epan/dissectors/packet-wsmp.c
index 085f6c0b57..0e6aad3a09 100644
--- a/epan/dissectors/packet-wsmp.c
+++ b/epan/dissectors/packet-wsmp.c
@@ -18,6 +18,8 @@
#include <epan/etypes.h>
#include <epan/expert.h>
+#include "packet-ieee1609dot2.h"
+
/* elemenID Types */
#define TRANSMITPW 0x04
#define CHANNUM 0x0F
@@ -117,88 +119,6 @@ static const value_string wsmp_tpid_vals[] = {
{ 0, NULL }
};
-/* IEEE std 1609.12
- * 4.1.3 PSID allocations
- * Using P-encoded PSID values (hex)
- */
-static const value_string wsmp_psid_vals[] = {
- { 0x0, "Null-networking protocol" },
-/* 0x00 */ { 0x00, "system" }, /* ISO 15628a */
-/* 0x01 */ { 0x01, "electronic-fee-collection" }, /* ISO 14906 */
-/* 0x02 */ { 0x02, "freight-fl eet-management" }, /* ISO 15628 */
-/* 0x03 */ { 0x03, "public-transport" }, /* ISO 15628 */
-/* 0x04 */ { 0x04, "traffi c-traveller-information" }, /* ISO 15628 */
-/* 0x05 */ { 0x05, "traffi c-control" }, /* ISO 15628 */
-/* 0x06 */ { 0x06, "parking management" }, /* ISO 15628 */
-/* 0x07 */ { 0x07, "geographic-road-database" }, /* ISO 15628 */
-/* 0x08 */ { 0x08, "medium-range-preinformation" }, /* ISO 15628 */
-/* 0x09 */ { 0x09, "man-machine-interface" }, /* ISO 15628 */
-/* 0x0A */ { 0x0A, "intersystem-interface" }, /* ISO 15628 */
-/* 0x0B */ { 0x0B, "automatic-vehicle-identifi cation" }, /* ISO 17264 */
-/* 0x0C */ { 0x0C, "emergency-warning" }, /* ISO 15628 */
-/* 0x0D */ { 0x0D, "private" }, /* ISO 15628 */
-/* 0x0E */ { 0x0E, "multi-purpose-payment" }, /* ISO 15628 */
-/* 0x0F */ { 0x0F, "dsrc-resource manager" }, /* ISO 15628 */
-/* 0x10 */ { 0x10, "after-theft-systems" }, /* ISO 15628 */
-/* 0x11 */ { 0x11, "cruise-assist-highway-system" }, /* ISO 15628 */
-/* 0x12 */ { 0x12, "multi-purpose-information-system" }, /* ISO 15628 */
-/* 0x13 */ { 0x13, "multi-mobile-information-system" }, /* ISO 15628 */
-/* 0x14 */ { 0x14, "efc-compliance-check-communication-applications " }, /* ISO TS 12813 */
-/* 0x15 */ { 0x15, "efc-localisation-augmentation-communication-applications" }, /* ISO TS 13141 */
-/* 0x16 */ { 0x16, "reserved for ISO/CEN-dsrc-applications" }, /* IISO 15628 */
-/* 0x17 */ { 0x17, "reserved for ISO/CEN-dsrc-applications" }, /* IISO 15628 */
-/* 0x18 */ { 0x18, "reserved for ISO/CEN-dsrc-applications" }, /* IISO 15628 */
-/* 0x19 */ { 0x19, "reserved for ISO/CEN-dsrc-applications" }, /* IISO 15628 */
-/* 0x10 */ { 0x1a, "reserved for ISO/CEN-dsrc-applications" }, /* IISO 15628 */
-/* 0x1b */ { 0x1b, "reserved for ISO/CEN-dsrc-applications" }, /* IISO 15628 */
-/* 0x1c */ { 0x1c, "reserved for ISO/CEN-dsrc-applications" }, /* IISO 15628 */
-
-/* 0x1d */ { 0x1d, "Private use" }, /* IISO 15628 */
-/* 0x1e */ { 0x1e, "Private use" }, /* IISO 15628 */
-/* 0x1f */ { 0x1f, "reserved for ISO/CEN-dsrc-applications" }, /* IISO 15628 */
-
-/* 0x20 */ { 0x20, "vehicle to vehicle safety and awarenesss" }, /* SAE J2735 */
-/* 0x21 */ { 0x21, "limited sensor vehicle to vehicle safety and awarenesss" }, /* SAE J2735 */
-/* 0x22 */ { 0x22, "tracked vehicle safety and awarenesss" }, /* SAE J2735 */
-/* 0x23 */ { 0x23, "WAVE security managements" }, /* IEEE Std 1609.2 */
-/* 0x24 */ { 0x24, "CA Basic Services" }, /* ETSI EN 302 637-2 */
-/* 0x25 */ { 0x25, "DEN Basic Services" }, /* ETSI EN 302 637-3 */
-/* 0x26 */ { 0x26, "Misbehavior reporting for common applicationss" }, /* CAMP */
-/* 0x27 */ { 0x27, "Vulnerable Road Users Safety Applications" }, /* SAE DSRC TC */
-
-/* 0x28 to 0x7E 0p28 to 0p7E Not allocated */
-
-/* 0x7F */ { 0x7F, "Testings" }, /* IEEE P1609 WG */
-/* 0x80 */ { 0x80, "differential GPS corrections, uncompressed" }, /* SAE J2735 */
-/* 0x81 */ { 0x81, "differential GPS corrections, compressed" }, /* SAE J2735 */
-/* 0x82 */ { 0x82, "intersection safety and awareness" }, /* SAE J2735 */
-/* 0x83 */ { 0x83, "traveller information and roadside signage" }, /* SAE J2735 */
-/* 0x84 */ { 0x84, "mobile probe exchanges" }, /* SAE J2735 */
-/* 0x85 */ { 0x85, "emergency and erratic vehicles present in roadway" }, /* SAE J2735 */
-/* 0x86 */ { 0x86, "Remote ITS station management protocol-Remote Management Protocol Execution(RMPE)" }, /* ISO 24102-2 */
-/* 0x87 */ { 0x87, "WAVE Service Advertisement" }, /* IEEE Std 1609.3 */
-/* 0x88 */ { 0x88, "Peer-to-peer distribution of Security Management Information" }, /* CAMP */
-
-/* 0x89 to 0xFF 0p80-09 to 0p80-7F Not allocated */
-
-/* 0x01-00 */ { 0x0100, "Certificate Revocation List Application" }, /* CAMP */
-
- /*0x01-01 to 0x3E-7F 0p80-81 to 0pBD-FF Not allocated*/
- /*0x3E-80 to 0x40-1F 0pBE-00 to 0pBF-9F Reserved IEEE P1609 WG 416*/
- /*0x40-20 to 0x40-5F 0pBF-A0 to 0pBF-DF Private used IEEE P1609 WG 64*/
- /*0x40-60 to 0x40-7F 0pBF-E0 to 0pBF-FF Testing IEEE P1609 WG 32*/
- /*16 384 total 2-octet p-encoded values*/
- /*0x40-80 0pC0-00-00 Cooperative Awareness Message (CAM) processor(deprecated) ETSI */
- /*0x40-81 0pC0-00-01 Decentralized Environmental Notification Message(DENM) processor(deprecated) ETSI */
- /*0x40-82 to 0x20-40-7F 0pC0-00-02 to 0pDF-FF-FF Not allocated*/
- /* 2 097 152 total 3-octet p-encoded values*/
-/* 0x20-40-81 */{ 0x204081, "ITS-station Internal management Communications Protocol(IICP)" }, /* ISO 24102-4 */
- /*0x20-40-82 to 0x10-20-40-7D 0pE0-00-00 - 02 to 0pEF-FFFF - FD Not allocated*/
-/* 0x10-20-40-7E */{ 0x1020407E, "IPv6 routing" }, /* IEEE Std 1609.3 */
-/* 0x10-20-40-7F */{ 0x1020407F, "Not allocated" }, /* */
-{ 0, NULL }
-};
-
/*
4.1.2 P-encoding of PSIDs
This standard defines a compact encoding for PSID referred to as p-encoding. Octets are numbered from the
@@ -240,7 +160,7 @@ dissect_wsmp_psid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int o
proto_tree_add_bits_item(tree, hf_wsmp_var_len_det, tvb, offset << 3, psidLen, ENC_NA);
proto_tree_add_uint_bits_format_value(tree, hf_wsmp_psid, tvb, (offset << 3) + psidLen,
- (psidLen << 3) - psidLen,*psid,"%s(%u)", val_to_str_const(*psid, wsmp_psid_vals, "Unknown"), *psid);
+ (psidLen << 3) - psidLen,*psid,"%s(%u)", val64_to_str_const(*psid, ieee1609dot2_Psid_vals, "Unknown"), *psid);
offset += psidLen;
return offset;
@@ -370,10 +290,10 @@ dissect_wsmp_v3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 oct)
/* WSM Data */
data_tree = proto_tree_add_subtree(tree, tvb, offset, wsm_len, ett_wsmdata, NULL, "Wave Short Message");
- if((psid == 0x20) && (IEEE1609dot2_handle)){
+ if((psid == (guint32)psid_vehicle_to_vehicle_safety_and_awarenesss) && (IEEE1609dot2_handle)){
tvbuff_t * tvb_new = tvb_new_subset_remaining(tvb, offset);
call_dissector(IEEE1609dot2_handle, tvb_new, pinfo, data_tree);
- } else if ((psid == 0x82) && (IEEE1609dot2_handle)) {
+ } else if ((psid == (guint32)psid_intersection_safety_and_awareness) && (IEEE1609dot2_handle)) {
tvbuff_t * tvb_new = tvb_new_subset_remaining(tvb, offset);
call_dissector(IEEE1609dot2_handle, tvb_new, pinfo, data_tree);
}
@@ -503,7 +423,7 @@ proto_register_wsmp(void)
NULL, HFILL }},
{ &hf_wsmp_psid,
- { "PSID", "wsmp.psid", FT_UINT32, BASE_HEX, VALS(wsmp_psid_vals), 0x0,
+ { "PSID", "wsmp.psid", FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_wsmp_channel,