---
title: GetMemorySegmentOffset
framework: networkingdriverkit
role: symbol
role_heading: Instance Method
path: networkingdriverkit/iousernetworkpacket/getmemorysegmentoffset-39e4c
---

# GetMemorySegmentOffset

Gets the offset to the beginning of the packet in the corresponding memory buffer.

## Declaration

```occ
virtual kern_return_t GetMemorySegmentOffset(uint64_t *offset) const;
```

## Parameters

- `offset`: On return, the memory segment offset value.

## Return Value

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

## See Also

### Getting the Packet Information

- [GetHeadroom](networkingdriverkit/iousernetworkpacket/getheadroom.md)
- [GetLinkHeaderLength](networkingdriverkit/iousernetworkpacket/getlinkheaderlength-8dlhu.md)
- [GetDataOffset](networkingdriverkit/iousernetworkpacket/getdataoffset-4tw7y.md)
- [GetDataLength](networkingdriverkit/iousernetworkpacket/getdatalength-8km3n.md)
