Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
packet-cipsafety.h
1 /* packet-cipsafety.h
2  * Routines for CIP (Common Industrial Protocol) Safety dissection
3  * CIP Safety Home: www.odva.org
4  *
5  * Copyright 2011
6  * Michael Mann <mmann@pyramidsolutions.com>
7  *
8  * Wireshark - Network traffic analyzer
9  * By Gerald Combs <gerald@wireshark.org>
10  * Copyright 1998 Gerald Combs
11  *
12  * SPDX-License-Identifier: GPL-2.0-or-later
13  */
14 #ifndef PACKET_CIPSAFETY_H
15 #define PACKET_CIPSAFETY_H
16 
17 #include "packet-enip.h"
18 
19 /* Classes that have class-specfic dissectors */
20 #define CI_CLS_SAFETY_SUPERVISOR 0x39 /* Safety Supervisor */
21 #define CI_CLS_SAFETY_VALIDATOR 0x3A /* Safety Validator */
22 
23 /* Class specific services */
24 /* Safety Supervisor */
25 #define SC_SSUPER_RECOVER 0x4C
26 #define SC_SSUPER_PERFORM_DIAGNOSTICS 0x4E
27 #define SC_SSUPER_CONFIGURE_REQUEST 0x4F
28 #define SC_SSUPER_VALIDATE_CONFIGURATION 0x50
29 #define SC_SSUPER_SET_PASSWORD 0x51
30 #define SC_SSUPER_CONFIGURATION_LOCK 0x52
31 #define SC_SSUPER_MODE_CHANGE 0x53
32 #define SC_SSUPER_SAFETY_RESET 0x54
33 #define SC_SSUPER_RESET_PASSWORD 0x55
34 #define SC_SSUPER_PROPOSE_TUNID 0x56
35 #define SC_SSUPER_APPLY_TUNID 0x57
36 
37 typedef struct cip_safety_info {
38  enum enip_connid_type conn_type;
39  enip_conn_val_t* eip_conn_info;
40  gboolean compute_crc;
42 
43 
44 /*
45 ** Exported functions
46 */
47 extern void dissect_unid(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_item *pi, const char* ssn_name, int hf_ssn_timestamp,
48  int hf_ssn_date, int hf_ssn_time, int hf_macid, gint ett, gint ett_ssn);
49 extern void dissect_cipsafety_ssn(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int hf_real_datetime, int hf_date, int hf_time);
50 
51 /*
52 ** Exported variables
53 */
54 extern const value_string cipsafety_ssn_date_vals[8];
55 extern attribute_info_t cip_safety_attribute_vals[51];
56 
57 #endif /* PACKET_CIPSAFETY_H */
Definition: packet_info.h:44
Definition: packet-cip.h:444
Definition: tvbuff-int.h:35
Definition: packet-enip.h:94
Definition: packet-cipsafety.h:37
Definition: value_string.h:24
Definition: proto.h:759