aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cip.h
diff options
context:
space:
mode:
authorDylan Ulis <daulis0@gmail.com>2018-05-31 07:24:26 -0400
committerAnders Broman <a.broman58@gmail.com>2018-06-01 05:53:13 +0000
commitc9ba7c95dfe16c55affc47741cea533866b2dc70 (patch)
treec0a0e07c20186d1ee2367cc0b256c9093aa5ae37 /epan/dissectors/packet-cip.h
parenta7c244e4f1faa6f7c3d1d438840983725bdd1fb6 (diff)
CIP: Use a struct for connection triad
1. Connection Serial Number, Vendor ID, and Device Serial Number are always used as a group. Group these as a struct to make them easier to manage. 2. Pull out common code into dissect_connection_triad() No functional changes. Change-Id: Ide126f8d0ea6ab8e2de5abf20e12643d5a35924d Reviewed-on: https://code.wireshark.org/review/27926 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-cip.h')
-rw-r--r--epan/dissectors/packet-cip.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/dissectors/packet-cip.h b/epan/dissectors/packet-cip.h
index b22b70cf4b..9009a3fb54 100644
--- a/epan/dissectors/packet-cip.h
+++ b/epan/dissectors/packet-cip.h
@@ -461,20 +461,22 @@ typedef struct cip_connID_info {
enum cip_safety_format_type {CIP_SAFETY_BASE_FORMAT, CIP_SAFETY_EXTENDED_FORMAT};
+typedef struct cip_connection_triad {
+ guint16 ConnSerialNumber;
+ guint16 VendorID;
+ guint32 DeviceSerialNumber;
+} cip_connection_triad_t;
+
typedef struct cip_safety_epath_info {
gboolean safety_seg;
enum cip_safety_format_type format;
guint16 running_rollover_value; /* Keep track of the rollover value over the course of the connection */
guint16 running_timestamp_value; /* Keep track of the timestamp value over the course of the connection */
- guint16 target_conn_sn;
- guint16 target_vendorID;
- guint32 target_device_sn;
+ cip_connection_triad_t target_triad;
} cip_safety_epath_info_t;
typedef struct cip_conn_info {
- guint16 ConnSerialNumber;
- guint16 VendorID;
- guint32 DeviceSerialNumber;
+ cip_connection_triad_t triad;
guint32 forward_open_frame;
cip_connID_info_t O2T;
cip_connID_info_t T2O;