2 * Routines for EtherNet/IP (Industrial Protocol) dissection
3 * EtherNet/IP Home: www.odva.org
5 * Conversation data support for CIP
6 * Jan Bartels, Siempelkamp Maschinen- und Anlagenbau GmbH & Co. KG
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
33 /* Offsets of fields within the DLR Common Frame Header */
34 #define DLR_CFH_SUB_TYPE 0
35 #define DLR_CFH_PROTO_VERSION 1
37 /* Offsets (from beginning of the packet) of fields within the DLR Message
40 #define DLR_MPF_FRAME_TYPE 2
41 #define DLR_MPF_SOURCE_PORT 3
42 #define DLR_MPF_SOURCE_IP 4
43 #define DLR_MPF_SEQUENCE_ID 8
45 /* Offset for Beacon frames */
46 #define DLR_BE_RING_STATE 12
47 #define DLR_BE_SUPERVISOR_PRECEDENCE 13
48 #define DLR_BE_BEACON_INTERVAL 14
49 #define DLR_BE_BEACON_TIMEOUT 18
50 #define DLR_BE_RESERVED 22
52 /* Offset for Neighbor_Check_Request frames */
53 #define DLR_NREQ_RESERVED 12
55 /* Offset for Neighbor_Check_Response frames */
56 #define DLR_NRES_SOURCE_PORT 12
57 #define DLR_NRES_RESERVED 13
59 /* Offset for Link_Status/Neighbor_Status frames */
60 #define DLR_LNS_SOURCE_PORT 12
61 #define DLR_LNS_RESERVED 13
63 /* Offset for Locate_Fault frames */
64 #define DLR_LF_RESERVED 12
66 /* Offset for Announce frames */
67 #define DLR_AN_RING_STATE 12
68 #define DLR_AN_RESERVED 13
70 /* Offset for Sign_On frames */
71 #define DLR_SO_NUM_NODES 12
72 #define DLR_SO_NODE_1_MAC 14
74 /* Offset for Advertise frames */
75 #define DLR_ADV_GATEWAY_STATE 12
76 #define DLR_ADV_GATEWAY_PRECEDENCE 13
77 #define DLR_ADV_ADVERTISE_INTERVAL 14
78 #define DLR_ADV_ADVERTISE_TIMEOUT 18
79 #define DLR_ADV_LEARNING_UPDATE_ENABLE 22
80 #define DLR_ADV_RESERVED 23
82 /* Offset for Advertise frames */
83 #define DLR_FLUSH_LEARNING_UPDATE_ENABLE 12
84 #define DLR_FLUSH_RESERVED 13
86 /* Offset for Advertise frames */
87 #define DLR_LEARN_RESERVED 12
90 #define DLR_FT_BEACON 1
91 #define DLR_FT_NEIGHBOR_REQ 2
92 #define DLR_FT_NEIGHBOR_RES 3
93 #define DLR_FT_LINK_STAT 4
94 #define DLR_FT_LOCATE_FLT 5
95 #define DLR_FT_ANNOUNCE 6
96 #define DLR_FT_SIGN_ON 7
97 #define DLR_FT_ADVERTISE 8
98 #define DLR_FT_FLUSH_TABLES 9
99 #define DLR_FT_LEARNING_UPDATE 10
103 guint32 req_num
, rep_num
;
105 cip_req_info_t
* cip_info
;
106 } enip_request_info_t
;
108 enum enip_connid_type
{ECIDT_UNKNOWN
, ECIDT_O2T
, ECIDT_T2O
};
110 void enip_close_cip_connection( packet_info
*pinfo
, guint16 ConnSerialNumber
, guint16 VendorID
, guint32 DeviceSerialNumber
);
112 extern attribute_info_t enip_attribute_vals
[45];
114 #endif /* PACKET_ENIP_H */