---
title: SetHeadroom
framework: networkingdriverkit
role: symbol
role_heading: Instance Method
path: networkingdriverkit/iousernetworkpacket/setheadroom
---

# SetHeadroom

Changes the number of bytes to reserve at the front of the packet’s buffer to the specified value.

## Declaration

```occ
virtual kern_return_t SetHeadroom(uint8_t headroom);
```

## Parameters

- `headroom`: The new headroom value, specified in bytes.

## Return Value

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

## See Also

### Configuring the Packet State Information

- [SetLinkHeaderLength](networkingdriverkit/iousernetworkpacket/setlinkheaderlength-9fqmg.md)
- [SetDataOffset](networkingdriverkit/iousernetworkpacket/setdataoffset-16kx3.md)
- [SetDataLength](networkingdriverkit/iousernetworkpacket/setdatalength-788b.md)
