libtase2  2.4.0
TASE.2/ICCP Protocol Source Code Library for C/C++
Loading...
Searching...
No Matches
iso_connection_parameters.h
Go to the documentation of this file.
1/*
2 * iso_connection_parameters.h
3 *
4 * This file is part of libmms/libtase2.
5 *
6 * Copyright 2013-2023 Michael Zillgihs
7 *
8 * All rights reserved.
9 */
10
11#ifndef ISO_CONNECTION_PARAMETERS_H_
12#define ISO_CONNECTION_PARAMETERS_H_
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#include "tls_config.h"
19#include "hal_socket.h"
20#include "libmms_common_api.h"
21#include "asecurity.h"
22#include <stdint.h>
23
32typedef struct {
33 uint16_t arc[10];
36
37LIBMMS_API void
39
45LIBMMS_API char*
47
55
76
97
98const char*
100
101typedef struct sAcseAuthenticationParameter* AcseAuthenticationParameter;
102
104{
106
107 union
108 {
109 struct
110 {
111 uint8_t* octetString;
113 } password; /* for mechanism = ACSE_AUTH_PASSWORD */
114
115 struct
116 {
117 uint8_t* buf;
119 } certificate; /* for mechanism = ACSE_AUTH_CERTIFICATE or ACSE_AUTH_TLS */
120
122};
123
124AcseAuthenticationParameter
126
127void
128AcseAuthenticationParameter_destroy(AcseAuthenticationParameter self);
129
130void
132
133void
134AcseAuthenticationParameter_setPassword(AcseAuthenticationParameter self, char* password);
135
141typedef struct {
142 uint8_t size;
143 uint8_t value[16];
144} TSelector;
145
146typedef struct {
147 uint8_t size;
148 uint8_t value[16];
149} SSelector;
150
151typedef struct {
152 uint8_t size;
153 uint8_t value[16];
154} PSelector;
155
156typedef struct sIsoApplicationAddress* IsoApplicationAddress;
157
172
184(*AcseAuthenticator)(void* parameter, AcseAuthenticationParameter authParameter, void** securityToken, IsoApplicationAddress localAppAddr, IsoApplicationAddress remoteAppAddr, Socket socket);
185
186typedef ASecurityConfiguration
187(*AcseALSConfigurationProvider)(void* parameter, IsoApplicationAddress localAppRef, IsoApplicationAddress remoteAppRef, Socket socket);
188
198LIBMMS_API void
199IsoApplicationAddress_setApTitle(IsoApplicationAddress self, const char* apTitle);
200
206LIBMMS_API void
207IsoApplicationAddress_setAeQualifier(IsoApplicationAddress self, int aeQualifier);
208
214LIBMMS_API void
215IsoApplicationAddress_setAeInvocationId(IsoApplicationAddress self, int aeInvocationId);
216
222LIBMMS_API void
223IsoApplicationAddress_setApInvocationId(IsoApplicationAddress self, int apInvocationId);
224
237LIBMMS_API void
238IsoApplicationAddress_setLowerLayerAddresses(IsoApplicationAddress self, PSelector pSelector, SSelector sSelector, TSelector tSelector);
239
242#ifdef __cplusplus
243}
244#endif
245
246#endif /* ISO_CONNECTION_PARAMETERS_H_ */
void AcseAuthenticationParameter_destroy(AcseAuthenticationParameter self)
ASecurityConfiguration(* AcseALSConfigurationProvider)(void *parameter, IsoApplicationAddress localAppRef, IsoApplicationAddress remoteAppRef, Socket socket)
Definition iso_connection_parameters.h:187
LIBMMS_API void IsoApplicationAddress_setApInvocationId(IsoApplicationAddress self, int apInvocationId)
set the AP-invocation-identifier
LIBMMS_API void ItuObjectIdentifier_setFromString(ItuObjectIdentifier *self, const char *str)
AcseServiceUserDiagnostics
Diagnostic information for ACSE service user (authentication) result.
Definition iso_connection_parameters.h:80
LIBMMS_API void IsoApplicationAddress_setAeInvocationId(IsoApplicationAddress self, int aeInvocationId)
set the AE-invocation-identifier
AcseServiceUserDiagnostics(* AcseAuthenticator)(void *parameter, AcseAuthenticationParameter authParameter, void **securityToken, IsoApplicationAddress localAppAddr, IsoApplicationAddress remoteAppAddr, Socket socket)
Callback function to authenticate a peer.
Definition iso_connection_parameters.h:184
const char * AcseServiceUserDiagnostics_toString(AcseServiceUserDiagnostics diag)
void AcseAuthenticationParameter_setPassword(AcseAuthenticationParameter self, char *password)
AcseAuthenticationParameter AcseAuthenticationParameter_create(void)
AcseAuthenticationMechanism
authentication mechanism used by AcseAuthenticator
Definition iso_connection_parameters.h:60
LIBMMS_API void IsoApplicationAddress_setApTitle(IsoApplicationAddress self, const char *apTitle)
set the AP-Title
LIBMMS_API char * ItuObjectIdentifier_toString(ItuObjectIdentifier *self)
Convert OID to string.
LIBMMS_API void IsoApplicationAddress_setAeQualifier(IsoApplicationAddress self, int aeQualifier)
set the AE-Qualifier
LIBMMS_API void IsoApplicationAddress_setLowerLayerAddresses(IsoApplicationAddress self, PSelector pSelector, SSelector sSelector, TSelector tSelector)
set addresses for the lower layers
void AcseAuthenticationParameter_setAuthMechanism(AcseAuthenticationParameter self, AcseAuthenticationMechanism mechanism)
@ ACSE_USER_AUTH_FAILURE
Definition iso_connection_parameters.h:94
@ ACSE_USER_CALLING_AE_QUALIFIER_NOT_RECOGNIZED
Definition iso_connection_parameters.h:86
@ ACSE_USER_CALLING_AP_TITLE_NOT_RECOGNIZED
Definition iso_connection_parameters.h:84
@ ACSE_USER_CALLING_AP_INVOCATION_ID_NOT_RECOGNIZED
Definition iso_connection_parameters.h:85
@ ACSE_USER_AUTH_MECH_NAME_REQUIRED
Definition iso_connection_parameters.h:93
@ ACSE_USER_CALLED_AE_QUALIFIER_NOT_RECOGNIZED
Definition iso_connection_parameters.h:90
@ ACSE_USER_NO_REASON_GIVEN
Definition iso_connection_parameters.h:82
@ ACSE_USER_CALLING_AE_INVOCATION_ID_NOT_RECOGNIZED
Definition iso_connection_parameters.h:87
@ ACSE_USER_AUTH_MECH_NAME_NOT_RECOGNIZED
Definition iso_connection_parameters.h:92
@ ACSE_USER_CALLED_AE_INVOCATION_ID_NOT_RECOGNIZED
Definition iso_connection_parameters.h:91
@ ACSE_USER_OK
Definition iso_connection_parameters.h:81
@ ACSE_USER_AUTH_REQUIRED
Definition iso_connection_parameters.h:95
@ ACSE_USER_CALLED_AP_INVOCATION_ID_NOT_RECOGNIZED
Definition iso_connection_parameters.h:89
@ ACSE_USER_APP_CONTEXT_NAME_NOT_SUPPORTED
Definition iso_connection_parameters.h:83
@ ACSE_USER_CALLED_AP_TITLE_NOT_RECOGNIZED
Definition iso_connection_parameters.h:88
@ ACSE_AUTH_NONE
Definition iso_connection_parameters.h:62
@ ACSE_AUTH_PASSWORD
Definition iso_connection_parameters.h:65
@ ACSE_AUTH_MECH_UNKNOWN
Definition iso_connection_parameters.h:74
@ ACSE_AUTH_CERTIFICATE
Definition iso_connection_parameters.h:68
@ ACSE_AUTH_TLS
Definition iso_connection_parameters.h:71
ISO application reference (specifies an ISO application endpoint)
Definition iso_connection_parameters.h:51
ItuObjectIdentifier apTitle
Definition iso_connection_parameters.h:52
int aeQualifier
Definition iso_connection_parameters.h:53
ITU (International Telecommunication Union) object identifier (OID)
Definition iso_connection_parameters.h:32
int arcCount
Definition iso_connection_parameters.h:34
Definition iso_connection_parameters.h:151
uint8_t size
Definition iso_connection_parameters.h:152
Definition iso_connection_parameters.h:146
uint8_t size
Definition iso_connection_parameters.h:147
COTP T selector.
Definition iso_connection_parameters.h:141
uint8_t size
Definition iso_connection_parameters.h:142
Definition iso_connection_parameters.h:104
union sAcseAuthenticationParameter::@2 value
int length
Definition iso_connection_parameters.h:118
struct sAcseAuthenticationParameter::@2::@4 certificate
AcseAuthenticationMechanism mechanism
Definition iso_connection_parameters.h:105
uint8_t * buf
Definition iso_connection_parameters.h:117
struct sAcseAuthenticationParameter::@2::@3 password
int passwordLength
Definition iso_connection_parameters.h:112
uint8_t * octetString
Definition iso_connection_parameters.h:111
Definition iso_connection_parameters.h:159
int aeQualifier
Definition iso_connection_parameters.h:165
unsigned int hasAeInvocationId
Definition iso_connection_parameters.h:161
SSelector sSelector
Definition iso_connection_parameters.h:169
PSelector pSelector
Definition iso_connection_parameters.h:168
int aeInvocationId
Definition iso_connection_parameters.h:166
ItuObjectIdentifier apTitle
Definition iso_connection_parameters.h:164
TSelector tSelector
Definition iso_connection_parameters.h:170
unsigned int hasApInvocationId
Definition iso_connection_parameters.h:162
unsigned int hasAeQualifier
Definition iso_connection_parameters.h:160
int apInvocationId
Definition iso_connection_parameters.h:167
TLS API functions.