forked from cisagov/icsnpp-opcua-binary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opcua_binary-create_session.pac
69 lines (58 loc) · 2.14 KB
/
opcua_binary-create_session.pac
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
## opcua_binary-create_session.pac
##
## OPCUA Binary Protocol Analyzer
##
## Binpac code for processing the create session service.
##
## Author: Kent Kvarfordt
## Contact: [email protected]
##
## Copyright (c) 2022 Battelle Energy Alliance, LLC. All rights reserved.
#
# UA Specification Part 4 - Services 1.04.pdf - GetEndpoints Service
#
# 5.6.2.2 - Table 15 - CreateSession Service Parameters
#
type Create_Session_Req(service: Service) = record {
req_hdr : Request_Header;
client_description : OpcUA_ApplicationDescription;
server_uri : OpcUA_String;
endpoint_url : OpcUA_String;
session_name : OpcUA_String;
client_nonce : OpcUA_ByteString;
client_cert : OpcUA_ApplicationInstanceCert;
req_session_timeout : OpcUA_Duration;
max_res_msg_size : uint32;
} &let {
deliver: bool = $context.flow.deliver_Svc_CreateSessionReq(this);
} &byteorder=littleendian;
#
# UA Specification Part 4 - Services 1.04.pdf - GetEndpoints Service
#
# 5.6.2.2 - Table 15 - CreateSession Service Parameters
#
type Create_Session_Res(service: Service) = record {
res_hdr : Response_Header;
session_id : OpcUA_NodeId;
# SessionAuthenticationToken: Section 7.31: 0x0000 un-encrypted; Opaque otherwise
auth_token : OpcUA_NodeId;
revised_session_timeout : OpcUA_Duration;
server_nonce : OpcUA_ByteString;
server_cert : OpcUA_ApplicationInstanceCert;
endpoints_size : int32;
endpoints : OpcUA_EndpointDescription[$context.flow.bind_length(endpoints_size)];
#
# From Table 15 - CreateSession Service Parameters: Response
#
# Description: serverSoftwareCertificates:
#
# This parameter is deprecated and the array shall be empty. Note: Based on sample
# packet capture data, the server_software_cert_size is present, but always set to -1
#
server_software_cert_size : int32;
# server_software_cert : SignedSoftwareCertificate
server_signature : OpcUA_SignatureData;
max_req_msg_size : uint32;
} &let {
deliver: bool = $context.flow.deliver_Svc_CreateSessionRes(this);
} &byteorder=littleendian;