aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorChristophe GUERBER <christophe.guerber@gmail.com>2019-01-02 16:15:33 +0100
committerAnders Broman <a.broman58@gmail.com>2019-01-02 20:51:05 +0000
commitf45fd81616874afabdae4011f74380c809c39759 (patch)
tree131372c854f938807d4b56630130eb40bf30c254 /epan/dissectors
parente2e5b01d771339a596a418ec306fe00ab504e593 (diff)
IEEE1609.2: Allow Service Specific Permissions dissection
IEEE1609 and GeoNetworking secured packets containing certificate contain Service Specific Permission items that was not dissected. This patch allows dissection of SSP both in IEEE1609dot2 dissector and in the geonetworking dissector. It also provides SSP dissectors for ETSI DEN and CA basic services. Change-Id: Ic5efe403f7c4337c7e51a4eab9a9d674d2fe1cf6 Reviewed-on: https://code.wireshark.org/review/31303 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf39
-rw-r--r--epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c10
-rw-r--r--epan/dissectors/asn1/its/packet-its-template.c230
-rw-r--r--epan/dissectors/packet-geonw.c18
-rw-r--r--epan/dissectors/packet-ieee1609dot2.c107
-rw-r--r--epan/dissectors/packet-its.c240
6 files changed, 604 insertions, 40 deletions
diff --git a/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf b/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf
index 6233de8428..ab7b011192 100644
--- a/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf
+++ b/epan/dissectors/asn1/ieee1609dot2/ieee1609dot2.cnf
@@ -43,18 +43,23 @@ UnknownLongitude
#.FIELD_RENAME
+#.FN_HDR Ieee1609Dot2Data
+ actx->private_data = (void*)wmem_new0(wmem_packet_scope(), ieee1609_private_data_t);
+#.END
+
#.FN_BODY Ieee1609Dot2Content/unsecuredData
+ 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, (tvbuff_t **)&actx->private_data);
+ NO_BOUND, NO_BOUND, FALSE, &my_private_data->unsecured_data);
- if (actx->private_data) {
+ if (my_private_data->unsecured_data) {
// psid may also be provided in HeaderInfo
guint32 *psid = (guint32*)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, (tvbuff_t *)(actx->private_data), actx->pinfo, tree);
- actx->private_data = NULL;
+ dissector_try_uint(unsecured_data_subdissector_table, *psid, my_private_data->unsecured_data, actx->pinfo, tree);
+ my_private_data->unsecured_data = NULL;
}
// else: wait for the HeaderInfo for a second chance to dissect the content
}
@@ -63,16 +68,36 @@ UnknownLongitude
#.FN_BODY HeaderInfo/psid
guint64 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);
- if (actx->private_data) {
+ if (my_private_data->unsecured_data) {
/* Call next dissector here */
- dissector_try_uint(unsecured_data_subdissector_table, (guint32) psid, (tvbuff_t *)(actx->private_data), actx->pinfo, tree);
- actx->private_data = NULL;
+ dissector_try_uint(unsecured_data_subdissector_table, (guint32) psid, my_private_data->unsecured_data, actx->pinfo, tree);
+ my_private_data->unsecured_data = NULL;
}
#.END
+#.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);
+
+#.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);
+ 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);
+ }
+#.END
+
#.ASSIGN_VALUE_TO_TYPE
psid-system Psid
psid-electronic-fee-collection Psid
diff --git a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c
index 900cfa158a..cb9a27e705 100644
--- a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c
+++ b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c
@@ -36,9 +36,16 @@ int proto_ieee1609dot2 = -1;
#include "packet-ieee1609dot2-hf.c"
/* Initialize the subtree pointers */
+static int ett_ieee1609dot2_ssp = -1;
#include "packet-ieee1609dot2-ett.c"
static dissector_table_t unsecured_data_subdissector_table;
+static dissector_table_t ssp_subdissector_table;
+
+typedef struct ieee1609_private_data {
+ tvbuff_t *unsecured_data;
+ guint64 psidssp; // psid for Service Specific Permissions
+} ieee1609_private_data_t;
void
ieee1609dot2_set_next_default_psid(packet_info *pinfo, guint32 psid)
@@ -62,6 +69,7 @@ void proto_register_ieee1609dot2(void) {
/* List of subtrees */
static gint *ett[] = {
#include "packet-ieee1609dot2-ettarr.c"
+ &ett_ieee1609dot2_ssp,
};
/* Register protocol */
@@ -76,6 +84,8 @@ void proto_register_ieee1609dot2(void) {
// See TS17419_ITS-AID_AssignedNumbers
unsecured_data_subdissector_table = register_dissector_table("ieee1609dot2.psid",
"ATS-AID/PSID based dissector for unsecured/signed data", proto_ieee1609dot2, FT_UINT32, BASE_HEX);
+ ssp_subdissector_table = register_dissector_table("ieee1609dot2.ssp",
+ "ATS-AID/PSID based dissector for Service Specific Permissions (SSP)", proto_ieee1609dot2, FT_UINT32, BASE_HEX);
}
void
diff --git a/epan/dissectors/asn1/its/packet-its-template.c b/epan/dissectors/asn1/its/packet-its-template.c
index 28948ae361..8e29cc8733 100644
--- a/epan/dissectors/asn1/its/packet-its-template.c
+++ b/epan/dissectors/asn1/its/packet-its-template.c
@@ -44,6 +44,7 @@
#include "packet-per.h"
#include "packet-its.h"
+#include "packet-ieee1609dot2.h"
/*
* Well Known Ports definitions as per:
@@ -121,6 +122,60 @@ static int proto_its_mapem = -1;
static int proto_its_spatem = -1;
static int proto_addgrpc = -1;
+/*
+ * DENM SSP
+ */
+static int hf_denmssp_version = -1;
+static int hf_denmssp_flags = -1;
+static int hf_denmssp_trafficCondition = -1;
+static int hf_denmssp_accident = -1;
+static int hf_denmssp_roadworks = -1;
+static int hf_denmssp_adverseWeatherConditionAdhesion = -1;
+static int hf_denmssp_hazardousLocationSurfaceCondition = -1;
+static int hf_denmssp_hazardousLocationObstacleOnTheRoad = -1;
+static int hf_denmssp_hazardousLocationAnimalOnTheRoad = -1;
+static int hf_denmssp_humanPresenceOnTheRoad = -1;
+static int hf_denmssp_wrongWayDriving = -1;
+static int hf_denmssp_rescueAndRecoveryWorkInProgress = -1;
+static int hf_denmssp_ExtremeWeatherCondition = -1;
+static int hf_denmssp_adverseWeatherConditionVisibility = -1;
+static int hf_denmssp_adverseWeatherConditionPrecipitation = -1;
+static int hf_denmssp_slowVehicle = -1;
+static int hf_denmssp_dangerousEndOfQueue = -1;
+static int hf_denmssp_vehicleBreakdown = -1;
+static int hf_denmssp_postCrash = -1;
+static int hf_denmssp_humanProblem = -1;
+static int hf_denmssp_stationaryVehicle = -1;
+static int hf_denmssp_emergencyVehicleApproaching = -1;
+static int hf_denmssp_hazardousLocationDangerousCurve = -1;
+static int hf_denmssp_collisionRisk = -1;
+static int hf_denmssp_signalViolation = -1;
+static int hf_denmssp_dangerousSituation = -1;
+
+/*
+ * CAM SSP
+ */
+static int hf_camssp_version = -1;
+static int hf_camssp_flags = -1;
+static int hf_camssp_cenDsrcTollingZone = -1;
+static int hf_camssp_publicTransport = -1;
+static int hf_camssp_specialTransport = -1;
+static int hf_camssp_dangerousGoods = -1;
+static int hf_camssp_roadwork = -1;
+static int hf_camssp_rescue = -1;
+static int hf_camssp_emergency = -1;
+static int hf_camssp_safetyCar = -1;
+static int hf_camssp_closedLanes = -1;
+static int hf_camssp_requestForRightOfWay = -1;
+static int hf_camssp_requestForFreeCrossingAtATrafficLight = -1;
+static int hf_camssp_noPassing = -1;
+static int hf_camssp_noPassingForTrucks = -1;
+static int hf_camssp_speedLimit = -1;
+static int hf_camssp_reserved = -1;
+
+static gint ett_denmssp_flags = -1;
+static gint ett_camssp_flags = -1;
+
// Subdissectors
static dissector_table_t its_version_subdissector_table;
static dissector_table_t its_msgid_subdissector_table;
@@ -142,6 +197,75 @@ static int dissect_regextval_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
return tvb_captured_length(tvb);
}
+static int dissect_denmssp_pdu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+{
+ static const int *denmssp_flags[] = {
+ &hf_denmssp_trafficCondition,
+ &hf_denmssp_accident,
+ &hf_denmssp_roadworks,
+ &hf_denmssp_adverseWeatherConditionAdhesion,
+ &hf_denmssp_hazardousLocationSurfaceCondition,
+ &hf_denmssp_hazardousLocationObstacleOnTheRoad,
+ &hf_denmssp_hazardousLocationAnimalOnTheRoad,
+ &hf_denmssp_humanPresenceOnTheRoad,
+ &hf_denmssp_wrongWayDriving,
+ &hf_denmssp_rescueAndRecoveryWorkInProgress,
+ &hf_denmssp_ExtremeWeatherCondition,
+ &hf_denmssp_adverseWeatherConditionVisibility,
+ &hf_denmssp_adverseWeatherConditionPrecipitation,
+ &hf_denmssp_slowVehicle,
+ &hf_denmssp_dangerousEndOfQueue,
+ &hf_denmssp_vehicleBreakdown,
+ &hf_denmssp_postCrash,
+ &hf_denmssp_humanProblem,
+ &hf_denmssp_stationaryVehicle,
+ &hf_denmssp_emergencyVehicleApproaching,
+ &hf_denmssp_hazardousLocationDangerousCurve,
+ &hf_denmssp_collisionRisk,
+ &hf_denmssp_signalViolation,
+ &hf_denmssp_dangerousSituation,
+ NULL
+ };
+
+ guint32 version;
+
+ proto_tree_add_item_ret_uint(tree, hf_denmssp_version, tvb, 0, 1, ENC_BIG_ENDIAN, &version);
+ if (version == 1) {
+ proto_tree_add_bitmask(tree, tvb, 1, hf_denmssp_flags, ett_denmssp_flags, denmssp_flags, ENC_BIG_ENDIAN);
+ }
+ return tvb_reported_length(tvb);
+}
+
+static int dissect_camssp_pdu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+{
+ static const int *camssp_flags[] = {
+ &hf_camssp_cenDsrcTollingZone,
+ &hf_camssp_publicTransport,
+ &hf_camssp_specialTransport,
+ &hf_camssp_dangerousGoods,
+ &hf_camssp_roadwork,
+ &hf_camssp_rescue,
+ &hf_camssp_emergency,
+ &hf_camssp_safetyCar,
+ &hf_camssp_closedLanes,
+ &hf_camssp_requestForRightOfWay,
+ &hf_camssp_requestForFreeCrossingAtATrafficLight,
+ &hf_camssp_noPassing,
+ &hf_camssp_noPassingForTrucks,
+ &hf_camssp_speedLimit,
+ &hf_camssp_reserved,
+ NULL
+ };
+
+ guint32 version;
+
+ proto_tree_add_item_ret_uint(tree, hf_camssp_version, tvb, 0, 1, ENC_BIG_ENDIAN, &version);
+ if (version == 1) {
+ proto_tree_add_bitmask(tree, tvb, 1, hf_camssp_flags, ett_camssp_flags, camssp_flags, ENC_BIG_ENDIAN);
+ }
+ return tvb_reported_length(tvb);
+}
+
// Generated by asn2wrs
#include "packet-its-hf.c"
@@ -349,10 +473,111 @@ void proto_register_its(void)
{ "trafficConditionSubCauseCode", "its.subCauseCode",
FT_UINT32, BASE_DEC, VALS(its_TrafficConditionSubCauseCode_vals), 0,
"SubCauseCodeType", HFILL }},
+
+ /*
+ * DENM SSP
+ */
+ { &hf_denmssp_version, { "Version", "its.ssp.denm.version", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_denmssp_flags, { "Allowed to sign", "its.ssp.denm.flags", FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL }},
+ { &hf_denmssp_trafficCondition,
+ { "trafficCondition", "its.denm.ssp.trafficCondition",
+ FT_UINT24, BASE_DEC, NULL, 0x800000, NULL, HFILL }},
+ { &hf_denmssp_accident,
+ { "accident", "its.denm.ssp.accident",
+ FT_UINT24, BASE_DEC, NULL, 0x400000, NULL, HFILL }},
+ { &hf_denmssp_roadworks,
+ { "roadworks", "its.denm.ssp.roadworks",
+ FT_UINT24, BASE_DEC, NULL, 0x200000, NULL, HFILL }},
+ { &hf_denmssp_adverseWeatherConditionAdhesion,
+ { "adverseWeatherConditionAdhesion", "its.denm.ssp.advWxConditionAdhesion",
+ FT_UINT24, BASE_DEC, NULL, 0x100000, NULL, HFILL }},
+ { &hf_denmssp_hazardousLocationSurfaceCondition,
+ { "hazardousLocationSurfaceCondition", "its.denm.ssp.hazLocationSurfaceCondition",
+ FT_UINT24, BASE_DEC, NULL, 0x080000, NULL, HFILL }},
+ { &hf_denmssp_hazardousLocationObstacleOnTheRoad,
+ { "hazardousLocationObstacleOnTheRoad", "its.denm.ssp.hazLocationObstacleOnTheRoad",
+ FT_UINT24, BASE_DEC, NULL, 0x040000, NULL, HFILL }},
+ { &hf_denmssp_hazardousLocationAnimalOnTheRoad,
+ { "hazardousLocationAnimalOnTheRoad", "its.denm.ssp.hazLocationAnimalOnTheRoad",
+ FT_UINT24, BASE_DEC, NULL, 0x020000, NULL, HFILL }},
+ { &hf_denmssp_humanPresenceOnTheRoad,
+ { "humanPresenceOnTheRoad", "its.denm.ssp.humanPresenceOnTheRoad",
+ FT_UINT24, BASE_DEC, NULL, 0x010000, NULL, HFILL }},
+ { &hf_denmssp_wrongWayDriving,
+ { "wrongWayDriving", "its.denm.ssp.wrongWayDriving",
+ FT_UINT24, BASE_DEC, NULL, 0x008000, NULL, HFILL }},
+ { &hf_denmssp_rescueAndRecoveryWorkInProgress,
+ { "rescueAndRecoveryWorkInProgress", "its.denm.ssp.rescueAndRecoveryWorkInProgress",
+ FT_UINT24, BASE_DEC, NULL, 0x004000, NULL, HFILL }},
+ { &hf_denmssp_ExtremeWeatherCondition,
+ { "ExtremeWeatherCondition", "its.denm.ssp.ExtremeWxCondition",
+ FT_UINT24, BASE_DEC, NULL, 0x002000, NULL, HFILL }},
+ { &hf_denmssp_adverseWeatherConditionVisibility,
+ { "adverseWeatherConditionVisibility", "its.denm.ssp.advWxConditionVisibility",
+ FT_UINT24, BASE_DEC, NULL, 0x001000, NULL, HFILL }},
+ { &hf_denmssp_adverseWeatherConditionPrecipitation,
+ { "adverseWeatherConditionPrecipitation", "its.denm.ssp.advWxConditionPrecipitation",
+ FT_UINT24, BASE_DEC, NULL, 0x000800, NULL, HFILL }},
+ { &hf_denmssp_slowVehicle,
+ { "slowVehicle", "its.denm.ssp.slowVehicle",
+ FT_UINT24, BASE_DEC, NULL, 0x000400, NULL, HFILL }},
+ { &hf_denmssp_dangerousEndOfQueue,
+ { "dangerousEndOfQueue", "its.denm.ssp.dangerousEndOfQueue",
+ FT_UINT24, BASE_DEC, NULL, 0x000200, NULL, HFILL }},
+ { &hf_denmssp_vehicleBreakdown,
+ { "vehicleBreakdown", "its.denm.ssp.vehicleBreakdown",
+ FT_UINT24, BASE_DEC, NULL, 0x000100, NULL, HFILL }},
+ { &hf_denmssp_postCrash,
+ { "postCrash", "its.denm.ssp.postCrash",
+ FT_UINT24, BASE_DEC, NULL, 0x000080, NULL, HFILL }},
+ { &hf_denmssp_humanProblem,
+ { "humanProblem", "its.denm.ssp.humanProblem",
+ FT_UINT24, BASE_DEC, NULL, 0x000040, NULL, HFILL }},
+ { &hf_denmssp_stationaryVehicle,
+ { "stationaryVehicle", "its.denm.ssp.stationaryVehicle",
+ FT_UINT24, BASE_DEC, NULL, 0x000020, NULL, HFILL }},
+ { &hf_denmssp_emergencyVehicleApproaching,
+ { "emergencyVehicleApproaching", "its.denm.ssp.emergencyVehicleApproaching",
+ FT_UINT24, BASE_DEC, NULL, 0x000010, NULL, HFILL }},
+ { &hf_denmssp_hazardousLocationDangerousCurve,
+ { "hazardousLocationDangerousCurve", "its.denm.ssp.hazLocationDangerousCurve",
+ FT_UINT24, BASE_DEC, NULL, 0x000008, NULL, HFILL }},
+ { &hf_denmssp_collisionRisk,
+ { "collisionRisk", "its.denm.ssp.collisionRisk",
+ FT_UINT24, BASE_DEC, NULL, 0x000004, NULL, HFILL }},
+ { &hf_denmssp_signalViolation,
+ { "signalViolation", "its.denm.ssp.signalViolation",
+ FT_UINT24, BASE_DEC, NULL, 0x000002, NULL, HFILL }},
+ { &hf_denmssp_dangerousSituation,
+ { "dangerousSituation", "its.denm.ssp.dangerousSituation",
+ FT_UINT24, BASE_DEC, NULL, 0x000001, NULL, HFILL }},
+
+ /*
+ * CAM SSP
+ */
+ { &hf_camssp_version, { "Version", "its.ssp.cam.version", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_camssp_flags, { "Allowed to sign", "its.ssp.cam.flags", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
+ { &hf_camssp_cenDsrcTollingZone, { "cenDsrcTollingZone", "its.ssp.cam.cenDsrcTollingZone", FT_UINT16, BASE_DEC, NULL, 0x8000, NULL, HFILL }},
+ { &hf_camssp_publicTransport, { "publicTransport", "its.ssp.cam.publicTransport", FT_UINT16, BASE_DEC, NULL, 0x4000, NULL, HFILL }},
+ { &hf_camssp_specialTransport, { "specialTransport", "its.ssp.cam.specialTransport", FT_UINT16, BASE_DEC, NULL, 0x2000, NULL, HFILL }},
+ { &hf_camssp_dangerousGoods, { "dangerousGoods", "its.ssp.cam.dangerousGoods", FT_UINT16, BASE_DEC, NULL, 0x1000, NULL, HFILL }},
+ { &hf_camssp_roadwork, { "roadwork", "its.ssp.cam.roadwork", FT_UINT16, BASE_DEC, NULL, 0x0800, NULL, HFILL }},
+ { &hf_camssp_rescue, { "rescue", "its.ssp.cam.rescue", FT_UINT16, BASE_DEC, NULL, 0x0400, NULL, HFILL }},
+ { &hf_camssp_emergency, { "emergency", "its.ssp.cam.emergency", FT_UINT16, BASE_DEC, NULL, 0x0200, NULL, HFILL }},
+ { &hf_camssp_safetyCar, { "safetyCar", "its.ssp.cam.safetyCar", FT_UINT16, BASE_DEC, NULL, 0x0100, NULL, HFILL }},
+ { &hf_camssp_closedLanes, { "closedLanes", "its.ssp.cam.closedLanes", FT_UINT16, BASE_DEC, NULL, 0x0080, NULL, HFILL }},
+ { &hf_camssp_requestForRightOfWay, { "requestForRightOfWay", "its.ssp.cam.requestForRightOfWay", FT_UINT16, BASE_DEC, NULL, 0x0040, NULL, HFILL }},
+ { &hf_camssp_requestForFreeCrossingAtATrafficLight, { "reqFreeCrossTrafLight", "its.ssp.cam.requestForFreeCrossingAtATrafficLight", FT_UINT16, BASE_DEC, NULL, 0x0020, NULL, HFILL }},
+ { &hf_camssp_noPassing, { "noPassing", "its.ssp.cam.noPassing", FT_UINT16, BASE_DEC, NULL, 0x0010, NULL, HFILL }},
+ { &hf_camssp_noPassingForTrucks, { "noPassingForTrucks", "its.ssp.cam.noPassingForTrucks", FT_UINT16, BASE_DEC, NULL, 0x0008, NULL, HFILL }},
+ { &hf_camssp_speedLimit, { "speedLimit", "its.ssp.cam.speedLimit", FT_UINT16, BASE_DEC, NULL, 0x0004, NULL, HFILL }},
+ { &hf_camssp_reserved, { "reserved", "its.ssp.cam.reserved", FT_UINT16, BASE_DEC, NULL, 0x0003, NULL, HFILL }},
};
static gint *ett[] = {
&ett_its,
+ &ett_denmssp_flags,
+ &ett_camssp_flags,
#include "packet-its-ettarr.c"
};
@@ -430,6 +655,11 @@ void proto_reg_handoff_its(void)
dissector_add_uint("dsrc.regionid", (addGrpC<<16)+Reg_RestrictionUserType, create_dissector_handle(dissect_AddGrpC_RestrictionUserType_addGrpC_PDU, proto_addgrpc ));
dissector_add_uint("dsrc.regionid", (addGrpC<<16)+Reg_SignalStatusPackage, create_dissector_handle(dissect_AddGrpC_SignalStatusPackage_addGrpC_PDU, proto_addgrpc ));
+ dissector_add_uint("ieee1609dot2.ssp", psid_den_basic_services, create_dissector_handle(dissect_denmssp_pdu, proto_its_denm));
+ dissector_add_uint("ieee1609dot2.ssp", psid_ca_basic_services, create_dissector_handle(dissect_camssp_pdu, proto_its_cam));
+ dissector_add_uint("geonw.ssp", psid_den_basic_services, create_dissector_handle(dissect_denmssp_pdu, proto_its_denm));
+ dissector_add_uint("geonw.ssp", psid_ca_basic_services, create_dissector_handle(dissect_camssp_pdu, proto_its_cam));
+
its_tap = register_tap("its");
}
diff --git a/epan/dissectors/packet-geonw.c b/epan/dissectors/packet-geonw.c
index f1b1500e28..baca366197 100644
--- a/epan/dissectors/packet-geonw.c
+++ b/epan/dissectors/packet-geonw.c
@@ -285,6 +285,7 @@ static expert_field ei_geonw_payload_len = EI_INIT;
static dissector_table_t geonw_subdissector_table;
static dissector_table_t sgeonw_v1_subdissector_table;
static dissector_table_t sgeonw_v2_subdissector_table;
+static dissector_table_t ssp_subdissector_table;
static dissector_table_t btpa_subdissector_table;
static dissector_table_t btpb_subdissector_table;
@@ -906,6 +907,7 @@ static int ett_sgeonw_encryption_parameter = -1;
static int ett_sgeonw_signature = -1;
static int ett_sgeonw_subject_info = -1;
static int ett_sgeonw_subject_attribute = -1;
+static int ett_sgeonw_ssp = -1;
static expert_field ei_sgeonw_len_unsupported = EI_INIT;
static expert_field ei_sgeonw_len_too_long = EI_INIT;
@@ -1454,15 +1456,23 @@ dissect_sec_itsaidssp(tvbuff_t *tvb, gint *offset, packet_info *pinfo, proto_tre
{
gint start = *offset;
guint32 param_len;
+ guint32 appid;
proto_item *ti;
+ proto_tree *subtree;
// XXX provide its-aid named values.
- dissect_sec_intx(tvb, offset, pinfo, tree, hf_sgeonw_app_id, NULL);
+ dissect_sec_intx(tvb, offset, pinfo, tree, hf_sgeonw_app_id, &appid);
param_len = dissect_sec_var_len(tvb, offset, pinfo, tree);
ti = proto_tree_add_item(tree, hf_sgeonw_opaque, tvb, *offset, param_len, ENC_NA);
// Expert info: shall be at most 31 bytes long
- if (param_len > 31)
+ if (param_len > 31) {
expert_add_info(pinfo, ti, &ei_sgeonw_ssp_too_long);
+ }
+ else {
+ subtree = proto_item_add_subtree(ti, ett_sgeonw_ssp);
+ tvbuff_t *next_tvb = tvb_new_subset_length(tvb, *offset, param_len);
+ dissector_try_uint(ssp_subdissector_table, appid, next_tvb, pinfo, subtree);
+ }
*offset += param_len;
return (*offset) - start;
@@ -3592,6 +3602,7 @@ proto_register_geonw(void)
&ett_sgeonw_signature,
&ett_sgeonw_subject_info,
&ett_sgeonw_subject_attribute,
+ &ett_sgeonw_ssp,
};
expert_module_t* expert_geonw;
@@ -3617,6 +3628,9 @@ proto_register_geonw(void)
sgeonw_v2_subdissector_table = register_dissector_table("geonw.sec.v2.app_id",
"Secured GeoNetworking version 2 payload application identifier", proto_geonw, FT_UINT16, BASE_HEX);
+ ssp_subdissector_table = register_dissector_table("geonw.ssp",
+ "ATS-AID/PSID based dissector for Service Specific Permissions (SSP)", proto_geonw, FT_UINT32, BASE_HEX);
+
geonw_address_type = address_type_dissector_register("AT_GEONW", "GeoNetworking address", geonw_to_str, geonw_str_len, NULL, geonw_col_filter_str, geonw_len, geonw_name_resolution_str, geonw_name_resolution_len);
/* Register configuration preferences */
diff --git a/epan/dissectors/packet-ieee1609dot2.c b/epan/dissectors/packet-ieee1609dot2.c
index c86bad5a09..7e41c5ee46 100644
--- a/epan/dissectors/packet-ieee1609dot2.c
+++ b/epan/dissectors/packet-ieee1609dot2.c
@@ -102,10 +102,11 @@ static int hf_ieee1609dot2_eciesBrainpoolP256r1 = -1; /* EccP256CurvePoint */
static int hf_ieee1609dot2_ecdsaNistP256 = -1; /* EccP256CurvePoint */
static int hf_ieee1609dot2_ecdsaBrainpoolP256r1 = -1; /* EccP256CurvePoint */
static int hf_ieee1609dot2_aes128Ccm = -1; /* OCTET_STRING_SIZE_16 */
-static int hf_ieee1609dot2_psid = -1; /* Psid */
+static int hf_ieee1609dot2_psid = -1; /* T_psid */
static int hf_ieee1609dot2_ssp = -1; /* ServiceSpecificPermissions */
static int hf_ieee1609dot2_SequenceOfPsidSsp_item = -1; /* PsidSsp */
-static int hf_ieee1609dot2_opaque = -1; /* OCTET_STRING_SIZE_0_MAX */
+static int hf_ieee1609dot2_opaque = -1; /* T_opaque */
+static int hf_ieee1609dot2_psid_01 = -1; /* Psid */
static int hf_ieee1609dot2_sspRange = -1; /* SspRange */
static int hf_ieee1609dot2_SequenceOfPsidSspRange_item = -1; /* PsidSspRange */
static int hf_ieee1609dot2_opaque_01 = -1; /* SequenceOfOctetString */
@@ -131,7 +132,7 @@ static int hf_ieee1609dot2_self = -1; /* NULL */
static int hf_ieee1609dot2_payload = -1; /* SignedDataPayload */
static int hf_ieee1609dot2_headerInfo = -1; /* HeaderInfo */
static int hf_ieee1609dot2_sha256HashedData = -1; /* OCTET_STRING_SIZE_32 */
-static int hf_ieee1609dot2_psid_01 = -1; /* T_psid */
+static int hf_ieee1609dot2_psid_02 = -1; /* T_psid_01 */
static int hf_ieee1609dot2_generationTime = -1; /* Time64 */
static int hf_ieee1609dot2_expiryTime = -1; /* Time64 */
static int hf_ieee1609dot2_generationLocation = -1; /* ThreeDLocation */
@@ -196,6 +197,7 @@ static int hf_ieee1609dot2_EndEntityType_enrol = -1;
#line 37 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
/* Initialize the subtree pointers */
+static int ett_ieee1609dot2_ssp = -1;
/*--- Included file: packet-ieee1609dot2-ett.c ---*/
#line 1 "./asn1/ieee1609dot2/packet-ieee1609dot2-ett.c"
@@ -264,9 +266,15 @@ static gint ett_ieee1609dot2_SubjectPermissions = -1;
static gint ett_ieee1609dot2_VerificationKeyIndicator = -1;
/*--- End of included file: packet-ieee1609dot2-ett.c ---*/
-#line 40 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
+#line 41 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
static dissector_table_t unsecured_data_subdissector_table;
+static dissector_table_t ssp_subdissector_table;
+
+typedef struct ieee1609_private_data {
+ tvbuff_t *unsecured_data;
+ guint64 psidssp; // psid for Service Specific Permissions
+} ieee1609_private_data_t;
void
ieee1609dot2_set_next_default_psid(packet_info *pinfo, guint32 psid)
@@ -1073,9 +1081,33 @@ dissect_ieee1609dot2_Psid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
static int
-dissect_ieee1609dot2_OCTET_STRING_SIZE_0_MAX(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+dissect_ieee1609dot2_T_psid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+#line 84 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
+ 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);
+
+
+
+ return offset;
+}
+
+
+
+static int
+dissect_ieee1609dot2_T_opaque(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+#line 88 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
+ 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, NULL);
+ 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);
+ }
+
return offset;
}
@@ -1087,7 +1119,7 @@ static const value_string ieee1609dot2_ServiceSpecificPermissions_vals[] = {
};
static const oer_choice_t ServiceSpecificPermissions_choice[] = {
- { 0, &hf_ieee1609dot2_opaque , ASN1_EXTENSION_ROOT , dissect_ieee1609dot2_OCTET_STRING_SIZE_0_MAX },
+ { 0, &hf_ieee1609dot2_opaque , ASN1_EXTENSION_ROOT , dissect_ieee1609dot2_T_opaque },
{ 0, NULL, 0, NULL }
};
@@ -1102,7 +1134,7 @@ dissect_ieee1609dot2_ServiceSpecificPermissions(tvbuff_t *tvb _U_, int offset _U
static const oer_sequence_t PsidSsp_sequence[] = {
- { &hf_ieee1609dot2_psid , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ieee1609dot2_Psid },
+ { &hf_ieee1609dot2_psid , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ieee1609dot2_T_psid },
{ &hf_ieee1609dot2_ssp , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ieee1609dot2_ServiceSpecificPermissions },
{ NULL, 0, 0, NULL }
};
@@ -1129,6 +1161,16 @@ dissect_ieee1609dot2_SequenceOfPsidSsp(tvbuff_t *tvb _U_, int offset _U_, asn1_c
}
+
+static int
+dissect_ieee1609dot2_OCTET_STRING_SIZE_0_MAX(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+ offset = dissect_oer_octet_string(tvb, offset, actx, tree, hf_index,
+ 0, NO_BOUND, FALSE, NULL);
+
+ return offset;
+}
+
+
static const oer_sequence_t SequenceOfOctetString_sequence_of[1] = {
{ &hf_ieee1609dot2_SequenceOfOctetString_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ieee1609dot2_OCTET_STRING_SIZE_0_MAX },
};
@@ -1166,7 +1208,7 @@ dissect_ieee1609dot2_SspRange(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
static const oer_sequence_t PsidSspRange_sequence[] = {
- { &hf_ieee1609dot2_psid , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ieee1609dot2_Psid },
+ { &hf_ieee1609dot2_psid_01, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ieee1609dot2_Psid },
{ &hf_ieee1609dot2_sspRange, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ieee1609dot2_SspRange },
{ NULL, 0, 0, NULL }
};
@@ -1279,18 +1321,19 @@ 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 47 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
+#line 51 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
+ 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, (tvbuff_t **)&actx->private_data);
+ NO_BOUND, NO_BOUND, FALSE, &my_private_data->unsecured_data);
- if (actx->private_data) {
+ if (my_private_data->unsecured_data) {
// psid may also be provided in HeaderInfo
guint32 *psid = (guint32*)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, (tvbuff_t *)(actx->private_data), actx->pinfo, tree);
- actx->private_data = NULL;
+ dissector_try_uint(unsecured_data_subdissector_table, *psid, my_private_data->unsecured_data, actx->pinfo, tree);
+ my_private_data->unsecured_data = NULL;
}
// else: wait for the HeaderInfo for a second chance to dissect the content
}
@@ -1303,15 +1346,17 @@ dissect_ieee1609dot2_T_unsecuredData(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx
static int
-dissect_ieee1609dot2_T_psid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 65 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
+dissect_ieee1609dot2_T_psid_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+#line 70 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
guint64 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);
- if (actx->private_data) {
+ if (my_private_data->unsecured_data) {
/* Call next dissector here */
- dissector_try_uint(unsecured_data_subdissector_table, (guint32) psid, (tvbuff_t *)(actx->private_data), actx->pinfo, tree);
- actx->private_data = NULL;
+ dissector_try_uint(unsecured_data_subdissector_table, (guint32) psid, my_private_data->unsecured_data, actx->pinfo, tree);
+ my_private_data->unsecured_data = NULL;
}
@@ -1336,7 +1381,7 @@ dissect_ieee1609dot2_MissingCrlIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn
static const oer_sequence_t HeaderInfo_sequence[] = {
- { &hf_ieee1609dot2_psid_01, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ieee1609dot2_T_psid },
+ { &hf_ieee1609dot2_psid_02, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ieee1609dot2_T_psid_01 },
{ &hf_ieee1609dot2_generationTime, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ieee1609dot2_Time64 },
{ &hf_ieee1609dot2_expiryTime, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ieee1609dot2_Time64 },
{ &hf_ieee1609dot2_generationLocation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ieee1609dot2_ThreeDLocation },
@@ -1855,6 +1900,9 @@ static const oer_sequence_t Ieee1609Dot2Data_sequence[] = {
static int
dissect_ieee1609dot2_Ieee1609Dot2Data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+#line 47 "./asn1/ieee1609dot2/ieee1609dot2.cnf"
+ actx->private_data = (void*)wmem_new0(wmem_packet_scope(), ieee1609_private_data_t);
+
offset = dissect_oer_sequence(tvb, offset, actx, tree, hf_index,
ett_ieee1609dot2_Ieee1609Dot2Data, Ieee1609Dot2Data_sequence);
@@ -1908,7 +1956,7 @@ static int dissect_Ieee1609Dot2Data_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U
/*--- End of included file: packet-ieee1609dot2-fn.c ---*/
-#line 52 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
+#line 59 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
/*--- proto_register_ieee1609dot2 ----------------------------------------------*/
@@ -2166,7 +2214,11 @@ void proto_register_ieee1609dot2(void) {
{ &hf_ieee1609dot2_opaque,
{ "opaque", "ieee1609dot2.opaque",
FT_BYTES, BASE_NONE, NULL, 0,
- "OCTET_STRING_SIZE_0_MAX", HFILL }},
+ NULL, HFILL }},
+ { &hf_ieee1609dot2_psid_01,
+ { "psid", "ieee1609dot2.psid",
+ FT_UINT64, BASE_DEC|BASE_VAL64_STRING, VALS64(ieee1609dot2_Psid_vals), 0,
+ NULL, HFILL }},
{ &hf_ieee1609dot2_sspRange,
{ "sspRange", "ieee1609dot2.sspRange",
FT_UINT32, BASE_DEC, VALS(ieee1609dot2_SspRange_vals), 0,
@@ -2267,10 +2319,10 @@ void proto_register_ieee1609dot2(void) {
{ "sha256HashedData", "ieee1609dot2.sha256HashedData",
FT_BYTES, BASE_NONE, NULL, 0,
"OCTET_STRING_SIZE_32", HFILL }},
- { &hf_ieee1609dot2_psid_01,
+ { &hf_ieee1609dot2_psid_02,
{ "psid", "ieee1609dot2.psid",
FT_UINT64, BASE_DEC|BASE_VAL64_STRING, VALS64(ieee1609dot2_Psid_vals), 0,
- NULL, HFILL }},
+ "T_psid_01", HFILL }},
{ &hf_ieee1609dot2_generationTime,
{ "generationTime", "ieee1609dot2.generationTime",
FT_UINT64, BASE_DEC, NULL, 0,
@@ -2505,7 +2557,7 @@ void proto_register_ieee1609dot2(void) {
NULL, HFILL }},
/*--- End of included file: packet-ieee1609dot2-hfarr.c ---*/
-#line 60 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
+#line 67 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
};
/* List of subtrees */
@@ -2578,7 +2630,8 @@ void proto_register_ieee1609dot2(void) {
&ett_ieee1609dot2_VerificationKeyIndicator,
/*--- End of included file: packet-ieee1609dot2-ettarr.c ---*/
-#line 65 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
+#line 72 "./asn1/ieee1609dot2/packet-ieee1609dot2-template.c"
+ &ett_ieee1609dot2_ssp,
};
/* Register protocol */
@@ -2593,6 +2646,8 @@ void proto_register_ieee1609dot2(void) {
// See TS17419_ITS-AID_AssignedNumbers
unsecured_data_subdissector_table = register_dissector_table("ieee1609dot2.psid",
"ATS-AID/PSID based dissector for unsecured/signed data", proto_ieee1609dot2, FT_UINT32, BASE_HEX);
+ ssp_subdissector_table = register_dissector_table("ieee1609dot2.ssp",
+ "ATS-AID/PSID based dissector for Service Specific Permissions (SSP)", proto_ieee1609dot2, FT_UINT32, BASE_HEX);
}
void
diff --git a/epan/dissectors/packet-its.c b/epan/dissectors/packet-its.c
index 71cb5c3a1f..f5b5f83b03 100644
--- a/epan/dissectors/packet-its.c
+++ b/epan/dissectors/packet-its.c
@@ -52,6 +52,7 @@
#include "packet-per.h"
#include "packet-its.h"
+#include "packet-ieee1609dot2.h"
/*
* Well Known Ports definitions as per:
@@ -129,6 +130,60 @@ static int proto_its_mapem = -1;
static int proto_its_spatem = -1;
static int proto_addgrpc = -1;
+/*
+ * DENM SSP
+ */
+static int hf_denmssp_version = -1;
+static int hf_denmssp_flags = -1;
+static int hf_denmssp_trafficCondition = -1;
+static int hf_denmssp_accident = -1;
+static int hf_denmssp_roadworks = -1;
+static int hf_denmssp_adverseWeatherConditionAdhesion = -1;
+static int hf_denmssp_hazardousLocationSurfaceCondition = -1;
+static int hf_denmssp_hazardousLocationObstacleOnTheRoad = -1;
+static int hf_denmssp_hazardousLocationAnimalOnTheRoad = -1;
+static int hf_denmssp_humanPresenceOnTheRoad = -1;
+static int hf_denmssp_wrongWayDriving = -1;
+static int hf_denmssp_rescueAndRecoveryWorkInProgress = -1;
+static int hf_denmssp_ExtremeWeatherCondition = -1;
+static int hf_denmssp_adverseWeatherConditionVisibility = -1;
+static int hf_denmssp_adverseWeatherConditionPrecipitation = -1;
+static int hf_denmssp_slowVehicle = -1;
+static int hf_denmssp_dangerousEndOfQueue = -1;
+static int hf_denmssp_vehicleBreakdown = -1;
+static int hf_denmssp_postCrash = -1;
+static int hf_denmssp_humanProblem = -1;
+static int hf_denmssp_stationaryVehicle = -1;
+static int hf_denmssp_emergencyVehicleApproaching = -1;
+static int hf_denmssp_hazardousLocationDangerousCurve = -1;
+static int hf_denmssp_collisionRisk = -1;
+static int hf_denmssp_signalViolation = -1;
+static int hf_denmssp_dangerousSituation = -1;
+
+/*
+ * CAM SSP
+ */
+static int hf_camssp_version = -1;
+static int hf_camssp_flags = -1;
+static int hf_camssp_cenDsrcTollingZone = -1;
+static int hf_camssp_publicTransport = -1;
+static int hf_camssp_specialTransport = -1;
+static int hf_camssp_dangerousGoods = -1;
+static int hf_camssp_roadwork = -1;
+static int hf_camssp_rescue = -1;
+static int hf_camssp_emergency = -1;
+static int hf_camssp_safetyCar = -1;
+static int hf_camssp_closedLanes = -1;
+static int hf_camssp_requestForRightOfWay = -1;
+static int hf_camssp_requestForFreeCrossingAtATrafficLight = -1;
+static int hf_camssp_noPassing = -1;
+static int hf_camssp_noPassingForTrucks = -1;
+static int hf_camssp_speedLimit = -1;
+static int hf_camssp_reserved = -1;
+
+static gint ett_denmssp_flags = -1;
+static gint ett_camssp_flags = -1;
+
// Subdissectors
static dissector_table_t its_version_subdissector_table;
static dissector_table_t its_msgid_subdissector_table;
@@ -150,6 +205,75 @@ static int dissect_regextval_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
return tvb_captured_length(tvb);
}
+static int dissect_denmssp_pdu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+{
+ static const int *denmssp_flags[] = {
+ &hf_denmssp_trafficCondition,
+ &hf_denmssp_accident,
+ &hf_denmssp_roadworks,
+ &hf_denmssp_adverseWeatherConditionAdhesion,
+ &hf_denmssp_hazardousLocationSurfaceCondition,
+ &hf_denmssp_hazardousLocationObstacleOnTheRoad,
+ &hf_denmssp_hazardousLocationAnimalOnTheRoad,
+ &hf_denmssp_humanPresenceOnTheRoad,
+ &hf_denmssp_wrongWayDriving,
+ &hf_denmssp_rescueAndRecoveryWorkInProgress,
+ &hf_denmssp_ExtremeWeatherCondition,
+ &hf_denmssp_adverseWeatherConditionVisibility,
+ &hf_denmssp_adverseWeatherConditionPrecipitation,
+ &hf_denmssp_slowVehicle,
+ &hf_denmssp_dangerousEndOfQueue,
+ &hf_denmssp_vehicleBreakdown,
+ &hf_denmssp_postCrash,
+ &hf_denmssp_humanProblem,
+ &hf_denmssp_stationaryVehicle,
+ &hf_denmssp_emergencyVehicleApproaching,
+ &hf_denmssp_hazardousLocationDangerousCurve,
+ &hf_denmssp_collisionRisk,
+ &hf_denmssp_signalViolation,
+ &hf_denmssp_dangerousSituation,
+ NULL
+ };
+
+ guint32 version;
+
+ proto_tree_add_item_ret_uint(tree, hf_denmssp_version, tvb, 0, 1, ENC_BIG_ENDIAN, &version);
+ if (version == 1) {
+ proto_tree_add_bitmask(tree, tvb, 1, hf_denmssp_flags, ett_denmssp_flags, denmssp_flags, ENC_BIG_ENDIAN);
+ }
+ return tvb_reported_length(tvb);
+}
+
+static int dissect_camssp_pdu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
+{
+ static const int *camssp_flags[] = {
+ &hf_camssp_cenDsrcTollingZone,
+ &hf_camssp_publicTransport,
+ &hf_camssp_specialTransport,
+ &hf_camssp_dangerousGoods,
+ &hf_camssp_roadwork,
+ &hf_camssp_rescue,
+ &hf_camssp_emergency,
+ &hf_camssp_safetyCar,
+ &hf_camssp_closedLanes,
+ &hf_camssp_requestForRightOfWay,
+ &hf_camssp_requestForFreeCrossingAtATrafficLight,
+ &hf_camssp_noPassing,
+ &hf_camssp_noPassingForTrucks,
+ &hf_camssp_speedLimit,
+ &hf_camssp_reserved,
+ NULL
+ };
+
+ guint32 version;
+
+ proto_tree_add_item_ret_uint(tree, hf_camssp_version, tvb, 0, 1, ENC_BIG_ENDIAN, &version);
+ if (version == 1) {
+ proto_tree_add_bitmask(tree, tvb, 1, hf_camssp_flags, ett_camssp_flags, camssp_flags, ENC_BIG_ENDIAN);
+ }
+ return tvb_reported_length(tvb);
+}
+
// Generated by asn2wrs
/*--- Included file: packet-its-hf.c ---*/
@@ -1261,7 +1385,7 @@ static int hf_evrsr_SupportedPaymentTypes_contract = -1;
static int hf_evrsr_SupportedPaymentTypes_externalIdentification = -1;
/*--- End of included file: packet-its-hf.c ---*/
-#line 147 "./asn1/its/packet-its-template.c"
+#line 271 "./asn1/its/packet-its-template.c"
// CauseCode/SubCauseCode management
static int hf_its_trafficConditionSubCauseCode = -1;
@@ -1703,7 +1827,7 @@ static gint ett_evrsr_RechargingType = -1;
static gint ett_evrsr_SupportedPaymentTypes = -1;
/*--- End of included file: packet-its-ett.c ---*/
-#line 177 "./asn1/its/packet-its-template.c"
+#line 301 "./asn1/its/packet-its-template.c"
// Deal with cause/subcause code management
struct { CauseCodeType_enum cause; int* hf; } cause_to_subcause[] = {
@@ -12806,7 +12930,7 @@ static int dissect_evrsr_EV_RSR_MessageBody_PDU(tvbuff_t *tvb _U_, packet_info *
/*--- End of included file: packet-its-fn.c ---*/
-#line 219 "./asn1/its/packet-its-template.c"
+#line 343 "./asn1/its/packet-its-template.c"
static int
dissect_its_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
@@ -17135,7 +17259,7 @@ void proto_register_its(void)
NULL, HFILL }},
/*--- End of included file: packet-its-hfarr.c ---*/
-#line 255 "./asn1/its/packet-its-template.c"
+#line 379 "./asn1/its/packet-its-template.c"
{ &hf_its_roadworksSubCauseCode,
{ "roadworksSubCauseCode", "its.subCauseCode",
@@ -17233,10 +17357,111 @@ void proto_register_its(void)
{ "trafficConditionSubCauseCode", "its.subCauseCode",
FT_UINT32, BASE_DEC, VALS(its_TrafficConditionSubCauseCode_vals), 0,
"SubCauseCodeType", HFILL }},
+
+ /*
+ * DENM SSP
+ */
+ { &hf_denmssp_version, { "Version", "its.ssp.denm.version", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_denmssp_flags, { "Allowed to sign", "its.ssp.denm.flags", FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL }},
+ { &hf_denmssp_trafficCondition,
+ { "trafficCondition", "its.denm.ssp.trafficCondition",
+ FT_UINT24, BASE_DEC, NULL, 0x800000, NULL, HFILL }},
+ { &hf_denmssp_accident,
+ { "accident", "its.denm.ssp.accident",
+ FT_UINT24, BASE_DEC, NULL, 0x400000, NULL, HFILL }},
+ { &hf_denmssp_roadworks,
+ { "roadworks", "its.denm.ssp.roadworks",
+ FT_UINT24, BASE_DEC, NULL, 0x200000, NULL, HFILL }},
+ { &hf_denmssp_adverseWeatherConditionAdhesion,
+ { "adverseWeatherConditionAdhesion", "its.denm.ssp.advWxConditionAdhesion",
+ FT_UINT24, BASE_DEC, NULL, 0x100000, NULL, HFILL }},
+ { &hf_denmssp_hazardousLocationSurfaceCondition,
+ { "hazardousLocationSurfaceCondition", "its.denm.ssp.hazLocationSurfaceCondition",
+ FT_UINT24, BASE_DEC, NULL, 0x080000, NULL, HFILL }},
+ { &hf_denmssp_hazardousLocationObstacleOnTheRoad,
+ { "hazardousLocationObstacleOnTheRoad", "its.denm.ssp.hazLocationObstacleOnTheRoad",
+ FT_UINT24, BASE_DEC, NULL, 0x040000, NULL, HFILL }},
+ { &hf_denmssp_hazardousLocationAnimalOnTheRoad,
+ { "hazardousLocationAnimalOnTheRoad", "its.denm.ssp.hazLocationAnimalOnTheRoad",
+ FT_UINT24, BASE_DEC, NULL, 0x020000, NULL, HFILL }},
+ { &hf_denmssp_humanPresenceOnTheRoad,
+ { "humanPresenceOnTheRoad", "its.denm.ssp.humanPresenceOnTheRoad",
+ FT_UINT24, BASE_DEC, NULL, 0x010000, NULL, HFILL }},
+ { &hf_denmssp_wrongWayDriving,
+ { "wrongWayDriving", "its.denm.ssp.wrongWayDriving",
+ FT_UINT24, BASE_DEC, NULL, 0x008000, NULL, HFILL }},
+ { &hf_denmssp_rescueAndRecoveryWorkInProgress,
+ { "rescueAndRecoveryWorkInProgress", "its.denm.ssp.rescueAndRecoveryWorkInProgress",
+ FT_UINT24, BASE_DEC, NULL, 0x004000, NULL, HFILL }},
+ { &hf_denmssp_ExtremeWeatherCondition,
+ { "ExtremeWeatherCondition", "its.denm.ssp.ExtremeWxCondition",
+ FT_UINT24, BASE_DEC, NULL, 0x002000, NULL, HFILL }},
+ { &hf_denmssp_adverseWeatherConditionVisibility,
+ { "adverseWeatherConditionVisibility", "its.denm.ssp.advWxConditionVisibility",
+ FT_UINT24, BASE_DEC, NULL, 0x001000, NULL, HFILL }},
+ { &hf_denmssp_adverseWeatherConditionPrecipitation,
+ { "adverseWeatherConditionPrecipitation", "its.denm.ssp.advWxConditionPrecipitation",
+ FT_UINT24, BASE_DEC, NULL, 0x000800, NULL, HFILL }},
+ { &hf_denmssp_slowVehicle,
+ { "slowVehicle", "its.denm.ssp.slowVehicle",
+ FT_UINT24, BASE_DEC, NULL, 0x000400, NULL, HFILL }},
+ { &hf_denmssp_dangerousEndOfQueue,
+ { "dangerousEndOfQueue", "its.denm.ssp.dangerousEndOfQueue",
+ FT_UINT24, BASE_DEC, NULL, 0x000200, NULL, HFILL }},
+ { &hf_denmssp_vehicleBreakdown,
+ { "vehicleBreakdown", "its.denm.ssp.vehicleBreakdown",
+ FT_UINT24, BASE_DEC, NULL, 0x000100, NULL, HFILL }},
+ { &hf_denmssp_postCrash,
+ { "postCrash", "its.denm.ssp.postCrash",
+ FT_UINT24, BASE_DEC, NULL, 0x000080, NULL, HFILL }},
+ { &hf_denmssp_humanProblem,
+ { "humanProblem", "its.denm.ssp.humanProblem",
+ FT_UINT24, BASE_DEC, NULL, 0x000040, NULL, HFILL }},
+ { &hf_denmssp_stationaryVehicle,
+ { "stationaryVehicle", "its.denm.ssp.stationaryVehicle",
+ FT_UINT24, BASE_DEC, NULL, 0x000020, NULL, HFILL }},
+ { &hf_denmssp_emergencyVehicleApproaching,
+ { "emergencyVehicleApproaching", "its.denm.ssp.emergencyVehicleApproaching",
+ FT_UINT24, BASE_DEC, NULL, 0x000010, NULL, HFILL }},
+ { &hf_denmssp_hazardousLocationDangerousCurve,
+ { "hazardousLocationDangerousCurve", "its.denm.ssp.hazLocationDangerousCurve",
+ FT_UINT24, BASE_DEC, NULL, 0x000008, NULL, HFILL }},
+ { &hf_denmssp_collisionRisk,
+ { "collisionRisk", "its.denm.ssp.collisionRisk",
+ FT_UINT24, BASE_DEC, NULL, 0x000004, NULL, HFILL }},
+ { &hf_denmssp_signalViolation,
+ { "signalViolation", "its.denm.ssp.signalViolation",
+ FT_UINT24, BASE_DEC, NULL, 0x000002, NULL, HFILL }},
+ { &hf_denmssp_dangerousSituation,
+ { "dangerousSituation", "its.denm.ssp.dangerousSituation",
+ FT_UINT24, BASE_DEC, NULL, 0x000001, NULL, HFILL }},
+
+ /*
+ * CAM SSP
+ */
+ { &hf_camssp_version, { "Version", "its.ssp.cam.version", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_camssp_flags, { "Allowed to sign", "its.ssp.cam.flags", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
+ { &hf_camssp_cenDsrcTollingZone, { "cenDsrcTollingZone", "its.ssp.cam.cenDsrcTollingZone", FT_UINT16, BASE_DEC, NULL, 0x8000, NULL, HFILL }},
+ { &hf_camssp_publicTransport, { "publicTransport", "its.ssp.cam.publicTransport", FT_UINT16, BASE_DEC, NULL, 0x4000, NULL, HFILL }},
+ { &hf_camssp_specialTransport, { "specialTransport", "its.ssp.cam.specialTransport", FT_UINT16, BASE_DEC, NULL, 0x2000, NULL, HFILL }},
+ { &hf_camssp_dangerousGoods, { "dangerousGoods", "its.ssp.cam.dangerousGoods", FT_UINT16, BASE_DEC, NULL, 0x1000, NULL, HFILL }},
+ { &hf_camssp_roadwork, { "roadwork", "its.ssp.cam.roadwork", FT_UINT16, BASE_DEC, NULL, 0x0800, NULL, HFILL }},
+ { &hf_camssp_rescue, { "rescue", "its.ssp.cam.rescue", FT_UINT16, BASE_DEC, NULL, 0x0400, NULL, HFILL }},
+ { &hf_camssp_emergency, { "emergency", "its.ssp.cam.emergency", FT_UINT16, BASE_DEC, NULL, 0x0200, NULL, HFILL }},
+ { &hf_camssp_safetyCar, { "safetyCar", "its.ssp.cam.safetyCar", FT_UINT16, BASE_DEC, NULL, 0x0100, NULL, HFILL }},
+ { &hf_camssp_closedLanes, { "closedLanes", "its.ssp.cam.closedLanes", FT_UINT16, BASE_DEC, NULL, 0x0080, NULL, HFILL }},
+ { &hf_camssp_requestForRightOfWay, { "requestForRightOfWay", "its.ssp.cam.requestForRightOfWay", FT_UINT16, BASE_DEC, NULL, 0x0040, NULL, HFILL }},
+ { &hf_camssp_requestForFreeCrossingAtATrafficLight, { "reqFreeCrossTrafLight", "its.ssp.cam.requestForFreeCrossingAtATrafficLight", FT_UINT16, BASE_DEC, NULL, 0x0020, NULL, HFILL }},
+ { &hf_camssp_noPassing, { "noPassing", "its.ssp.cam.noPassing", FT_UINT16, BASE_DEC, NULL, 0x0010, NULL, HFILL }},
+ { &hf_camssp_noPassingForTrucks, { "noPassingForTrucks", "its.ssp.cam.noPassingForTrucks", FT_UINT16, BASE_DEC, NULL, 0x0008, NULL, HFILL }},
+ { &hf_camssp_speedLimit, { "speedLimit", "its.ssp.cam.speedLimit", FT_UINT16, BASE_DEC, NULL, 0x0004, NULL, HFILL }},
+ { &hf_camssp_reserved, { "reserved", "its.ssp.cam.reserved", FT_UINT16, BASE_DEC, NULL, 0x0003, NULL, HFILL }},
};
static gint *ett[] = {
&ett_its,
+ &ett_denmssp_flags,
+ &ett_camssp_flags,
/*--- Included file: packet-its-ettarr.c ---*/
#line 1 "./asn1/its/packet-its-ettarr.c"
@@ -17649,7 +17874,7 @@ void proto_register_its(void)
&ett_evrsr_SupportedPaymentTypes,
/*--- End of included file: packet-its-ettarr.c ---*/
-#line 357 "./asn1/its/packet-its-template.c"
+#line 582 "./asn1/its/packet-its-template.c"
};
proto_its = proto_register_protocol("Intelligent Transport Systems", "ITS", "its");
@@ -17726,6 +17951,11 @@ void proto_reg_handoff_its(void)
dissector_add_uint("dsrc.regionid", (addGrpC<<16)+Reg_RestrictionUserType, create_dissector_handle(dissect_AddGrpC_RestrictionUserType_addGrpC_PDU, proto_addgrpc ));
dissector_add_uint("dsrc.regionid", (addGrpC<<16)+Reg_SignalStatusPackage, create_dissector_handle(dissect_AddGrpC_SignalStatusPackage_addGrpC_PDU, proto_addgrpc ));
+ dissector_add_uint("ieee1609dot2.ssp", psid_den_basic_services, create_dissector_handle(dissect_denmssp_pdu, proto_its_denm));
+ dissector_add_uint("ieee1609dot2.ssp", psid_ca_basic_services, create_dissector_handle(dissect_camssp_pdu, proto_its_cam));
+ dissector_add_uint("geonw.ssp", psid_den_basic_services, create_dissector_handle(dissect_denmssp_pdu, proto_its_denm));
+ dissector_add_uint("geonw.ssp", psid_ca_basic_services, create_dissector_handle(dissect_camssp_pdu, proto_its_cam));
+
its_tap = register_tap("its");
}