亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ixethdbvlan.c

?? 友善mini2440嵌入式
?? C
?? 第 1 頁 / 共 3 頁
字號:
/** * @file IxEthDBVlan.c * * @brief Implementation of the VLAN API *  * @par * IXP400 SW Release version 2.0 *  * -- Copyright Notice -- *  * @par * Copyright 2001-2005, Intel Corporation. * All rights reserved. *  * @par * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. Neither the name of the Intel Corporation nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. *  * @par * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *  * @par * -- End of Copyright Notice -- */#include "IxEthDB.h"#include "IxEthDB_p.h"/* forward prototypes */IX_ETH_DB_PUBLICIxEthDBStatus ixEthDBUpdateTrafficClass(IxEthDBPortId portID, UINT32 classIndex);IX_ETH_DB_PUBLICIxEthDBStatus ixEthDBVlanTableGet(IxEthDBPortId portID, IxEthDBVlanSet portVlanTable, IxEthDBVlanSet vlanSet);/* contants used by various functions as "action" parameter */#define ADD_VLAN    (0x1)#define REMOVE_VLAN (0x2)/** * @brief adds or removes a VLAN from a VLAN set * * @param vlanID VLAN ID to add or remove * @param table VLAN set to add into or remove from * @param action ADD_VLAN or REMOVE_VLAN *  * @internal */IX_ETH_DB_PRIVATEvoid ixEthDBLocalVlanMembershipChange(UINT32 vlanID, IxEthDBVlanSet table, UINT32 action){    UINT32 setOffset;        /* add/remove VID to membership table */    setOffset = VLAN_SET_OFFSET(vlanID); /* we need 9 bits to index the 512 byte membership array */    if (action == ADD_VLAN)    {        table[setOffset] |= 1 << VLAN_SET_MASK(vlanID);    }    else if (action == REMOVE_VLAN)    {        table[setOffset] &= ~(1 << VLAN_SET_MASK(vlanID));    }}/** * @brief updates a set of 8 VLANs in an NPE * * @param portID ID of the port * @param setOffset offset of the 8 VLANs * * This function updates the VLAN membership table * and Transmit Tagging Info table for 8 consecutive * VLAN IDs indexed by setOffset. * * For example, a setOffset of 0 indexes VLAN IDs 0 * through 7, 1 indexes VLAN IDs 8 through 9 etc. * * @return IX_ETH_DB_SUCCESS if the operation completed * successfully or an appropriate error message otherwise * * @internal */IX_ETH_DB_PRIVATEIxEthDBStatus ixEthDBVlanTableEntryUpdate(IxEthDBPortId portID, UINT32 setOffset){    PortInfo *portInfo = &ixEthDBPortInfo[portID];    IxNpeMhMessage message;    IX_STATUS result;            FILL_SETPORTVLANTABLEENTRY_MSG(message, IX_ETH_DB_PORT_ID_TO_NPE_LOGICAL_ID(portID),         2 * setOffset,         portInfo->vlanMembership[setOffset],         portInfo->transmitTaggingInfo[setOffset]);        IX_ETHDB_SEND_NPE_MSG(IX_ETH_DB_PORT_ID_TO_NPE(portID), message, result);        return result;}/** * @brief updates a VLAN range in an NPE * * @param portID ID of the port * * This function is similar to @ref ixEthDBVlanTableEntryUpdate * except that it can update more than one VLAN set (up to * the entire VLAN membership and TTI tables if the offset is 0 * and length is sizeof (IxEthDBVlanSet) (512 bytes). * * Updating the NPE via this method is slower as it requires * a memory copy from SDRAM, hence it is recommended that the * ixEthDBVlanTableEntryUpdate function is used where possible. * * @return IX_ETH_DB_SUCCESS if the operation completed * successfully or an appropriate error message otherwise * * @internal */IX_ETH_DB_PRIVATEIxEthDBStatus ixEthDBVlanTableRangeUpdate(IxEthDBPortId portID){    PortInfo *portInfo    = &ixEthDBPortInfo[portID];    UINT8 *vlanUpdateZone = (UINT8 *) portInfo->updateMethod.vlanUpdateZone;    IxNpeMhMessage message;    UINT32 setIndex;    IX_STATUS result;    /* copy membership info and transmit tagging into into exchange area */    for (setIndex = 0 ; setIndex < sizeof (portInfo->vlanMembership) ; setIndex++)    {        /* membership and TTI data are interleaved */        vlanUpdateZone[setIndex * 2]     = portInfo->vlanMembership[setIndex];        vlanUpdateZone[setIndex * 2 + 1] = portInfo->transmitTaggingInfo[setIndex];    }    IX_OSAL_CACHE_FLUSH(vlanUpdateZone, FULL_VLAN_BYTE_SIZE);        /* build NPE message */    FILL_SETPORTVLANTABLERANGE_MSG(message, IX_ETH_DB_PORT_ID_TO_NPE_LOGICAL_ID(portID), 0, 0,         IX_OSAL_MMU_VIRT_TO_PHYS(vlanUpdateZone));    /* send message */        IX_ETHDB_SEND_NPE_MSG(IX_ETH_DB_PORT_ID_TO_NPE(portID), message, result);    return result;}/** * @brief adds or removes a VLAN from a port's VLAN membership table * or Transmit Tagging Information table * * @param portID ID of the port * @param vlanID VLAN ID to add or remove * @param table to add or remove from * @param action ADD_VLAN or REMOVE_VLAN * * @return IX_ETH_DB_SUCCESS if the operation completed * successfully or an appropriate error message otherwise * * @internal */IX_ETH_DB_PRIVATEIxEthDBStatus ixEthDBPortVlanMembershipChange(IxEthDBPortId portID, IxEthDBVlanId vlanID, IxEthDBVlanSet table, UINT32 action){    /* change VLAN in local membership table */    ixEthDBLocalVlanMembershipChange(vlanID, table, action);        /* send updated entry to NPE */    return ixEthDBVlanTableEntryUpdate(portID, VLAN_SET_OFFSET(vlanID));}/** * @brief sets the default port VLAN tag (the lower 3 bytes are the PVID) * * @param portID ID of the port * @param vlanTag port VLAN tag (802.1Q tag) *  * Note that this function is documented in the main component * header file, IxEthDB.h. * * @return IX_ETH_DB_SUCCESS if the operation completed successfully * or an appropriate error message otherwise */IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPortVlanTagSet(IxEthDBPortId portID, IxEthDBVlanTag vlanTag){    IxNpeMhMessage message;    IX_STATUS result;        IX_ETH_DB_CHECK_PORT(portID);        IX_ETH_DB_CHECK_SINGLE_NPE(portID);     IX_ETH_DB_CHECK_VLAN_TAG(vlanTag);        IX_ETH_DB_CHECK_FEATURE(portID, IX_ETH_DB_VLAN_QOS);            /* add VLAN ID to local membership table */    ixEthDBPortVlanMembershipChange(portID,         vlanTag & IX_ETH_DB_802_1Q_VLAN_MASK,         ixEthDBPortInfo[portID].vlanMembership,         ADD_VLAN);            /* set tag in portInfo */    ixEthDBPortInfo[portID].vlanTag = vlanTag;        /* build VLAN_SetDefaultRxVID message */    FILL_SETDEFAULTRXVID_MSG(message,         IX_ETH_DB_PORT_ID_TO_NPE_LOGICAL_ID(portID),         IX_IEEE802_1Q_VLAN_TPID,         vlanTag);        IX_ETHDB_SEND_NPE_MSG(IX_ETH_DB_PORT_ID_TO_NPE(portID), message, result);        return result;}/** * @brief retrieves the default port VLAN tag (the lower 3 bytes are the PVID) * * @param portID ID of the port * @param vlanTag address to write the port VLAN tag (802.1Q tag) into *  * Note that this function is documented in the main component * header file, IxEthDB.h. * * @return IX_ETH_DB_SUCCESS if the operation completed successfully * or an appropriate error message otherwise */IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPortVlanTagGet(IxEthDBPortId portID, IxEthDBVlanTag *vlanTag){    IX_ETH_DB_CHECK_PORT(portID);        IX_ETH_DB_CHECK_SINGLE_NPE(portID);        IX_ETH_DB_CHECK_FEATURE(portID, IX_ETH_DB_VLAN_QOS);        IX_ETH_DB_CHECK_REFERENCE(vlanTag);        *vlanTag = ixEthDBPortInfo[portID].vlanTag;        return IX_ETH_DB_SUCCESS;}/** * @brief sets the VLAN tag (the lower 3 bytes are the PVID) of a  * database filtering record * * @param portID ID of the port * @param vlanTag VLAN tag (802.1Q tag) *  * Important: filtering records are automatically converted to  * IX_ETH_DB_FILTERING_VLAN record when added a VLAN tag. * * Note that this function is documented in the main component * header file, IxEthDB.h. * * @return IX_ETH_DB_SUCCESS if the operation completed successfully * or an appropriate error message otherwise */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;        /* set record type to VLAN if not already set */    descriptor->type = IX_ETH_DB_FILTERING_VLAN_RECORD;        /* add vlan tag */    descriptor->recordData.filteringVlanData.ieee802_1qTag = vlanTag;        /* transaction completed */    ixEthDBReleaseHashNode(searchResult);        return IX_ETH_DB_SUCCESS;}/** * @brief retrieves the VLAN tag (the lower 3 bytes are the PVID) from a  * database VLAN filtering record * * @param portID ID of the port * @param vlanTag address to write the VLAN tag (802.1Q tag) into *  * Note that this function is documented in the main component * header file, IxEthDB.h. * * @return IX_ETH_DB_SUCCESS if the operation completed successfully * or an appropriate error message otherwise */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;            /* get vlan tag */    *vlanTag = descriptor->recordData.filteringVlanData.ieee802_1qTag;        /* transaction completed */    ixEthDBReleaseHashNode(searchResult);        return IX_ETH_DB_SUCCESS;}/** * @brief adds a VLAN to a port's VLAN membership table * * @param portID ID of the port * @param vlanID VLAN ID to add *  * Note that this function is documented in the main component * header file, IxEthDB.h. * * @return IX_ETH_DB_SUCCESS if the operation completed successfully * or an appropriate error message otherwise */IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPortVlanMembershipAdd(IxEthDBPortId portID, IxEthDBVlanId vlanID){    IX_ETH_DB_CHECK_PORT(portID);    IX_ETH_DB_CHECK_SINGLE_NPE(portID);    IX_ETH_DB_CHECK_VLAN_ID(vlanID);    IX_ETH_DB_CHECK_FEATURE(portID, IX_ETH_DB_VLAN_QOS);    return ixEthDBPortVlanMembershipChange(portID, vlanID, ixEthDBPortInfo[portID].vlanMembership, ADD_VLAN);}/** * @brief removes a VLAN from a port's VLAN membership table * * @param portID ID of the port * @param vlanID VLAN ID to remove * * Note that this function is documented in the main component * header file, IxEthDB.h. * * @return IX_ETH_DB_SUCCESS if the operation completed successfully * or an appropriate error message otherwise */IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBPortVlanMembershipRemove(IxEthDBPortId portID, IxEthDBVlanId vlanID){

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美人与z0zoxxxx视频| 欧美日韩中文另类| 91麻豆成人久久精品二区三区| 91丝袜美腿高跟国产极品老师| 色噜噜偷拍精品综合在线| 91啪亚洲精品| 欧美成人精品1314www| 国产精品久久久久婷婷二区次 | 中文欧美字幕免费| 26uuu欧美日本| 国产精品亲子伦对白| 亚洲国产精品久久一线不卡| 国产一区视频在线看| 国产精品一区二区不卡| 成人高清免费在线播放| 欧美一区二区三区电影| 一区二区在线观看不卡| 免费视频一区二区| 91免费版pro下载短视频| 欧美一区二区三区免费观看视频| 国产精品青草综合久久久久99| 亚洲一区二区三区三| 久草这里只有精品视频| 欧美日韩一区二区不卡| 日韩欧美一二三区| 亚洲激情六月丁香| 日本不卡一二三区黄网| 色综合久久99| 国产精品麻豆久久久| 丝袜国产日韩另类美女| 一本色道久久加勒比精品 | 五月婷婷激情综合网| 亚洲综合久久av| 国产精品一区二区男女羞羞无遮挡| 欧美高清性hdvideosex| 中文字幕视频一区二区三区久| 国产一区二区视频在线| 欧美一区在线视频| 视频一区欧美精品| 欧美体内she精视频| 亚洲在线视频免费观看| 一本一道波多野结衣一区二区| 亚洲国产高清在线| 国产在线一区观看| 久久久蜜桃精品| 国产精品一区二区久久不卡| 久久久久国产精品人| 精品一区二区三区在线播放视频| 日韩一级欧美一级| 奇米一区二区三区| 欧美成人video| 久久国产精品一区二区| 2021国产精品久久精品| 国产精品主播直播| 中文无字幕一区二区三区| 国产成人aaa| 国产精品视频一二三| 成人成人成人在线视频| 成人免费在线播放视频| 91国偷自产一区二区三区观看| 亚洲精选视频在线| 欧美性高清videossexo| 亚洲成人免费视| 日韩精品一区二区三区蜜臀| 国产美女娇喘av呻吟久久| 久久久久久久免费视频了| 成人免费av资源| 亚洲一区在线观看视频| 欧美精三区欧美精三区| 一个色在线综合| 欧美日韩小视频| 亚洲欧美一区二区久久| 不卡电影免费在线播放一区| 国产精品二三区| 972aa.com艺术欧美| 日本视频中文字幕一区二区三区| 欧美日韩国产免费| 国模一区二区三区白浆| 亚洲人成小说网站色在线| 欧美日韩成人一区二区| 国产老妇另类xxxxx| 亚洲视频 欧洲视频| 宅男在线国产精品| 欧美日韩精品二区第二页| 国产最新精品免费| 亚洲欧美国产三级| 制服丝袜av成人在线看| 成人午夜av影视| 视频精品一区二区| 久久精品一区二区| 欧美日韩一区国产| 国产不卡视频在线播放| 亚洲韩国精品一区| 国产欧美日韩在线视频| 欧美日韩精品系列| 91免费视频观看| 国产乱妇无码大片在线观看| 亚洲成人av一区二区三区| 欧美一区中文字幕| 色综合天天综合网天天狠天天| 男人的天堂久久精品| 成人欧美一区二区三区白人| 欧美精品一区二区三区蜜桃| 欧美色视频一区| 91麻豆国产福利在线观看| 激情综合网激情| 日本人妖一区二区| 亚洲一二三区视频在线观看| 亚洲国产精品激情在线观看| 日韩女优毛片在线| 欧美三级韩国三级日本三斤| 99在线热播精品免费| 秋霞午夜av一区二区三区| 亚洲女同一区二区| 国产日韩视频一区二区三区| 日韩一二三四区| 欧美视频一区二区三区| 色综合亚洲欧洲| 99精品热视频| 成人av在线观| 成人激情文学综合网| 国产精品1区2区3区在线观看| 亚洲欧美色一区| 久久久久久免费| 国产精品久久久久影院老司| 国产精品美女一区二区在线观看| 久久午夜老司机| xfplay精品久久| 久久久不卡网国产精品二区| 欧美大度的电影原声| 日韩一区二区精品在线观看| 欧美高清视频不卡网| 91精品一区二区三区在线观看| 欧美体内she精高潮| 99re8在线精品视频免费播放| 激情文学综合丁香| 国产一区二区三区不卡在线观看| 看电影不卡的网站| 精品一区二区精品| 国产成人在线免费观看| 国产一区二区视频在线播放| 亚洲已满18点击进入久久| 亚洲精品中文在线| 午夜成人免费电影| 亚洲大片精品永久免费| 亚欧色一区w666天堂| 天天做天天摸天天爽国产一区| 精品国产伦一区二区三区观看体验 | 国产在线精品一区在线观看麻豆| 丰满白嫩尤物一区二区| 久久精品国产一区二区三| 一区二区三区电影在线播| 一区二区三区影院| 亚洲综合激情另类小说区| 亚洲成人777| 亚洲午夜久久久久久久久电影网| 亚洲视频一二区| 亚洲一区二区三区在线看| 日韩av电影免费观看高清完整版在线观看| 亚洲成a天堂v人片| 久久国产免费看| 成人avav在线| 欧美日韩亚州综合| 久久综合久久久久88| 国产精品成人在线观看| 亚洲韩国一区二区三区| 极品少妇一区二区三区精品视频 | 久久精品人人做人人爽人人| 久久综合色一综合色88| 久久久久国产精品麻豆| 最新国产成人在线观看| 奇米影视在线99精品| 久久色.com| 91视频com| 国产一区二区电影| 亚洲视频中文字幕| 性欧美大战久久久久久久久| 日本vs亚洲vs韩国一区三区| 精品无人码麻豆乱码1区2区| 不卡一区在线观看| 久久夜色精品国产欧美乱极品| 中文字幕视频一区| 麻豆成人免费电影| 一本大道久久精品懂色aⅴ| 精品国产乱码久久久久久1区2区 | 成人亚洲一区二区一| 欧美精品久久一区二区三区| 国产欧美一区二区精品性色超碰 | 国内精品久久久久影院薰衣草| 91蝌蚪国产九色| 久久久久久久综合狠狠综合| 亚洲成人高清在线| 成人av午夜电影| 精品国产a毛片| 五月激情六月综合| 激情综合亚洲精品| 色久综合一二码| 亚洲精品国产第一综合99久久| 国产精品一二三四| 日韩午夜小视频|