---
title: getVlanTag
framework: networkingdriverkit
role: symbol
role_heading: Instance Method
path: networkingdriverkit/iousernetworkpacket/getvlantag
---

# getVlanTag

## Declaration

```occ
bool getVlanTag(uint16_t *vlanTag) const;
```

## Parameters

- `vlanTag`: Pointer to return vlanTag from the packet.

## Return Value

Return Value True if the tag is present, false otherwise.

## Discussion

Discussion Get the Vlan Tag from the packet, where the driver has enabled the kFeatureHardwareVlan capability, for the case that feature is not enabled, this method will return false.
