Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_diagSecurity_server.h File Reference
#include "legato.h"
#include "taf_types_server.h"
#include "taf_diagSecurity_common.h"

Go to the source code of this file.

Functions

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)
 

Function Documentation

◆ taf_diagSecurity_GetServiceRef()

le_msg_ServiceRef_t taf_diagSecurity_GetServiceRef ( void  )

Get the server service reference

◆ taf_diagSecurity_GetClientSessionRef()

le_msg_SessionRef_t taf_diagSecurity_GetClientSessionRef ( void  )

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()

taf_diagSecurity_ServiceRef_t taf_diagSecurity_GetService ( void  )

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()

taf_diagSecurity_RxSesTypeCheckHandlerRef_t taf_diagSecurity_AddRxSesTypeCheckHandler ( taf_diagSecurity_ServiceRef_t  svcRef,
taf_diagSecurity_RxSesTypeHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'taf_diagSecurity_RxSesTypeCheck'

This event provides information on Rx session control type.

Parameters
[in]svcRefService reference.
[in]handlerPtrReceived message handler.
[in]contextPtr

◆ taf_diagSecurity_RemoveRxSesTypeCheckHandler()

void taf_diagSecurity_RemoveRxSesTypeCheckHandler ( taf_diagSecurity_RxSesTypeCheckHandlerRef_t  handlerRef)

Remove handler function for EVENT 'taf_diagSecurity_RxSesTypeCheck'

Parameters
[in]handlerRef

◆ taf_diagSecurity_SendSesTypeCheckResp()

le_result_t taf_diagSecurity_SendSesTypeCheckResp ( taf_diagSecurity_RxSesTypeCheckRef_t  rxSesTypeRef,
taf_diagSecurity_SesControlErrorCode_t  errCode 
)

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]rxSesTypeRefReceived session type reference.
[in]errCodeError code type.

◆ taf_diagSecurity_AddSesChangeHandler()

taf_diagSecurity_SesChangeHandlerRef_t taf_diagSecurity_AddSesChangeHandler ( taf_diagSecurity_ServiceRef_t  svcRef,
taf_diagSecurity_SesChangeHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'taf_diagSecurity_SesChange'

This event provides information on session control type change.

Parameters
[in]svcRefService reference.
[in]handlerPtrReceived message handler.
[in]contextPtr

◆ taf_diagSecurity_RemoveSesChangeHandler()

void taf_diagSecurity_RemoveSesChangeHandler ( taf_diagSecurity_SesChangeHandlerRef_t  handlerRef)

Remove handler function for EVENT 'taf_diagSecurity_SesChange'

Parameters
[in]handlerRef

◆ taf_diagSecurity_GetCurrentSesType()

le_result_t taf_diagSecurity_GetCurrentSesType ( taf_diagSecurity_ServiceRef_t  svcRef,
taf_diagSecurity_SessionType_t currentTypePtr 
)

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]svcRefService reference.
[out]currentTypePtrCurrent session control type.

◆ taf_diagSecurity_AddRxSecAccessMsgHandler()

taf_diagSecurity_RxSecAccessMsgHandlerRef_t taf_diagSecurity_AddRxSecAccessMsgHandler ( taf_diagSecurity_ServiceRef_t  svcRef,
taf_diagSecurity_RxSecAccessMsgHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'taf_diagSecurity_RxSecAccessMsg'

This event provides information about the Rx security access message.

Parameters
[in]svcRefService reference.
[in]handlerPtrReceived message handler.
[in]contextPtr

◆ taf_diagSecurity_RemoveRxSecAccessMsgHandler()

void taf_diagSecurity_RemoveRxSecAccessMsgHandler ( taf_diagSecurity_RxSecAccessMsgHandlerRef_t  handlerRef)

Remove handler function for EVENT 'taf_diagSecurity_RxSecAccessMsg'

Parameters
[in]handlerRef

◆ taf_diagSecurity_GetSecAccessPayloadLen()

le_result_t taf_diagSecurity_GetSecAccessPayloadLen ( taf_diagSecurity_RxSecAccessMsgRef_t  rxMsgRef,
uint16_t *  payloadLenPtr 
)

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]rxMsgRefReceived message reference.
[out]payloadLenPtrSecurity access payload length.

◆ taf_diagSecurity_GetSecAccessPayload()

le_result_t taf_diagSecurity_GetSecAccessPayload ( taf_diagSecurity_RxSecAccessMsgRef_t  rxMsgRef,
uint8_t *  payloadPtr,
size_t *  payloadSizePtr 
)

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]rxMsgRefReceived message reference.
[out]payloadPtrSecurity access payload.
[in,out]payloadSizePtr

◆ taf_diagSecurity_SendSecAccessResp()

le_result_t taf_diagSecurity_SendSecAccessResp ( taf_diagSecurity_RxSecAccessMsgRef_t  rxMsgRef,
taf_diagSecurity_SecAccessErrorCode_t  errCode,
const uint8_t *  dataPtr,
size_t  dataSize 
)

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]rxMsgRefReceived message reference.
[in]errCodeError code type.
[in]dataPtrPayload data.
[in]dataSize

◆ taf_diagSecurity_RemoveSvc()

le_result_t taf_diagSecurity_RemoveSvc ( taf_diagSecurity_ServiceRef_t  svcRef)

Removes the security service.

Returns
  • LE_OK – Succeeded.
  • LE_BAD_PARAMETER – Invalid svcRef.
Parameters
[in]svcRefService reference.