2 * Routines for "Ethernet Powerlink 2.0" dissection
3 * (ETHERNET Powerlink V2.0 Communication Profile Specification Draft Standard Version 1.0.0)
5 * Copyright (c) 2006: Zurich University of Applied Sciences Winterthur (ZHW)
6 * Institute of Embedded Systems (InES)
9 * - Dominic B'chaz <bdo@zhwin.ch>
10 * - Damir Bursic <bum@zhwin.ch>
11 * - David B_chi <bhd@zhwin.ch>
17 * Wireshark - Network traffic analyzer
18 * By Gerald Combs <gerald@wireshark.org>
19 * Copyright 1999 Gerald Combs
21 * This program is free software; you can redistribute it and/or
22 * modify it under the terms of the GNU General Public License
23 * as published by the Free Software Foundation; either version 2
24 * of the License, or (at your option) any later version.
26 * This program is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 * GNU General Public License for more details.
31 * You should have received a copy of the GNU General Public License
32 * along with this program; if not, write to the Free Software
33 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
36 #ifndef __PACKET_EPL_H__
37 #define __PACKET_EPL_H__
39 /* function prototypes */
40 static gboolean dissect_epl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
41 void proto_register_epl(void);
42 void proto_reg_handoff_epl(void);
44 gint dissect_epl_soc(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
45 gint dissect_epl_preq(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
46 gint dissect_epl_pres(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, guint8 epl_src, gint offset);
47 gint dissect_epl_soa(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, guint8 epl_src, gint offset);
49 gint dissect_epl_asnd(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, guint8 epl_src, gint offset);
50 gint dissect_epl_asnd_ires(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, guint8 epl_src, gint offset);
51 gint dissect_epl_asnd_sres(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, guint8 epl_src, gint offset);
52 gint dissect_epl_asnd_nmtcmd(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
53 gint dissect_epl_asnd_nmtreq(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
55 gint dissect_epl_asnd_sdo(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
56 gint dissect_epl_sdo_sequence(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
57 gint dissect_epl_sdo_command(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
58 gint dissect_epl_sdo_command_write_by_index(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 segmented, gboolean response);
59 gint dissect_epl_sdo_command_read_by_index(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 segmented, gboolean response);
61 const gchar* decode_epl_address(guchar adr);
62 const gchar* decode_epl_address_abbrev(guchar adr);
66 /* Container for tapping relevant data */
67 typedef struct _epl_info_t {
68 unsigned char epl_mtyp;
73 #define EPL_INVALID_NODEID 0
74 #define EPL_MN_NODEID 240
75 #define EPL_DIAGNOSTIC_DEVICE_NODEID 253
76 #define EPL_TO_LEGACY_ETHERNET_ROUTER_NODEID 254
77 #define EPL_BROADCAST_NODEID 255
79 static const value_string addr_str_vals[] = {
80 {EPL_INVALID_NODEID, " (invalid)" },
81 {EPL_MN_NODEID, " (Managing Node)" },
82 {EPL_DIAGNOSTIC_DEVICE_NODEID, " (Diagnostic Device)" },
83 {EPL_TO_LEGACY_ETHERNET_ROUTER_NODEID, " (EPL to legacy Ethernet Router)" },
84 {EPL_BROADCAST_NODEID, " (broadcast)" },
87 static const gchar* addr_str_cn = " (Controlled Node)";
88 static const gchar* addr_str_res = " (reserved)";
90 static const value_string addr_str_abbr_vals[] = {
91 {EPL_INVALID_NODEID, " (inv.)" },
92 {EPL_MN_NODEID, " (MN)" },
93 {EPL_DIAGNOSTIC_DEVICE_NODEID, " (diag.)" },
94 {EPL_TO_LEGACY_ETHERNET_ROUTER_NODEID, " (router)" },
95 {EPL_BROADCAST_NODEID, " (bc)" },
99 static const gchar* addr_str_abbr_cn = " (CN)";
100 static const gchar* addr_str_abbr_res = " (res.)";
103 #define UDP_PORT_EPL 3819
105 /* Offsets of fields within an EPL packet. */
106 #define EPL_MTYP_OFFSET 0 /* same offset for all message types*/
107 #define EPL_DEST_OFFSET 1 /* same offset for all message types*/
108 #define EPL_SRC_OFFSET 2 /* same offset for all message types*/
110 #define EPL_SOA_SVID_OFFSET 6
111 #define EPL_SOA_SVTG_OFFSET 7
112 #define EPL_SOA_EPLV_OFFSET 8
114 #define EPL_ASND_SVID_OFFSET 3
115 #define EPL_ASND_DATA_OFFSET 4
118 /* EPL message types */
120 #define EPL_PREQ 0x03
121 #define EPL_PRES 0x04
123 #define EPL_ASND 0x06
125 static const value_string mtyp_vals[] = {
126 {EPL_SOC, "Start of Cycle (SoC)" },
127 {EPL_PREQ, "PollRequest (PReq)" },
128 {EPL_PRES, "PollResponse (PRes)" },
129 {EPL_SOA, "Start of Asynchronous (SoA)"},
130 {EPL_ASND, "Asynchronous Send (ASnd)" },
134 #define EPL_SOC_MC_MASK 0x80
135 #define EPL_SOC_PS_MASK 0x40
136 #define EPL_PDO_RD_MASK 0x01
138 /* RequestedServiceID s for EPL message type "SoA" */
139 #define EPL_SOA_NOSERVICE 0
140 #define EPL_SOA_IDENTREQUEST 1
141 #define EPL_SOA_STATUSREQUEST 2
142 #define EPL_SOA_NMTREQUESTINVITE 3
143 #define EPL_SOA_UNSPECIFIEDINVITE 255
145 static const value_string soa_svid_vals[] = {
146 {EPL_SOA_NOSERVICE, "NoService" },
147 {EPL_SOA_IDENTREQUEST, "IdentRequest" },
148 {EPL_SOA_STATUSREQUEST, "StatusRequest" },
149 {EPL_SOA_NMTREQUESTINVITE, "NMTRequestInvite" },
150 {EPL_SOA_UNSPECIFIEDINVITE, "UnspecifiedInvite"},
154 /* ServiceID values for EPL message type "ASnd" */
155 #define EPL_ASND_IDENTRESPONSE 1
156 #define EPL_ASND_STATUSRESPONSE 2
157 #define EPL_ASND_NMTREQUEST 3
158 #define EPL_ASND_NMTCOMMAND 4
159 #define EPL_ASND_SDO 5
161 static const value_string asnd_svid_vals[] = {
162 {EPL_ASND_IDENTRESPONSE, "IdentResponse" },
163 {EPL_ASND_STATUSRESPONSE, "StatusResponse"},
164 {EPL_ASND_NMTREQUEST, "NMTRequest" },
165 {EPL_ASND_NMTCOMMAND, "NMTCommand" },
166 {EPL_ASND_SDO, "SDO" },
170 /* NMTCommand values for EPL message type "ASnd" */
171 #define EPL_ASND_NMTCOMMAND_NMTSTARTNODE 0x21
172 #define EPL_ASND_NMTCOMMAND_NMTSTOPNODE 0x22
173 #define EPL_ASND_NMTCOMMAND_NMTENTERPREOPERATIONAL2 0x23
174 #define EPL_ASND_NMTCOMMAND_NMTENABLEREADYTOOPERATE 0x24
175 #define EPL_ASND_NMTCOMMAND_NMTRESETNODE 0x28
176 #define EPL_ASND_NMTCOMMAND_NMTRESETCOMMUNICATION 0x29
177 #define EPL_ASND_NMTCOMMAND_NMTRESETCONFIGURATION 0x2A
178 #define EPL_ASND_NMTCOMMAND_NMTSWRESET 0x2B
180 #define EPL_ASND_NMTCOMMAND_NMTSTARTNODEEX 0x41
181 #define EPL_ASND_NMTCOMMAND_NMTSTOPNODEEX 0x42
182 #define EPL_ASND_NMTCOMMAND_NMTENTERPREOPERATIONAL2EX 0x43
183 #define EPL_ASND_NMTCOMMAND_NMTENABLEREADYTOOPERATEEX 0x44
184 #define EPL_ASND_NMTCOMMAND_NMTRESETNODEEX 0x48
185 #define EPL_ASND_NMTCOMMAND_NMTRESETCOMMUNICATIONEX 0x49
186 #define EPL_ASND_NMTCOMMAND_NMTRESETCONFIGURATIONEX 0x4A
187 #define EPL_ASND_NMTCOMMAND_NMTSWRESETEX 0x4B
189 #define EPL_ASND_NMTCOMMAND_NMTNETHOSTNAMESET 0x62
190 #define EPL_ASND_NMTCOMMAND_NMTFLUSHARPENTRY 0x63
191 #define EPL_ASND_NMTCOMMAND_NMTPUBLISHCONFIGUREDNODES 0x80
192 #define EPL_ASND_NMTCOMMAND_NMTPUBLISHACTIVENODES 0x90
193 #define EPL_ASND_NMTCOMMAND_NMTPUBLISHPREOPERATIONAL1 0x91
194 #define EPL_ASND_NMTCOMMAND_NMTPUBLISHPREOPERATIONAL2 0x92
195 #define EPL_ASND_NMTCOMMAND_NMTPUBLISHREADYTOOPERATE 0x93
196 #define EPL_ASND_NMTCOMMAND_NMTPUBLISHOPERATIONAL 0x94
197 #define EPL_ASND_NMTCOMMAND_NMTPUBLISHSTOPPED 0x95
198 #define EPL_ASND_NMTCOMMAND_NMTPUBLISHEMERGENCYNEW 0xA0
199 #define EPL_ASND_NMTCOMMAND_NMTPUBLISHTIME 0XB0
200 #define EPL_ASND_NMTCOMMAND_NMTINVALIDSERVICE 0xFF
202 static const value_string asnd_cid_vals[] = {
203 {EPL_ASND_NMTCOMMAND_NMTSTARTNODE, "NMTStartNode" },
204 {EPL_ASND_NMTCOMMAND_NMTSTOPNODE, "NMTStopNode" },
205 {EPL_ASND_NMTCOMMAND_NMTENTERPREOPERATIONAL2, "NMTEnterPreOperational2" },
206 {EPL_ASND_NMTCOMMAND_NMTENABLEREADYTOOPERATE, "NMTEnableReadyToOperate" },
207 {EPL_ASND_NMTCOMMAND_NMTRESETNODE, "NMTResetNode" },
208 {EPL_ASND_NMTCOMMAND_NMTRESETCOMMUNICATION, "NMTResetCommunication" },
209 {EPL_ASND_NMTCOMMAND_NMTRESETCONFIGURATION, "NMTResetConfiguration" },
210 {EPL_ASND_NMTCOMMAND_NMTSWRESET, "NMTSwReset" },
211 {EPL_ASND_NMTCOMMAND_NMTSTARTNODEEX, "NMTStartNodeEx" },
212 {EPL_ASND_NMTCOMMAND_NMTSTOPNODEEX, "NMTStopNodeEx" },
213 {EPL_ASND_NMTCOMMAND_NMTENTERPREOPERATIONAL2EX, "NMTEnterPreOperational2Ex" },
214 {EPL_ASND_NMTCOMMAND_NMTENABLEREADYTOOPERATEEX, "NMTEnableReadyToOperateEx" },
215 {EPL_ASND_NMTCOMMAND_NMTRESETNODEEX, "NMTResetNodeEx" },
216 {EPL_ASND_NMTCOMMAND_NMTRESETCOMMUNICATIONEX, "NMTCommunicationEx" },
217 {EPL_ASND_NMTCOMMAND_NMTRESETCONFIGURATIONEX, "NMTResetConfigurationEx" },
218 {EPL_ASND_NMTCOMMAND_NMTSWRESETEX, "NMTSwResetEx" },
219 {EPL_ASND_NMTCOMMAND_NMTNETHOSTNAMESET, "NMTNetHostNameSet" },
220 {EPL_ASND_NMTCOMMAND_NMTFLUSHARPENTRY, "NMTFlushArpEntry" },
221 {EPL_ASND_NMTCOMMAND_NMTPUBLISHCONFIGUREDNODES, "NMTPublishConfiguredNodes" },
222 {EPL_ASND_NMTCOMMAND_NMTPUBLISHACTIVENODES, "NMTPublishActiveNodes" },
223 {EPL_ASND_NMTCOMMAND_NMTPUBLISHPREOPERATIONAL1, "NMTPublishPreOperational1" },
224 {EPL_ASND_NMTCOMMAND_NMTPUBLISHPREOPERATIONAL2, "NMTPublishPreOperational2" },
225 {EPL_ASND_NMTCOMMAND_NMTPUBLISHREADYTOOPERATE, "NMTPublishReadyToOperate" },
226 {EPL_ASND_NMTCOMMAND_NMTPUBLISHOPERATIONAL, "NMTPublishOperational" },
227 {EPL_ASND_NMTCOMMAND_NMTPUBLISHSTOPPED, "NMTPublishStopped" },
228 {EPL_ASND_NMTCOMMAND_NMTPUBLISHEMERGENCYNEW, "NMTPublishEmergencyNew" },
229 {EPL_ASND_NMTCOMMAND_NMTPUBLISHTIME, "NMTPublishTime" },
230 {EPL_ASND_NMTCOMMAND_NMTINVALIDSERVICE, "NMTInvalidService" },
231 /* "special" values to cover all possibilities of CommandID in NMTRequests */
232 {EPL_ASND_IDENTRESPONSE, "IdentResponse" },
233 {EPL_ASND_STATUSRESPONSE, "StatusResponse" },
237 /* Priority values for EPL message type "ASnd", "", "", field PR */
238 #define EPL_PR_GENERICREQUEST 0x03
239 #define EPL_PR_NMTREQUEST 0x07
241 static const value_string epl_pr_vals[] = {
244 {2, "below generic"},
245 {EPL_PR_GENERICREQUEST, "GenericRequest"},
246 {4, "above generic"},
248 {6, "below NMTRequest"},
249 {EPL_PR_NMTREQUEST, "NMTRequest"},
253 /* NMT State values (for CN)*/
254 #define EPL_NMT_GS_OFF 0x00
255 #define EPL_NMT_GS_INITIALIZING 0x19
256 #define EPL_NMT_GS_RESET_APPLICATION 0x29
257 #define EPL_NMT_GS_RESET_COMMUNICATION 0x39
258 #define EPL_NMT_CS_NOT_ACTIVE 0x1C
259 #define EPL_NMT_CS_PRE_OPERATIONAL_1 0x1D
260 #define EPL_NMT_CS_PRE_OPERATIONAL_2 0x5D
261 #define EPL_NMT_CS_READY_TO_OPERATE 0x6D
262 #define EPL_NMT_CS_OPERATIONAL 0xFD
263 #define EPL_NMT_CS_STOPPED 0x4D
264 #define EPL_NMT_CS_BASIC_ETHERNET 0x1E
266 static const value_string epl_nmt_cs_vals[] = {
267 {EPL_NMT_GS_OFF, "NMT_GS_OFF" },
268 {EPL_NMT_GS_INITIALIZING, "NMT_GS_INITIALIZING" },
269 {EPL_NMT_GS_RESET_APPLICATION, "NMT_GS_RESET_APPLICATION" },
270 {EPL_NMT_GS_RESET_COMMUNICATION, "NMT_GS_RESET_COMMUNICATION"},
271 {EPL_NMT_CS_NOT_ACTIVE, "NMT_CS_NOT_ACTIVE" },
272 {EPL_NMT_CS_PRE_OPERATIONAL_1, "NMT_CS_PRE_OPERATIONAL_1" },
273 {EPL_NMT_CS_PRE_OPERATIONAL_2, "NMT_CS_PRE_OPERATIONAL_2" },
274 {EPL_NMT_CS_READY_TO_OPERATE, "NMT_CS_READY_TO_OPERATE" },
275 {EPL_NMT_CS_OPERATIONAL, "NMT_CS_OPERATIONAL" },
276 {EPL_NMT_CS_STOPPED, "NMT_CS_STOPPED" },
277 {EPL_NMT_CS_BASIC_ETHERNET, "NMT_CS_BASIC_ETHERNET" },
281 /* NMT State values (for MN)*/
282 #define EPL_NMT_GS_OFF 0x00
283 #define EPL_NMT_GS_INITIALIZING 0x19
284 #define EPL_NMT_GS_RESET_APPLICATION 0x29
285 #define EPL_NMT_GS_RESET_COMMUNICATION 0x39
286 #define EPL_NMT_MS_NOT_ACTIVE 0x1C
287 #define EPL_NMT_MS_PRE_OPERATIONAL_1 0x1D
288 #define EPL_NMT_MS_PRE_OPERATIONAL_2 0x5D
289 #define EPL_NMT_MS_READY_TO_OPERATE 0x6D
290 #define EPL_NMT_MS_OPERATIONAL 0xFD
291 #define EPL_NMT_MS_BASIC_ETHERNET 0x1E
293 static const value_string epl_nmt_ms_vals[] = {
294 {EPL_NMT_GS_OFF, "NMT_GS_OFF" },
295 {EPL_NMT_GS_INITIALIZING, "NMT_GS_INITIALIZING" },
296 {EPL_NMT_GS_RESET_APPLICATION, "NMT_GS_RESET_APPLICATION" },
297 {EPL_NMT_GS_RESET_COMMUNICATION, "NMT_GS_RESET_COMMUNICATION"},
298 {EPL_NMT_MS_NOT_ACTIVE, "NMT_MS_NOT_ACTIVE" },
299 {EPL_NMT_MS_PRE_OPERATIONAL_1, "NMT_MS_PRE_OPERATIONAL_1" },
300 {EPL_NMT_MS_PRE_OPERATIONAL_2, "NMT_MS_PRE_OPERATIONAL_2" },
301 {EPL_NMT_MS_READY_TO_OPERATE, "NMT_MS_READY_TO_OPERATE" },
302 {EPL_NMT_MS_OPERATIONAL, "NMT_MS_OPERATIONAL" },
303 {EPL_NMT_MS_BASIC_ETHERNET, "NMT_MS_BASIC_ETHERNET" },
307 /* SDO SequenceLayer */
308 #define EPL_ASND_SDO_SEQ_RECEIVE_SEQUENCE_NUMBER_OFFSET 4
309 #define EPL_ASND_SDO_SEQ_RECEIVE_CON_OFFSET 4
311 #define EPL_ASND_SDO_SEQ_SEND_SEQUENCE_NUMBER_OFFSET 5
312 #define EPL_ASND_SDO_SEQ_SEND_CON_OFFSET 5
314 #define EPL_ASND_SDO_SEQ_RECEIVE_CON_NO_CONNECTION 0x00
315 #define EPL_ASND_SDO_SEQ_RECEIVE_CON_INITIALIZATION 0x01
316 #define EPL_ASND_SDO_SEQ_RECEIVE_CON_CONNECTION_VALID 0x02
317 #define EPL_ASND_SDO_SEQ_RECEIVE_CON_ERROR_RESPONSE 0x03
318 #define EPL_ASND_SDO_SEQ_CON_MASK 0x03
320 static const value_string epl_sdo_receive_con_vals[] = {
321 {EPL_ASND_SDO_SEQ_RECEIVE_CON_NO_CONNECTION, "No connection" },
322 {EPL_ASND_SDO_SEQ_RECEIVE_CON_INITIALIZATION, "Initialization" },
323 {EPL_ASND_SDO_SEQ_RECEIVE_CON_CONNECTION_VALID, "Connection valid" },
324 {EPL_ASND_SDO_SEQ_RECEIVE_CON_ERROR_RESPONSE, "Error Response (retransmission request)"},
328 #define EPL_ASND_SDO_SEQ_SEND_CON_NO_CONNECTION 0x00
329 #define EPL_ASND_SDO_SEQ_SEND_CON_INITIALIZATION 0x01
330 #define EPL_ASND_SDO_SEQ_SEND_CON_CONNECTION_VALID 0x02
331 #define EPL_ASND_SDO_SEQ_SEND_CON_ERROR_VALID_ACK_REQ 0x03
333 static const value_string epl_sdo_send_con_vals[] = {
334 {EPL_ASND_SDO_SEQ_SEND_CON_NO_CONNECTION, "No connection" },
335 {EPL_ASND_SDO_SEQ_SEND_CON_INITIALIZATION, "Initialization" },
336 {EPL_ASND_SDO_SEQ_SEND_CON_CONNECTION_VALID, "Connection valid" },
337 {EPL_ASND_SDO_SEQ_SEND_CON_ERROR_VALID_ACK_REQ, "Connection valid with acknowledge request" },
341 /* SDO EPL Command Layer Protocol */
342 #define EPL_ASND_SDO_CMD_ABORT_FILTER 0x40
343 #define EPL_ASND_SDO_CMD_SEGMENTATION_FILTER 0x30
344 #define EPL_ASND_SDO_CMD_RESPONSE_FILTER 0x80
347 /* SDO - Abort Transfer */
348 static const value_string sdo_cmd_abort_code[] = {
349 {0x05030000, "reserved" },
350 {0x05040000, "SDO protocol timed out." },
351 {0x05040001, "Client/server Command ID not valid or unknown." },
352 {0x05040002, "Invalid block size." },
353 {0x05040003, "Invalid sequence number." },
354 {0x05040004, "reserved" },
355 {0x05040005, "Out of memory." },
356 {0x06010000, "Unsupported access to an object." },
357 {0x06010001, "Attempt to read a write-only object." },
358 {0x06010002, "Attempt to write a read-only object." },
359 {0x06020000, "Object does not exist in the object dictionary." },
360 {0x06040041, "Object can not be mapped to the PDO." },
361 {0x06040042, "The number and length of the objects to be mapped would exceed PDO length." },
362 {0x06040043, "General parameter incompatibility." },
363 {0x06040047, "General internal incompatibility in the device." },
364 {0x06060000, "Access failed due to an hardware error." },
365 {0x06070010, "Data type does not match, length of service parameter does not match." },
366 {0x06070012, "Data type does not match, length of service parameter too high." },
367 {0x06070013, "Data type does not match, length of service parameter too low." },
368 {0x06090011, "Sub-index does not exist." },
369 {0x06090030, "Value range of parameter exceeded (only for write access)." },
370 {0x06090031, "Value of parameter writen to high." },
371 {0x06090032, "Value of parameter writen to low." },
372 {0x06090036, "maximum value is less then minimum value." },
373 {0x08000000, "General error" },
374 {0x08000020, "Data cannot be transferred or stored to the application." },
375 {0x08000021, "Data cannot be transferred or stored to the application because of local control." },
376 {0x08000022, "Data cannot be transferred or stored to the application because of the present device state." },
377 {0x08000023, "Object dictionary dynamic generation fails or no object dictionary is present." },
378 {0x08000024, "EDS, DCF or Concise DCF Data set empty." },
383 #define EPL_ASND_SDO_CMD_RESPONSE_RESPONSE 0
384 #define EPL_ASND_SDO_CMD_RESPONSE_REQUEST 1
386 static const value_string epl_sdo_asnd_cmd_response[] = {
387 {EPL_ASND_SDO_CMD_RESPONSE_RESPONSE, "Request" },
388 {EPL_ASND_SDO_CMD_RESPONSE_REQUEST, "Response" },
392 #define EPL_ASND_SDO_CMD_ABORT_TRANSFER_OK 0
393 #define EPL_ASND_SDO_CMD_ABORT_ABORT_TRANSFER 1
395 static const value_string epl_sdo_asnd_cmd_abort[] = {
396 {EPL_ASND_SDO_CMD_ABORT_TRANSFER_OK, "Transfer OK" },
397 {EPL_ASND_SDO_CMD_ABORT_ABORT_TRANSFER, "Abort Transfer" },
401 #define EPL_ASND_SDO_CMD_SEGMENTATION_EPEDITED_TRANSFER 0
402 #define EPL_ASND_SDO_CMD_SEGMENTATION_INITIATE_TRANSFER 1
403 #define EPL_ASND_SDO_CMD_SEGMENTATION_SEGMENT 2
404 #define EPL_ASND_SDO_CMD_SEGMENTATION_TRANSFER_COMPLETE 3
406 static const value_string epl_sdo_asnd_cmd_segmentation[] = {
407 {EPL_ASND_SDO_CMD_SEGMENTATION_EPEDITED_TRANSFER, "Expedited Transfer" },
408 {EPL_ASND_SDO_CMD_SEGMENTATION_INITIATE_TRANSFER, "Initiate Transfer" },
409 {EPL_ASND_SDO_CMD_SEGMENTATION_SEGMENT, "Segment" },
410 {EPL_ASND_SDO_CMD_SEGMENTATION_TRANSFER_COMPLETE, "Transfer Complete" },
414 #define EPL_ASND_SDO_COMMAND_NOT_IN_LIST 0x00
415 #define EPL_ASND_SDO_COMMAND_WRITE_BY_INDEX 0x01
416 #define EPL_ASND_SDO_COMMAND_READ_BY_INDEX 0x02
417 #define EPL_ASND_SDO_COMMAND_WRITE_ALL_BY_INDEX 0x03
418 #define EPL_ASND_SDO_COMMAND_READ_ALL_BY_INDEX 0x04
419 #define EPL_ASND_SDO_COMMAND_WRITE_BY_NAME 0x05
420 #define EPL_ASND_SDO_COMMAND_READ_BY_NAME 0x06
421 #define EPL_ASND_SDO_COMMAND_FILE_WRITE 0x20
422 #define EPL_ASND_SDO_COMMAND_FILE_READ 0x21
423 #define EPL_ASND_SDO_COMMAND_WRITE_MULTIPLE_PARAMETER_BY_INDEX 0x31
424 #define EPL_ASND_SDO_COMMAND_READ_MULTIPLE_PARAMETER_BY_INDEX 0x32
425 #define EPL_ASND_SDO_COMMAND_MAXIMUM_SEGMENT_SIZE 0x70
426 #define EPL_ASND_SDO_COMMAND_LINK_NAME_TO_INDEX 0x71
428 static const value_string epl_sdo_asnd_commands[] = {
429 {EPL_ASND_SDO_COMMAND_NOT_IN_LIST , "Not in List" },
430 {EPL_ASND_SDO_COMMAND_WRITE_BY_INDEX , "Write by Index" },
431 {EPL_ASND_SDO_COMMAND_READ_BY_INDEX , "Read by Index" },
432 {EPL_ASND_SDO_COMMAND_WRITE_ALL_BY_INDEX , "Write All by Index" },
433 {EPL_ASND_SDO_COMMAND_READ_ALL_BY_INDEX , "Read All by Index" },
434 {EPL_ASND_SDO_COMMAND_WRITE_BY_NAME , "Write by Name" },
435 {EPL_ASND_SDO_COMMAND_READ_BY_NAME , "Read by Name" },
436 {EPL_ASND_SDO_COMMAND_FILE_WRITE , "File Write" },
437 {EPL_ASND_SDO_COMMAND_FILE_READ , "File Read" },
438 {EPL_ASND_SDO_COMMAND_WRITE_MULTIPLE_PARAMETER_BY_INDEX, "Write Multiple Parameter by Index" },
439 {EPL_ASND_SDO_COMMAND_READ_MULTIPLE_PARAMETER_BY_INDEX , "Read Multiple Parameter by Index" },
440 {EPL_ASND_SDO_COMMAND_MAXIMUM_SEGMENT_SIZE , "Maximum Segment Size" },
441 {EPL_ASND_SDO_COMMAND_LINK_NAME_TO_INDEX , "Link objects only accessible via name to an index/sub-index"},
445 #endif /* __PACKET_EPL_H__ */