---
title: mbuf_split
framework: Kernel
role: symbol
role_heading: Function
platforms: [macOS 10.4+]
path: kernel/1535762-mbuf_split
---

# mbuf_split

## Declaration

```occ
errno_t mbuf_split(mbuf_t src, size_t offset, mbuf_how_t how, mbuf_t *new_mbuf);
```

## Parameters

- `src`: The mbuf to be split.
- `offset`: The offset in the buffer where the mbuf should be split.
- `how`: Blocking or non-blocking.
- `new_mbuf`: Upon success, the second half of the split mbuf chain.

## Return Value

Return Value 0 upon success otherwise the errno error. In the case of failure, the original mbuf chain passed in to src will be preserved.

## Discussion

Discussion Split an mbuf chain at a specific offset.
