<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEFilterDataProvider/handleInboundData(from:readBytesStartOffset:readBytes:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NEFilterDataProvider(im)handleInboundDataFromFlow:readBytesStartOffset:readBytes:"
  },
  "title" : "handleInboundData(from:readBytesStartOffset:readBytes:)"
}
-->

# handleInboundData(from:readBytesStartOffset:readBytes:)

Make a filtering decision about a chunk of inbound data.

```
func handleInboundData(from flow: NEFilterFlow, readBytesStartOffset offset: Int, readBytes: Data) -> NEFilterDataVerdict
```

## Parameters

`flow`

An [`NEFilterFlow`](/documentation/NetworkExtension/NEFilterFlow) object containing information about the flow.

`offset`

An unsigned integer containing the offset of the data stored in `readBytes`. This offset is measured from the beginning of the flow’s inbound data.

`readBytes`

An <doc://com.apple.documentation/documentation/Foundation/NSData> object containing the data to filter. For non-UDP/TCP flows, since the data may optionally include the IP header, `readBytes` includes a 4-byte [`NEFilterDataAttribute`](/documentation/NetworkExtension/NEFilterDataAttribute) field preceding the user data. Your handler must examine the [`NEFilterDataAttribute`](/documentation/NetworkExtension/NEFilterDataAttribute) field and handle the data accordingly.

## Return Value

A [`NEFilterDataVerdict`](/documentation/NetworkExtension/NEFilterDataVerdict) object indicating how the system should handle the chunk of data and all subsequent inbound data for the flow.

## Discussion

`NEFilterDataProvider` subclasses must override this method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)