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

# mbuf_dup

## Declaration

```occ
errno_t mbuf_dup(const mbuf_t src, mbuf_how_t how, mbuf_t *new_mbuf);
```

## Parameters

- `src`: The source mbuf.
- `how`: Blocking or non-blocking.
- `new_mbuf`: Upon success, the newly allocated mbuf.

## Return Value

Return Value 0 upon success otherwise the errno error.

## Discussion

Discussion Exactly duplicates an mbuf chain. If the original mbuf contains a packet header (including tags), the new mbuf will have the same packet header contents and a copy of each tag associated with the original mbuf.
