---
title: SetPacketDirection
framework: networkingdriverkit
role: symbol
role_heading: Instance Method
path: networkingdriverkit/iousernetworkpacketqueue/setpacketdirection
---

# SetPacketDirection

Specifies whether packets flow into or out of the queue.

## Declaration

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

## Parameters

- `direction`: The direction for network packets to travel.

## Return Value

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

## Discussion

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

## See Also

### Configuring the Queue Attributes

- [SetPacketBufferPool](networkingdriverkit/iousernetworkpacketqueue/setpacketbufferpool.md)
