---
title: setVlanTag
framework: networkingdriverkit
role: symbol
role_heading: Instance Method
path: networkingdriverkit/iousernetworkpacket/setvlantag
---

# setVlanTag

## Declaration

```occ
void setVlanTag(uint16_t vlanTag);
```

## Parameters

- `vlanTag`: To be stored in the packet.

## Discussion

Discussion Set the Vlan Tag for the packet. Set the Vlan Tag for the packet, where the driver has enabled the kFeatureHardwareVlan capability, or the case that feature is not enabled, this method should not be used.
