---
title: SetDataOffset
framework: networkingdriverkit
role: symbol
role_heading: Instance Method
path: networkingdriverkit/iousernetworkpacket/setdataoffset-16kx3
---

# SetDataOffset

Changes the offset to the beginning of the packet’s data to the specified value.

## Declaration

```occ
virtual kern_return_t SetDataOffset(uint16_t offset);
```

## Parameters

- `offset`: The new data offset value, specified in bytes from the beginning of the buffer.

## Return Value

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

## See Also

### Configuring the Packet State Information

- [SetHeadroom](networkingdriverkit/iousernetworkpacket/setheadroom.md)
- [SetLinkHeaderLength](networkingdriverkit/iousernetworkpacket/setlinkheaderlength-9fqmg.md)
- [SetDataLength](networkingdriverkit/iousernetworkpacket/setdatalength-788b.md)
