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

# mbuf_adjustlen

## Declaration

```occ
errno_t mbuf_adjustlen(mbuf_t mbuf, int amount);
```

## Parameters

- `mbuf`: The mbuf to adjust.
- `amount`: The number of bytes increment the length by.

## Return Value

Return Value 0 upon success otherwise the errno error.

## Discussion

Discussion Adds amount to the mbuf len. Verifies that the new length is valid (greater than or equal to zero and less than maximum amount of data that may be stored in the mbuf). This function will not adjust the packet header length field or affect any other mbufs in a chain.
