# addFlow

Source: [https://docs.qualcomm.com/doc/80-PK177-134/topic/add_flow.html](https://docs.qualcomm.com/doc/80-PK177-134/topic/add_flow.html)

Adds a new filter to the system and applies the provided uplink/downlink levels, PDCP timer, and OOD value.

    addFlow()Copy to clipboard

## Parameters

| Parameters | API type | Data type | Description |
| --- | --- | --- | --- |
| direction | Java | directionEnum | The direction<br>                                that the filter should be applied on (UPLINK, DOWNLINK, or<br>                                BOTH). |
| Native | dpp\_directionEnum |
| srcIp | Java | String | Source IP address<br><br><br>                                <br>(This is always the address of the mobile device, even when the<br>                                    filter is for DOWNLINK). |
| Native | const char \* |
| srcPort | Java | int | Source port<br><br><br>                                <br>(This is always the port of the mobile device, even when the<br>                                    filter is for DOWNLINK). |
| Native | uint16\_t |
| dstIp | Java | String | Destination IP address<br><br><br>                                <br>(This is always the address of the external target, even when the<br>                                    filter is for DOWNLINK). |
| Native | const char \* |
| dstPort | Java | int | Destination port<br><br><br>                                <br>(This is always the port of the external target, even when the<br>                                    filter is for DOWNLINK). |
| Native | uint16\_t |
| protocol | Java | protocolEnum | Protocol. |
| Native | dpp\_protocolEnum |
| appType | Java | appTypeEnum | Classification of the app requesting the addition of<br>                                this flow (appType). |
| Native | dpp\_appTypeEnum |
| inactivityTimer | Java | long | Time that the flow can be inactive before the system<br>                                deletes it. |
| Native | uint32\_t |
| dscp | Java | int | DSCP value (0-255). |
| Native | uint8\_t |
| cb | Java | IflowStatus | Callback providing the flow ID (iFlowStatus). |
| Native | dpp\_flowStatus |
| ret | Native | int8\_t& | On success this is the actual return value from the API.<br><br><br>                                <br><ul class="ul"><br>                                        <li class="li">1: Success</li><br><br>                                        <li class="li">-1: Iqesdk is null</li><br><br>                                        <li class="li">-2: Subsystem error</li><br><br>                                    </ul> |

## Returns

| Return | API type | Data type | Description |
| --- | --- | --- | --- |
| response | Java | int | <ul class="ul" id="concept.dita_1079e836-63de-48a4-b980-bc9d95d0fe52__ul_ocw_zct_n5b"><br>                                    <li class="li">1: Success</li><br><br>                                    <li class="li">-1: Iqesdk is null</li><br><br>                                    <li class="li">-2: Subsystem error</li><br><br>                                </ul> |
| Native | qesdk\_transaction\_status | See QESDK transaction status for Native APIs for usage details. Use qesdk\_transaction\_status to confirm API call invocation. If successful, use the `ret` value for the actual API return value object. |

**Parent Topic:** DPP subsystem APIs

Last Published: Nov 14, 2024

Previous Topic
 
registerFlowStatusUpdates Next Topic

getFlows