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

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

?? m2iflib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
        default:            return ERROR;        }    return OK;    }/***************************************************************************** m2IfPktCountRtnInstall - install an interface packet counter routine** This function installs a routine in the M2_ID.  This routine is a packet* counter which is able to update all the interface counters.** RETURNS: ERROR if the M2_ID is NULL, OK if the routine was installed.*/STATUS m2IfPktCountRtnInstall    (    M2_ID *           pId,    M2_PKT_COUNT_RTN  pRtn    )    {    if (pId == NULL)        return ERROR;    pId->m2PktCountRtn = pRtn;    return OK;    }/***************************************************************************** m2IfCtrUpdateRtnInstall - install an interface counter update routine** This function installs a routine in the M2_ID.  This routine is able to* update a single specified interface counter.** RETURNS: ERROR if the M2_ID is NULL, OK if the routine was installed.*/STATUS m2IfCtrUpdateRtnInstall    (    M2_ID *            pId,    M2_CTR_UPDATE_RTN  pRtn    )    {    if (pId == NULL)        return ERROR;    pId->m2CtrUpdateRtn = pRtn;    return OK;    }/***************************************************************************** m2IfVarUpdateRtnInstall - install an interface variable update routine** This function installs a routine in the M2_ID.  This routine is able to* update a single specified interface variable.** RETURNS: ERROR if the M2_ID is NULL, OK if the routine was installed.*/STATUS m2IfVarUpdateRtnInstall    (    M2_ID *            pId,    M2_VAR_UPDATE_RTN  pRtn    )    {    if (pId == NULL)        return ERROR;    pId->m2VarUpdateRtn = pRtn;    return OK;    }/******************************************************************************** centiSecsGet - get hundreds of a second** The number of hundreds of a second that have passed since this routine was* first called.** RETURNS: Hundreds of a second since the group was initialized.** SEE ALSO: N/A*/LOCAL unsigned long centiSecsGet (void)    {    unsigned long currCentiSecs;    unsigned long clkRate = sysClkRateGet ();    if (startCentiSecs == 0)	startCentiSecs = (tickGet () * 100) / clkRate;    currCentiSecs = (tickGet () * 100) / clkRate;    return (currCentiSecs - startCentiSecs);    }/******************************************************************************** m2IfInit - initialize MIB-II interface-group routines** This routine allocates the resources needed to allow access to the * MIB-II interface-group variables.  This routine must be called before any * interface variables can be accessed.  The input parameter <pTrapRtn> is an* optional pointer to a user-supplied SNMP trap generator.  The input parameter* <pTrapArg> is an optional argument to the trap generator.  Only one trap* generator is supported.** VXWORKS AE PROTECTION DOMAINS* Under VxWorks AE, you can call m2IfInit() from within the kernel * protection domain only, and the data referenced in the <pTrapRtn> and  * <pTrapArg> parameters must reside in the kernel protection domain.  * This restriction does not apply to non-AE versions of VxWorks.  ** RETURNS: OK, if successful; ERROR, if an error occurred.** ERRNO:* S_m2Lib_CANT_CREATE_IF_SEM** SEE ALSO: * m2IfGroupInfoGet(), m2IfTblEntryGet(), m2IfTblEntrySet(), m2IfDelete()*/STATUS m2IfInit     (    FUNCPTR 	pTrapRtn, 	/* pointer to user trap generator */    void * 	pTrapArg	/* pointer to user trap generator argument */    )    {    /* add hooks for if.c */    _m2SetIfLastChange = (FUNCPTR) m2SetIfLastChange;    _m2IfTableUpdate   = (FUNCPTR) m2IfTableUpdate;    /* Create the Interface semaphore */    if (m2InterfaceSem == NULL)        {        m2InterfaceSem = semMCreate (SEM_Q_PRIORITY | SEM_INVERSION_SAFE |                                   SEM_DELETE_SAFE);        if (m2InterfaceSem == NULL)            {	    errnoSet (S_m2Lib_CANT_CREATE_IF_SEM);            return (ERROR);            }        }    /* Take the interface semaphore, and initialize group global variables */     semTake (m2InterfaceSem, WAIT_FOREVER);    pM2TrapRtn    = pTrapRtn;    pM2TrapRtnArg = pTrapArg;#ifdef VIRTUAL_STACK    _ifTableLastChange = 0;    _ifStackLastChange = 0;#else    /* VIRTUAL_STACK */    ifTableLastChange = 0;    ifStackLastChange = 0;#endif   /* VIRTUAL_STACK */        semGive (m2InterfaceSem);    (void) centiSecsGet ();     /* Initialize group time reference */    return (OK);    }/***************************************************************************** m2IfTableUpdate - insert or remove an entry in the ifTable** This routine is called by if_attach and if_detach to insert/remove* an entry from the local m2IfLib ifTable.  The status can be either* M2_IF_TABLE_INSERT or M2_IF_TABLE_REMOVE.  The ifIndex that is searched* for in the AVL tree is specified in given the ifnet struct.* <if_ioctl> is a function pointer to change the flags on the interface.* <addr_get> is a function pointer to add the interface's addresses to* ifRcvAddressTable.  Ethernet interfaces can use NULL for both function* pointers, other interfaces will need to pass an appropriate function.** RETURNS: ERROR if entry does not exist, OK if the entry was deleted*/STATUS m2IfTableUpdate    (    struct ifnet *  pIfNet,    UINT            status,   /* attaching or detaching */    int             (*if_ioctl) /* protocol specific ioctl or null for default (ethernet) */		      (struct socket*,u_long,caddr_t),    STATUS          (*addr_get) /* func to grab the interface's addrs, null for default (ethernet) */		      (struct ifnet*, M2_IFINDEX*)    )    {    UINT              index;    M2_IFINDEX *      pIfIndex;    M2_IFSTACKTBL *   pIfStackTbl;    M2_IFSTACKTBL *   pTempS;    M2_IFRCVADDRTBL * pIfRcvAddrTbl;    M2_IFRCVADDRTBL * pTempR;    M2_ID *           pM2Id = NULL;    long *            pFlags = NULL;    index = pIfNet->if_index;    switch (status)        {        case M2_IF_TABLE_INSERT:            {            pIfIndex = KHEAP_ALLOC(sizeof(M2_IFINDEX));            if (!pIfIndex)                return ERROR;            memset(pIfIndex, 0, sizeof(M2_IFINDEX));            pIfIndex->ifIndex  = index;            pIfIndex->pIfStats = pIfNet;                 /* Set the MIB style flag */            pFlags = (long *) ifnetToEndFieldsGet (pIfNet, END_OBJ_FLAGS);            if (pFlags)                {                if (*pFlags & END_MIB_2233)                    pIfIndex->mibStyle = TRUE;                else                    pIfIndex->mibStyle = FALSE;                }	    if (if_ioctl)      /* use supplied ioctl */		{		pIfIndex->ifIoctl = if_ioctl;		}            else               /* default */		{		pIfIndex->ifIoctl = ifioctl;		}            if (addr_get)		{		pIfIndex->rcvAddrGet = addr_get;		}            else		{		pIfIndex->rcvAddrGet = rcvEtherAddrGet;		}            /* Set Interface OID to default */            memcpy(pIfIndex->ifOid.idArray, ifZeroObjectId.idArray,                   ifZeroObjectId.idLength * sizeof(long));            pIfIndex->ifOid.idLength = ifZeroObjectId.idLength;            /* Fill in the unicast and the multicast addresses */	    (*pIfIndex->rcvAddrGet)(pIfNet, pIfIndex);            semTake (m2InterfaceSem, WAIT_FOREVER);            /* Insert the node in the tree */            if (avlInsert(pM2IfRootPtr, pIfIndex, (GENERIC_ARGUMENT)index,                          nextIndex) != OK)                {		semGive (m2InterfaceSem);                KHEAP_FREE((char *)pIfIndex);                return ERROR;                }            m2IfCount++;            ifsInList = index;#ifdef VIRTUAL_STACK            _ifTableLastChange = centiSecsGet();#else    /* VIRTUAL_STACK */            ifTableLastChange = centiSecsGet();#endif   /* VIRTUAL_STACK */                      semGive (m2InterfaceSem);            if (pM2TrapRtn != NULL)                {                (*pM2TrapRtn)(M2_LINK_UP_TRAP,                                   pIfIndex->ifIndex, pM2TrapRtnArg);                }            return OK;            }        case M2_IF_TABLE_REMOVE:            {	    semTake (m2InterfaceSem, WAIT_FOREVER);            /* Remove the node from the tree */            if ((pIfIndex = (M2_IFINDEX *)avlDelete(pM2IfRootPtr,                                                    (GENERIC_ARGUMENT)index,                                                    nextIndex)) == NULL)		{		semGive (m2InterfaceSem);                return ERROR;		}            pIfStackTbl = pIfIndex->pNextLower;            while (pIfStackTbl != NULL)                {                pTempS = pIfStackTbl;                pIfStackTbl = pIfStackTbl->pNextLower;                KHEAP_FREE((char *)pTempS);                }            pIfRcvAddrTbl = pIfIndex->pRcvAddr;            while (pIfRcvAddrTbl != NULL)                {                pTempR = pIfRcvAddrTbl;                pIfRcvAddrTbl = pIfRcvAddrTbl->pNextEntry;                KHEAP_FREE((char *)pTempR);                }            KHEAP_FREE((char *)pIfIndex);            m2IfCount--;#ifdef VIRTUAL_STACK            _ifTableLastChange = centiSecsGet();#else    /* VIRTUAL_STACK */                        ifTableLastChange = centiSecsGet();#endif   /* VIRTUAL_STACK */                        semGive (m2InterfaceSem);            if ( (pM2TrapRtn != NULL) && (pIfNet->if_ioctl != NULL) &&                     ((*pIfNet->if_ioctl)(pIfNet, SIOCGMIB2233,                                                  (caddr_t)&pM2Id) == 0) )                {                if (pM2Id->m2Data.mibXIfTbl.ifLinkUpDownTrapEnable                                            == M2_LINK_UP_DOWN_TRAP_ENABLED)                    {                    (*pM2TrapRtn)(M2_LINK_DOWN_TRAP,                                       pIfIndex->ifIndex, pM2TrapRtnArg);                    }                }            return OK;            }        default:            return ERROR;        }    }/******************************************************************************** rcvEtherAddrGet - populate the rcvAddr fields for the ifRcvAddressTable** This function needs to be called to add all physical addresses for which an* interface may receive or send packets. This includes unicast and multicast* addresses. The address is inserted into the linked list maintained in the* AVL node corresponding to the interface. Given the ifnet struct and the* AVL node corresponding to the interface, this function goes through all the* physical addresses associated with this interface and adds them into the* linked list.** RETURNS: OK, if successful; ERROR, otherwise. */STATUS rcvEtherAddrGet    (    struct ifnet *     pIfNet,       /* pointer to the interface's ifnet */    M2_IFINDEX *       pIfIndexEntry /* avl node */    )    {    struct arpcom *      pIfArpcom = (struct arpcom*) pIfNet;    unsigned char *      pEnetAddr = pIfArpcom->ac_enaddr;    LIST *               pMCastList = NULL;    ETHER_MULTI *        pEtherMulti = NULL;    /* Copy the list of mcast addresses */    if ( (pIfArpcom->ac_if.if_ioctl != NULL) &&             ((*pIfArpcom->ac_if.if_ioctl)((struct ifnet *)pIfArpcom,                               SIOCGMCASTLIST, (caddr_t)&pMCastList) != 0) )        {        return (ERROR);        }        /* First create the entry for the unicast address */    rcvEtherAddrAdd (pIfIndexEntry, pEnetAddr);    /* Loop thru the mcast linked list and add the addresses */    for ( pEtherMulti = (ETHER_MULTI *) lstFirst (pMCastList);             pEtherMulti != NULL;                 pEtherMulti = (ETHER_MULTI *) lstNext ((NODE *)pEtherMulti) )        {        rcvEtherAddrAdd (pIfIndexEntry, (unsigned char *)pEtherMulti->addr);        }    return (OK);    }/****************************************************************************** rcvEtherAddrAdd - add a physical address into the linked list** This function is a helper function for rcvEtherAddrGet.  It is called to* add a single physical address into the linked list of addresses maintained* by the AVL node.** RETURNS: OK, if successful; ERROR, otherwise.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97精品超碰一区二区三区| 极品少妇xxxx精品少妇偷拍| 国产女主播一区| 日韩一区在线免费观看| 亚洲精品中文在线观看| 亚洲在线免费播放| 日韩avvvv在线播放| 国产制服丝袜一区| 91老师片黄在线观看| 欧美色手机在线观看| 欧美不卡视频一区| 国产午夜亚洲精品午夜鲁丝片| 国产精品久久久久影院| 亚洲欧美日韩中文播放| 日韩高清在线一区| 成人av电影在线网| 日韩一区二区免费高清| 中文字幕第一区| 喷水一区二区三区| 99久久婷婷国产综合精品| 欧美夫妻性生活| 中文字幕av免费专区久久| 日本三级亚洲精品| 91免费看视频| 中文字幕制服丝袜成人av | 午夜精品一区二区三区电影天堂| 美女爽到高潮91| 欧美日韩国产综合视频在线观看| 久久久久久99久久久精品网站| 亚洲成人免费在线观看| a级精品国产片在线观看| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲一区日韩精品中文字幕| 国产91精品免费| 国产精品视频一二三区| 国产尤物一区二区| 久久久久久久网| 久草在线在线精品观看| 精品国产伦理网| 久久精品国产一区二区| 欧美裸体一区二区三区| 艳妇臀荡乳欲伦亚洲一区| 91亚洲大成网污www| 中文字幕一区二区三区在线播放| 大白屁股一区二区视频| 国产精品成人一区二区艾草| 99精品国产热久久91蜜凸| 亚洲人成电影网站色mp4| 一本久久a久久免费精品不卡| 夜色激情一区二区| 91精品国产综合久久久久久漫画| 日韩国产欧美三级| 久久精品一区二区三区不卡牛牛| 国产成人aaaa| 亚洲国产视频网站| 久久久久亚洲蜜桃| 色噜噜久久综合| 毛片av一区二区| 国产精品夫妻自拍| 欧美丰满少妇xxxbbb| 国产一区二区调教| 亚洲自拍偷拍图区| 2023国产精品视频| 欧美日韩五月天| 风间由美一区二区三区在线观看 | 国产高清在线精品| 亚洲欧美另类图片小说| 欧美一级片在线看| 欧美亚洲国产一区二区三区va| 男女性色大片免费观看一区二区 | 国产最新精品免费| 亚洲影院理伦片| 中文字幕一区二区三区av | 亚洲男人的天堂一区二区| 日韩欧美国产综合一区 | 丝袜a∨在线一区二区三区不卡| 欧美在线视频你懂得| eeuss鲁片一区二区三区在线观看| 亚洲无线码一区二区三区| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 日韩一区精品字幕| 亚洲v日本v欧美v久久精品| 国产精品不卡在线| 国产精品久久午夜夜伦鲁鲁| 欧美精品一区二区久久婷婷| 欧美亚洲综合一区| 欧美丝袜自拍制服另类| 91福利小视频| 91精品国产综合久久久蜜臀粉嫩 | 日韩精品每日更新| 日本午夜精品一区二区三区电影| 亚洲丰满少妇videoshd| 偷拍一区二区三区四区| 日本午夜一本久久久综合| 免费看欧美女人艹b| 九九视频精品免费| 成人国产免费视频| 91丨porny丨蝌蚪视频| 欧美喷水一区二区| 日韩你懂的在线播放| 国产欧美一区在线| 亚洲午夜久久久久久久久电影院| 亚洲成人激情社区| 国产精品一线二线三线| 成人高清视频在线| 日韩欧美国产一区二区三区 | 欧美丰满嫩嫩电影| 国产亚洲精品精华液| 伊人开心综合网| 国产二区国产一区在线观看| 日本高清免费不卡视频| 精品区一区二区| 一区二区三区蜜桃| 成人av高清在线| 久久综合一区二区| 免费成人结看片| 日本韩国视频一区二区| 欧美国产日韩亚洲一区| 日本人妖一区二区| 欧美日韩精品一区二区三区四区| 久久婷婷国产综合国色天香| 日韩在线a电影| 欧美日韩精品系列| 亚洲午夜免费电影| 91美女视频网站| 一区二区三区四区在线免费观看 | 欧美日韩一区成人| 欧美综合一区二区| 精品国产亚洲在线| 国产视频一区在线观看| 欧美α欧美αv大片| 久久久五月婷婷| 国产欧美一区二区精品忘忧草| 亚洲.国产.中文慕字在线| 成人不卡免费av| 国产精品美女久久久久久久久久久 | 精品日韩在线一区| 理论电影国产精品| 欧美伦理电影网| 蜜桃视频一区二区三区在线观看| 欧美日韩国产在线播放网站| 午夜精品久久久| 日韩欧美在线不卡| 成人av高清在线| 性久久久久久久| 国产亚洲一二三区| 欧洲国内综合视频| 捆绑紧缚一区二区三区视频| 欧美不卡在线视频| 成熟亚洲日本毛茸茸凸凹| 一个色在线综合| 精品毛片乱码1区2区3区| 99re这里只有精品首页| 日本一道高清亚洲日美韩| 国产精品成人在线观看| 91精品国产综合久久婷婷香蕉| 国产激情视频一区二区三区欧美| 亚洲欧美激情插| 国产免费成人在线视频| 欧美久久一二区| 日本久久一区二区三区| 国产一区在线精品| 亚州成人在线电影| 亚洲毛片av在线| 中文字幕免费不卡在线| 日韩免费看的电影| 欧美日韩综合不卡| 91啪亚洲精品| 成人国产精品免费网站| 欧美伊人精品成人久久综合97| 美女mm1313爽爽久久久蜜臀| 午夜精品在线看| 亚洲一区二区三区自拍| 中文字幕在线观看不卡视频| 欧美精品一区二区三区视频| 日韩欧美一二三四区| 精品国产一区a| 久久一区二区三区四区| 久久中文字幕电影| 欧美韩日一区二区三区四区| 国产女人水真多18毛片18精品视频| 欧美一区二区三区免费在线看| 欧美日韩国产首页在线观看| 欧美日韩一级二级三级| 欧美一区二区网站| 久久久久久久综合| 国产精品久久久久婷婷二区次| 国产精品伦一区二区三级视频| 亚洲免费大片在线观看| 一区二区三区四区不卡视频| 亚洲第一狼人社区| 九九国产精品视频| 91小视频在线免费看| 91精品蜜臀在线一区尤物| 久久老女人爱爱| 亚洲一区二区三区精品在线| 国内精品久久久久影院薰衣草| a亚洲天堂av| 精品国产亚洲在线| 亚洲综合清纯丝袜自拍|