/* retrieves the VLAN tag (the lower 3 bytes are the PVID) from a database VLAN filtering record  */
IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBVlanTagGet(IxEthDBMacAddr *macAddr, IxEthDBVlanTag *vlanTag)
/* retrieves the VLAN tag (the lower 3 bytes are the PVID) from a database VLAN filtering record  */
IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBVlanTagGet(IxEthDBMacAddr *macAddr, IxEthDBVlanTag *vlanTag)
{
    HashNode *searchResult;
    MacDescriptor *descriptor;
    IX_ETH_DB_CHECK_REFERENCE(macAddr);
    IX_ETH_DB_CHECK_REFERENCE(vlanTag);
    searchResult = ixEthDBSearch(macAddr, IX_ETH_DB_FILTERING_VLAN_RECORD);
    if (searchResult == NULL)
    {
        return IX_ETH_DB_NO_SUCH_ADDR;
    }
    descriptor = (MacDescriptor *) searchResult->data;
    *vlanTag = descriptor->recordData.filteringVlanData.ieee802_1qTag;
    ixEthDBReleaseHashNode(searchResult);
    return IX_ETH_DB_SUCCESS;
}