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

# mbuf_set_vlan_tag

## Declaration

```occ
errno_t mbuf_set_vlan_tag(mbuf_t mbuf, u_int16_t vlan);
```

## Parameters

- `mbuf`: The mbuf containing the packet.
- `vlan`: The protocol family of the aux data to add.

## Return Value

Return Value 0 upon success otherwise the errno error.

## Discussion

Discussion This function is used by interfaces that support vlan tagging in hardware. This function will set properties in the mbuf to indicate which vlan the packet was received for.
