<!--
{
  "availability" : [
    "DriverKit: -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkingDriverKit",
  "identifier" : "/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "NetworkingDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserNetworkPacketBufferPool"
  },
  "title" : "IOUserNetworkPacketBufferPool"
}
-->

# IOUserNetworkPacketBufferPool

An object that manages the storage space for packets coming into and out of your driver.

```
class IOUserNetworkPacketBufferPool;
```

## Overview

Create an [`IOUserNetworkPacketBufferPool`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool) during the initial setup of your driver and use it to store the packets that your driver transmits or receives. Every driver must have a packet buffer pool large enough to hold all of the packets in its transmit and receive queues. You allocate this pool early in the <doc://com.apple.documentation/documentation/DriverKit/IOService/Start> method of your [`IOUserNetworkEthernet`](/documentation/NetworkingDriverKit/IOUserNetworkEthernet) service, and you deallocate that pool only after your service stops.

## Topics

### Creating a Buffer Pool

[`static kern_return_t Create(OSObject *poolOwner, const char name[1024], uint32_t packetCount, uint32_t bufferCount, uint32_t bufferSize, IOUserNetworkPacketBufferPool **pool);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/Create)

Creates a new packet buffer pool object and allocates space for the specified number of packets.

[`virtual bool init();`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/init)

Initializes the network packet buffer pool object.

[`virtual void free();`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/free)

Releases the resources owned by the network packet buffer pool object.

### Getting Pool Information

[`virtual kern_return_t GetBufferCount(uint32_t *count);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/GetBufferCount)

Returns the number of buffers associated with the network packet buffer pool.

[`virtual kern_return_t GetPacketCount(uint32_t *count);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/GetPacketCount)

Returns the number of network packets that the pool is capable of storing.

### Deallocating Packets

[`virtual kern_return_t DeallocatePacket(IOUserNetworkPacket *packet);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/DeallocatePacket-3i02n)

Disposes of any resources associated with the packet and makes the packet available for reuse.

[`virtual kern_return_t DeallocatePackets(IOUserNetworkPacket **packets, uint32_t packetsCount);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/DeallocatePackets-186ya)

Disposes of any resources associated with the specified packets and makes them available for reuse.

### Getting the Memory Block

[`virtual kern_return_t CopyMemoryDescriptor(IOMemoryDescriptor **memory);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/CopyMemoryDescriptor)

Returns a memory descriptor for the buffer pool’s contents.

### Instance Methods

[`virtual IOReturn allocatePacket(IOUserNetworkPacket **packet, IOOptionBits options);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/allocatePacket)

[`virtual IOReturn deallocatePacket(IOUserNetworkPacket *packet);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/deallocatePacket-42aob)

[`virtual IOReturn deallocatePackets(IOUserNetworkPacket **packets, uint32_t packetsCount);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/deallocatePackets-58i5)

[`virtual IOService * getPoolOwnerDevice();`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/getPoolOwnerDevice)

[`virtual bool initWithName(const char *poolName, OSObject *owner, IONetworkPacketType packetType, const IOUserNetworkPacketBufferPoolOptions *options);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/initWithName)

[`virtual IOReturn newPacket(IOUserNetworkPacketDescriptor *descriptor, IOUserNetworkPacket **packet);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/newPacket)

[`virtual void release() const;`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/release)

### Type Methods

[`static kern_return_t CreateWithOptions(IOService *device, const char name[1024], const IOUserNetworkPacketBufferPoolOptions *options, IOUserNetworkPacketBufferPool **pool);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/CreateWithOptions)

[`static IOUserNetworkPacketBufferPool * withName(const char *poolName, OSObject *owner, IONetworkPacketType packetType, const IOUserNetworkPacketBufferPoolOptions *options);`](/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/withName)

## Relationships

### Inherits From

[`OSObject`](/documentation/DriverKit/OSObject)

---

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)