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

# mbuf_pullup

## Declaration

```occ
errno_t mbuf_pullup(mbuf_t *mbuf, size_t len);
```

## Parameters

- `mbuf`: The mbuf in the chain the data should be contiguous in.
- `len`: The number of bytes to pull from the next mbuf(s).

## Return Value

Return Value 0 upon success otherwise the errno error. In the case of an error, the mbuf chain has been freed.

## Discussion

Discussion Move the next len bytes in to mbuf from other mbufs in the chain. This is commonly used to get the IP and TCP or UDP header contiguous in the first mbuf. If mbuf_pullup fails, the entire mbuf chain will be freed.
