aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbat <stefan.battmer@matrix-vision.de>2017-11-08 12:05:06 +0100
committerMichael Mann <mmann78@netscape.net>2017-11-09 13:57:06 +0000
commite7e4dc5d98869f91af3e649324d726217b2a8861 (patch)
tree63dae587d800f5f487821f465ce49099ce8699af
parent74936320a43c18a2ad538c8235e410f4912f6e4c (diff)
gvcp:
- Added support for new registers: - GVCP_IEEE_1588_EXTENDED_CAPABILITY (0x00000974) - GVCP_IEEE_1588_SUPPORTED_PROFILES (0x00000978) - GVCP_IEEE_1588_SELECTED_PROFILE (0x0000097C) - Added support for missing/new error codes (0x8013 - 0x8017) - Added dissector code for 'current link configuration' part of device mode register - Added support for proper event dissection with the length field in event commands is used as recommended by the GEV 2.1 specification - Added dissector code for new capability/configuration bits (iee1588 profile, multi-part, large leader/trailer, ieee extended capabilities) - BUGFIX: In multi-zone mode, zone directions where decoded as 'Receiver' and 'Transmitter' instead of 'Bottom Up' and 'Top-Down' - BUGFIX: Commands that received at least one 'PENDING_ACK' before the final acknowledge where always reported with '(Failed)' in the Wireshark main window - Fixed some typos gvsp: - Added full multi-part dissection support - Replaced some hard-coded numbers by numerical constants - Added support for missing/new error codes (0x8013 - 0x8017) - BUGFIX: In multi-zone mode, zone directions where decoded as 'Receiver' and 'Transmitter' instead of 'Bottom Up' and 'Top-Down' - Combined 'AddressOffsetHigh/Low' for multi-zone/part into a single more readable 64-bit value Change-Id: I55862204ef71f69bc88c79fe2259f7cb8365699a Reviewed-on: https://code.wireshark.org/review/24299 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/packet-gvcp.c305
-rw-r--r--epan/dissectors/packet-gvsp.c662
2 files changed, 731 insertions, 236 deletions
diff --git a/epan/dissectors/packet-gvcp.c b/epan/dissectors/packet-gvcp.c
index f969bf8..8c8c77f 100644
--- a/epan/dissectors/packet-gvcp.c
+++ b/epan/dissectors/packet-gvcp.c
@@ -65,7 +65,7 @@ Bootstrap registers addresses
#define GVCP_VERSION (0x00000000)
#define GVCP_DEVICE_MODE (0x00000004)
#define GVCP_DEVICE_MAC_HIGH_0 (0x00000008)
-#define GVCP_DEVICE_MAC_LOW_0 (0x0000000c)
+#define GVCP_DEVICE_MAC_LOW_0 (0x0000000C)
#define GVCP_SUPPORTED_IP_CONFIGURATION_0 (0x00000010)
#define GVCP_CURIPCFG_0 (0x00000014)
#define GVCP_CURRENT_IP_ADDRESS_0 (0x00000024)
@@ -74,9 +74,9 @@ Bootstrap registers addresses
#define GVCP_MANUFACTURER_NAME (0x00000048)
#define GVCP_MODEL_NAME (0x00000068)
#define GVCP_DEVICE_VERSION (0x00000088)
-#define GVCP_MANUFACTURER_INFO (0x000000a8)
+#define GVCP_MANUFACTURER_INFO (0x000000A8)
#define GVCP_SERIAL_NUMBER (0x000000d8)
-#define GVCP_USER_DEFINED_NAME (0x000000e8)
+#define GVCP_USER_DEFINED_NAME (0x000000E8)
#define GVCP_FIRST_URL (0x00000200)
#define GVCP_SECOND_URL (0x00000400)
#define GVCP_NUMBER_OF_NETWORK_INTERFACES (0x00000600)
@@ -126,28 +126,31 @@ Bootstrap registers addresses
#define GVCP_MESSAGE_CHANNEL_CAPS (0x00000930)
#define GVCP_CAPABILITY (0x00000934)
#define GVCP_HEARTBEAT_TIMEOUT (0x00000938)
-#define GVCP_TIMESTAMP_TICK_FREQUENCY_HIGH (0x0000093c)
+#define GVCP_TIMESTAMP_TICK_FREQUENCY_HIGH (0x0000093C)
#define GVCP_TIMESTAMP_TICK_FREQUENCY_LOW (0x00000940)
#define GVCP_TIMESTAMP_CONTROL (0x00000944)
#define GVCP_TIMESTAMP_VALUE_HIGH (0x00000948)
-#define GVCP_TIMESTAMP_VALUE_LOW (0x0000094c)
+#define GVCP_TIMESTAMP_VALUE_LOW (0x0000094C)
#define GVCP_DISCOVERY_ACK_DELAY (0x00000950)
#define GVCP_CONFIGURATION (0x00000954)
#define GVCP_PENDING_TIMEOUT (0x00000958)
#define GVCP_CONTROL_SWITCHOVER_KEY (0x0000095C)
-#define GVCP_GVSCP_CONFIGURATION ( 0x00000960 )
-#define GVCP_PHYSICAL_LINK_CAPABILITY ( 0x00000964 )
-#define GVCP_PHYSICAL_LINK_CONFIGURATION ( 0x00000968 )
-#define GVCP_IEEE_1588_STATUS ( 0x0000096C )
-#define GVCP_SCHEDULED_ACTION_COMMAND_QUEUE_SIZE ( 0x00000970 )
-#define GVCP_CCP (0x00000a00)
+#define GVCP_GVSCP_CONFIGURATION (0x00000960)
+#define GVCP_PHYSICAL_LINK_CAPABILITY (0x00000964)
+#define GVCP_PHYSICAL_LINK_CONFIGURATION (0x00000968)
+#define GVCP_IEEE_1588_STATUS (0x0000096C)
+#define GVCP_SCHEDULED_ACTION_COMMAND_QUEUE_SIZE (0x00000970)
+#define GVCP_IEEE_1588_EXTENDED_CAPABILITY (0x00000974)
+#define GVCP_IEEE_1588_SUPPORTED_PROFILES (0x00000978)
+#define GVCP_IEEE_1588_SELECTED_PROFILE (0x0000097C)
+#define GVCP_CCP (0x00000A00)
#define GVCP_PRIMARY_APPLICATION_PORT (0x00000A04)
#define GVCP_PRIMARY_APPLICATION_IP_ADDRESS (0x00000A14)
-#define GVCP_MC_DESTINATION_PORT (0x00000b00)
-#define GVCP_MC_DESTINATION_ADDRESS (0x00000b10)
-#define GVCP_MC_TIMEOUT (0x00000b14)
-#define GVCP_MC_RETRY_COUNT (0x00000b18)
-#define GVCP_MC_SOURCE_PORT (0x00000b1c)
+#define GVCP_MC_DESTINATION_PORT (0x00000B00)
+#define GVCP_MC_DESTINATION_ADDRESS (0x00000B10)
+#define GVCP_MC_TIMEOUT (0x00000B14)
+#define GVCP_MC_RETRY_COUNT (0x00000B18)
+#define GVCP_MC_SOURCE_PORT (0x00000B1C)
#define GVCP_MANIFEST_TABLE (0x00009000)
#define GVCP_SC_DESTINATION_PORT(I) (0x0d00+(0x40*I))
@@ -215,6 +218,11 @@ GVCP statuses
#define GEV_STATUS_PACKET_NOT_YET_AVAILABLE (0x8010)
#define GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY (0x8011)
#define GEV_STATUS_PACKET_REMOVED_FROM_MEMORY (0x8012)
+#define GEV_STATUS_NO_REF_TIME (0x8013) /* GEV 2.0 */
+#define GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE (0x8014) /* GEV 2.0 */
+#define GEV_STATUS_OVERFLOW (0x8015) /* GEV 2.0 */
+#define GEV_STATUS_ACTION_LATE (0x8016) /* GEV 2.0 */
+#define GEV_STATUS_LEADER_TRAILER_OVERFLOW (0x8017) /* GEV 2.1 */
#define GEV_STATUS_ERROR (0x8FFF)
@@ -313,6 +321,7 @@ static int hf_gvcp_resendcmd_first_packet_id = -1;
static int hf_gvcp_resendcmd_last_packet_id = -1;
static int hf_gvcp_eventcmd_id = -1;
static int hf_gvcp_eventcmd_error_id = -1;
+static int hf_gvcp_eventcmd_extid_length = -1;
static int hf_gvcp_eventcmd_device_specific_id = -1;
static int hf_gvcp_eventcmd_stream_channel_index = -1;
static int hf_gvcp_eventcmd_block_id = -1;
@@ -402,6 +411,7 @@ static int hf_gvcp_currentipconfig = -1;
static int hf_gvcp_spec_version = -1;
/* Added for 2.0 support */
+static int hf_gvcp_devicemode_current_link_configuration_v2_0 = -1;
static int hf_gvcp_ip_config_can_handle_pause_frames_v2_0 = -1;
static int hf_gvcp_ip_config_can_generate_pause_frames_v2_0 = -1;
static int hf_gvcp_number_of_active_links_v2_0 = -1;
@@ -468,6 +478,17 @@ static int hf_gvcp_resendcmd_extended_last_packet_id_v2_0 = -1;
static int hf_gvcp_actioncmd_time_v2_0 = -1;
static int hf_gvcp_eventcmd_block_id_64bit_v2_0 = -1;
+/* Added for 2.1 support */
+static int hf_gvcp_selected_ieee1588_profile_v2_1 = -1;
+static int hf_gvcp_capability_ieee1588_extended_capabilities_v2_1 = -1;
+static int hf_gvcp_ieee1588_profile_registers_present_v2_1 = -1;
+static int hf_gvcp_ieee1588_ptp_profile_supported_v2_1 = -1;
+static int hf_gvcp_ieee1588_802dot1as_profile_supported_v2_1 = -1;
+static int hf_gvcp_sc_multi_part_supported_v2_1 = -1;
+static int hf_gvcp_sc_large_leader_trailer_supported_v2_1 = -1;
+static int hf_gvcp_sc_multi_part_enabled_v2_1 = -1;
+static int hf_gvcp_sc_large_leader_trailer_enabled_v2_1 = -1;
+
/* Generated from convert_proto_tree_add_text.pl */
static int hf_gvcp_custom_register_value = -1;
static int hf_gvcp_custom_read_register_addr = -1;
@@ -499,7 +520,6 @@ static const value_string devicemodenames_class[] = {
{0, NULL},
};
-#if 0
/*Current Link Configuration*/
static const value_string linkconfiguration_class[] = {
{ GEV_LINKCONFIG_SINGLELINK, "Single Link" },
@@ -508,7 +528,6 @@ static const value_string linkconfiguration_class[] = {
{ GEV_LINKCONFIG_DYNAMICLAG, "Dynamic LAG" },
{0, NULL},
};
-#endif
static const value_string devicemodenames_characterset[] = {
{ 0x01, "UTF-8 Character Set" },
@@ -579,6 +598,11 @@ static const value_string statusnames[] = {
{ GEV_STATUS_PACKET_NOT_YET_AVAILABLE, "GEV_STATUS_PACKET_NOT_YET_AVAILABLE" },
{ GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY, "GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY" },
{ GEV_STATUS_PACKET_REMOVED_FROM_MEMORY, "GEV_STATUS_PACKET_REMOVED_FROM_MEMORY" },
+ { GEV_STATUS_NO_REF_TIME, "GEV_STATUS_NO_REF_TIME" },
+ { GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE, "GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE" },
+ { GEV_STATUS_OVERFLOW, "GEV_STATUS_OVERFLOW" },
+ { GEV_STATUS_ACTION_LATE, "GEV_STATUS_ACTION_LATE" },
+ { GEV_STATUS_LEADER_TRAILER_OVERFLOW, "GEV_STATUS_LEADER_TRAILER_OVERFLOW" },
{ GEV_STATUS_ERROR, "GEV_STATUS_ERROR" },
{ 0, NULL },
};
@@ -589,21 +613,26 @@ static const value_string statusnames_short[] = {
{ GEV_STATUS_NOT_IMPLEMENTED, "(Not Implemented) " },
{ GEV_STATUS_INVALID_PARAMETER, "(Invalid Parameter) " },
{ GEV_STATUS_INVALID_ADDRESS, "(Invalid Address) " },
- { GEV_STATUS_WRITE_PROTECT, "(Write Pprotect) " },
+ { GEV_STATUS_WRITE_PROTECT, "(Write Protect) " },
{ GEV_STATUS_BAD_ALIGNMENT, "(Bad Alignment) " },
{ GEV_STATUS_ACCESS_DENIED, "(Access Denied) " },
{ GEV_STATUS_BUSY, "(Busy) " },
{ GEV_STATUS_LOCAL_PROBLEM, "(Local Problem) " },
- { GEV_STATUS_MSG_MISMATCH, "(Msg Mismatch) " },
+ { GEV_STATUS_MSG_MISMATCH, "(Message Mismatch) " },
{ GEV_STATUS_INVALID_PROTOCOL, "(Invalid Protocol) " },
- { GEV_STATUS_NO_MSG, "(No Msg) " },
+ { GEV_STATUS_NO_MSG, "(No Message) " },
{ GEV_STATUS_PACKET_UNAVAILABLE, "(Packet Unavailable) " },
{ GEV_STATUS_DATA_OVERRUN, "(Data Overrun) " },
{ GEV_STATUS_INVALID_HEADER, "(Invalid Header) " },
- { GEV_STATUS_WRONG_CONFIG, "(Wrong Config) " },
+ { GEV_STATUS_WRONG_CONFIG, "(Wrong Configuration) " },
{ GEV_STATUS_PACKET_NOT_YET_AVAILABLE, "(Packet not yet available) " },
- { GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY, "(Packet and prev removed from memory) " },
+ { GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY, "(Packet and previous removed from memory) " },
{ GEV_STATUS_PACKET_REMOVED_FROM_MEMORY, "(Packet removed from memory) " },
+ { GEV_STATUS_NO_REF_TIME, "(No reference time)" },
+ { GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE, "(Packet temp. unavailable)" },
+ { GEV_STATUS_OVERFLOW, "(overflow)" },
+ { GEV_STATUS_ACTION_LATE, "(Action late)" },
+ { GEV_STATUS_LEADER_TRAILER_OVERFLOW, "(Leader/Trailer overflow)" },
{ GEV_STATUS_ERROR, "(Error) " },
{ 0, NULL },
};
@@ -613,6 +642,11 @@ static const true_false_string directionnames = {
"Transmitter"
};
+static const true_false_string zonedirectionnames = {
+ "Bottom-Up",
+ "Top-Down"
+};
+
/*
brief Register name to address mappings
*/
@@ -690,6 +724,14 @@ const value_string bootstrapregisternames[] = {
{ GVCP_CONFIGURATION, "[GVCP Configuration]" },
{ GVCP_PENDING_TIMEOUT, "[Pending Timeout]" },
{ GVCP_CONTROL_SWITCHOVER_KEY, "[Control switchover key]" },
+ { GVCP_GVSCP_CONFIGURATION, "[GVSP Configuration]" },
+ { GVCP_PHYSICAL_LINK_CAPABILITY, "[Physical link capability]" },
+ { GVCP_PHYSICAL_LINK_CONFIGURATION, "[Physical link configuration]" },
+ { GVCP_IEEE_1588_STATUS, "[IEEE1588 status]" },
+ { GVCP_SCHEDULED_ACTION_COMMAND_QUEUE_SIZE, "[Scheduled action command queue size]" },
+ { GVCP_IEEE_1588_EXTENDED_CAPABILITY, "[IEEE1588 extended capabilities]" },
+ { GVCP_IEEE_1588_SUPPORTED_PROFILES, "[IEEE1588 supported profiles]" },
+ { GVCP_IEEE_1588_SELECTED_PROFILE, "[IEEE1588 selected profile]" },
{ GVCP_CCP, "[CCP (Control Channel Privilege)]" },
{ GVCP_PRIMARY_APPLICATION_PORT, "[Primary Application Port]" },
{ GVCP_PRIMARY_APPLICATION_IP_ADDRESS, "[Primary Application IP address]" },
@@ -793,6 +835,7 @@ static int dissect_register(guint32 addr, proto_tree *branch, tvbuff_t *tvb, gin
case GVCP_DEVICE_MODE:
proto_tree_add_item(branch, hf_gvcp_devicemode_endianess, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_devicemode_deviceclass, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(branch, hf_gvcp_devicemode_current_link_configuration_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_devicemode_characterset, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
@@ -962,6 +1005,7 @@ static int dissect_register(guint32 addr, proto_tree *branch, tvbuff_t *tvb, gin
proto_tree_add_item(branch, hf_gvcp_capability_1588_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_capability_extended_status_code_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_capability_scheduled_action_command_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(branch, hf_gvcp_capability_ieee1588_extended_capabilities_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_capability_action_command, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_capability_pending, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_capability_evendata, tvb, offset, 4, ENC_BIG_ENDIAN);
@@ -1043,6 +1087,19 @@ static int dissect_register(guint32 addr, proto_tree *branch, tvbuff_t *tvb, gin
proto_tree_add_item(branch, hf_gvcp_scheduled_action_command_queue_size_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
+ case GVCP_IEEE_1588_EXTENDED_CAPABILITY:
+ proto_tree_add_item(branch, hf_gvcp_ieee1588_profile_registers_present_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ break;
+
+ case GVCP_IEEE_1588_SUPPORTED_PROFILES:
+ proto_tree_add_item(branch, hf_gvcp_ieee1588_ptp_profile_supported_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(branch, hf_gvcp_ieee1588_802dot1as_profile_supported_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ break;
+
+ case GVCP_IEEE_1588_SELECTED_PROFILE:
+ proto_tree_add_item(branch, hf_gvcp_selected_ieee1588_profile_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ break;
+
case GVCP_CCP:
proto_tree_add_item(branch, hf_gvcp_control_switchover_key, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_control_switchover_en, tvb, offset, 4, ENC_BIG_ENDIAN);
@@ -1129,6 +1186,8 @@ static int dissect_register(guint32 addr, proto_tree *branch, tvbuff_t *tvb, gin
case GVCP_SC_CAPABILITY(3):
proto_tree_add_item(branch, hf_gvcp_sc_big_little_endian_supported, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_sc_ip_reassembly_supported, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(branch, hf_gvcp_sc_multi_part_supported_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(branch, hf_gvcp_sc_large_leader_trailer_supported_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_sc_multizone_supported_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_sc_packet_resend_destination_option_supported_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_sc_packet_resend_all_in_transmission_supported_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
@@ -1140,6 +1199,8 @@ static int dissect_register(guint32 addr, proto_tree *branch, tvbuff_t *tvb, gin
case GVCP_SC_CONFIGURATION(1):
case GVCP_SC_CONFIGURATION(2):
case GVCP_SC_CONFIGURATION(3):
+ proto_tree_add_item(branch, hf_gvcp_sc_multi_part_enabled_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(branch, hf_gvcp_sc_large_leader_trailer_enabled_v2_1, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_sc_packet_resend_destination_option_enabled_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_sc_packet_resend_all_in_transmission_enabled_v2_0, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(branch, hf_gvcp_sc_unconditional_streaming_enabled, tvb, offset, 4, ENC_BIG_ENDIAN);
@@ -1228,7 +1289,7 @@ static int dissect_register(guint32 addr, proto_tree *branch, tvbuff_t *tvb, gin
return 1;
}
-/* Attemps to dissect a bootstrap register (readmem context) */
+/* Attempts to dissect a bootstrap register (readmem context) */
static int dissect_register_data(guint32 addr, proto_tree *branch, tvbuff_t *tvb, gint offset, gint length)
{
switch (addr)
@@ -1745,6 +1806,7 @@ static void dissect_eventdata_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb,
{
gint32 eventid;
gint offset;
+ gint data_length = 0;
offset = startoffset;
/* Get event ID */
@@ -1755,6 +1817,13 @@ static void dissect_eventdata_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb,
if (gvcp_telegram_tree != NULL)
{
+ /* If extended ID, then we have event_size here (2.1) */
+ if (extendedblockids)
+ {
+ proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_extid_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ data_length = tvb_get_ntohs(tvb, offset); // We get the data length here
+ }
+
/* skip reserved field */
offset += 2;
@@ -1788,6 +1857,7 @@ static void dissect_eventdata_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb,
}
else
{
+ offset += 2;
/* Block id (64 bit) only if reported by gvcp flag */
proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_block_id_64bit_v2_0, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
@@ -1797,6 +1867,12 @@ static void dissect_eventdata_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb,
proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_timestamp, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
+ if ((data_length == 24) && (extendedblockids))
+ {
+ /* "no data" this is an ok case for extended id, eventcmd to be deprecated */
+ return;
+ }
+
/* Data */
proto_tree_add_item(gvcp_telegram_tree, hf_gvcp_eventcmd_data, tvb, offset, -1, ENC_NA);
}
@@ -2017,7 +2093,6 @@ static void dissect_writereg_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb,
gint num_registers = 0;
num_registers = gvcp_trans->addr_count;
-
if (num_registers > 1)
{
col_append_fstr(pinfo->cinfo, COL_INFO, "[Multiple WriteReg Ack] (%d/%d) %s ", ack_index, num_registers, (ack_index == num_registers ? "(Success)" : "(Failed)"));
@@ -2029,8 +2104,8 @@ static void dissect_writereg_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb,
if (gvcp_telegram_tree != NULL)
{
- proto_item_append_text(item, " %s",(ack_index == num_registers ? "(Success)" : "(Failed)"));
- }
+ proto_item_append_text(item, " %s", (ack_index == num_registers ? "(Success)" : "(Failed)"));
+ }
}
else
{
@@ -2209,6 +2284,7 @@ static int dissect_gvcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
(command == GVCP_PACKETRESEND_CMD))
{
proto_tree_add_item(gvcp_tree_flag, hf_gvcp_64bitid_flag_v2_0, tvb, offset, 1, ENC_BIG_ENDIAN);
+ flags = (gchar) tvb_get_guint8(tvb, offset );
extendedblockids = (flags & 0x10);
}
if ((command == GVCP_DISCOVERY_CMD) ||
@@ -2244,11 +2320,11 @@ static int dissect_gvcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
}
/* Parse the second part of both the command and the acknowledge header:
- 0 15 16 31
+ 0 15 16 31
-------- -------- -------- --------
- | status | acknowledge |
+ | status | acknowledge |
-------- -------- -------- --------
- >| length | req_id |<
+ | length | req_id |
-------- -------- -------- --------
Add the data length
@@ -2259,7 +2335,7 @@ static int dissect_gvcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
offset += 2;
/* Add the request ID */
- proto_tree_add_item(gvcp_tree, hf_gvcp_request_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(gvcp_tree, hf_gvcp_request_id, tvb, offset, 2, ENC_BIG_ENDIAN);
request_id = tvb_get_ntohs(tvb, offset);
offset += 2;
@@ -2286,7 +2362,7 @@ static int dissect_gvcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
}
else
{
- if (ack_string)
+ if (ack_string && ( ack_code != GVCP_PENDING_ACK ) )
{
/* this is a response, so update trans info with ack's frame number */
/* get list of transactions for given request id */
@@ -2506,7 +2582,7 @@ void proto_register_gvcp(void)
{ &hf_gvcp_64bitid_flag_v2_0,
{ "64 bit ID", "gvcp.cmd.flag.64bitid",
- FT_BOOLEAN, 8, NULL, 0x10,
+ FT_BOOLEAN, 8, NULL, 0x08,
NULL, HFILL }},
{ &hf_gvcp_allow_broadcast_acknowledge_flag,
@@ -2563,7 +2639,7 @@ void proto_register_gvcp(void)
{ &hf_gvcp_forceip_static_subnet_mask,
{ "Subnet Mask", "gvcp.cmd.forceip.subnetmask",
- FT_IPv4, BASE_NETMASK, NULL, 0x0,
+ FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_gvcp_forceip_static_default_gateway,
@@ -2679,6 +2755,11 @@ void proto_register_gvcp(void)
FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
NULL, HFILL }},
+ { &hf_gvcp_eventcmd_extid_length,
+ { "Event Size", "gvcp.cmd.event.eventsize",
+ FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
+ NULL, HFILL }},
+
{ &hf_gvcp_eventcmd_device_specific_id,
{ "Device Specific ID", "gvcp.cmd.event.devicespecificid",
FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
@@ -2760,7 +2841,7 @@ void proto_register_gvcp(void)
/* GVCP_devicemode */
{ &hf_gvcp_devicemode_endianess,
- { "Endianness", "gvcp.bootstrap.devicemode.endianess",
+ { "Endianess", "gvcp.bootstrap.devicemode.endianess",
FT_BOOLEAN, 32, NULL, 0x80000000,
NULL, HFILL
}},
@@ -2771,6 +2852,12 @@ void proto_register_gvcp(void)
NULL, HFILL
}},
+ { &hf_gvcp_devicemode_current_link_configuration_v2_0,
+ { "Current Link Configuration", "gvcp.bootstrap.devicemode.currentlinkconfiguration",
+ FT_UINT32, BASE_HEX, VALS(linkconfiguration_class), 0x03000000,
+ NULL, HFILL
+ }},
+
{& hf_gvcp_devicemode_characterset,
{ "Character Set", "gvcp.bootstrap.devicemode.characterset",
FT_UINT32, BASE_HEX, VALS(devicemodenames_characterset), 0x0000000F,
@@ -2844,7 +2931,7 @@ void proto_register_gvcp(void)
{ &hf_gvcp_current_subnet_mask,
{ "Subnet Mask", "gvcp.bootstrap.currentsubnetmask",
- FT_IPv4, BASE_NETMASK, NULL, 0x0,
+ FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* GVCP_CURRENT_DEFAULT_GATEWAY_0, 1, 2, 3 */
@@ -2930,7 +3017,7 @@ void proto_register_gvcp(void)
{& hf_gvcp_persistent_subnet,
{ "Persistent Subnet Mask", "gvcp.bootstrap.persistentsubnetmask",
- FT_IPv4, BASE_NETMASK, NULL, 0x0,
+ FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL
}},
@@ -2982,10 +3069,18 @@ void proto_register_gvcp(void)
NULL, HFILL
}},
+ /* GVCP_IEEE_1588_SELECTED_PROFILE */
+
+ {& hf_gvcp_selected_ieee1588_profile_v2_1,
+ { "IEEE 1588 Selected Profile", "gvcp.bootstrap.ieee1588selectedprofile",
+ FT_UINT32, BASE_DEC, NULL, 0x0000001F,
+ NULL, HFILL
+ }},
+
/* GVCP_SC_CAPS */
{& hf_gvcp_sccaps_scspx_register_supported,
- { "SCSPx Register Supporteed", "gvcp.bootstrap.sccaps.scspxregistersupported",
+ { "SCSPx Register Supported", "gvcp.bootstrap.sccaps.scspxregistersupported",
FT_BOOLEAN, 32, NULL, 0x80000000,
NULL, HFILL
}},
@@ -3004,6 +3099,28 @@ void proto_register_gvcp(void)
NULL, HFILL
}},
+ /* GVCP_IEEE_1588_EXTENDED_CAPABILITY */
+
+ {& hf_gvcp_ieee1588_profile_registers_present_v2_1,
+ { "IEEE 1588 Profile Registers Present", "gvcp.bootstrap.ieee1588extendedcapabilities.profileregisterspresent",
+ FT_BOOLEAN, 32, NULL, 0x80000000,
+ NULL, HFILL
+ }},
+
+ /* GVCP_IEEE_1588_SUPPORTED_PROFILES */
+
+ {& hf_gvcp_ieee1588_ptp_profile_supported_v2_1,
+ { "IEEE 1588 PTP Profile Supported", "gvcp.bootstrap.ieee1588supportedprofiles.ptp",
+ FT_BOOLEAN, 32, NULL, 0x80000000,
+ NULL, HFILL
+ }},
+
+ {& hf_gvcp_ieee1588_802dot1as_profile_supported_v2_1,
+ { "IEEE 1588 802.1as Profile Supported", "gvcp.bootstrap.ieee1588supportedprofiles.802dot1as",
+ FT_BOOLEAN, 32, NULL, 0x40000000,
+ NULL, HFILL
+ }},
+
/* GVCP_CAPABILITY */
{& hf_gvcp_capability_user_defined,
@@ -3096,6 +3213,12 @@ void proto_register_gvcp(void)
NULL, HFILL
}},
+ {& hf_gvcp_capability_ieee1588_extended_capabilities_v2_1,
+ { "IEEE1588 Extended Capabilities", "gvcp.bootstrap.capability.ieee1588extendedcapabilities",
+ FT_BOOLEAN, 32, NULL, 0x00010000,
+ NULL, HFILL
+ }},
+
{& hf_gvcp_capability_action_command,
{ "Action Command", "gvcp.bootstrap.capability.actioncommand",
FT_BOOLEAN, 32, NULL, 0x00000040,
@@ -3109,7 +3232,7 @@ void proto_register_gvcp(void)
}},
{& hf_gvcp_capability_evendata,
- { "Eventdata Supported", "gvcp.bootstrap.capability.eventdata",
+ { "Event Data Supported", "gvcp.bootstrap.capability.eventdata",
FT_BOOLEAN, 32, NULL, 0x00000010,
NULL, HFILL
}},
@@ -3476,8 +3599,20 @@ void proto_register_gvcp(void)
NULL, HFILL
}},
+ {& hf_gvcp_sc_multi_part_supported_v2_1,
+ { "Multi-part Supported", "gvcp.bootstrap.sccx.multipartsupported",
+ FT_BOOLEAN, 32, NULL, 0x00000040,
+ NULL, HFILL
+ }},
+
+ {& hf_gvcp_sc_large_leader_trailer_supported_v2_1,
+ { "Large Leader/Trailer Supported", "gvcp.bootstrap.sccx.largeleadertrailersupported",
+ FT_BOOLEAN, 32, NULL, 0x00000020,
+ NULL, HFILL
+ }},
+
{& hf_gvcp_sc_multizone_supported_v2_0,
- { "Multizone Supported", "gvcp.bootstrap.sccx.multizonesupported",
+ { "Multi-zone Supported", "gvcp.bootstrap.sccx.multizonesupported",
FT_BOOLEAN, 32, NULL, 0x00000010,
NULL, HFILL
}},
@@ -3508,6 +3643,18 @@ void proto_register_gvcp(void)
/* GVCP_SC_CONFIGURATION(0), 1, 2, 3 */
+ {& hf_gvcp_sc_multi_part_enabled_v2_1,
+ { "Multi-part Enabled", "gvcp.bootstrap.sccfgx.multipartenabled",
+ FT_BOOLEAN, 32, NULL, 0x40,
+ NULL, HFILL
+ }},
+
+ {& hf_gvcp_sc_large_leader_trailer_enabled_v2_1,
+ { "Large Leader/Trailer Enabled", "gvcp.bootstrap.sccfgx.largeleadertrailerenabled",
+ FT_BOOLEAN, 32, NULL, 0x20,
+ NULL, HFILL
+ }},
+
{& hf_gvcp_sc_packet_resend_destination_option_enabled_v2_0,
{ "Resend Destination Option Enabled", "gvcp.bootstrap.sccfgx.resenddestinationoptionenabled",
FT_BOOLEAN, 32, NULL, 0x8,
@@ -3544,193 +3691,193 @@ void proto_register_gvcp(void)
{& hf_gvcp_sc_zone0_direction_v2_0,
{ "Zone 0 Direction", "gvcp.bootstrap.sczdx.zone0direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x80000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x80000000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone1_direction_v2_0,
{ "Zone 1 Direction", "gvcp.bootstrap.sczdx.zone1direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x40000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x40000000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone2_direction_v2_0,
{ "Zone 2 Direction", "gvcp.bootstrap.sczdx.zone2direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x20000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x20000000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone3_direction_v2_0,
{ "Zone 3 Direction", "gvcp.bootstrap.sczdx.zone3direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x10000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x10000000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone4_direction_v2_0,
{ "Zone 4 Direction", "gvcp.bootstrap.sczdx.zone4direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x08000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x08000000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone5_direction_v2_0,
{ "Zone 5 Direction", "gvcp.bootstrap.sczdx.zone5direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x04000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x04000000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone6_direction_v2_0,
{ "Zone 6 Direction", "gvcp.bootstrap.sczdx.zone6direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x02000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x02000000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone7_direction_v2_0,
{ "Zone 7 Direction", "gvcp.bootstrap.sczdx.zone7direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x01000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x01000000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone8_direction_v2_0,
{ "Zone 8 Direction", "gvcp.bootstrap.sczdx.zone8direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00800000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00800000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone9_direction_v2_0,
{ "Zone 9 Direction", "gvcp.bootstrap.sczdx.zone9direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00400000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00400000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone10_direction_v2_0,
{ "Zone 10 Direction", "gvcp.bootstrap.sczdx.zone10direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00200000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00200000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone11_direction_v2_0,
{ "Zone 11 Direction", "gvcp.bootstrap.sczdx.zone1direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00100000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00100000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone12_direction_v2_0,
{ "Zone 12 Direction", "gvcp.bootstrap.sczdx.zone12direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00080000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00080000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone13_direction_v2_0,
{ "Zone 13 Direction", "gvcp.bootstrap.sczdx.zone13direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00040000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00040000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone14_direction_v2_0,
{ "Zone 14 Direction", "gvcp.bootstrap.sczdx.zone14direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00020000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00020000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone15_direction_v2_0,
{ "Zone 15 Direction", "gvcp.bootstrap.sczdx.zone15direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00010000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00010000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone16_direction_v2_0,
{ "Zone 16 Direction", "gvcp.bootstrap.sczdx.zone16direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00008000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00008000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone17_direction_v2_0,
{ "Zone 17 Direction", "gvcp.bootstrap.sczdx.zone17direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00004000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00004000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone18_direction_v2_0,
{ "Zone 18 Direction", "gvcp.bootstrap.sczdx.zone18direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00002000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00002000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone19_direction_v2_0,
{ "Zone 19 Direction", "gvcp.bootstrap.sczdx.zone19direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00001000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00001000,
NULL, HFILL
}},
{& hf_gvcp_sc_zone20_direction_v2_0,
{ "Zone 20 Direction", "gvcp.bootstrap.sczdx.zone20direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000800,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000800,
NULL, HFILL
}},
{& hf_gvcp_sc_zone21_direction_v2_0,
{ "Zone 21 Direction", "gvcp.bootstrap.sczdx.zone21direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000400,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000400,
NULL, HFILL
}},
{& hf_gvcp_sc_zone22_direction_v2_0,
{ "Zone 22 Direction", "gvcp.bootstrap.sczdx.zone22direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000200,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000200,
NULL, HFILL
}},
{& hf_gvcp_sc_zone23_direction_v2_0,
{ "Zone 23 Direction", "gvcp.bootstrap.sczdx.zone23direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000100,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000100,
NULL, HFILL
}},
{& hf_gvcp_sc_zone24_direction_v2_0,
{ "Zone 24 Direction", "gvcp.bootstrap.sczdx.zone24direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000080,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000080,
NULL, HFILL
}},
{& hf_gvcp_sc_zone25_direction_v2_0,
{ "Zone 25 Direction", "gvcp.bootstrap.sczdx.zone25direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000040,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000040,
NULL, HFILL
}},
{& hf_gvcp_sc_zone26_direction_v2_0,
{ "Zone 26 Direction", "gvcp.bootstrap.sczdx.zone26direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000020,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000020,
NULL, HFILL
}},
{& hf_gvcp_sc_zone27_direction_v2_0,
{ "Zone 27 Direction", "gvcp.bootstrap.sczdx.zone27direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000010,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000010,
NULL, HFILL
}},
{& hf_gvcp_sc_zone28_direction_v2_0,
{ "Zone 28 Direction", "gvcp.bootstrap.sczdx.zone28direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000008,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000008,
NULL, HFILL
}},
{& hf_gvcp_sc_zone29_direction_v2_0,
{ "Zone 29 Direction", "gvcp.bootstrap.sczdx.zone29direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000004,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000004,
NULL, HFILL
}},
{& hf_gvcp_sc_zone30_direction_v2_0,
{ "Zone 30 Direction", "gvcp.bootstrap.sczdx.zone30direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000002,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000002,
NULL, HFILL
}},
{& hf_gvcp_sc_zone31_direction_v2_0,
{ "Zone 31 Direction", "gvcp.bootstrap.sczdx.zone31direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000001,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000001,
NULL, HFILL
}},
@@ -3781,13 +3928,13 @@ void proto_register_gvcp(void)
"This is a response to the GVCP request in this frame", HFILL
}},
- /* Generated from convert_proto_tree_add_text.pl */
- { &hf_gvcp_reserved_bit, { "Reserved Bit", "gvcp.reserved_bit", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
- { &hf_gvcp_manifest_table, { "Manifest Table", "gvcp.manifest_table", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
- { &hf_gvcp_custom_register_value, { "Value", "gvcp.bootstrap.custom.register.value", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
- { &hf_gvcp_custom_read_register_addr, { "Custom Register Address", "gvcp.bootstrap.custom.register.read", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
- { &hf_gvcp_custom_read_register_value, { "Custom Register Value", "gvcp.bootstrap.custom.register.read_value", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
- { &hf_gvcp_readmemcmd_data_read, { "Data read", "gvcp.cmd.readmem.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ /* Generated from convert_proto_tree_add_text.pl */
+ { &hf_gvcp_reserved_bit, { "Reserved Bit", "gvcp.reserved_bit", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_gvcp_manifest_table, { "Manifest Table", "gvcp.manifest_table", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_gvcp_custom_register_value, { "Value", "gvcp.bootstrap.custom.register.value", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+ { &hf_gvcp_custom_read_register_addr, { "Custom Register Address", "gvcp.bootstrap.custom.register.read", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+ { &hf_gvcp_custom_read_register_value, { "Custom Register Value", "gvcp.bootstrap.custom.register.read_value", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+ { &hf_gvcp_readmemcmd_data_read, { "Data read", "gvcp.cmd.readmem.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
};
static gint *ett[] = {
diff --git a/epan/dissectors/packet-gvsp.c b/epan/dissectors/packet-gvsp.c
index 2e90b7a..17fb45a 100644
--- a/epan/dissectors/packet-gvsp.c
+++ b/epan/dissectors/packet-gvsp.c
@@ -35,6 +35,11 @@ void proto_reg_handoff_gvsp(void);
#define GVSP_MIN_PACKET_SIZE 8
#define GVSP_V2_MIN_PACKET_SIZE 20
+#define GVSP_EXTENDED_ID_BIT 0x80
+#define GVSP_EXTENDED_CHUNK_BIT 0x4000
+
+#define GVSP_SIZE_OF_PART_INFO_LEADER ( 48 )
+#define GVSP_SIZE_OF_PART_INFO_TRAILER ( 16 )
/*
Payload types
@@ -44,11 +49,12 @@ void proto_reg_handoff_gvsp(void);
#define GVSP_PAYLOAD_RAWDATA ( 0x0002 )
#define GVSP_PAYLOAD_FILE ( 0x0003 )
#define GVSP_PAYLOAD_CHUNKDATA ( 0x0004 )
-#define GVSP_PAYLOAD_EXTENDEDCHUNKDATA ( 0x0005 ) /* Deprecated */
-#define GVSP_PAYLOAD_JPEG ( 0x0006 )
-#define GVSP_PAYLOAD_JPEG2000 ( 0x0007 )
-#define GVSP_PAYLOAD_H264 ( 0x0008 )
-#define GVSP_PAYLOAD_MULTIZONEIMAGE ( 0x0009 )
+#define GVSP_PAYLOAD_EXTENDEDCHUNKDATA ( 0x0005 ) /* Deprecated with GEV 2.0 */
+#define GVSP_PAYLOAD_JPEG ( 0x0006 ) /* GEV 2.0 */
+#define GVSP_PAYLOAD_JPEG2000 ( 0x0007 ) /* GEV 2.0 */
+#define GVSP_PAYLOAD_H264 ( 0x0008 ) /* GEV 2.0 */
+#define GVSP_PAYLOAD_MULTIZONEIMAGE ( 0x0009 ) /* GEV 2.0 */
+#define GVSP_PAYLOAD_MULTIPART ( 0x000A ) /* GEV 2.1 */
#define GVSP_PAYLOAD_DEVICEPSECIFICSTART ( 0x8000 )
@@ -62,6 +68,26 @@ void proto_reg_handoff_gvsp(void);
#define GVSP_PACKET_ALLIN ( 4 )
#define GVSP_PACKET_PAYLOAD_H264 ( 5 )
#define GVSP_PACKET_PAYLOAD_MULTIZONE ( 6 )
+#define GVSP_PACKET_PAYLOAD_MULTIPART ( 7 ) /* GEV 2.1 */
+#define GVSP_PACKET_PAYLOAD_LAST ( 7 )
+
+/*
+ GVSP Multi-Part data types (GEV 2.1)
+ */
+
+#define GVSP_MULTIPART_DATA_TYPE_2DIMAGE ( 0x0001 )
+#define GVSP_MULTIPART_DATA_TYPE_2DPLANEBIPLANAR ( 0x0002 )
+#define GVSP_MULTIPART_DATA_TYPE_2DPLANETRIPLANAR ( 0x0003 )
+#define GVSP_MULTIPART_DATA_TYPE_2DPLANEQUADPLANAR ( 0x0004 )
+#define GVSP_MULTIPART_DATA_TYPE_3DIMAGE ( 0x0005 )
+#define GVSP_MULTIPART_DATA_TYPE_3DPLANEBIPLANAR ( 0x0006 )
+#define GVSP_MULTIPART_DATA_TYPE_3DPLANETRIPLANAR ( 0x0007 )
+#define GVSP_MULTIPART_DATA_TYPE_3DPLANEQUADPLANAR ( 0x0008 )
+#define GVSP_MULTIPART_DATA_TYPE_CONFIDENCEMAP ( 0x0009 )
+#define GVSP_MULTIPART_DATA_TYPE_CHUNKDATA ( 0x000A )
+#define GVSP_MULTIPART_DATA_TYPE_JPEG ( 0x000B )
+#define GVSP_MULTIPART_DATA_TYPE_JPEG2000 ( 0x000C )
+#define GVSP_MULTIPART_DATA_TYPE_DEVICESPECIFIC ( 0x8000 )
/*
@@ -88,6 +114,12 @@ void proto_reg_handoff_gvsp(void);
#define GEV_STATUS_PACKET_NOT_YET_AVAILABLE (0x8010)
#define GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY (0x8011)
#define GEV_STATUS_PACKET_REMOVED_FROM_MEMORY (0x8012)
+#define GEV_STATUS_NO_REF_TIME (0x8013) /* GEV 2.0 */
+#define GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE (0x8014) /* GEV 2.0 */
+#define GEV_STATUS_OVERFLOW (0x8015) /* GEV 2.0 */
+#define GEV_STATUS_ACTION_LATE (0x8016) /* GEV 2.0 */
+#define GEV_STATUS_LEADER_TRAILER_OVERFLOW (0x8017) /* GEV 2.1 */
+#define GEV_STATUS_LAST (0x8017)
#define GEV_STATUS_ERROR (0x8FFF)
@@ -363,7 +395,9 @@ static int ett_gvsp_fieldinfo = -1;
static int ett_gvsp_cs = -1;
static int ett_gvsp_sc_zone_direction = -1;
static int ett_gvsp_zoneinfo = -1;
-
+static int ett_gvsp_zoneinfo_multipart = -1;
+static int ett_gvsp_partinfo_leader = -1;
+static int ett_gvsp_partinfo_trailer = -1;
static const value_string statusnames[] = {
{ GEV_STATUS_SUCCESS, "GEV_STATUS_SUCCESS" },
@@ -386,6 +420,11 @@ static const value_string statusnames[] = {
{ GEV_STATUS_PACKET_NOT_YET_AVAILABLE, "GEV_STATUS_PACKET_NOT_YET_AVAILABLE" },
{ GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY, "GEV_STATUS_PACKET_AND_PREV_REMOVED_FROM_MEMORY" },
{ GEV_STATUS_PACKET_REMOVED_FROM_MEMORY, "GEV_STATUS_PACKET_REMOVED_FROM_MEMORY" },
+ { GEV_STATUS_NO_REF_TIME, "GEV_STATUS_NO_REF_TIME" },
+ { GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE, "GEV_STATUS_PACKET_TEMPORARILY_UNAVAILABLE" },
+ { GEV_STATUS_OVERFLOW, "GEV_STATUS_OVERFLOW" },
+ { GEV_STATUS_ACTION_LATE, "GEV_STATUS_ACTION_LATE" },
+ { GEV_STATUS_LEADER_TRAILER_OVERFLOW, "GEV_STATUS_LEADER_TRAILER_OVERFLOW" },
{ GEV_STATUS_ERROR, "GEV_STATUS_ERROR" },
{ 0, NULL },
};
@@ -393,45 +432,68 @@ static const value_string statusnames[] = {
static value_string_ext statusnames_ext = VALUE_STRING_EXT_INIT(statusnames);
static const value_string formatnames[] = {
- { GVSP_PACKET_LEADER, "LEADER" },
- { GVSP_PACKET_TRAILER, "TRAILER" },
- { GVSP_PACKET_PAYLOAD, "PAYLOAD" },
- { GVSP_PACKET_ALLIN, "ALLIN" },
- { GVSP_PACKET_PAYLOAD_H264, "H264" },
- { GVSP_PACKET_PAYLOAD_MULTIZONE, "MULTIZONE" },
- { 0x80 | GVSP_PACKET_LEADER, "LEADER (ext IDs)" },
- { 0x80 | GVSP_PACKET_TRAILER, "TRAILER (ext IDs)" },
- { 0x80 | GVSP_PACKET_PAYLOAD, "PAYLOAD (ext IDs)" },
- { 0x80 | GVSP_PACKET_ALLIN, "ALLIN (ext IDs)" },
- { 0x80 | GVSP_PACKET_PAYLOAD_H264, "H264 (ext IDs)" },
- { 0x80 | GVSP_PACKET_PAYLOAD_MULTIZONE, "MULTIZONE (ext IDs)" },
+ { GVSP_PACKET_LEADER, "LEADER" },
+ { GVSP_PACKET_TRAILER, "TRAILER" },
+ { GVSP_PACKET_PAYLOAD, "PAYLOAD" },
+ { GVSP_PACKET_ALLIN, "ALLIN" },
+ { GVSP_PACKET_PAYLOAD_H264, "H264" },
+ { GVSP_PACKET_PAYLOAD_MULTIZONE, "MULTI-ZONE" },
+ { GVSP_PACKET_PAYLOAD_MULTIPART, "MULTI-PART" },
+ { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_LEADER, "LEADER (ext IDs)" },
+ { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_TRAILER, "TRAILER (ext IDs)" },
+ { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_PAYLOAD, "PAYLOAD (ext IDs)" },
+ { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_ALLIN, "ALL-IN (ext IDs)" },
+ { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_PAYLOAD_H264, "H264 (ext IDs)" },
+ { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_PAYLOAD_MULTIZONE, "MULTI-ZONE (ext IDs)" },
+ { GVSP_EXTENDED_ID_BIT | GVSP_PACKET_PAYLOAD_MULTIPART, "MULTI-PART (ext IDs)" },
{ 0, NULL },
};
static const value_string payloadtypenames[] = {
- { GVSP_PAYLOAD_IMAGE, "IMAGE" },
- { GVSP_PAYLOAD_RAWDATA, "RAWDATA" },
- { GVSP_PAYLOAD_FILE, "FILE" },
- { GVSP_PAYLOAD_CHUNKDATA, "CHUNKDATA" },
- { GVSP_PAYLOAD_EXTENDEDCHUNKDATA, "EXTENDEDCHUNKDATA (obsolete with v2.0)" },
- { GVSP_PAYLOAD_JPEG, "JPEG" },
- { GVSP_PAYLOAD_JPEG2000, "JPEG2000" },
- { GVSP_PAYLOAD_H264, "H264" },
- { GVSP_PAYLOAD_MULTIZONEIMAGE, "MUTLIZONEIAMGE" },
- { 0x4000 | GVSP_PAYLOAD_IMAGE, "IMAGE (v2.0 chunks)" },
- { 0x4000 | GVSP_PAYLOAD_RAWDATA, "RAWDATA (v2.0 Chunks)" },
- { 0x4000 | GVSP_PAYLOAD_FILE, "FILE (v2.0 Chunks)" },
- { 0x4000 | GVSP_PAYLOAD_CHUNKDATA, "CHUNKDATA (v2.0 Chunks)" },
- { 0x4000 | GVSP_PAYLOAD_EXTENDEDCHUNKDATA, "EXTENDEDCHUNKDATA (v2.0 chunks?)" },
- { 0x4000 | GVSP_PAYLOAD_JPEG, "JPEG (v2.0 Chunks)" },
- { 0x4000 | GVSP_PAYLOAD_JPEG2000, "JPEG2000 (v2.0 Chunks)" },
- { 0x4000 | GVSP_PAYLOAD_H264, "H264 (v2.0 Chunks)" },
- { 0x4000 | GVSP_PAYLOAD_MULTIZONEIMAGE, "MULTIZONEIMAGE (v2.0 Chunks)" },
+ { GVSP_PAYLOAD_IMAGE, "IMAGE" },
+ { GVSP_PAYLOAD_RAWDATA, "RAW DATA" },
+ { GVSP_PAYLOAD_FILE, "FILE" },
+ { GVSP_PAYLOAD_CHUNKDATA, "CHUNK DATA" },
+ { GVSP_PAYLOAD_EXTENDEDCHUNKDATA, "EXTENDED CHUNK DATA (obsolete with v2.0)" },
+ { GVSP_PAYLOAD_JPEG, "JPEG" },
+ { GVSP_PAYLOAD_JPEG2000, "JPEG 2000" },
+ { GVSP_PAYLOAD_H264, "H264" },
+ { GVSP_PAYLOAD_MULTIZONEIMAGE, "MULTI-ZONE IMAGE" },
+ { GVSP_PAYLOAD_MULTIPART, "MULTI-PART" },
+ { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_IMAGE, "IMAGE (v2.0 chunks)" },
+ { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_RAWDATA, "RAW DATA (v2.0 Chunks)" },
+ { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_FILE, "FILE (v2.0 Chunks)" },
+ { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_CHUNKDATA, "CHUNK DATA (v2.0 Chunks)" },
+ { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_EXTENDEDCHUNKDATA, "EXTENDED CHUNK DATA (v2.0 chunks?)" },
+ { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_JPEG, "JPEG (v2.0 Chunks)" },
+ { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_JPEG2000, "JPEG 2000 (v2.0 Chunks)" },
+ { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_H264, "H264 (v2.0 Chunks)" },
+ { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_MULTIZONEIMAGE, "MULTI-ZONE IMAGE (v2.0 Chunks)" },
+ { GVSP_EXTENDED_CHUNK_BIT | GVSP_PAYLOAD_MULTIPART, "MULTI-PART (v2.0 Chunks)" },
{ 0, NULL },
};
static value_string_ext payloadtypenames_ext = VALUE_STRING_EXT_INIT(payloadtypenames);
+static const value_string multipartdatatypenames[] = {
+ { GVSP_MULTIPART_DATA_TYPE_2DIMAGE, "2D IMAGE" },
+ { GVSP_MULTIPART_DATA_TYPE_2DPLANEBIPLANAR, "2D PLANE BI-PLANAR" },
+ { GVSP_MULTIPART_DATA_TYPE_2DPLANETRIPLANAR, "2D PLANE TRI-PLANAR" },
+ { GVSP_MULTIPART_DATA_TYPE_2DPLANEQUADPLANAR, "2D PLANE QUAD-PLANAR" },
+ { GVSP_MULTIPART_DATA_TYPE_3DIMAGE, "3D IMAGE" },
+ { GVSP_MULTIPART_DATA_TYPE_3DPLANEBIPLANAR, "3D PLANE BI-PLANAR" },
+ { GVSP_MULTIPART_DATA_TYPE_3DPLANETRIPLANAR, "3D PLANE TRI-PLANAR" },
+ { GVSP_MULTIPART_DATA_TYPE_3DPLANEQUADPLANAR, "3D PLANE QUAD-PLANAR" },
+ { GVSP_MULTIPART_DATA_TYPE_CONFIDENCEMAP, "CONFIDENCE MAP" },
+ { GVSP_MULTIPART_DATA_TYPE_CHUNKDATA, "CHUNK DATA" },
+ { GVSP_MULTIPART_DATA_TYPE_JPEG, "JPEG" },
+ { GVSP_MULTIPART_DATA_TYPE_JPEG2000, "JPEG 2000" },
+ { GVSP_MULTIPART_DATA_TYPE_DEVICESPECIFIC, "DEVICE SPECIFIC" },
+ { 0, NULL },
+};
+
+static value_string_ext multipartdatatypenames_ext = VALUE_STRING_EXT_INIT(multipartdatatypenames);
+
static const value_string pixeltypenames[] = {
{ GVSP_PIX_MONO1P, "Monochrome 1-bit packed" },
{ GVSP_PIX_CONFIDENCE1P, "Confidence 1-bit packed" },
@@ -671,9 +733,9 @@ static const value_string colornames[] = {
{ 0, NULL },
};
-static const true_false_string directionnames = {
- "Receiver",
- "Transmitter"
+static const true_false_string zonedirectionnames = {
+ "Bottom Up",
+ "Top-Down"
};
@@ -730,11 +792,11 @@ static int hf_gvsp_sropinterleavingdepth = -1;
static int hf_gvsp_sropmaxdondiff = -1;
static int hf_gvsp_sropdeintbufreq = -1;
static int hf_gvsp_sropinitbuftime = -1;
+static int hf_gvsp_add_zones = -1;
static int hf_gvsp_zoneinfo = -1;
static int hf_gvsp_zoneid = -1;
static int hf_gvsp_endofzone = -1;
-static int hf_gvsp_addressoffsethigh = -1;
-static int hf_gvsp_addressoffsetlow = -1;
+static int hf_gvsp_addressoffset = -1;
static int hf_gvsp_sc_zone_direction = -1;
static int hf_gvsp_sc_zone0_direction = -1;
static int hf_gvsp_sc_zone1_direction = -1;
@@ -768,6 +830,17 @@ static int hf_gvsp_sc_zone28_direction = -1;
static int hf_gvsp_sc_zone29_direction = -1;
static int hf_gvsp_sc_zone30_direction = -1;
static int hf_gvsp_sc_zone31_direction = -1;
+static int hf_gvsp_numparts = -1;
+static int hf_gvsp_multipartdatatype = -1;
+static int hf_gvsp_partlength = -1;
+static int hf_gvsp_multi_part_source_id = -1;
+static int hf_gvsp_data_purpose_id = -1;
+static int hf_gvsp_region_id = -1;
+static int hf_gvsp_endofpart = -1;
+static int hf_gvsp_add_zones_multipart = -1;
+static int hf_gvsp_zoneinfo_multipart = -1;
+static int hf_gvsp_multi_part_part_id = -1;
+static int hf_gvsp_data_type_specific = -1;
static int hf_gvsp_chunkdatapayloadlengthex = -1;
static int hf_gvsp_chunklayoutidex = -1;
@@ -835,6 +908,13 @@ static const int *zoneinfo_fields[] = {
NULL
};
+static const int *zoneinfo_multipart_fields[] = {
+ &hf_gvsp_endofpart,
+ &hf_gvsp_zoneid,
+ &hf_gvsp_endofzone,
+ NULL
+};
+
static const int *flags_fields[] = {
&hf_gvsp_flagdevicespecific0,
&hf_gvsp_flagdevicespecific1,
@@ -851,6 +931,31 @@ static const int *flags_fields[] = {
};
/*
+ \brief Dissects the image AOI
+ */
+
+static void dissect_image_aoi(proto_tree *gvsp_tree, tvbuff_t *tvb, gint offset)
+{
+ /* Size X */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_sizex, tvb, offset, 4, ENC_BIG_ENDIAN);
+
+ /* Size Y */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_sizey, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
+
+ /* Offset X */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_offsetx, tvb, offset + 8, 4, ENC_BIG_ENDIAN);
+
+ /* Offset Y */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_offsety, tvb, offset + 12, 4, ENC_BIG_ENDIAN);
+
+ /* Padding X */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_paddingx, tvb, offset + 16, 2, ENC_BIG_ENDIAN);
+
+ /* Padding Y */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_paddingy, tvb, offset + 18, 2, ENC_BIG_ENDIAN);
+}
+
+/*
\brief Dissects the image leader
*/
@@ -870,23 +975,8 @@ static gint dissect_image_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_in
proto_tree_add_bitmask(gvsp_tree, tvb, offset + 12, hf_gvsp_pixelformat, ett_gvsp_pixelformat,
pixelformat_fields, ENC_BIG_ENDIAN);
- /* Size X */
- proto_tree_add_item(gvsp_tree, hf_gvsp_sizex, tvb, offset + 16, 4, ENC_BIG_ENDIAN);
-
- /* Size Y */
- proto_tree_add_item(gvsp_tree, hf_gvsp_sizey, tvb, offset + 20, 4, ENC_BIG_ENDIAN);
-
- /* Offset X */
- proto_tree_add_item(gvsp_tree, hf_gvsp_offsetx, tvb, offset + 24, 4, ENC_BIG_ENDIAN);
-
- /* Offset Y */
- proto_tree_add_item(gvsp_tree, hf_gvsp_offsety, tvb, offset + 28, 4, ENC_BIG_ENDIAN);
-
- /* Padding X */
- proto_tree_add_item(gvsp_tree, hf_gvsp_paddingx, tvb, offset + 32, 2, ENC_BIG_ENDIAN);
-
- /* Padding Y */
- proto_tree_add_item(gvsp_tree, hf_gvsp_paddingy, tvb, offset + 34, 2, ENC_BIG_ENDIAN);
+ /* AOI */
+ dissect_image_aoi(gvsp_tree, tvb, offset + 16);
/* Return dissected byte count (for all-in dissection) */
return 36;
@@ -905,12 +995,67 @@ static gint dissect_image_trailer(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_i
/* Size Y */
proto_tree_add_item(gvsp_tree, hf_gvsp_sizey, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
- /* Return dissected byte count (for all-in dissection) */
+ /* Return dissected byte count (for all-in and extended chunk mode dissection) */
return 8;
}
/*
+ \brief Dissects the multi-part trailer
+ */
+
+static gint dissect_multi_part_trailer(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint offset)
+{
+ gint part_count = tvb_reported_length_remaining(tvb, offset + 4) / GVSP_SIZE_OF_PART_INFO_TRAILER;
+ gint i = 0;
+ gint j = 0;
+
+ /* Payload type */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
+
+ for (i = 0; i < part_count; i++)
+ {
+ guint16 multi_part_data_type = tvb_get_ntohs(tvb, offset + 4 + i * GVSP_SIZE_OF_PART_INFO_TRAILER);
+
+ /* Add a tree per part */
+ proto_tree* gvsp_part_tree = proto_tree_add_subtree(gvsp_tree, tvb, offset + 4 + i * GVSP_SIZE_OF_PART_INFO_TRAILER, GVSP_SIZE_OF_PART_INFO_TRAILER, ett_gvsp_partinfo_trailer, NULL, "Part Specific Data");
+
+ /* Multi-Part data type */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_multipartdatatype, tvb, offset + 4 + i * GVSP_SIZE_OF_PART_INFO_TRAILER, 2, ENC_BIG_ENDIAN);
+
+ /* Part Length */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_partlength, tvb, offset + 6 + i * GVSP_SIZE_OF_PART_INFO_TRAILER, 6, ENC_BIG_ENDIAN);
+
+ switch( multi_part_data_type )
+ {
+ case GVSP_MULTIPART_DATA_TYPE_2DIMAGE:
+ case GVSP_MULTIPART_DATA_TYPE_2DPLANEBIPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_2DPLANETRIPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_2DPLANEQUADPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_3DIMAGE:
+ case GVSP_MULTIPART_DATA_TYPE_3DPLANEBIPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_3DPLANETRIPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_3DPLANEQUADPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_CONFIDENCEMAP:
+ /* Size Y */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_sizey, tvb, offset + 12 + i * GVSP_SIZE_OF_PART_INFO_TRAILER, 4, ENC_BIG_ENDIAN);
+ break;
+ default:
+ /* 2 DWORDS of data type specific data */
+ for (j = 0; j < 2; j++)
+ {
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_data_type_specific, tvb, offset + 12 + i * GVSP_SIZE_OF_PART_INFO_TRAILER + 4 * j, 4, ENC_BIG_ENDIAN);
+ }
+ break;
+ }
+ }
+
+ /* Return dissected byte count (for all-in and extended chunk mode dissection) */
+ return 4 + part_count * GVSP_SIZE_OF_PART_INFO_TRAILER;
+}
+
+
+/*
\brief Dissects the raw data leader
*/
@@ -1015,23 +1160,8 @@ static gint dissect_extended_chunk_data_leader(proto_tree *gvsp_tree, tvbuff_t *
proto_tree_add_bitmask(gvsp_tree, tvb, offset + 12, hf_gvsp_pixelformat, ett_gvsp_pixelformat,
pixelformat_fields, ENC_BIG_ENDIAN);
- /* Size X */
- proto_tree_add_item(gvsp_tree, hf_gvsp_sizex, tvb, offset + 16, 4, ENC_BIG_ENDIAN);
-
- /* Size Y */
- proto_tree_add_item(gvsp_tree, hf_gvsp_sizey, tvb, offset + 20, 4, ENC_BIG_ENDIAN);
-
- /* Offset X */
- proto_tree_add_item(gvsp_tree, hf_gvsp_offsetx, tvb, offset + 24, 4, ENC_BIG_ENDIAN);
-
- /* Offset Y */
- proto_tree_add_item(gvsp_tree, hf_gvsp_offsety, tvb, offset + 28, 4, ENC_BIG_ENDIAN);
-
- /* Padding X */
- proto_tree_add_item(gvsp_tree, hf_gvsp_paddingx, tvb, offset + 32, 2, ENC_BIG_ENDIAN);
-
- /* Padding Y */
- proto_tree_add_item(gvsp_tree, hf_gvsp_paddingy, tvb, offset + 34, 2, ENC_BIG_ENDIAN);
+ /* AOI */
+ dissect_image_aoi(gvsp_tree, tvb, offset + 16);
/* Return dissected byte count (for all-in dissection) */
return 36;
@@ -1144,7 +1274,7 @@ static gint dissect_h264_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_inf
/*
- \brief Dissects the multizone image leader
+ \brief Dissects the multi-zone image leader
*/
static gint dissect_multizone_image_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint offset)
@@ -1166,26 +1296,121 @@ static gint dissect_multizone_image_leader(proto_tree *gvsp_tree, tvbuff_t *tvb,
proto_tree_add_bitmask(gvsp_tree, tvb, offset + 16, hf_gvsp_pixelformat, ett_gvsp_pixelformat,
pixelformat_fields, ENC_BIG_ENDIAN);
- /* Size X */
- proto_tree_add_item(gvsp_tree, hf_gvsp_sizex, tvb, offset + 20, 4, ENC_BIG_ENDIAN);
+ /* AOI */
+ dissect_image_aoi(gvsp_tree, tvb, offset + 20);
- /* Size Y */
- proto_tree_add_item(gvsp_tree, hf_gvsp_sizey, tvb, offset + 24, 4, ENC_BIG_ENDIAN);
+ /* Return dissected byte count (for all-in dissection) */
+ return 40;
+}
- /* Offset X */
- proto_tree_add_item(gvsp_tree, hf_gvsp_offsetx, tvb, offset + 28, 4, ENC_BIG_ENDIAN);
- /* Offset Y */
- proto_tree_add_item(gvsp_tree, hf_gvsp_offsety, tvb, offset + 32, 4, ENC_BIG_ENDIAN);
+/*
+ \brief Dissects the multi-part leader
+ */
- /* Padding X */
- proto_tree_add_item(gvsp_tree, hf_gvsp_paddingx, tvb, offset + 36, 2, ENC_BIG_ENDIAN);
+static gint dissect_multi_part_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint offset)
+{
+ /* Get the number of parts from the header. As we are already looking at the beginning of the sixth DWORD here we must step back */
+ gint part_count_from_leader = tvb_get_guint8(tvb, offset - 13);
+ gint part_count_from_remaining_bytes = tvb_reported_length_remaining(tvb, offset + 12) / GVSP_SIZE_OF_PART_INFO_LEADER;
+ /* In case the leader contains incorrect data rely on the number of reported bytes instead */
+ gint part_count = part_count_from_leader <= part_count_from_remaining_bytes ? part_count_from_leader : part_count_from_remaining_bytes;
+ gint i = 0;
+ gint j = 0;
- /* Padding Y */
- proto_tree_add_item(gvsp_tree, hf_gvsp_paddingy, tvb, offset + 38, 2, ENC_BIG_ENDIAN);
+ /* Payload type */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_payloadtype, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
+
+ /* Timestamp */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_timestamp, tvb, offset + 4, 8, ENC_BIG_ENDIAN);
+
+ for (i = 0; i < part_count; i++)
+ {
+ guint16 multi_part_data_type = tvb_get_ntohs(tvb, offset + 12 + i * GVSP_SIZE_OF_PART_INFO_LEADER);
+ /* Add a tree per part */
+ proto_tree* gvsp_part_tree = proto_tree_add_subtree(gvsp_tree, tvb, offset + 12 + i * GVSP_SIZE_OF_PART_INFO_LEADER, GVSP_SIZE_OF_PART_INFO_LEADER,
+ ett_gvsp_partinfo_leader, NULL, "Part Specific Data");
+
+ /* Multi-Part data type */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_multipartdatatype, tvb, offset + 12 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 2, ENC_BIG_ENDIAN);
+
+ /* Part Length */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_partlength, tvb, offset + 14 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 6, ENC_BIG_ENDIAN);
+
+ switch( multi_part_data_type )
+ {
+ case GVSP_MULTIPART_DATA_TYPE_2DIMAGE:
+ case GVSP_MULTIPART_DATA_TYPE_2DPLANEBIPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_2DPLANETRIPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_2DPLANEQUADPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_3DIMAGE:
+ case GVSP_MULTIPART_DATA_TYPE_3DPLANEBIPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_3DPLANETRIPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_3DPLANEQUADPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_CONFIDENCEMAP:
+ /* Pixel format */
+ proto_tree_add_bitmask(gvsp_part_tree, tvb, offset + 20 + i * GVSP_SIZE_OF_PART_INFO_LEADER, hf_gvsp_pixelformat, ett_gvsp_pixelformat, pixelformat_fields, ENC_BIG_ENDIAN);
+ break;
+ case GVSP_MULTIPART_DATA_TYPE_JPEG:
+ case GVSP_MULTIPART_DATA_TYPE_JPEG2000:
+ default:
+ /* Data Format */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_dataformat, tvb, offset + 20 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 4, ENC_BIG_ENDIAN);
+ break;
+ }
+
+ /* Source ID */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_multi_part_source_id, tvb, offset + 26 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 1, ENC_BIG_ENDIAN);
+
+ /* Additional Zones */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_add_zones_multipart, tvb, offset + 27 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 1, ENC_BIG_ENDIAN);
+
+ /* Zone direction */
+ proto_tree_add_bitmask(gvsp_part_tree, tvb, offset + 28 + i * GVSP_SIZE_OF_PART_INFO_LEADER, hf_gvsp_sc_zone_direction,
+ ett_gvsp_sc_zone_direction, sc_zone_direction_fields, ENC_BIG_ENDIAN);
+
+ /* Data Purpose */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_data_purpose_id, tvb, offset + 32 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 2, ENC_BIG_ENDIAN);
+
+ /* Region ID */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_region_id, tvb, offset + 34 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 2, ENC_BIG_ENDIAN);
+
+ switch( multi_part_data_type )
+ {
+ case GVSP_MULTIPART_DATA_TYPE_2DIMAGE:
+ case GVSP_MULTIPART_DATA_TYPE_2DPLANEBIPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_2DPLANETRIPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_2DPLANEQUADPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_3DIMAGE:
+ case GVSP_MULTIPART_DATA_TYPE_3DPLANEBIPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_3DPLANETRIPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_3DPLANEQUADPLANAR:
+ case GVSP_MULTIPART_DATA_TYPE_CONFIDENCEMAP:
+ dissect_image_aoi(gvsp_part_tree, tvb, offset + 36 + i * GVSP_SIZE_OF_PART_INFO_LEADER);
+ break;
+ case GVSP_MULTIPART_DATA_TYPE_JPEG:
+ case GVSP_MULTIPART_DATA_TYPE_JPEG2000:
+ /* Generic flags */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_genericflags, tvb, offset + 36 + i * GVSP_SIZE_OF_PART_INFO_LEADER, 1, ENC_BIG_ENDIAN);
+
+ /* Timestamp tick frequency */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_timestamptickfrequency, tvb, offset + 36 + i * GVSP_SIZE_OF_PART_INFO_LEADER + 4, 8, ENC_BIG_ENDIAN);
+
+ /* Data format */
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_dataformat, tvb, offset + 36 + i * GVSP_SIZE_OF_PART_INFO_LEADER + 12, 4, ENC_BIG_ENDIAN);
+ break;
+ default:
+ /* 6 DWORDS of data type specific data */
+ for (j = 0; j < 6; j++)
+ {
+ proto_tree_add_item(gvsp_part_tree, hf_gvsp_data_type_specific, tvb, offset + 36 + i * GVSP_SIZE_OF_PART_INFO_LEADER + 4 * j, 4, ENC_BIG_ENDIAN);
+ }
+ break;
+ }
+ }
/* Return dissected byte count (for all-in dissection) */
- return 40;
+ return 12 + part_count * GVSP_SIZE_OF_PART_INFO_LEADER;
}
@@ -1212,7 +1437,7 @@ static gint dissect_extra_chunk_info(proto_tree *gvsp_tree, tvbuff_t *tvb, packe
/* Chunk data payload length */
proto_tree_add_item(gvsp_tree, hf_gvsp_chunkdatapayloadlengthex, tvb, offset, 4, ENC_BIG_ENDIAN);
- /* Chunk layoud id */
+ /* Chunk layout id */
proto_tree_add_item(gvsp_tree, hf_gvsp_chunklayoutidex, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
/* Return dissected byte count (for all-in dissection) */
@@ -1258,7 +1483,7 @@ static void dissect_packet_payload_h264(proto_tree *gvsp_tree, tvbuff_t *tvb, pa
/*
- \brief Dissects a packet payload for multizone
+ \brief Dissects a packet payload for multi-zone
*/
static void dissect_packet_payload_multizone(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint offset, gvsp_packet_info *info)
@@ -1269,11 +1494,8 @@ static void dissect_packet_payload_multizone(proto_tree *gvsp_tree, tvbuff_t *tv
proto_tree_add_bitmask(gvsp_tree, tvb, offset + 1, hf_gvsp_zoneinfo,
ett_gvsp_zoneinfo, zoneinfo_fields, ENC_BIG_ENDIAN);
- /* Address offset high */
- proto_tree_add_item(gvsp_tree, hf_gvsp_addressoffsethigh, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
-
- /* Address offset low */
- proto_tree_add_item(gvsp_tree, hf_gvsp_addressoffsetlow, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
+ /* Address offset */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_addressoffset, tvb, offset + 2, 6, ENC_BIG_ENDIAN);
/* Data */
proto_tree_add_item(gvsp_tree, hf_gvsp_payloaddata, tvb, offset + 8, -1, ENC_NA);
@@ -1282,6 +1504,29 @@ static void dissect_packet_payload_multizone(proto_tree *gvsp_tree, tvbuff_t *tv
/*
+ \brief Dissects a packet payload for multi-part
+ */
+
+static void dissect_packet_payload_multipart(proto_tree *gvsp_tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint offset, gvsp_packet_info *info)
+{
+ if (status_with_payload(info) && tvb_reported_length_remaining(tvb, offset))
+ {
+ /* Part ID */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_multi_part_part_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+
+ /* Zone information */
+ proto_tree_add_bitmask(gvsp_tree, tvb, offset + 1, hf_gvsp_zoneinfo_multipart,
+ ett_gvsp_zoneinfo_multipart, zoneinfo_multipart_fields, ENC_BIG_ENDIAN);
+
+ /* Address offset high */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_addressoffset, tvb, offset + 2, 6, ENC_BIG_ENDIAN);
+
+ /* Data */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_payloaddata, tvb, offset + 8, -1, ENC_NA);
+ }
+}
+
+/*
\brief Dissects an all in packet
*/
@@ -1374,6 +1619,11 @@ static void dissect_packet_all_in(proto_tree *gvsp_tree, tvbuff_t *tvb, gint off
}
dissect_packet_payload_multizone(gvsp_tree, tvb, pinfo, offset, info);
break;
+
+ /* case GVSP_PAYLOAD_MULTIPART: */
+ /* By definition, Multi-part cannot support All-in Packet since it requires at least one data packet per part. */
+ /* Therefore, it is not possible to use All-in Transmission mode for Multi-part payload type. */
+
}
}
@@ -1419,6 +1669,10 @@ static void dissect_packet_leader(proto_tree *gvsp_tree, tvbuff_t *tvb, gint off
dissect_multizone_image_leader(gvsp_tree, tvb, pinfo, offset);
break;
+ case GVSP_PAYLOAD_MULTIPART:
+ dissect_multi_part_leader(gvsp_tree, tvb, pinfo, offset);
+ break;
+
default:
break;
}
@@ -1454,6 +1708,10 @@ static void dissect_packet_trailer(proto_tree *gvsp_tree, tvbuff_t *tvb, gint of
offset += dissect_generic_trailer(gvsp_tree, tvb, pinfo, offset);
break;
+ case GVSP_PAYLOAD_MULTIPART:
+ offset += dissect_multi_part_trailer(gvsp_tree, tvb, pinfo, offset);
+ break;
+
default:
break;
}
@@ -1476,7 +1734,7 @@ static int dissect_gvsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
proto_tree *gvsp_tree = NULL;
gvsp_packet_info info;
- if ((tvb_reported_length(tvb) < GVSP_MIN_PACKET_SIZE) ||
+ if ((tvb_reported_length(tvb) < GVSP_MIN_PACKET_SIZE) ||
(tvb_captured_length(tvb) < 5))
{
return 0;
@@ -1486,7 +1744,7 @@ static int dissect_gvsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
info.format = tvb_get_guint8(tvb, 4);
- if ((info.format & 0x80) && tvb_reported_length(tvb) < GVSP_V2_MIN_PACKET_SIZE)
+ if ((info.format & GVSP_EXTENDED_ID_BIT) && tvb_reported_length(tvb) < GVSP_V2_MIN_PACKET_SIZE)
{
return 0;
}
@@ -1503,7 +1761,7 @@ static int dissect_gvsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
gvsp_tree = proto_item_add_subtree(ti, ett_gvsp);
/* Look for extended ID flag and then clear it */
- info.enhanced = info.format & 0x80;
+ info.enhanced = info.format & GVSP_EXTENDED_ID_BIT;
info.format &= 0x7F;
/* Add packet format to info string */
@@ -1536,14 +1794,31 @@ static int dissect_gvsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
proto_tree_add_item(gvsp_tree, hf_gvsp_format, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
+ info.packetid = tvb_get_ntohl(tvb, offset - 1);
+ info.packetid &= 0x00FFFFFF;
if (info.enhanced == 0)
{
- info.packetid = tvb_get_ntohl(tvb, offset - 1);
- info.packetid &= 0x00FFFFFF;
proto_tree_add_item(gvsp_tree, hf_gvsp_packetid24, tvb, offset, 3, ENC_BIG_ENDIAN);
+ offset += 3;
+ }
+ else
+ {
+ offset += 2;
+ if (info.format == GVSP_PACKET_LEADER)
+ {
+ if (tvb_get_guint8(tvb, 23) == GVSP_PAYLOAD_MULTIZONEIMAGE)
+ {
+ /* packet id contains the number of additional zones for multi-zone */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_add_zones, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ else if (tvb_get_guint8(tvb, 23) == GVSP_PAYLOAD_MULTIPART)
+ {
+ /* packet id contains the number of parts for multi-part */
+ proto_tree_add_item(gvsp_tree, hf_gvsp_numparts, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ }
+ offset += 1;
}
-
- offset += 3;
if (info.enhanced != 0)
{
@@ -1596,6 +1871,10 @@ static int dissect_gvsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
dissect_packet_payload_multizone(gvsp_tree, tvb, pinfo, offset, &info);
return tvb_captured_length(tvb);
+ case GVSP_PACKET_PAYLOAD_MULTIPART:
+ dissect_packet_payload_multipart(gvsp_tree, tvb, pinfo, offset, &info);
+ return tvb_captured_length(tvb);
+
default:
break;
}
@@ -1647,7 +1926,7 @@ static gboolean dissect_gvsp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Larger packet size if Extended ID flag is set */
format = tvb_get_guint8(tvb, 4);
- if ((format & 0x80) && tvb_reported_length(tvb) < GVSP_V2_MIN_PACKET_SIZE)
+ if ((format & GVSP_EXTENDED_ID_BIT) && tvb_reported_length(tvb) < GVSP_V2_MIN_PACKET_SIZE)
{
return FALSE;
}
@@ -1655,15 +1934,15 @@ static gboolean dissect_gvsp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Check for valid status codes */
status_code = tvb_get_ntohs(tvb, 0);
- if (status_code == 0x0000 ||
- status_code == 0x0100 ||
- (status_code >= 0x8001 && status_code <= 0x8016) ||
- status_code == 0x8FFF)
+ if (status_code == GEV_STATUS_SUCCESS ||
+ status_code == GEV_STATUS_PACKET_RESEND ||
+ (status_code >= GEV_STATUS_NOT_IMPLEMENTED && status_code <= GEV_STATUS_LAST) ||
+ status_code == GEV_STATUS_ERROR)
{
format &= 0x7F;
/* Check for valid format types */
- if (format >= 1 && format <= 6)
+ if (format >= GVSP_PACKET_LEADER && format <= GVSP_PACKET_PAYLOAD_LAST)
{
if(format == GVSP_PACKET_LEADER && tvb_captured_length_remaining(tvb, 8) >= 2)
{
@@ -1762,7 +2041,7 @@ void proto_register_gvsp(void)
}},
{& hf_gvsp_flagresendrangeerror,
- { "Flag Resend Range Error 7", "gvsp.flag.resendrangeerror",
+ { "Flag Resend Range Error", "gvsp.flag.resendrangeerror",
FT_UINT16, BASE_HEX, NULL, 0x0004,
NULL, HFILL
}},
@@ -1925,7 +2204,7 @@ void proto_register_gvsp(void)
{& hf_gvsp_timestamptickfrequency ,
{ "Timestamp Tick Frequency", "gvsp.timestamptickfrequency",
- FT_UINT64, BASE_HEX, NULL, 0x0,
+ FT_UINT64, BASE_HEX_DEC, NULL, 0x0,
NULL, HFILL
}},
@@ -2013,8 +2292,14 @@ void proto_register_gvsp(void)
NULL, HFILL
}},
+ {& hf_gvsp_add_zones,
+ { "Additional Zones (Multi-Zone)", "gvsp.addzones",
+ FT_UINT8, BASE_HEX, NULL, 0x1F,
+ NULL, HFILL
+ }},
+
{& hf_gvsp_zoneinfo,
- { "Zone Info", "gvsp.zoneinfo",
+ { "Zone Info (Multi-Zone)", "gvsp.multizoneinfo",
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL
}},
@@ -2027,217 +2312,277 @@ void proto_register_gvsp(void)
{& hf_gvsp_endofzone,
{ "End of Zone", "gvsp.endofzone",
- FT_UINT8, BASE_HEX, NULL, 0x01,
- NULL, HFILL
- }},
-
- {& hf_gvsp_addressoffsethigh,
- { "Address Offset High", "gvsp.addressoffsethigh",
- FT_UINT16, BASE_HEX, NULL, 0,
+ FT_BOOLEAN, 8, NULL, 0x01,
NULL, HFILL
}},
- {& hf_gvsp_addressoffsetlow,
- { "Address Offset Low", "gvsp.addressoffsetlow",
- FT_UINT32, BASE_HEX, NULL, 0,
+ {& hf_gvsp_addressoffset,
+ { "Address Offset", "gvsp.addressoffset",
+ FT_UINT64, BASE_HEX_DEC, NULL, 0,
NULL, HFILL
}},
{& hf_gvsp_sc_zone_direction,
{ "Zone Directions Mask", "gvsp.zonedirection",
- FT_UINT32, BASE_HEX, NULL, 0,
+ FT_UINT32, BASE_HEX_DEC, NULL, 0,
NULL, HFILL
}},
{& hf_gvsp_sc_zone0_direction,
{ "Zone 0 Direction", "gvsp.zone0direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x80000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x80000000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone1_direction,
{ "Zone 1 Direction", "gvsp.zone1direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x40000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x40000000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone2_direction,
{ "Zone 2 Direction", "gvsp.zone2direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x20000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x20000000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone3_direction,
{ "Zone 3 Direction", "gvsp.zone3direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x10000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x10000000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone4_direction,
{ "Zone 4 Direction", "gvsp.zone4direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x08000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x08000000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone5_direction,
{ "Zone 5 Direction", "gvsp.zone5direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x04000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x04000000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone6_direction,
{ "Zone 6 Direction", "gvsp.zone6direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x02000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x02000000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone7_direction,
{ "Zone 7 Direction", "gvsp.zone7direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x01000000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x01000000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone8_direction,
{ "Zone 8 Direction", "gvsp.zone8direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00800000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00800000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone9_direction,
{ "Zone 9 Direction", "gvsp.zone9direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00400000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00400000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone10_direction,
{ "Zone 10 Direction", "gvsp.zone10direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00200000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00200000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone11_direction,
{ "Zone 11 Direction", "gvsp.zone1direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00100000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00100000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone12_direction,
{ "Zone 12 Direction", "gvsp.zone12direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00080000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00080000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone13_direction,
{ "Zone 13 Direction", "gvsp.zone13direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00040000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00040000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone14_direction,
{ "Zone 14 Direction", "gvsp.zone14direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00020000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00020000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone15_direction,
{ "Zone 15 Direction", "gvsp.zone15direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00010000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00010000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone16_direction,
{ "Zone 16 Direction", "gvsp.zone16direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00008000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00008000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone17_direction,
{ "Zone 17 Direction", "gvsp.zone17direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00004000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00004000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone18_direction,
{ "Zone 18 Direction", "gvsp.zone18direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00002000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00002000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone19_direction,
{ "Zone 19 Direction", "gvsp.zone19direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00001000,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00001000,
NULL, HFILL
}},
{& hf_gvsp_sc_zone20_direction,
{ "Zone 20 Direction", "gvsp.zone20direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000800,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000800,
NULL, HFILL
}},
{& hf_gvsp_sc_zone21_direction,
{ "Zone 21 Direction", "gvsp.zone21direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000400,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000400,
NULL, HFILL
}},
{& hf_gvsp_sc_zone22_direction,
{ "Zone 22 Direction", "gvsp.zone22direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000200,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000200,
NULL, HFILL
}},
{& hf_gvsp_sc_zone23_direction,
{ "Zone 23 Direction", "gvsp.zone23direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000100,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000100,
NULL, HFILL
}},
{& hf_gvsp_sc_zone24_direction,
{ "Zone 24 Direction", "gvsp.zone24direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000080,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000080,
NULL, HFILL
}},
{& hf_gvsp_sc_zone25_direction,
{ "Zone 25 Direction", "gvsp.zone25direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000040,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000040,
NULL, HFILL
}},
{& hf_gvsp_sc_zone26_direction,
{ "Zone 26 Direction", "gvsp.zone26direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000020,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000020,
NULL, HFILL
}},
{& hf_gvsp_sc_zone27_direction,
{ "Zone 27 Direction", "gvsp.zone27direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000010,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000010,
NULL, HFILL
}},
{& hf_gvsp_sc_zone28_direction,
{ "Zone 28 Direction", "gvsp.zone28direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000008,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000008,
NULL, HFILL
}},
{& hf_gvsp_sc_zone29_direction,
{ "Zone 29 Direction", "gvsp.zone29direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000004,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000004,
NULL, HFILL
}},
{& hf_gvsp_sc_zone30_direction,
{ "Zone 30 Direction", "gvsp.zone30direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000002,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000002,
NULL, HFILL
}},
{& hf_gvsp_sc_zone31_direction,
{ "Zone 31 Direction", "gvsp.zone31direction",
- FT_BOOLEAN, 32, TFS(&directionnames), 0x00000001,
+ FT_BOOLEAN, 32, TFS(&zonedirectionnames), 0x00000001,
+ NULL, HFILL
+ }},
+
+ {& hf_gvsp_numparts,
+ { "Multi-part number of parts", "gvsp.numparts",
+ FT_UINT8, BASE_DEC, NULL, 0,
+ NULL, HFILL
+ }},
+
+ {& hf_gvsp_multipartdatatype,
+ { "Data Type", "gvsp.multipartdatatype",
+ FT_UINT16, BASE_HEX|BASE_EXT_STRING, &multipartdatatypenames_ext, 0,
+ NULL, HFILL
+ }},
+
+ {& hf_gvsp_partlength,
+ { "Part Length", "gvsp.partlength",
+ FT_UINT64, BASE_HEX_DEC, NULL, 0,
+ NULL, HFILL
+ }},
+
+ {& hf_gvsp_multi_part_source_id,
+ { "Source ID", "gvsp.sourceid",
+ FT_UINT8, BASE_HEX_DEC, NULL, 0,
+ NULL, HFILL
+ }},
+
+ {& hf_gvsp_data_purpose_id,
+ { "Data Purpose ID", "gvsp.datapurposeid",
+ FT_UINT16, BASE_HEX_DEC, NULL, 0,
+ NULL, HFILL
+ }},
+
+ {& hf_gvsp_region_id,
+ { "Region ID", "gvsp.regionid",
+ FT_UINT16, BASE_HEX_DEC, NULL, 0,
+ NULL, HFILL
+ }},
+
+ {& hf_gvsp_data_type_specific,
+ { "Data Type Specific", "gvsp.datatypespecific",
+ FT_UINT32, BASE_HEX_DEC, NULL, 0,
+ NULL, HFILL
+ }},
+
+ {& hf_gvsp_endofpart,
+ { "End of Part", "gvsp.endofpart",
+ FT_BOOLEAN, 8, NULL, 0x40,
+ NULL, HFILL
+ }},
+
+ {& hf_gvsp_add_zones_multipart,
+ { "Additional Zones (Multi-Part)", "gvsp.multipartaddzones",
+ FT_UINT8, BASE_HEX, NULL, 0x1F,
+ NULL, HFILL
+ }},
+
+ {& hf_gvsp_zoneinfo_multipart,
+ { "Zone Info (Multi-Part)", "gvsp.multipartzoneinfo",
+ FT_UINT8, BASE_HEX, NULL, 0,
+ NULL, HFILL
+ }},
+
+ {& hf_gvsp_multi_part_part_id,
+ { "Part ID", "gvsp.partid",
+ FT_UINT8, BASE_HEX_DEC, NULL, 0,
NULL, HFILL
}},
@@ -2264,7 +2609,10 @@ void proto_register_gvsp(void)
&ett_gvsp_fieldinfo,
&ett_gvsp_cs,
&ett_gvsp_sc_zone_direction,
- &ett_gvsp_zoneinfo
+ &ett_gvsp_zoneinfo,
+ &ett_gvsp_zoneinfo_multipart,
+ &ett_gvsp_partinfo_leader,
+ &ett_gvsp_partinfo_trailer
};
proto_gvsp = proto_register_protocol("GigE Vision Streaming Protocol", "GVSP", "gvsp");