# 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](https://docs.qualcomm.com/doc/80-PK177-134/topic/direction.html)
that the filter should be applied on (UPLINK, DOWNLINK, or
BOTH). |
| direction | Native | dpp\_directionEnum | The [direction](https://docs.qualcomm.com/doc/80-PK177-134/topic/direction.html)
that the filter should be applied on (UPLINK, DOWNLINK, or
BOTH). |
| srcIp | Java | String | Source IP address
(This is always the address of the mobile device, even when the
filter is for DOWNLINK). |
| srcIp | Native | const char \* | Source IP address
(This is always the address of the mobile device, even when the
filter is for DOWNLINK). |
| srcPort | Java | int | Source port
(This is always the port of the mobile device, even when the
filter is for DOWNLINK). |
| srcPort | Native | uint16\_t | Source port
(This is always the port of the mobile device, even when the
filter is for DOWNLINK). |
| dstIp | Java | String | Destination IP address
(This is always the address of the external target, even when the
filter is for DOWNLINK). |
| dstIp | Native | const char \* | Destination IP address
(This is always the address of the external target, even when the
filter is for DOWNLINK). |
| dstPort | Java | int | Destination port
(This is always the port of the external target, even when the
filter is for DOWNLINK). |
| dstPort | Native | uint16\_t | Destination port
(This is always the port of the external target, even when the
filter is for DOWNLINK). |
| protocol | Java | protocolEnum | [Protocol](https://docs.qualcomm.com/doc/80-PK177-134/topic/dpp_flow_protocol.html). |
| protocol | Native | dpp\_protocolEnum | [Protocol](https://docs.qualcomm.com/doc/80-PK177-134/topic/dpp_flow_protocol.html). |
| appType | Java | appTypeEnum | Classification of the app requesting the addition of
this flow ([appType](https://docs.qualcomm.com/doc/80-PK177-134/topic/app_type.html)). |
| appType | Native | dpp\_appTypeEnum | Classification of the app requesting the addition of
this flow ([appType](https://docs.qualcomm.com/doc/80-PK177-134/topic/app_type.html)). |
| inactivityTimer | Java | long | Time that the flow can be inactive before the system
deletes it. |
| inactivityTimer | Native | uint32\_t | Time that the flow can be inactive before the system
deletes it. |
| dscp | Java | int | DSCP value (0-255). |
| dscp | Native | uint8\_t | DSCP value (0-255). |
| cb | Java | IflowStatus | Callback providing the flow ID ([iFlowStatus](https://docs.qualcomm.com/doc/80-PK177-134/topic/i_flow_status.html)). |
| cb | Native | dpp\_flowStatus | Callback providing the flow ID ([iFlowStatus](https://docs.qualcomm.com/doc/80-PK177-134/topic/i_flow_status.html)). |
| ret | Native | int8\_t& | On success this is the actual return value from the API.