<!--
{
  "availability" : [
    "DriverKit: -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkingDriverKit",
  "identifier" : "/documentation/NetworkingDriverKit/IOUserNetworkPacketQueue/SetPacketDirection",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "NetworkingDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserNetworkPacketQueue@F@SetPacketDirection#i#"
  },
  "title" : "SetPacketDirection"
}
-->

# SetPacketDirection

Specifies whether packets flow into or out of the queue.

```
virtual kern_return_t SetPacketDirection(IOUserNetworkPacketDirection direction);
```

## Parameters

`direction`

The direction for network packets to travel.

## Return Value

`kIOReturnSuccess` on success, or another value if an error occurred.

## Discussion

Typically, you do not call this method yourself. The concrete subclasses set the direction during initialization.

---

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)