#include "legato.h"
#include "taf_types_server.h"
#include "taf_diagSecurity_common.h"
Go to the source code of this file.
|
le_msg_ServiceRef_t | taf_diagSecurity_GetServiceRef (void) |
|
le_msg_SessionRef_t | taf_diagSecurity_GetClientSessionRef (void) |
|
void | taf_diagSecurity_AdvertiseService (void) |
|
taf_diagSecurity_ServiceRef_t | taf_diagSecurity_GetService (void) |
|
taf_diagSecurity_RxSesTypeCheckHandlerRef_t | taf_diagSecurity_AddRxSesTypeCheckHandler (taf_diagSecurity_ServiceRef_t svcRef, taf_diagSecurity_RxSesTypeHandlerFunc_t handlerPtr, void *contextPtr) |
|
void | taf_diagSecurity_RemoveRxSesTypeCheckHandler (taf_diagSecurity_RxSesTypeCheckHandlerRef_t handlerRef) |
|
le_result_t | taf_diagSecurity_SendSesTypeCheckResp (taf_diagSecurity_RxSesTypeCheckRef_t rxSesTypeRef, taf_diagSecurity_SesControlErrorCode_t errCode) |
|
taf_diagSecurity_SesChangeHandlerRef_t | taf_diagSecurity_AddSesChangeHandler (taf_diagSecurity_ServiceRef_t svcRef, taf_diagSecurity_SesChangeHandlerFunc_t handlerPtr, void *contextPtr) |
|
void | taf_diagSecurity_RemoveSesChangeHandler (taf_diagSecurity_SesChangeHandlerRef_t handlerRef) |
|
le_result_t | taf_diagSecurity_GetCurrentSesType (taf_diagSecurity_ServiceRef_t svcRef, taf_diagSecurity_SessionType_t *currentTypePtr) |
|
taf_diagSecurity_RxSecAccessMsgHandlerRef_t | taf_diagSecurity_AddRxSecAccessMsgHandler (taf_diagSecurity_ServiceRef_t svcRef, taf_diagSecurity_RxSecAccessMsgHandlerFunc_t handlerPtr, void *contextPtr) |
|
void | taf_diagSecurity_RemoveRxSecAccessMsgHandler (taf_diagSecurity_RxSecAccessMsgHandlerRef_t handlerRef) |
|
le_result_t | taf_diagSecurity_GetSecAccessPayloadLen (taf_diagSecurity_RxSecAccessMsgRef_t rxMsgRef, uint16_t *payloadLenPtr) |
|
le_result_t | taf_diagSecurity_GetSecAccessPayload (taf_diagSecurity_RxSecAccessMsgRef_t rxMsgRef, uint8_t *payloadPtr, size_t *payloadSizePtr) |
|
le_result_t | taf_diagSecurity_SendSecAccessResp (taf_diagSecurity_RxSecAccessMsgRef_t rxMsgRef, taf_diagSecurity_SecAccessErrorCode_t errCode, const uint8_t *dataPtr, size_t dataSize) |
|
le_result_t | taf_diagSecurity_RemoveSvc (taf_diagSecurity_ServiceRef_t svcRef) |
|
◆ taf_diagSecurity_GetServiceRef()
le_msg_ServiceRef_t taf_diagSecurity_GetServiceRef |
( |
void |
| ) |
|
Get the server service reference
◆ taf_diagSecurity_GetClientSessionRef()
Get the client session reference for the current message
◆ taf_diagSecurity_AdvertiseService()
void taf_diagSecurity_AdvertiseService |
( |
void |
| ) |
|
Initialize the server and advertise the service.
◆ taf_diagSecurity_GetService()
Diagnostic SessionControl type. Error code for SessionControl. Error code for SecurityAccess. Reference to the security service. Reference to the SessionControl received request message. Reference to the Session change message. Reference to the SecurityAccess received request message. Handler for a Rx session control type. Reference type used by Add/Remove functions for EVENT 'taf_diagSecurity_RxSesTypeCheck' Handler for a session control type change. Reference type used by Add/Remove functions for EVENT 'taf_diagSecurity_SesChange' Handler for a Rx security access message. Reference type used by Add/Remove functions for EVENT 'taf_diagSecurity_RxSecAccessMsg' Gets the reference of a security service. If there is no security service, a new one will be created.
- Returns
- Reference to the service instance.
- NULL if not allowed to create the service.
- Note
- The process exits if an invalid reference is passed.
Gets the reference of a security service. If there is no security service, a new one will be created.
- Returns
- Reference to the service instance.
- NULL if not allowed to create the service.
- Note
- The process exits if an invalid reference is passed.
◆ taf_diagSecurity_AddRxSesTypeCheckHandler()
Add handler function for EVENT 'taf_diagSecurity_RxSesTypeCheck'
This event provides information on Rx session control type.
- Parameters
-
[in] | svcRef | Service reference. |
[in] | handlerPtr | Received message handler. |
[in] | contextPtr | |
◆ taf_diagSecurity_RemoveRxSesTypeCheckHandler()
Remove handler function for EVENT 'taf_diagSecurity_RxSesTypeCheck'
- Parameters
-
◆ taf_diagSecurity_SendSesTypeCheckResp()
Sends a response message for the condition check of Rx session control type.
- Note
- This function must be called to send a response if receiving a message.
- Returns
- LE_OK – Succeeded.
- LE_BAD_PARAMETER – Invalid rxMsgRef.
- LE_NOT_FOUND – Reference not found.
- LE_FAULT – Failed.
- Note
- The process exits if an invalid reference is passed.
- Parameters
-
[in] | rxSesTypeRef | Received session type reference. |
[in] | errCode | Error code type. |
◆ taf_diagSecurity_AddSesChangeHandler()
Add handler function for EVENT 'taf_diagSecurity_SesChange'
This event provides information on session control type change.
- Parameters
-
[in] | svcRef | Service reference. |
[in] | handlerPtr | Received message handler. |
[in] | contextPtr | |
◆ taf_diagSecurity_RemoveSesChangeHandler()
Remove handler function for EVENT 'taf_diagSecurity_SesChange'
- Parameters
-
◆ taf_diagSecurity_GetCurrentSesType()
Gets the current session control type.
- Returns
- LE_OK – Succeeded.
- LE_BAD_PARAMETER – Invalid svcRef.
- LE_NOT_FOUND – Reference not found.
- Note
- The process exits if an invalid reference is passed.
- Parameters
-
[in] | svcRef | Service reference. |
[out] | currentTypePtr | Current session control type. |
◆ taf_diagSecurity_AddRxSecAccessMsgHandler()
Add handler function for EVENT 'taf_diagSecurity_RxSecAccessMsg'
This event provides information about the Rx security access message.
- Parameters
-
[in] | svcRef | Service reference. |
[in] | handlerPtr | Received message handler. |
[in] | contextPtr | |
◆ taf_diagSecurity_RemoveRxSecAccessMsgHandler()
Remove handler function for EVENT 'taf_diagSecurity_RxSecAccessMsg'
- Parameters
-
◆ taf_diagSecurity_GetSecAccessPayloadLen()
Gets the payload length of the Rx security access message.
- Returns
- LE_OK – Succeeded.
- LE_BAD_PARAMETER – Invalid rxMsgRef.
- LE_NOT_FOUND – Reference not found.
- Note
- The process exits if an invalid reference is passed.
- Parameters
-
[in] | rxMsgRef | Received message reference. |
[out] | payloadLenPtr | Security access payload length. |
◆ taf_diagSecurity_GetSecAccessPayload()
Gets the payload of the Rx security access message. The payload can be either securityAccessDataRecord or securityKey based on request accessType.
- Returns
- LE_OK – Succeeded.
- LE_BAD_PARAMETER – Invalid rxMsgRef.
- LE_OVERFLOW – Payload size is too small.
- LE_NOT_FOUND – Reference not found.
- Note
- The process exits if an invalid reference is passed.
- Parameters
-
[in] | rxMsgRef | Received message reference. |
[out] | payloadPtr | Security access payload. |
[in,out] | payloadSizePtr | |
◆ taf_diagSecurity_SendSecAccessResp()
Sends a response message for the Rx security access message.
- Note
- This function must be called to send a response if receiving a message.
- Returns
- LE_OK – Succeeded.
- LE_BAD_PARAMETER – Invalid rxMsgRef.
- LE_NOT_FOUND – Reference not found.
- LE_FAULT – Failed.
- Note
- The process exits if an invalid reference is passed.
- Parameters
-
[in] | rxMsgRef | Received message reference. |
[in] | errCode | Error code type. |
[in] | dataPtr | Payload data. |
[in] | dataSize | |
◆ taf_diagSecurity_RemoveSvc()
Removes the security service.
- Returns
- LE_OK – Succeeded.
- LE_BAD_PARAMETER – Invalid svcRef.
- Parameters
-
[in] | svcRef | Service reference. |