Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
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 <[email protected]>
7 *
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <[email protected]>
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-specific 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#define SC_SSUPER_PROPOSE_TUNID_LIST 0x58
37#define SC_SSUPER_APPLY_TUNID_LIST 0x59
38
39typedef struct cip_safety_info {
40 enum enip_connid_type conn_type;
41 cip_conn_info_t* eip_conn_info;
42 bool compute_crc;
44
45
46/*
47** Exported functions
48*/
49extern void dissect_unid(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_item *pi, const char* snn_name, int hf_snn_timestamp,
50 int hf_snn_date, int hf_snn_time, int hf_macid, int ett, int ett_snn);
51extern void dissect_cipsafety_snn(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int hf_real_datetime, int hf_date, int hf_time);
52extern void cip_safety_128us_fmt(char *s, uint32_t value);
53extern void add_safety_data_type_to_info_column(packet_info *pinfo, enum enip_connid_type conn_type, const cip_safety_epath_info_t* safety);
54
55/*
56** Exported variables
57*/
58extern const value_string cipsafety_snn_date_vals[8];
59extern const attribute_info_t cip_safety_attribute_vals[51];
60extern const range_string safety_max_consumer_numbers[];
61
62#endif /* PACKET_CIPSAFETY_H */
Definition packet_info.h:43
Definition proto.h:901
Definition value_string.h:292
Definition value_string.h:25
Definition packet-cip.h:472
Definition packet-cip.h:547
Definition packet-cip.h:526
Definition packet-cipsafety.h:39
Definition tvbuff-int.h:35