# addFilter Source: [https://docs.qualcomm.com/doc/80-PK177-134/topic/add_filter.html](https://docs.qualcomm.com/doc/80-PK177-134/topic/add_filter.html) Adds a new filter to the system and applies the provided uplink/downlink levels, PDCP timer, and OOD value. addFilter()Copy to clipboard ## Parameters | Parameters | API type | Data type | Description | | --- | --- | --- | --- | | srcIp | Java | String | Source IP address | | srcIp | Native | const char\* | Source IP address | | dstIp | Java | String | Destination IP address | | dstIp | Native | const char\* | Destination IP address | | srcPort | Java | int | Source port | | srcPort | Native | uint16\_t | Source port | | dstPort | Java | int | Destination port | | dstPort | Native | uint16\_t | Destination port | | protocol | Java | protocolEnum | [Protocol](https://docs.qualcomm.com/doc/80-PK177-134/topic/llm_filter_protocol.html) | | protocol | Native | llm\_protocolEnum | [Protocol](https://docs.qualcomm.com/doc/80-PK177-134/topic/llm_filter_protocol.html) | | dscp | Java | int | DSCP value (0-255) | | dscp | Native | uint8\_t | DSCP value (0-255) | | uplink | Java | level | Latency [level](https://docs.qualcomm.com/doc/80-PK177-134/topic/level.html) to be set on
uplink | | uplink | Native | llm\_level | Latency [level](https://docs.qualcomm.com/doc/80-PK177-134/topic/level.html) to be set on
uplink | | downlink | Java | level | Latency [level](https://docs.qualcomm.com/doc/80-PK177-134/topic/level.html) to be set on
downlink | | downlink | Native | llm\_level | Latency [level](https://docs.qualcomm.com/doc/80-PK177-134/topic/level.html) to be set on
downlink | | pdcpTimer | Java | long | PDCP timer value | | pdcpTimer | Native | uint32\_t | PDCP timer value | | ood | Java | oodEnum | [OOD value](https://docs.qualcomm.com/doc/80-PK177-134/topic/ood.html) | | ood | Native | llm\_oodEnum | [OOD value](https://docs.qualcomm.com/doc/80-PK177-134/topic/ood.html) | | addFilterCallback | Java | IfilterStatus | Callback providing the filter ID ([Filter status](https://docs.qualcomm.com/doc/80-PK177-134/topic/filter_status.html)) | | addFilterCallback | Native | llm\_filterStatus | Callback providing the filter ID ([Filter status](https://docs.qualcomm.com/doc/80-PK177-134/topic/filter_status.html)) | | ret | Native | int8\_t& | On success this is the actual return value from the API.



| | | | | | ## Returns | **Return** | **API type** | **Data type** | **Description** | | --- | --- | --- | --- | | response | Java | int | | | response | Native | qesdk\_transaction\_status | See [QESDK transaction status for Native APIs](https://docs.qualcomm.com/doc/80-PK177-134/topic/native_qesdk_class.html) 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. | | | | | | Note: Any kind of functional error will report via callback function. **Parent Topic:** [LLM subsystem APIs](https://docs.qualcomm.com/doc/80-PK177-134/topic/llm_functions.html) Last Published: Nov 14, 2024 [Previous Topic registerFilterStatusUpdates](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/register_filter_status_updates.md) [Next Topic addFilterV2](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/add_filter_v2.md)