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

# mbuf_pkthdr_setlen

## Declaration

```occ
void mbuf_pkthdr_setlen(mbuf_t mbuf, size_t len);
```

## Parameters

- `mbuf`: The mbuf containing the packet header.
- `len`: The new length of the packet.

## Discussion

Discussion Sets the length of the packet in the packet header.
