/* sets the VLAN tag (the lower 3 bytes are the PVID) of a database filtering record 
Note that this function is documented in the main component header file, IxEthDB.h. */
IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBVlanTagSet(IxEthDBMacAddr *macAddr, IxEthDBVlanTag vlanTag)
/* sets the VLAN tag (the lower 3 bytes are the PVID) of a database filtering record 
Note that this function is documented in the main component header file, IxEthDB.h. */
IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBVlanTagSet(IxEthDBMacAddr *macAddr, IxEthDBVlanTag vlanTag)
{
    HashNode *searchResult;
    MacDescriptor *descriptor;
    IX_ETH_DB_CHECK_REFERENCE(macAddr);
    IX_ETH_DB_CHECK_VLAN_TAG(vlanTag);
    searchResult = ixEthDBSearch(macAddr, IX_ETH_DB_ALL_FILTERING_RECORDS);
    if (searchResult == NULL)
    {
        return IX_ETH_DB_NO_SUCH_ADDR;
    }
    descriptor = (MacDescriptor *) searchResult->data;
    descriptor->type = IX_ETH_DB_FILTERING_VLAN_RECORD;
    descriptor->recordData.filteringVlanData.ieee802_1qTag = vlanTag;
    ixEthDBReleaseHashNode(searchResult);
    return IX_ETH_DB_SUCCESS;
}