2 * Routines for CIP (Common Industrial Protocol) dissection
3 * CIP Home: www.odva.org
6 * Magnus Hansson <mah@hms.se>
7 * Joakim Wiberg <jow@hms.se>
9 * Added support for Connection Configuration Object
10 * ryan wamsley * Copyright 2007
12 * Added support for PCCC Objects
13 * Jared Rittle - Cisco Talos
16 * Wireshark - Network traffic analyzer
17 * By Gerald Combs <gerald@wireshark.org>
18 * Copyright 1998 Gerald Combs
20 * SPDX-License-Identifier: GPL-2.0-or-later
26 /* CIP Service Codes */
27 #define SC_GET_ATT_ALL 0x01
28 #define SC_SET_ATT_ALL 0x02
29 #define SC_GET_ATT_LIST 0x03
30 #define SC_SET_ATT_LIST 0x04
34 #define SC_CREATE 0x08
35 #define SC_DELETE 0x09
36 #define SC_MULT_SERV_PACK 0x0A
37 #define SC_APPLY_ATTRIBUTES 0x0D
38 #define SC_GET_ATT_SINGLE 0x0E
39 #define SC_SET_ATT_SINGLE 0x10
40 #define SC_FIND_NEXT_OBJ_INST 0x11
41 #define SC_RESTOR 0x15
44 #define SC_GET_MEMBER 0x18
45 #define SC_SET_MEMBER 0x19
46 #define SC_INSERT_MEMBER 0x1A
47 #define SC_REMOVE_MEMBER 0x1B
48 #define SC_GROUP_SYNC 0x1C
50 #define CIP_SC_MASK 0x7F
51 #define CIP_SC_RESPONSE_MASK 0x80
53 /* Classes that have class-specific dissectors */
54 #define CI_CLS_MR 0x02 /* Message Router */
55 #define CI_CLS_CM 0x06 /* Connection Manager */
56 #define CI_CLS_PCCC 0x67 /* PCCC Class */
57 #define CI_CLS_MB 0x44 /* Modbus Object */
58 #define CI_CLS_CCO 0xF3 /* Connection Configuration Object */
60 /* Class specific services */
61 /* Connection Manager */
62 #define SC_CM_FWD_CLOSE 0x4E
63 #define SC_CM_UNCON_SEND 0x52
64 #define SC_CM_FWD_OPEN 0x54
65 #define SC_CM_LARGE_FWD_OPEN 0x5B
66 #define SC_CM_GET_CONN_OWNER 0x5A
69 #define SC_PCCC_EXECUTE_PCCC 0x4B
71 /* Modbus Object services */
72 #define SC_MB_READ_DISCRETE_INPUTS 0x4B
73 #define SC_MB_READ_COILS 0x4C
74 #define SC_MB_READ_INPUT_REGISTERS 0x4D
75 #define SC_MB_READ_HOLDING_REGISTERS 0x4E
76 #define SC_MB_WRITE_COILS 0x4F
77 #define SC_MB_WRITE_HOLDING_REGISTERS 0x50
78 #define SC_MB_PASSTHROUGH 0x51
80 /* Connection Configuration Object services */
81 #define SC_CCO_KICK_TIMER 0x4B
82 #define SC_CCO_OPEN_CONN 0x4C
83 #define SC_CCO_CLOSE_CONN 0x4D
84 #define SC_CCO_STOP_CONN 0x4E
85 #define SC_CCO_CHANGE_START 0x4F
86 #define SC_CCO_GET_STATUS 0x50
87 #define SC_CCO_CHANGE_COMPLETE 0x51
88 #define SC_CCO_AUDIT_CHANGE 0x52
90 /* CIP General status codes */
91 #define CI_GRC_SUCCESS 0x00
92 #define CI_GRC_FAILURE 0x01
93 #define CI_GRC_NO_RESOURCE 0x02
94 #define CI_GRC_BAD_DATA 0x03
95 #define CI_GRC_BAD_PATH 0x04
96 #define CI_GRC_BAD_CLASS_INSTANCE 0x05
97 #define CI_GRC_PARTIAL_DATA 0x06
98 #define CI_GRC_CONN_LOST 0x07
99 #define CI_GRC_BAD_SERVICE 0x08
100 #define CI_GRC_BAD_ATTR_DATA 0x09
101 #define CI_GRC_ATTR_LIST_ERROR 0x0A
102 #define CI_GRC_ALREADY_IN_MODE 0x0B
103 #define CI_GRC_BAD_OBJ_MODE 0x0C
104 #define CI_GRC_OBJ_ALREADY_EXISTS 0x0D
105 #define CI_GRC_ATTR_NOT_SETTABLE 0x0E
106 #define CI_GRC_PERMISSION_DENIED 0x0F
107 #define CI_GRC_DEV_IN_WRONG_STATE 0x10
108 #define CI_GRC_REPLY_DATA_TOO_LARGE 0x11
109 #define CI_GRC_FRAGMENT_PRIMITIVE 0x12
110 #define CI_GRC_CONFIG_TOO_SMALL 0x13
111 #define CI_GRC_UNDEFINED_ATTR 0x14
112 #define CI_GRC_CONFIG_TOO_BIG 0x15
113 #define CI_GRC_OBJ_DOES_NOT_EXIST 0x16
114 #define CI_GRC_NO_FRAGMENTATION 0x17
115 #define CI_GRC_DATA_NOT_SAVED 0x18
116 #define CI_GRC_DATA_WRITE_FAILURE 0x19
117 #define CI_GRC_REQUEST_TOO_LARGE 0x1A
118 #define CI_GRC_RESPONSE_TOO_LARGE 0x1B
119 #define CI_GRC_MISSING_LIST_DATA 0x1C
120 #define CI_GRC_INVALID_LIST_STATUS 0x1D
121 #define CI_GRC_SERVICE_ERROR 0x1E
122 #define CI_GRC_CONN_RELATED_FAILURE 0x1F
123 #define CI_GRC_INVALID_PARAMETER 0x20
124 #define CI_GRC_WRITE_ONCE_FAILURE 0x21
125 #define CI_GRC_INVALID_REPLY 0x22
126 #define CI_GRC_BUFFER_OVERFLOW 0x23
127 #define CI_GRC_MESSAGE_FORMAT 0x24
128 #define CI_GRC_BAD_KEY_IN_PATH 0x25
129 #define CI_GRC_BAD_PATH_SIZE 0x26
130 #define CI_GRC_UNEXPECTED_ATTR 0x27
131 #define CI_GRC_INVALID_MEMBER 0x28
132 #define CI_GRC_MEMBER_NOT_SETTABLE 0x29
133 #define CI_GRC_G2_SERVER_FAILURE 0x2A
134 #define CI_GRC_UNKNOWN_MB_ERROR 0x2B
135 #define CI_GRC_ATTRIBUTE_NOT_GET 0x2C
137 #define CI_GRC_STILL_PROCESSING 0xFF
140 /* PCCC Status Codes */
141 #define PCCC_GS_SUCCESS 0x00
142 #define PCCC_GS_ILLEGAL_CMD 0x10
143 #define PCCC_GS_HOST_COMMS 0x20
144 #define PCCC_GS_MISSING_REMOTE_NODE 0x30
145 #define PCCC_GS_HARDWARE_FAULT 0x40
146 #define PCCC_GS_ADDRESSING_ERROR 0x50
147 #define PCCC_GS_CMD_PROTECTION 0x60
148 #define PCCC_GS_PROGRAM_MODE 0x70
149 #define PCCC_GS_MISSING_COMPATABILITY_FILE 0x80
150 #define PCCC_GS_BUFFER_FULL_1 0x90
151 #define PCCC_GS_WAIT_ACK 0xA0
152 #define PCCC_GS_REMOTE_DOWNLOAD_ERROR 0xB0
153 #define PCCC_GS_BUFFER_FULL_2 0xC0
154 #define PCCC_GS_NOT_USED_1 0xD0
155 #define PCCC_GS_NOT_USED_2 0xE0
156 #define PCCC_GS_USE_EXTSTS 0xF0
158 /* PCCC Extended Status Codes */
159 #define PCCC_ES_ILLEGAL_VALUE 0x01
160 #define PCCC_ES_SHORT_ADDRESS 0x02
161 #define PCCC_ES_LONG_ADDRESS 0x03
162 #define PCCC_ES_NOT_FOUND 0x04
163 #define PCCC_ES_BAD_FORMAT 0x05
164 #define PCCC_ES_BAD_POINTER 0x06
165 #define PCCC_ES_BAD_SIZE 0x07
166 #define PCCC_ES_SITUATION_CHANGED 0x08
167 #define PCCC_ES_DATA_TOO_LARGE 0x09
168 #define PCCC_ES_TRANS_TOO_LARGE 0x0A
169 #define PCCC_ES_ACCESS_DENIED 0x0B
170 #define PCCC_ES_NOT_AVAILABLE 0x0C
171 #define PCCC_ES_ALREADY_EXISTS 0x0D
172 #define PCCC_ES_NO_EXECUTION 0x0E
173 #define PCCC_ES_HIST_OVERFLOW 0x0F
174 #define PCCC_ES_NO_ACCESS 0x10
175 #define PCCC_ES_ILLEGAL_DATA_TYPE 0x11
176 #define PCCC_ES_INVALID_DATA 0x12
177 #define PCCC_ES_BAD_REFERENCE 0x13
178 #define PCCC_ES_EXECUTION_FAILURE 0x14
179 #define PCCC_ES_CONVERSION_ERROR 0x15
180 #define PCCC_ES_NO_COMMS 0x16
181 #define PCCC_ES_TYPE_MISMATCH 0x17
182 #define PCCC_ES_BAD_RESPONSE 0x18
183 #define PCCC_ES_DUP_LABEL 0x19
184 #define PCCC_ES_FILE_ALREADY_OPEN 0x1A
185 #define PCCC_ES_PROGRAM_ALREADY_OWNED 0x1B
186 #define PCCC_ES_RESERVED_1 0x1C
187 #define PCCC_ES_RESERVED_2 0x1D
188 #define PCCC_ES_PROTECTION_VIOLATION 0x1E
189 #define PCCC_ES_TMP_INTERNAL_ERROR 0x1F
190 #define PCCC_ES_RACK_FAULT 0x22
191 #define PCCC_ES_TIMEOUT 0x23
192 #define PCCC_ES_UNKNOWN 0x24
194 /* PCCC Command Codes */
195 #define PCCC_CMD_00 0x00
196 #define PCCC_CMD_01 0x01
197 #define PCCC_CMD_02 0x02
198 #define PCCC_CMD_04 0x04
199 #define PCCC_CMD_05 0x05
200 #define PCCC_CMD_06 0x06
201 #define PCCC_CMD_07 0x07
202 #define PCCC_CMD_08 0x08
203 #define PCCC_CMD_0F 0x0F
205 /* PCCC Function Codes */
206 #define PCCC_FNC_06_00 0x00
207 #define PCCC_FNC_06_01 0x01
208 #define PCCC_FNC_06_02 0x02
209 #define PCCC_FNC_06_03 0x03
210 #define PCCC_FNC_06_04 0x04
211 #define PCCC_FNC_06_05 0x05
212 #define PCCC_FNC_06_06 0x06
213 #define PCCC_FNC_06_07 0x07
214 #define PCCC_FNC_06_08 0x08
215 #define PCCC_FNC_06_09 0x09
216 #define PCCC_FNC_06_0A 0x0A
218 #define PCCC_FNC_07_00 0x00
219 #define PCCC_FNC_07_01 0x01
220 #define PCCC_FNC_07_03 0x03
221 #define PCCC_FNC_07_04 0x04
222 #define PCCC_FNC_07_05 0x05
223 #define PCCC_FNC_07_06 0x06
225 #define PCCC_FNC_0F_00 0x00
226 #define PCCC_FNC_0F_01 0x01
227 #define PCCC_FNC_0F_02 0x02
228 #define PCCC_FNC_0F_03 0x03
229 #define PCCC_FNC_0F_04 0x04
230 #define PCCC_FNC_0F_05 0x05
231 #define PCCC_FNC_0F_06 0x06
232 #define PCCC_FNC_0F_07 0x07
233 #define PCCC_FNC_0F_08 0x08
234 #define PCCC_FNC_0F_09 0x09
235 #define PCCC_FNC_0F_0A 0x0A
236 #define PCCC_FNC_0F_11 0x11
237 #define PCCC_FNC_0F_12 0x12
238 #define PCCC_FNC_0F_17 0x17
239 #define PCCC_FNC_0F_18 0x18
240 #define PCCC_FNC_0F_26 0x26
241 #define PCCC_FNC_0F_29 0x29
242 #define PCCC_FNC_0F_3A 0x3A
243 #define PCCC_FNC_0F_41 0x41
244 #define PCCC_FNC_0F_50 0x50
245 #define PCCC_FNC_0F_52 0x52
246 #define PCCC_FNC_0F_53 0x53
247 #define PCCC_FNC_0F_55 0x55
248 #define PCCC_FNC_0F_57 0x57
249 #define PCCC_FNC_0F_5E 0x5E
250 #define PCCC_FNC_0F_67 0x67
251 #define PCCC_FNC_0F_68 0x68
252 #define PCCC_FNC_0F_79 0x79
253 #define PCCC_FNC_0F_80 0x80
254 #define PCCC_FNC_0F_81 0x81
255 #define PCCC_FNC_0F_82 0x82
256 #define PCCC_FNC_0F_88 0x88
257 #define PCCC_FNC_0F_8F 0x8F
258 #define PCCC_FNC_0F_A1 0xA1
259 #define PCCC_FNC_0F_A2 0xA2
260 #define PCCC_FNC_0F_A3 0xA3
261 #define PCCC_FNC_0F_A7 0xA7
262 #define PCCC_FNC_0F_A9 0xA9
263 #define PCCC_FNC_0F_AA 0xAA
264 #define PCCC_FNC_0F_AB 0xAB
265 #define PCCC_FNC_0F_AF 0xAF
267 /* PCCC File Types */
268 #define PCCC_FILE_TYPE_LOGIC 0x22
269 #define PCCC_FILE_TYPE_FUNCTION_CS0_CS2 0x48
270 #define PCCC_FILE_TYPE_CHANNEL_CONFIG 0x49
271 #define PCCC_FILE_TYPE_FUNCTION_ES1 0x4A
272 #define PCCC_FILE_TYPE_ONLINE_EDIT 0x65
273 #define PCCC_FILE_TYPE_FUNCTION_IOS 0x6A
274 #define PCCC_FILE_TYPE_DATA_OUTPUT 0x82
275 #define PCCC_FILE_TYPE_DATA_INPUT 0x83
276 #define PCCC_FILE_TYPE_DATA_STATUS 0x84
277 #define PCCC_FILE_TYPE_DATA_BINARY 0x85
278 #define PCCC_FILE_TYPE_DATA_TIMER 0x86
279 #define PCCC_FILE_TYPE_DATA_COUNTER 0x87
280 #define PCCC_FILE_TYPE_DATA_CONTROL 0x88
281 #define PCCC_FILE_TYPE_DATA_INTEGER 0x89
282 #define PCCC_FILE_TYPE_DATA_FLOAT 0x8A
283 #define PCCC_FILE_TYPE_FORCE_OUTPUT 0xA1
284 #define PCCC_FILE_TYPE_FORCE_INPUT 0xA2
285 #define PCCC_FILE_TYPE_FUNCTION_ES0 0xE0
286 #define PCCC_FILE_TYPE_FUNCTION_STI 0xE2
287 #define PCCC_FILE_TYPE_FUNCTION_EII 0xE3
288 #define PCCC_FILE_TYPE_FUNCTION_RTC 0xE4
289 #define PCCC_FILE_TYPE_FUNCTION_BHI 0xE5
290 #define PCCC_FILE_TYPE_FUNCTION_MMI 0xE6
291 #define PCCC_FILE_TYPE_FUNCTION_LCD 0xEC
292 #define PCCC_FILE_TYPE_FUNCTION_PTOX 0xED
293 #define PCCC_FILE_TYPE_FUNCTION_PWMX 0xEE
295 /* PCCC CPU Mode Codes */
296 #define PCCC_CPU_3A_PROGRAM 0x01
297 #define PCCC_CPU_3A_RUN 0x02
299 #define PCCC_CPU_80_PROGRAM 0x01
300 #define PCCC_CPU_80_RUN 0x06
301 #define PCCC_CPU_80_TEST_CONT 0x07
302 #define PCCC_CPU_80_TEST_SINGLE 0x08
303 #define PCCC_CPU_80_TEST_DEBUG 0x09
308 #define CI_SEGMENT_TYPE_MASK 0xE0
310 #define CI_PORT_SEGMENT 0x00
311 #define CI_LOGICAL_SEGMENT 0x20
312 #define CI_NETWORK_SEGMENT 0x40
313 #define CI_SYMBOLIC_SEGMENT 0x60
314 #define CI_DATA_SEGMENT 0x80
316 #define CI_PORT_SEG_EX_LINK_ADDRESS 0x10
317 #define CI_PORT_SEG_PORT_ID_MASK 0x0F
319 #define CI_LOGICAL_SEG_TYPE_MASK 0x1C
320 #define CI_LOGICAL_SEG_CLASS_ID 0x00
321 #define CI_LOGICAL_SEG_INST_ID 0x04
322 #define CI_LOGICAL_SEG_MBR_ID 0x08
323 #define CI_LOGICAL_SEG_CON_POINT 0x0C
324 #define CI_LOGICAL_SEG_ATTR_ID 0x10
325 #define CI_LOGICAL_SEG_SPECIAL 0x14
326 #define CI_LOGICAL_SEG_SERV_ID 0x18
327 #define CI_LOGICAL_SEG_EXT_LOGICAL 0x1C
329 #define CI_LOGICAL_SEG_FORMAT_MASK 0x03
330 #define CI_LOGICAL_SEG_8_BIT 0x00
331 #define CI_LOGICAL_SEG_16_BIT 0x01
332 #define CI_LOGICAL_SEG_32_BIT 0x02
333 #define CI_LOGICAL_SEG_RES_2 0x03
334 #define CI_LOGICAL_SEG_E_KEY 0x00
336 #define CI_E_KEY_FORMAT_VAL 0x04
338 #define CI_DATA_SEG_TYPE_MASK 0x1F
339 #define CI_DATA_SEG_SIMPLE 0x00
340 #define CI_DATA_SEG_SYMBOL 0x11
342 #define CI_NETWORK_SEG_TYPE_MASK 0x1F
343 #define CI_NETWORK_SEG_SCHEDULE 0x01
344 #define CI_NETWORK_SEG_FIXED_TAG 0x02
345 #define CI_NETWORK_SEG_PROD_INHI 0x03
346 #define CI_NETWORK_SEG_SAFETY 0x10
347 #define CI_NETWORK_SEG_PROD_INHI_US 0x11
348 #define CI_NETWORK_SEG_EXTENDED 0x1F
350 #define CI_SYMBOL_SEG_FORMAT_MASK 0xE0
351 #define CI_SYMBOL_SEG_SIZE_MASK 0x1F
352 #define CI_SYMBOL_SEG_DOUBLE 0x20
353 #define CI_SYMBOL_SEG_TRIPLE 0x40
354 #define CI_SYMBOL_SEG_NUMERIC 0xC0
356 #define CI_SYMBOL_NUMERIC_USINT 6
357 #define CI_SYMBOL_NUMERIC_UINT 7
358 #define CI_SYMBOL_NUMERIC_UDINT 8
360 #define CI_TRANSPORT_CLASS_MASK 0x0F
361 #define CI_PRODUCTION_TRIGGER_MASK 0x70
362 #define CI_PRODUCTION_DIR_MASK 0x80
364 #define CONN_TYPE_NULL 0
365 #define CONN_TYPE_MULTICAST 1
366 #define CONN_TYPE_P2P 2
367 #define CONN_TYPE_RESERVED 3
369 #define ENIP_CIP_INTERFACE 0
371 /* Define common services */
372 #define GENERIC_SC_LIST \
373 { SC_GET_ATT_ALL, "Get Attributes All" }, \
374 { SC_SET_ATT_ALL, "Set Attributes All" }, \
375 { SC_GET_ATT_LIST, "Get Attribute List" }, \
376 { SC_SET_ATT_LIST, "Set Attribute List" }, \
377 { SC_RESET, "Reset" }, \
378 { SC_START, "Start" }, \
379 { SC_STOP, "Stop" }, \
380 { SC_CREATE, "Create" }, \
381 { SC_DELETE, "Delete" }, \
382 { SC_MULT_SERV_PACK, "Multiple Service Packet" }, \
383 { SC_APPLY_ATTRIBUTES, "Apply Attributes" }, \
384 { SC_GET_ATT_SINGLE, "Get Attribute Single" }, \
385 { SC_SET_ATT_SINGLE, "Set Attribute Single" }, \
386 { SC_FIND_NEXT_OBJ_INST, "Find Next Object Instance" }, \
387 { SC_RESTOR, "Restore" }, \
388 { SC_SAVE, "Save" }, \
389 { SC_NO_OP, "Nop" }, \
390 { SC_GET_MEMBER, "Get Member" }, \
391 { SC_SET_MEMBER, "Set Member" }, \
392 { SC_INSERT_MEMBER, "Insert Member" }, \
393 { SC_REMOVE_MEMBER, "Remove Member" }, \
394 { SC_GROUP_SYNC, "Group Sync" }, \
396 typedef struct cip_simple_request_info {
402 } cip_simple_request_info_t;
435 /* Currently not supported */
439 typedef int attribute_dissector_func(packet_info *pinfo, proto_tree *tree, proto_item *item, tvbuff_t *tvb,
440 int offset, int total_len);
442 typedef struct attribute_info {
444 gboolean class_instance;
446 int gaa_index; /* Index of attribute in GetAttributeAll response (< 0 means not in GetAttrbuteAll */
448 enum cip_datatype datatype;
450 attribute_dissector_func *pdissect;
453 typedef struct cip_connID_info {
460 enum cip_safety_format_type {CIP_SAFETY_BASE_FORMAT, CIP_SAFETY_EXTENDED_FORMAT};
462 typedef struct cip_safety_epath_info {
464 enum cip_safety_format_type format;
465 guint16 running_rollover_value; /* Keep track of the rollover value over the course of the connection */
466 guint16 running_timestamp_value; /* Keep track of the timestamp value over the course of the connection */
467 guint16 target_conn_sn;
468 guint16 target_vendorID;
469 guint32 target_device_sn;
470 } cip_safety_epath_info_t;
472 typedef struct cip_conn_info {
473 guint16 ConnSerialNumber;
475 guint32 DeviceSerialNumber;
476 guint32 forward_open_frame;
477 cip_connID_info_t O2T;
478 cip_connID_info_t T2O;
479 guint8 TransportClass_trigger;
480 cip_safety_epath_info_t safety;
486 typedef struct cip_req_info {
487 dissector_handle_t dissector;
492 cip_simple_request_info_t *ciaData;
493 cip_conn_info_t* connInfo;
497 ** Exported functions
500 /* Depending on if a Class or Symbol segment appears in Connection Path or
501 a Request Path, display '->' before or after the actual name. */
503 #define DISPLAY_CONNECTION_PATH 1
504 #define DISPLAY_REQUEST_PATH 2
505 extern void dissect_epath( tvbuff_t *tvb, packet_info *pinfo, proto_tree *path_tree, proto_item *epath_item, int offset, int path_length,
506 gboolean generate, gboolean packed, cip_simple_request_info_t* req_data, cip_safety_epath_info_t* safety,
507 int display_type, proto_item *msp_item,
508 gboolean is_msp_item);
510 // Elementary Data Types.
511 enum cip_elem_data_types {
512 CIP_STRING_TYPE = 0xD0,
513 CIP_SHORT_STRING_TYPE = 0xDA,
514 CIP_STRING2_TYPE = 0xD5
516 extern int dissect_cip_string_type(packet_info *pinfo, proto_tree *tree, proto_item *item, tvbuff_t *tvb, int offset, int hf_type, int string_type);
518 extern void dissect_cip_date_and_time(proto_tree *tree, tvbuff_t *tvb, int offset, int hf_datetime);
519 extern attribute_info_t* cip_get_attribute(guint class_id, guint instance, guint attribute);
520 extern int dissect_cip_get_attribute_all_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
521 int offset, cip_simple_request_info_t* req_data);
522 extern void load_cip_request_data(packet_info *pinfo, cip_simple_request_info_t *req_data);
523 void dissect_cip_run_idle(tvbuff_t* tvb, int offset, proto_tree* item_tree);
526 ** Exported variables
528 extern const value_string cip_sc_rr[];
529 extern const value_string cip_reset_type_vals[];
530 extern value_string_ext cip_gs_vals_ext;
531 extern value_string_ext cip_cm_ext_st_vals_ext;
532 extern value_string_ext cip_vendor_vals_ext;
533 extern value_string_ext cip_devtype_vals_ext;
534 extern value_string_ext cip_class_names_vals_ext;
536 /* Common class attributes and attribute dissection functions*/
537 extern int hf_attr_class_revision;
538 extern int hf_attr_class_max_instance;
539 extern int hf_attr_class_num_instance;
540 extern int hf_attr_class_opt_attr_num;
541 extern int hf_attr_class_attr_num;
542 extern int hf_attr_class_opt_service_num;
543 extern int hf_attr_class_service_code;
544 extern int hf_attr_class_num_class_attr;
545 extern int hf_attr_class_num_inst_attr;
547 #define CLASS_ATTRIBUTE_1_NAME "Revision"
548 #define CLASS_ATTRIBUTE_2_NAME "Max Instance"
549 #define CLASS_ATTRIBUTE_3_NAME "Number of Instances"
550 #define CLASS_ATTRIBUTE_4_NAME "Optional Attribute List"
551 #define CLASS_ATTRIBUTE_5_NAME "Optional Service List"
552 #define CLASS_ATTRIBUTE_6_NAME "Maximum ID Number Class Attributes"
553 #define CLASS_ATTRIBUTE_7_NAME "Maximum ID Number Instance Attributes"
555 extern void add_cip_service_to_info_column(packet_info *pinfo, guint8 service, const value_string* service_vals);
557 extern int dissect_optional_attr_list(packet_info *pinfo, proto_tree *tree, proto_item *item, tvbuff_t *tvb,
558 int offset, int total_len);
559 extern int dissect_optional_service_list(packet_info *pinfo, proto_tree *tree, proto_item *item, tvbuff_t *tvb,
560 int offset, int total_len);
561 extern int dissect_padded_epath_len_usint(packet_info *pinfo, proto_tree *tree, proto_item *item, tvbuff_t *tvb,
562 int offset, int total_len);
563 extern int dissect_padded_epath_len_uint(packet_info *pinfo, proto_tree *tree, proto_item *item, tvbuff_t *tvb,
564 int offset, int total_len);
572 * indent-tabs-mode: nil
575 * ex: set shiftwidth=3 tabstop=8 expandtab:
576 * :indentSize=3:tabSize=8:noTabs=true:
579 #endif /* PACKET_CIP_H */