Go to the documentation of this file.
24 #ifndef __APP_LAYER_ENIP_COMMON_H__
25 #define __APP_LAYER_ENIP_COMMON_H__
31 #define LIST_SERVICES 0x0004
32 #define LIST_IDENTITY 0x0063
33 #define LIST_INTERFACES 0x0064
34 #define REGISTER_SESSION 0x0065
35 #define UNREGISTER_SESSION 0x0066
36 #define SEND_RR_DATA 0x006F
37 #define SEND_UNIT_DATA 0x0070
38 #define INDICATE_STATUS 0x0072
42 #define NULL_ADDR 0x0000
43 #define CONNECTION_BASED 0x00a1
44 #define CONNECTED_DATA_ITEM 0x00b1
45 #define UNCONNECTED_DATA_ITEM 0x00b2
46 #define SEQUENCE_ADDR_ITEM 0xB002
49 #define SUCCESS 0x0000
50 #define INVALID_CMD 0x0001
51 #define NO_RESOURCES 0x0002
52 #define INCORRECT_DATA 0x0003
53 #define INVALID_SESSION 0x0064
54 #define INVALID_LENGTH 0x0065
55 #define UNSUPPORTED_PROT_REV 0x0069
57 #define ENCAP_HEADER_ERROR 0x006A
59 #define MAX_CIP_SERVICE 127
60 #define MAX_CIP_CLASS 65535
61 #define MAX_CIP_ATTRIBUTE 65535
64 #define CIP_RESERVED 0x00
65 #define CIP_GET_ATTR_ALL 0x01
66 #define CIP_GET_ATTR_LIST 0x03
67 #define CIP_SET_ATTR_LIST 0x04
68 #define CIP_RESET 0x05
69 #define CIP_START 0x06
71 #define CIP_CREATE 0x08
72 #define CIP_DELETE 0x09
74 #define CIP_APPLY_ATTR 0x0d
75 #define CIP_GET_ATTR_SINGLE 0x0e
76 #define CIP_SET_ATTR_SINGLE 0x10
77 #define CIP_KICK_TIMER 0x4b
78 #define CIP_OPEN_CONNECTION 0x4c
79 #define CIP_CHANGE_START 0x4f
80 #define CIP_GET_STATUS 0x50
83 #define PATH_CLASS_8BIT 0x20
84 #define PATH_CLASS_16BIT 0x21
85 #define PATH_INSTANCE_8BIT 0x24
86 #define PATH_INSTANCE_16BIT 0x25
87 #define PATH_ATTR_8BIT 0x30
88 #define PATH_ATTR_16BIT 0x31 //possible value
232 int DecodeCIPPDU(
const uint8_t *input, uint32_t input_len,
struct ENIPEncapAddressItem_ ENIPEncapAddressItem
ENIPEncapDataHdr encap_data_header
struct CIPServiceEntry_::@2::@5 response
struct ENIPState_ ENIPState
Per flow ENIP state container.
struct CIPServiceEntry_::@2::@4 request
Per flow ENIP state container.
AppLayerStateData state_data
struct HtpBodyChunk_ * next
TAILQ_ENTRY(SegmentEntry_) next
TAILQ_HEAD(, ENIPTransaction_) tx_list
int DecodeCommonPacketFormatPDU(const uint8_t *input, uint32_t input_len, ENIPTransaction *enip_data, uint16_t offset)
Decode Common Packet Format.
int DecodeCIPRequestMSPPDU(const uint8_t *input, uint32_t input_len, ENIPTransaction *enip_data, uint16_t offset)
Decode CIP Request Multi Service Packet.
struct ENIPTransaction_ ENIPTransaction
struct CIPServiceEntry_ CIPServiceEntry
struct CIPRespHdr_ CIPRespHdr
int DecodeCIPResponseMSPPDU(const uint8_t *input, uint32_t input_len, ENIPTransaction *enip_data, uint16_t offset)
Decode CIP Response MultiService Packet.
ENIPEncapDataItem encap_data_item
int DecodeCIPRequestPathPDU(const uint8_t *input, uint32_t input_len, CIPServiceEntry *node, uint16_t offset)
Decode CIP Request Path.
int DecodeCIPResponsePDU(const uint8_t *input, uint32_t input_len, ENIPTransaction *enip_data, uint16_t offset)
Decode CIP Response.
struct ENIPEncapDataItem_ ENIPEncapDataItem
struct SegmentEntry_ SegmentEntry
struct AttributeEntry_ AttributeEntry
struct AppLayerTxData AppLayerTxData
TAILQ_HEAD(, CIPServiceEntry_) service_list
TAILQ_ENTRY(CIPServiceEntry_) next
uint32_t interface_handle
TAILQ_ENTRY(AttributeEntry_) next
TAILQ_HEAD(, AttributeEntry_) attrib_list
struct ENIPEncapHdr_ ENIPEncapHdr
uint64_t tx_with_detect_state_cnt
struct ENIPEncapDataHdr_ ENIPEncapDataHdr
int DecodeCIPPDU(const uint8_t *input, uint32_t input_len, ENIPTransaction *enip_data, uint16_t offset)
Decode CIP packet.
int DecodeENIPPDU(const uint8_t *input, uint32_t input_len, ENIPTransaction *enip_data)
Decode ENIP Encapsulation Header.
struct CIPReqHdr_ CIPReqHdr
int DecodeCIPRequestPDU(const uint8_t *input, uint32_t input_len, ENIPTransaction *enip_data, uint16_t offset)
Decode CIP Request.
TAILQ_ENTRY(ENIPTransaction_) next
ENIPEncapAddressItem encap_addr_item
TAILQ_HEAD(, SegmentEntry_) segment_list