S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_secure_channels_api_internal.h File Reference
#include <stdint.h>
#include "sopc_secure_channels_api.h"

Go to the source code of this file.

Enumerations

enum  SOPC_SecureChannels_InternalEvent {
  INT_EP_SC_CREATE = 0x400 , INT_EP_SC_CLOSE , INT_EP_SC_REVERSE_CONNECT , INT_SC_RCV_RHE_TRANSITION ,
  INT_EP_SC_CREATED , INT_EP_SC_RHE_DECODED , INT_EP_SC_DISCONNECTED , INT_REVERSE_EP_REQ_CONNECTION ,
  INT_SC_RCV_HEL , INT_SC_RCV_ACK , INT_SC_RCV_ERR , INT_SC_RCV_OPN ,
  INT_SC_RCV_CLO , INT_SC_RCV_RHE , INT_SC_RCV_MSG_CHUNKS , INT_SC_RCV_MSG_CHUNK_ABORT ,
  INT_SC_RCV_FAILURE , INT_SC_SND_FATAL_FAILURE , INT_SC_SENT_ABORT_FAILURE , INT_SC_SND_HEL ,
  INT_SC_SND_ACK , INT_SC_SND_ERR , INT_SC_SND_RHE , INT_SC_SND_OPN ,
  INT_SC_SND_CLO , INT_SC_SND_MSG_CHUNKS , INT_SC_CLOSE
}
 
enum  SOPC_SecureChannels_TimerEvent {
  TIMER_SC_CONNECTION_TIMEOUT = 0x500 , TIMER_SC_SERVER_REVERSE_CONN_RETRY , TIMER_SC_CLIENT_OPN_RENEW , TIMER_SC_REQUEST_TIMEOUT ,
  TIMER_SC_RHE_RECEPTION_TIMEOUT
}
 

Functions

void SOPC_SecureChannels_EnqueueInternalEvent (SOPC_SecureChannels_InternalEvent event, uint32_t id, uintptr_t params, uintptr_t auxParam)
 
void SOPC_SecureChannels_EnqueueInternalEventAsNext (SOPC_SecureChannels_InternalEvent event, uint32_t id, uintptr_t params, uintptr_t auxParam)
 

Enumeration Type Documentation

◆ SOPC_SecureChannels_InternalEvent

Enumerator
INT_EP_SC_CREATE 

Creates a new SC connection to be associated with the given secure channel listener configuration index and socket index.
id = endpoint description configuration index
auxParam = socket index

INT_EP_SC_CLOSE 

Closes the SC connection with the given connection index associated with this SC listener.
id = secure channel connection index
(auxParam = (reverse) endpoint configuration index)

INT_EP_SC_REVERSE_CONNECT 

Server side only: Start reverse connection to a client reverse endpoint.
This event is triggered on EP_OPEN event treatment for each reverse connection configured,
when a connection is established (client shall be able to connect again) or
when a connection failed on retry timeout with event TIMER_SC_SERVER_REVERSE_CONN_RETRY.
id = endpoint description configuration index
auxParam = (uint16_t) client to connect configuration index in endpoint config

INT_SC_RCV_RHE_TRANSITION 

Client side only:
RHE associated to a waiting SC connection => transition validated for SC
id = secure channel connection index

INT_EP_SC_CREATED 

The new SC connection, requested by INT_EP_SC_CREATE, has been created with given index and is associated with the given SC listener configuration index. Registers the connection as associated to the listener.
id = endpoint description configuration index
auxParam = (uint32_t) secure channel connection index

INT_EP_SC_RHE_DECODED 

Notify secure listener that connection is accepted.
id = secure channel connection index.
param = (char*) serverURI
auxParam = (char*) serverEndpointURL

INT_EP_SC_DISCONNECTED 

Notify listener that connection has been closed.
id = (reverse) endpoint description configuration index
auxParam = (uint32_t) secure channel connection index

INT_REVERSE_EP_REQ_CONNECTION 

Client side only:
Initialization of Reverse connection (client-side), associates the secure channel connection to the secure listener.
id = reverse endpoint configuration index
auxParam = (uint32_t) secure channel connection index

INT_SC_RCV_HEL 

Hello message has been received on the secure channel with given connection index
id = secure channel connection index

INT_SC_RCV_ACK 

Acknowledge message has been received on the secure channel with given connection index and byte buffer containing message payload.
id = secure channel connection index
params = (SOPC_Buffer*) buffer positioned to message payload

INT_SC_RCV_ERR 

Error message has been received on the secure channel with given connection index
id = secure channel connection index
params = (SOPC_Buffer*) buffer positioned to message payload

INT_SC_RCV_OPN 

An OPC UA OpenSecureChannel message has been received on the secure channel with given connection index and byte buffer containing unencrypted message payload.
id = secure channel connection index
params = (SOPC_Buffer*) buffer positioned to message payload
auxParam = (uint32_t) requestId context if request (server side / requestHandle if response (client side)

INT_SC_RCV_CLO 

Same as INT_SC_RCV_OPN for CloseSecureChannel

INT_SC_RCV_RHE 

ReverseHello message was received on the secure channel with given connection index and byte buffer containing unencrypted message payload.
id = secure channel connection index
params = (SOPC_Buffer*) buffer positioned to message payload
INT_SC_RCV_RHE_TRANSITION is the final step in listener => connection manager

INT_SC_RCV_MSG_CHUNKS 

An OPC UA message has been received in one or several chunks on the secure channel with given connection index and byte buffer containing unencrypted message payload.
Same parameters as INT_SC_RCV_OPN

INT_SC_RCV_MSG_CHUNK_ABORT 

Notifies OPC UA message of type ABORT received.
Same parameters as INT_SC_RCV_OPN

INT_SC_RCV_FAILURE 

Reception of a message on the secure channel with given connection index failed. Closes the secure channel connection.
id = secure channel connection index
auxParam = error status

INT_SC_SND_FATAL_FAILURE 

Notifies encoding into chunks of an OPC UA message, provided as bytes buffer, failed during multi-chunk generation, signature or encryption.
id = secure channel connection index
params = requestId (server) / requestHandle (client)
auxParam = (SOPC_StatusCode) error status in case of client

INT_SC_SENT_ABORT_FAILURE 

Notifies encoding into chunks of an OPC UA ABORT message failed during multi-chunk generation, signature, encryption on transmission.
Same parameters as INT_SC_SND_FATAL_FAILURE

INT_SC_SND_HEL 

Provides an OPC UA TCP "Hello" message payload to send for the given connection index.
id = secure channel connection index
params = (SOPC_Buffer*) buffer positioned to message payload

INT_SC_SND_ACK 

Same as INT_SC_SND_HEL for "Hello" message

INT_SC_SND_ERR 

Same as INT_SC_SND_HEL for "Error" message

INT_SC_SND_RHE 

Same as INT_SC_SND_HEL for "Reverse Hello" message

INT_SC_SND_OPN 

Provides OPC UA OpenSecureChannel message payload to send for the given connection index.
id = secure channel connection index
params = (SOPC_Buffer*) buffer positioned to message payload
auxParam = (uint32_t) request Id context if response / request Handle if request when MSG

INT_SC_SND_CLO 

Provides OPC UA CloseSecureChannel message payload to send for the given connection index.
id = secure channel connection index
params = (SOPC_Buffer*) buffer positioned to message payload

INT_SC_SND_MSG_CHUNKS 

Provides OPC UA unencrypted message to send on the secure channel with given connection index.
Same parameters as INT_SC_SND_OPN

INT_SC_CLOSE 

Notifies to close the given connection index by modifying state to closed state. It is used to delay the effective closure just after sending an error message (INT_SC_SND_ERR).
id = secure channel connection index
params = (char*) reason
auxParam = (SOPC_StatusCode) errorStatus

◆ SOPC_SecureChannels_TimerEvent

Enumerator
TIMER_SC_CONNECTION_TIMEOUT 

Clears the secure channel data (if it is still not connected) and notifies it.
id = secure channel connection index

TIMER_SC_SERVER_REVERSE_CONN_RETRY 

This event is triggered on connection retry timeout after a reverse connection failure.
A new reverse connection event INT_EP_SC_REVERSE_CONNECT will be triggered on event treatment.
id = endpoint configuration index
params = reverse connection index in endpoint

TIMER_SC_CLIENT_OPN_RENEW 

Renews the secure channel security token.
id = secure channel connection index

TIMER_SC_REQUEST_TIMEOUT 

Clears the message request data and notifies it sending SC_REQUEST_TIMEOUT event to Services.
id = secure channel connection index
params = (uint32_t) requestHandle (Debug purpose only)
auxParam = (uint32_t) requestId

TIMER_SC_RHE_RECEPTION_TIMEOUT 

Timeout for reception of RHE message after socket connection from server
id = secure channel connection index

Function Documentation

◆ SOPC_SecureChannels_EnqueueInternalEvent()

void SOPC_SecureChannels_EnqueueInternalEvent ( SOPC_SecureChannels_InternalEvent event,
uint32_t id,
uintptr_t params,
uintptr_t auxParam )

◆ SOPC_SecureChannels_EnqueueInternalEventAsNext()

void SOPC_SecureChannels_EnqueueInternalEventAsNext ( SOPC_SecureChannels_InternalEvent event,
uint32_t id,
uintptr_t params,
uintptr_t auxParam )