forked from cisagov/icsnpp-opcua-binary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
read-types.zeek
95 lines (76 loc) · 3.7 KB
/
read-types.zeek
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
##! read-types.zeek
##!
##! OPCUA Binary Protocol Analyzer
##!
##! Zeek script type/record definitions describing the information
##! that will be written to the log files.
##!
##! Author: Kent Kvarfordt
##! Contact: kent.kvarfordt@inl.gov
##!
##! Copyright (c) 2022 Battelle Energy Alliance, LLC. All rights reserved.
module ICSNPP_OPCUA_Binary;
export {
type OPCUA_Binary::Read: record {
ts : time &log;
uid : string &log;
id : conn_id &log;
is_orig : bool &log;
source_h : addr &log; # Source IP Address
source_p : port &log; # Source Port
destination_h : addr &log; # Destination IP Address
destination_p : port &log; # Destination Port
opcua_link_id : string &log; # Link back into OPCUA_Binary::Info
# Request
max_age : count &log &optional;
timestamps_to_return : count &log &optional;
timestamps_to_return_str : string &log &optional;
nodes_to_read_link_id : string &log &optional; # Link into OPCUA_Binary::NodesToRead
# Response
read_results_link_id : string &log &optional; # Link into OPCUA_Binary::ReadResults
diag_info_link_id : string &log &optional; # Link into OPCUA_Binary::DiagnosticInfoDetail log
};
type OPCUA_Binary::ReadNodesToRead: record {
ts : time &log;
uid : string &log;
id : conn_id &log;
is_orig : bool &log;
source_h : addr &log; # Source IP Address
source_p : port &log; # Source Port
destination_h : addr &log; # Destination IP Address
destination_p : port &log; # Destination Port
nodes_to_read_link_id : string &log; # Link back into OPCUA_Binary::Read
# node_id : OpcUA_NodeId
node_id_encoding_mask : string &log &optional;
node_id_namespace_idx : count &log &optional;
node_id_numeric : count &log &optional;
node_id_string : string &log &optional;
node_id_guid : string &log &optional;
node_id_opaque : string &log &optional;
attribute_id : count &log;
attribute_id_str : string &log;
index_range : string &log;
# data_encoding : QualifiedName
data_encoding_name_idx : count &log &optional;
data_encoding_name : string &log &optional;
};
type OPCUA_Binary::ReadResults: record {
ts : time &log;
uid : string &log;
id : conn_id &log;
is_orig : bool &log;
source_h : addr &log; # Source IP Address
source_p : port &log; # Source Port
destination_h : addr &log; # Destination IP Address
destination_p : port &log; # Destination Port
results_link_id : string &log;
level : count &log;
data_value_encoding_mask : string &log;
status_code_link_id : string &log &optional; # Id into OPCUA_Binary::StatusCodeDetail log
source_timestamp : time &log &optional;
source_pico_sec : count &log &optional;
server_timestamp : time &log &optional;
server_pico_sec : count &log &optional;
read_results_variant_metadata_link_id : string &log &optional; # Link into OPCUA_Binary::VariantMetadata log
};
}