Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
opcua_transport_layer.h
1/******************************************************************************
2** Copyright (C) 2006-2009 ascolab GmbH. All Rights Reserved.
3** Web: http://www.ascolab.com
4**
5** SPDX-License-Identifier: GPL-2.0-or-later
6**
7** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
8** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
9**
10** Project: OpcUa Wireshark Plugin
11**
12** Description: OpcUa Transport Layer Decoder.
13**
14** Author: Gerhard Gappmeier <[email protected]>
15******************************************************************************/
16
19 bool encrypted;
20};
21
23extern int g_opcua_default_sig_len;
24
25/* Transport Layer: message parsers */
26
38int parseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
39
51int parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
52
64int parseError(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
65
77int parseReverseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
78
90int parseMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
91
103int parseAbort(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
104
116int parseService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
117
129int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
130
142int parseCloseSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
143
149void registerTransportLayerTypes(int proto);
150
151
152/*
153 * The per-conversation encryption information is stored in a pointer
154 * value; here are functions to construct the pointer value, as a
155 * uintptr_t and extract values from the pointer value.
156 */
157#include "opcua_simpletypes.h"
158
166static inline uintptr_t
167construct_encryption_info(enum ua_message_mode mode, uint8_t sig_len)
168{
169 return ((uintptr_t)sig_len << 8) | (uintptr_t)mode;
170}
171
178static inline enum ua_message_mode
179extract_message_mode(uintptr_t data)
180{
181 return (enum ua_message_mode)(data & 0xff);
182}
183
190static inline uint8_t
191extract_signature_length(uintptr_t data)
192{
193 return (uint8_t)(data >> 8);
194}
195
203void store_encryption_info(packet_info *pinfo, enum ua_message_mode mode, uint8_t sig_len);
204
212void get_encryption_info(packet_info *pinfo, enum ua_message_mode *mode, uint8_t *sig_len);
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
Definition proto.h:909
Core tvbuff (testy virtual buffer) structure representing a region of packet data,...
Definition tvbuff-int.h:95
This struct is used to pass meta data down to decoding functions.
Definition opcua_transport_layer.h:18
bool encrypted
Definition opcua_transport_layer.h:19