1# Data Transfer Management<a name="EN-US_TOPIC_0000001150002727"></a>
2
3
4## Introduction<a name="section11660541593"></a>
5
6In OpenHarmony, the data transfer management module provides cross-device data transfer management and control policies for distributed services. The data transfer management module defines a sef of APIs to provide management and control policies for cross-device data transmission and obtain the highest risk level of data to be sent to the peer device.
7
8The figure below illustrates the deployment logic of the data transfer management module.
9
10![](figures/datatransmitmgr.png)
11
12-   Distributed service: provides distributed data management capabilities, including the distributed file system and distributed data management.
13
14-   Data transfer management module: provides management and control policies for cross-device data transmission and obtains the highest risk level of data to be sent to the peer device.
15
16-   Device security level management module: provides device security level information for data transfer management and control.
17
18Before data is transferred, the distributed service checks whether the security level of the peer device supports the risk level of the data to be transferred. The table below lists the mappings between the device security levels and data risk levels.
19
20**Table 1** Mappings between data risk levels and device security levels
21
22| **Device Security Level**| **SL5**   | **SL4**   | **SL3**   | **SL2**   | **SL1**   |
23| ---------------- | --------- | --------- | --------- | --------- | --------- |
24| **Data Risk Level**| **S0 to S4** | **S0 to S4** | **S0 to S3** | **S0 to S2** | **S0 to S1** |
25
26The distributed service blocks data transmission based on the data risk level returned by the data transfer management module. Before data transmission is denied, a dialog box can be displayed to ask for user's permission. Data can be transferred if the user allows. The device vendors can implement the authorization mechanism.
27
28
29## Directory Structure<a name="section161941989596"></a>
30
31```
32/base/security/dataclassification
33├── frameworks                   # Framework code
34│   └── datatransmitmgr          # Code of basic functions
35└── interfaces                   # APIs
36    ── innerkits                # Internal APIs
37        └── datatransmitmgr      # Code of internal APIs
38```
39
40## Available APIs<a name="section1312121216216"></a>
41
42**Table 2** APIs of the data transfer management module
43
44| API                                                      | Description                                  |
45| ------------------------------------------------------------ | -------------------------------------- |
46| int32_t DATASL_GetHighestSecLevel(DEVSLQueryParams *queryParams, uint32_t *levelInfo); | Obtains the data risk levels supported by the device.    |
47| int32_t DATASL_GetHighestSecLevelAsync(DEVSLQueryParams *queryParams, HigestSecInfoCallback *callback); | Asynchronously obtains the data risk levels supported by the device.|
48| int32_t DATASL_OnStart(void);                                | Starts initialization.                          |
49| void DATASL_OnStop(void);                                    | Stops initialization.                        |
50
51
52
53
54## Repositories Involved<a name="section1371113476307"></a>
55
56**Security subsystem**
57
58base/security/dataclassification
59