11#ifndef TASE2_ENDPOINT_H_
12#define TASE2_ENDPOINT_H_
305 Tase2_ApplicationAddress localApAddr, Tase2_ApplicationAddress remoteApAddr);
352TASE2_API Tase2_ApplicationAddress
451TASE2_API Tase2_ApplicationAddress
struct sTLSConfiguration * TLSConfiguration
Definition tls_config.h:38
TASE2_API void Tase2_Endpoint_setLocalTcpPort(Tase2_Endpoint self, int tcpPort)
Sets the local TCP port (only for passive mode)
TASE2_API void Tase2_Endpoint_setRemoteIpAddress(Tase2_Endpoint self, const char *ipAddress)
Sets the remote IP address (only for active mode)
TASE2_API void Tase2_Endpoint_destroy(Tase2_Endpoint self)
Delete the endpoint and release all resources.
TASE2_API Tase2_Client Tase2_Endpoint_removeClient(Tase2_Endpoint self, Tase2_Client client)
Remove a client from the endpoint.
ASecurityConfiguration(* Tase2_Endpoint_ALSConfigurationProvider)(Tase2_Endpoint endpoint, void *parameter, const char *peerAddress, Tase2_ApplicationAddress localApAddr, Tase2_ApplicationAddress remoteApAddr)
Callback handler to provide a connection specific ASecurityConfiguration instance for ALS setup.
Definition tase2_endpoint.h:304
TASE2_API void Tase2_Endpoint_disconnect(Tase2_Endpoint self, int disconnectMethod)
Disconnect (close all connections and stop listening for new connections)
void(* Tase2_Endpoint_ConnectionHandler)(Tase2_Endpoint endpoint, void *parameter, Tase2_Endpoint_Connection connection, bool connect)
Callback function is called when another endpoint is connected or diconnected to the local endpoint.
Definition tase2_endpoint.h:162
TASE2_API void Tase2_Endpoint_setLocalIpAddress(Tase2_Endpoint self, const char *ipAddress)
Sets the local IP address (only for passive mode)
TASE2_API Tase2_Server Tase2_Endpoint_removeServer(Tase2_Endpoint self, Tase2_Server server)
Remove a server from the endpoint.
TASE2_API void Tase2_Endpoint_setLocalAddresses(Tase2_Endpoint self, Tase2_PSelector pSelector, Tase2_SSelector sSelector, Tase2_TSelector tSelector)
Sets the local addresses for ISO layers (transport, session, presentation)
TASE2_API Tase2_ApplicationAddress Tase2_Endpoint_getRemoteApplicationAddress(Tase2_Endpoint self)
Get the default remote application address instance.
Tase2_AuthenticationMethod
Authentication mechanism used by peer.
Definition tase2_endpoint.h:242
TASE2_API void Tase2_Endpoint_setRemoteApTitleEx(Tase2_Endpoint self, const char *apTitle)
Set remote AP-title (for active endpoint)
TASE2_API void Tase2_Endpoint_setConnectionHandler(Tase2_Endpoint self, Tase2_Endpoint_ConnectionHandler handler, void *parameter)
Set a handler that is called whenever a connection to a remote endpoint is opened or closed.
TASE2_API void Tase2_Endpoint_setALSConfigurationProvider(Tase2_Endpoint self, Tase2_Endpoint_ALSConfigurationProvider provider, void *parameter)
Set a ALS configuration provider. This enables the user to provide a connection specific ASecurityCon...
TASE2_API bool Tase2_Endpoint_isConnected(Tase2_Endpoint self)
Check if the endpoint is connected with at least one TCP client (passive endpoint) or connected to a ...
TASE2_API void Tase2_Endpoint_setLocalAeQualifier(Tase2_Endpoint self, int aeQualifier)
Set local AE-qualifier.
TASE2_API void Tase2_Endpoint_setMaxServOutstandingCalling(Tase2_Endpoint self, int value)
Set the maximum number of outstanding service calls.
TASE2_API void Tase2_Endpoint_setConnectTimeout(Tase2_Endpoint self, int timeoutInMs)
Sets the connect timeout of active endpoints.
TASE2_API void Tase2_Endpoint_setALSConfiguration(Tase2_Endpoint self, ASecurityConfiguration secConfig)
Set application layer security (ALS) configuration.
Tase2_ALS_Mode
Definition tase2_endpoint.h:68
TASE2_API Tase2_TSelector * Tase2_Endpoint_Connection_getPeerTSel(Tase2_Endpoint_Connection self)
Get the T selector of the peer.
TASE2_API void Tase2_Endpoint_setLocalApInvocationId(Tase2_Endpoint self, int apInvocationId)
Set local AP-invocation-ID.
TASE2_API char * Tase2_Endpoint_Connection_getPeerApTitle(Tase2_Endpoint_Connection self)
Get the ISO ACSE AP-title of the peer.
TASE2_API Tase2_PSelector * Tase2_Endpoint_Connection_getPeerPSel(Tase2_Endpoint_Connection self)
Get the P selector of the peer.
TASE2_API char * Tase2_Endpoint_Connection_getPeerIpAddress(Tase2_Endpoint_Connection self)
Get the address of the peer application (IP address and port number)
TASE2_API Tase2_ApplicationAddress Tase2_Endpoint_getLocalApplicationAddress(Tase2_Endpoint self)
Get the local application address instance.
TASE2_API int Tase2_Endpoint_Connection_getMaxPduSize(Tase2_Endpoint_Connection self)
Get the maximum MMS PDU size used by this connection.
TASE2_API Tase2_Endpoint_State Tase2_Endpoint_getState(Tase2_Endpoint self)
Get the current state of the endpoint.
bool(* Tase2_Endpoint_ConnectionAcceptHandler)(Tase2_Endpoint endpoint, void *parameter, const char *peerAddress, Tase2_BilateralTable clientBlt, Tase2_AuthenticationMethod authType, uint8_t *authValue, int authValLen)
Callback handler to accept/reject new connections.
Definition tase2_endpoint.h:271
TASE2_API void Tase2_Endpoint_setRemoteAeQualifier(Tase2_Endpoint self, int aeQualifier)
Set remote AE-qualifier (for active endpoint)
TASE2_API const char * Tase2_Endpoint_getId(Tase2_Endpoint self)
Get the ID string of the endpoint.
TASE2_API void Tase2_Endpoint_setRemoteTcpPort(Tase2_Endpoint self, int tcpPort)
Sets the remote TCP port (only for active mode)
TASE2_API void Tase2_Endpoint_setStateChangedHandler(Tase2_Endpoint self, Tase2_Endpoint_StateChangedHandler handler, void *parameter)
Set a handler that is called whenever the state of the endpoint changes.
Tase2_Endpoint_State
Definition tase2_endpoint.h:40
TASE2_API Tase2_Endpoint Tase2_Endpoint_create(TLSConfiguration tlsConfig, bool passive)
Create a new endpoint instance.
TASE2_API void Tase2_Endpoint_setAddressMatchingRules(Tase2_Endpoint self, bool apTitle, bool aeQualifier, bool pSelector, bool sSelector, bool tSelector)
Set the address matching rules for identifying peer endpoints.
struct sTase2_Endpoint_Connection * Tase2_Endpoint_Connection
Represents a connection to another connected TASE.2 endpoint.
Definition tase2_endpoint.h:37
TASE2_API void Tase2_Endpoint_setMaxMmsPduSize(Tase2_Endpoint self, int maxPduSize)
Sets the maximum MMS PDU size used by the endpoint.
TASE2_API void Tase2_Endpoint_setIdentity(Tase2_Endpoint self, const char *vendor, const char *model, const char *revision)
Set own identity for the identity service.
TASE2_API void Tase2_Endpoint_setId(Tase2_Endpoint self, const char *id)
Set the ID string of the endpoint.
TASE2_API void Tase2_Endpoint_setConnectionAcceptHandler(Tase2_Endpoint self, Tase2_Endpoint_ConnectionAcceptHandler handler, void *parameter)
Set the peer connection handler that is called when a peer tries to connect.
TASE2_API void Tase2_Endpoint_setWriteTimeout(Tase2_Endpoint self, int timeoutInMs)
Sets the timeout for writing to TCP sockets.
TASE2_API void Tase2_Endpoint_setLocalApTitle(Tase2_Endpoint self, const char *apTitle, int aeQualifier)
Set the local AP-title value.
TASE2_API void Tase2_Endpoint_setRemoteApInvocationId(Tase2_Endpoint self, int apInvocationId)
Set remote AP-invocation-ID (for active endpoint)
TASE2_API void Tase2_Endpoint_setALSMode(Tase2_Endpoint self, Tase2_ALS_Mode mode)
Set the ALS (application layer security) mode.
TASE2_API Tase2_SSelector * Tase2_Endpoint_Connection_getPeerSSel(Tase2_Endpoint_Connection self)
Get the S selector of the peer.
TASE2_API void Tase2_Endpoint_setRemoteApTitle(Tase2_Endpoint self, const char *apTitle, int aeQualifier)
Set remote AP-title and AE-qualifier (for active endpoint)
TASE2_API void Tase2_Endpoint_connect(Tase2_Endpoint self)
Connect the endpoint (start a passive or active TCP endpoint)
struct sTase2_Client * Tase2_Client
A TASE.2 client to communicate with a single TASE.2 server.
Definition tase2_endpoint.h:88
TASE2_API void Tase2_Endpoint_setLocalAeInvocationId(Tase2_Endpoint self, int aeInvocationId)
Set local AE-invocation-ID.
struct sTase2_BilateralTable * Tase2_BilateralTable
Definition tase2_endpoint.h:27
TASE2_API bool Tase2_Endpoint_waitForState(Tase2_Endpoint self, Tase2_Endpoint_State state, int timeoutInMs)
Wait until the endpoint enters a specific state of state changes to TASE2_ENDPOINT_STATE_ERROR.
TASE2_API void Tase2_Endpoint_setLocalApTitleEx(Tase2_Endpoint self, const char *apTitle)
Set local AP-title.
TASE2_API void Tase2_Endpoint_setRemoteAddresses(Tase2_Endpoint self, Tase2_PSelector pSelector, Tase2_SSelector sSelector, Tase2_TSelector tSelector)
Sets the remote addresses for ISO layers (transport, session, presentation)
void(* Tase2_Endpoint_StateChangedHandler)(Tase2_Endpoint endpoint, void *parameter, Tase2_Endpoint_State newState)
Callback function is called whenever the state of the endpoint changes.
Definition tase2_endpoint.h:152
TASE2_API void Tase2_Endpoint_addServer(Tase2_Endpoint self, Tase2_Server server)
Add a server to the endpoint.
TASE2_API void Tase2_Endpoint_setRemoteAeInvocationId(Tase2_Endpoint self, int aeInvocationId)
Set remote AE-invocation-ID (for active endpoint)
TASE2_API int Tase2_Endpoint_connectedPeers(Tase2_Endpoint self)
Get number of connected peers.
TASE2_API void Tase2_Endpoint_disconnectPeer(Tase2_Endpoint self, const char *peerIpAddress)
Disconnect a specific connection identified by the IP address and optionally by the port number.
TASE2_API int Tase2_Endpoint_Connection_getPeerAeQualifier(Tase2_Endpoint_Connection self)
Get the ISO ACSE AE-qualifier of the peer.
struct sTase2_Endpoint * Tase2_Endpoint
A TASE.2 endpoint that can be configured as passive (TCP server) or active (TCP client)
Definition tase2_endpoint.h:32
TASE2_API void Tase2_Endpoint_setTLSConfiguration(Tase2_Endpoint self, TLSConfiguration tlsConfig)
Set the TLS configuration.
TASE2_API void Tase2_Endpoint_setRequestTimeout(Tase2_Endpoint self, int timeoutInMs)
Sets the timeout for confirmed request messages.
struct sTase2_Server * Tase2_Server
Handle for a Tase2_Server instance (representing a TASE.2/MMS server)
Definition tase2_endpoint.h:93
TASE2_API bool Tase2_Endpoint_isPassive(Tase2_Endpoint self)
Check if endpoint is in passive mode.
TASE2_API void Tase2_Endpoint_setMaxServOutstandingCalled(Tase2_Endpoint self, int value)
Set the maximum number of outstanding service calls.
@ TASE2_AUTH_TYPE_PASSWORD
Definition tase2_endpoint.h:247
@ TASE2_AUTH_TYPE_NONE
Definition tase2_endpoint.h:244
@ TASE2_AUTH_TYPE_UNKNOWN
Definition tase2_endpoint.h:256
@ TASE2_AUTH_TYPE_TLS
Definition tase2_endpoint.h:253
@ TASE2_AUTH_TYPE_CERTIFICATE
Definition tase2_endpoint.h:250
@ TASE2_ALS_MODE_UNSECURE
Definition tase2_endpoint.h:72
@ TASE2_ALS_MODE_BOTH
Definition tase2_endpoint.h:77
@ TASE2_ALS_MODE_SECURE
Definition tase2_endpoint.h:82
@ TASE2_ENDPOINT_STATE_IDLE
Definition tase2_endpoint.h:44
@ TASE2_ENDPOINT_STATE_ERROR
Definition tase2_endpoint.h:64
@ TASE2_ENDPOINT_STATE_LISTENING
Definition tase2_endpoint.h:49
@ TASE2_ENDPOINT_STATE_CONNECTED
Definition tase2_endpoint.h:54
@ TASE2_ENDPOINT_STATE_CONNECTING
Definition tase2_endpoint.h:59
ITU (International Telecommunication Union) object identifier (OID)
Definition iso_connection_parameters.h:32
P selector (ISO presentation layer address)
Definition tase2_endpoint.h:123
uint8_t size
Definition tase2_endpoint.h:124
S selector (ISO session layer address)
Definition tase2_endpoint.h:112
uint8_t size
Definition tase2_endpoint.h:113
T selector (ISO transport layer address)
Definition tase2_endpoint.h:101
uint8_t size
Definition tase2_endpoint.h:102
Definition tase2_endpoint.h:131
unsigned int hasApInvocationId
Definition tase2_endpoint.h:134
int aeQualifier
Definition tase2_endpoint.h:137
unsigned int hasAeInvocationId
Definition tase2_endpoint.h:133
Tase2_TSelector tSelector
Definition tase2_endpoint.h:142
Tase2_SSelector sSelector
Definition tase2_endpoint.h:141
ItuObjectIdentifier apTitle
Definition tase2_endpoint.h:136
int apInvocationId
Definition tase2_endpoint.h:139
int aeInvocationId
Definition tase2_endpoint.h:138
Tase2_PSelector pSelector
Definition tase2_endpoint.h:140
unsigned int hasAeQualifier
Definition tase2_endpoint.h:132