m2mb API docs  25.30.004.0
m2mb API sets documentation
m2mb_secure_ms.h
Go to the documentation of this file.
1 /* $version: 252203 */
2 /*===============================================================================================*/
3 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
27 #ifndef M2M_M2MB_SECURE_MS_API_H
28 #define M2M_M2MB_SECURE_MS_API_H
29 
30 
31 /* Global declarations ==========================================================================*/
32 
34 #define M2MB_SYSTEM_FILE_ID (-1)
35 
37 #define M2MB_RAM_FILE_ID (0)
38 
39 /* m2mb_secure_ms_open Flags : default are all 0 */
41 #define M2MB_SECURE_MS_READ 0x0000
42 
43 #define M2MB_SECURE_MS_WRITE 0x0001 //( (UINT32)1<<0 )
44 
45 #define M2MB_SECURE_MS_CREATE 0x0002 //( (UINT32)1<<1 )
46 
49 #define M2MB_SECURE_MS_ADMIN 0x0004
50 
51 #define M2MB_SECURE_MS_READ_ONLY 0x0008
52 
55 #define M2MB_SECURE_MS_TRUSTED 0x0010
56 
57 #define M2MB_SECURE_MS_ALLOW_COMPARE 0x0020
58 
59 #define M2MB_SECURE_MS_NO_ENCRYPTION 0x0080
60 
61 /* Error Codes ================================================================================= */
66  typedef enum
67  {
102  ENUM_TO_INT( M2MB_SECURE_MS_ERRNO_E )
104 
105 /* Global typedefs ==============================================================================*/
106 
111 typedef struct M2MB_SECURE_MS_HANDLE_S *M2MB_SECURE_MS_HANDLE;
112 
161 typedef enum
162 {
178 
184 typedef enum
185 {
193 
194 /* Global functions =============================================================================*/
195 
196 /*-----------------------------------------------------------------------------------------------*/
274 
275 /*-----------------------------------------------------------------------------------------------*/
307 M2MB_RESULT_E m2mb_secure_ms_remove_file( INT32 file_id );
308 
309 /*-----------------------------------------------------------------------------------------------*/
385 M2MB_RESULT_E m2mb_secure_ms_open( M2MB_SECURE_MS_HANDLE *handle, INT32 file_id, UINT16 item_id, UINT16 flags );
386 
387 /*-----------------------------------------------------------------------------------------------*/
466 M2MB_RESULT_E m2mb_secure_ms_read( M2MB_SECURE_MS_HANDLE handle, UINT32 max_len, UINT8 *data, UINT32 *act_len );
467 
468 /*-----------------------------------------------------------------------------------------------*/
523 M2MB_RESULT_E m2mb_secure_ms_write( M2MB_SECURE_MS_HANDLE handle, UINT8 *data, UINT32 len );
524 
525 /*-----------------------------------------------------------------------------------------------*/
559 M2MB_RESULT_E m2mb_secure_ms_compare( M2MB_SECURE_MS_HANDLE handle, UINT8 *data, UINT32 len );
560 
561 /*-----------------------------------------------------------------------------------------------*/
605 M2MB_RESULT_E m2mb_secure_ms_delete( M2MB_SECURE_MS_HANDLE handle );
606 
607 /*-----------------------------------------------------------------------------------------------*/
652 M2MB_RESULT_E m2mb_secure_ms_close( M2MB_SECURE_MS_HANDLE handle );
653 
654 /*-----------------------------------------------------------------------------------------------*/
678 
679 /*-----------------------------------------------------------------------------------------------*/
700 M2MB_RESULT_E m2mb_secure_ms_init( void );
701 
702 #endif /* M2M_M2MB_SECURE_MS_API_H */
703 
M2MB_SECURE_MS_TSD_ACTIVE
Definition: m2mb_secure_ms.h:187
M2MB_SECURE_MS_ERRNO_FILE_SYSTEM_ERR
Definition: m2mb_secure_ms.h:91
M2MB_SECURE_MS_ERRNO_ILLEGAL_PARAM
Definition: m2mb_secure_ms.h:79
m2mb_secure_ms_write
M2MB_RESULT_E m2mb_secure_ms_write(M2MB_SECURE_MS_HANDLE handle, UINT8 *data, UINT32 len)
Writes a Secured Data item.
M2MB_SECURE_MS_CSD_ACTIVE
Definition: m2mb_secure_ms.h:189
M2MB_SECURE_MS_ERRNO_ID_DOESNT_EXIST
Definition: m2mb_secure_ms.h:77
M2MB_SECURE_MS_ERRNO_OUT_OF_SPACE
Definition: m2mb_secure_ms.h:81
M2MB_SECURE_MS_LOCK_CSD
Definition: m2mb_secure_ms.h:173
M2MB_SECURE_MS_GET_STATE
Definition: m2mb_secure_ms.h:164
M2MB_SECURE_MS_ERRNO_NOERROR
Definition: m2mb_secure_ms.h:69
M2MB_SECURE_MS_MANAGE_STATE_E
M2MB_SECURE_MS_MANAGE_STATE_E
The state of the Secure Storage. It represent the Secure Microservice System File levels (TSD-CSD-OSD...
Definition: m2mb_secure_ms.h:184
M2MB_SECURE_MS_ERRNO_INVALID_HANDLE
Definition: m2mb_secure_ms.h:83
M2MB_SECURE_MS_TELIT_FACTORY_RESET
Definition: m2mb_secure_ms.h:170
M2MB_SECURE_MS_ERRNO_INCOMPATIBLE_REQ
Definition: m2mb_secure_ms.h:99
M2MB_SECURE_MS_ERRNO_IN_USE
Definition: m2mb_secure_ms.h:71
M2MB_SECURE_MS_ERRNO_ID_ALREADY_EXIST
Definition: m2mb_secure_ms.h:75
m2mb_secure_ms_errno
M2MB_SECURE_MS_ERRNO_E m2mb_secure_ms_errno(M2MB_SECURE_MS_HANDLE handle)
Return the last error obtained calling Secure MS functions.
m2mb_secure_ms_manage
M2MB_RESULT_E m2mb_secure_ms_manage(M2MB_SECURE_MS_MANAGE_REQ_E request, M2MB_SECURE_MS_MANAGE_STATE_E *state)
A management function that handles Telit's and the Customer's default values.
M2MB_SECURE_MS_ERRNO_NO_ACCESS_RIGHTS
Definition: m2mb_secure_ms.h:73
M2MB_SECURE_MS_CUSTOMER_FACTORY_RESET
Definition: m2mb_secure_ms.h:176
m2mb_secure_ms_remove_file
M2MB_RESULT_E m2mb_secure_ms_remove_file(INT32 file_id)
Deletes the relevant secure data file.
M2MB_SECURE_MS_OSD_ACTIVE
Definition: m2mb_secure_ms.h:191
m2mb_secure_ms_delete
M2MB_RESULT_E m2mb_secure_ms_delete(M2MB_SECURE_MS_HANDLE handle)
Delete an Item from the Secured file.
M2MB_SECURE_MS_ERRNO_FAIL_TO_CREATE_HANDLE
Definition: m2mb_secure_ms.h:85
m2mb_secure_ms_close
M2MB_RESULT_E m2mb_secure_ms_close(M2MB_SECURE_MS_HANDLE handle)
Close the opened secure data file.
M2MB_SECURE_MS_ERRNO_FATAL
Definition: m2mb_secure_ms.h:95
M2MB_SECURE_MS_HANDLE
struct M2MB_SECURE_MS_HANDLE_S * M2MB_SECURE_MS_HANDLE
Opaque Handle used for the Secure Microservice calls.
Definition: m2mb_secure_ms.h:111
m2mb_secure_ms_read
M2MB_RESULT_E m2mb_secure_ms_read(M2MB_SECURE_MS_HANDLE handle, UINT32 max_len, UINT8 *data, UINT32 *act_len)
Read a Secured Data item.
m2mb_secure_ms_compare
M2MB_RESULT_E m2mb_secure_ms_compare(M2MB_SECURE_MS_HANDLE handle, UINT8 *data, UINT32 len)
Compare the input Item to the Secured copy.
M2MB_SECURE_MS_ERRNO_E
M2MB_SECURE_MS_ERRNO_E
Enumeration representing all supported: value different got. has line code meaning: provide number to...
Definition: m2mb_secure_ms.h:66
M2MB_SECURE_MS_MANAGE_REQ_E
M2MB_SECURE_MS_MANAGE_REQ_E
Management request option. Secure Microservice System File has 3 levels (see M2MB_SECURE_MS_MANAGE_ST...
Definition: m2mb_secure_ms.h:161
m2mb_secure_ms_open
M2MB_RESULT_E m2mb_secure_ms_open(M2MB_SECURE_MS_HANDLE *handle, INT32 file_id, UINT16 item_id, UINT16 flags)
Open the relevant secure data file.
M2MB_SECURE_MS_ERRNO_DELETE_ERR
Definition: m2mb_secure_ms.h:97
m2mb_secure_ms_init
M2MB_RESULT_E m2mb_secure_ms_init(void)
Module initialization.
M2MB_SECURE_MS_ERRNO_DATA_ISNT_DEFINED_AS_KEY
Definition: m2mb_secure_ms.h:93
M2MB_SECURE_MS_ERRNO_UNKNOWN
Definition: m2mb_secure_ms.h:101
M2MB_SECURE_MS_LOCK_TSD
Definition: m2mb_secure_ms.h:167
M2MB_SECURE_MS_ERRNO_CRYPTO_ERR
Definition: m2mb_secure_ms.h:89
M2MB_SECURE_MS_ERRNO_INVALID_DATA
Definition: m2mb_secure_ms.h:87