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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? m2riplib.c

?? vxworks的完整的源代碼
?? C
字號:
/* m2RipLib.c - VxWorks interface routines to RIP for SNMP Agent *//* Copyright 1984 - 2001 Wind River Systems, Inc. *//*modification history--------------------01n,15oct01,rae  merge from truestack ver 01o, base 01m (VIRTUAL_STACK)01m,30jun98,spm  corrected authentication to allow change to shorter key01l,26jun98,spm  changed RIP_MCAST_ADDR constant from string to value; altered                 multicast group handling to comply with ANVL RIP tests01k,25oct97,kbw  making minor man page fixes01j,06oct97,gnn  cleaned up issues with IMPORT of ripState01i,15may97,gnn  cleaned up some warnings; #ifdef'd out some test code01h,08may97,gnn  fixed the authentication string code.01g,30apr97,kbw  fiddled man page text01f,28apr97,gnn  fixed some of the documentation01e,24apr97,gnn  fixed an errno value01d,20apr97,kbw  fixed man page format, spell check01c,17apr97,gnn  modified interfaces and variable to follow standards.01b,14apr97,gnn  added documentation for MIB-II stuff.01a,01apr97,gnn  written.*/ /*DESCRIPTIONThis library provides routines to initialize the group, access thegroup global variables, read the table of network interfaces that RIPknows about, and change the state of such an interface.  For a broaderdescription of MIB-II services, see the manual entry for m2Lib.USING THIS LIBRARYThis library can be initialized and deleted by calling m2RipInit() andm2RipDelete() respectively, if only the RIP group's services are needed.If full MIB-II support is used, this group and all other groups can beinitialized and deleted by calling m2Init() and m2Delete().The group global variables are accessed by callingm2RipGlobalCountersGet() as follows:.CS    M2_RIP2_GLOBAL_GROUP   ripGlobal;    if (m2RipGlobalCountersGet (&ripGlobal) == OK)	/@ values in ripGlobal are valid @/.CETo retrieve the RIP group statistics for a particular interface you call them2RipIfStatEntryGet() routine a pointer to an M2_RIP2_IFSTAT_ENTRY structure that contains the address of the interface you are searching for.  For example:.CS    M2_RIP2_IFSTAT_ENTRY ripIfStat;    	ripIfStat.rip2IfStatAddress = inet_addr("90.0.0.3");	if (m2RipIfStatEntryGet(M2_EXACT_VALUE, &ripIfStat) == OK)	/@ values in ripIfState are valid @/.CETo retrieve the configuration statistics for a particular interface them2RipIfConfEntryGet() routine must be called with an IP address encoded in anM2_RIP2_IFSTAT_ENTRY structure which is passed as the second argument.  Forexample:.CS    M2_RIP2_IFCONF_ENTRY ripIfConf;    	ripIfConf.rip2IfConfAddress = inet_addr("90.0.0.3");	if (m2RipIfConfEntryGet(M2_EXACT_VALUE, &ripIfConf) == OK)	/@ values in ripIfConf are valid @/.CETo set the values of for an interface the m2RipIfConfEntrySet() routine mustbe called with an IP address in dot notation encoded into anM2_RIP2_IFSTAT_ENTRY structure, which is passed as the second argument.  Forexample:.CS    M2_RIP2_IFCONF_ENTRY ripIfConf;	ripIfConf.rip2IfConfAddress = inet_addr("90.0.0.3");	/@ Set the authorization type. @/	ripIfConf.rip2IfConfAuthType = M2_rip2IfConfAuthType_simplePassword;	bzero(ripIfConf.rip2IfConfAuthKey, 16);	bcopy("Simple Password ", ripIfConf.rip2IfConfAuthKey, 16);	/@ We only accept version 1 packets. @/	ripIfConf.rip2IfConfSend = M2_rip2IfConfSend_ripVersion1;	/@ We only send version 1 packets. @/	ripIfConf.rip2IfConfReceive = M2_rip2IfConfReceive_rip1;	/@ Default routes have a metric of 2 @/	ripIfConf.rip2IfConfDefaultMetric = 2;	/@ If the interface is invalid it is turned off, we make it valid. @/	ripIfConf.rip2IfConfStatus = M2_rip2IfConfStatus_valid;		if (m2RipIfConfEntrySet(varsToSet, &ripIfConf) == OK)	/@ Call succeded. @/.CEINCLUDE FILES: rip/m2RipLib.h rip/defs.hSEE ALSO:ripLib*//* includes */#include "vxWorks.h"#include "rip/m2RipLib.h"#include "rip/defs.h"#include "m2Lib.h"#include "errnoLib.h"#include "errno.h"#include "inetLib.h"#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#include "netinet/vsRip.h"#endif/* defines */#define	same(a1, a2) \	(memcmp((a1)->sa_data, (a2)->sa_data, 14) == 0)/* typedefs *//* globals */#ifndef VIRTUAL_STACKextern	struct interface *ripIfNet;#endif/* locals *//* forward declarations *//******************************************************************************** m2RipInit - initialize the RIP MIB support** This routine sets up the RIP MIB and should be called before any * other m2RipLib routine.** RETURNS: OK, always.**/STATUS m2RipInit (void)    {    return (OK);    }/******************************************************************************** m2RipDelete - delete the RIP MIB support** This routine should be called after all m2RipLib calls are completed.** RETURNS: OK, always. **/STATUS m2RipDelete (void)    {    return (OK);    }/******************************************************************************** m2RipGlobalCountersGet - get MIB-II RIP-group global counters** This routine fills in an M2_RIP2_GLOBAL_GROUP structure pointed to * by <pRipGlobal> with the values of the MIB-II RIP-group global counters.** RETURNS: OK or ERROR. ** ERRNO:*  S_m2Lib_INVALID_PARAMETER** SEE ALSO:* m2RipInit()*/STATUS m2RipGlobalCountersGet    (    M2_RIP2_GLOBAL_GROUP* pRipGlobal    )    {#ifndef VIRTUAL_STACK    extern RIP ripState;#endif    if (pRipGlobal == NULL)        {        errnoSet(S_m2Lib_INVALID_PARAMETER);        return (ERROR);        }    bcopy((char *)&ripState.ripGlobal, (char *)pRipGlobal,          sizeof(M2_RIP2_GLOBAL_GROUP));    return (OK);    }/******************************************************************************** m2RipIfStatEntryGet - get MIB-II RIP-group interface entry** This routine retrieves the interface statistics for the interface serving* the subnet of the IP address contained in the M2_RIP2_IFSTAT_ENTRY* structure.  <pRipIfStat> is a pointer to an M2_RIP2_IFSTAT_ENTRY structure* which the routine will fill in upon successful completion.** This routine either returns an exact match if <search> is M2_EXACT_VALUE,* or the next value greater than or equal to the value supplied if the* <search> is M2_NEXT_VALUE.** RETURNS: OK, or ERROR if either <pRipIfStat> is invalid or an exact match* failed.** ERRNO:*  S_m2Lib_INVALID_PARAMETER*  S_m2Lib_ENTRY_NOT_FOUND* * SEE ALSO:* m2RipInit()*/STATUS m2RipIfStatEntryGet    (    int search,    M2_RIP2_IFSTAT_ENTRY* pRipIfStat    )    {    struct interface* pIfp;    struct interface* pIfpSaved = NULL;    struct sockaddr_in address;    unsigned long ipAddrSaved = -1;    unsigned long currIpAddr;        address.sin_addr.s_addr = pRipIfStat->rip2IfStatAddress;    address.sin_family = AF_INET;            if (search == M2_EXACT_VALUE)        {                pIfpSaved = ripIfLookup((struct sockaddr *)&address);                if (pIfpSaved == NULL)            {            errnoSet(S_m2Lib_ENTRY_NOT_FOUND);            return (ERROR);            }        }    else        {	for (pIfp = ripIfNet; pIfp; pIfp = pIfp->int_next)            {            currIpAddr = ntohl(((struct sockaddr_in *)&pIfp->int_addr)->sin_addr.s_addr);            if ((currIpAddr >= ntohl(address.sin_addr.s_addr)) &&                (currIpAddr < ipAddrSaved))                {                pIfpSaved = pIfp;                ipAddrSaved = currIpAddr;                }            }        if (pIfpSaved == NULL)            {            errnoSet(S_m2Lib_ENTRY_NOT_FOUND);            return (ERROR);            }        }    bcopy((char *)&pIfpSaved->ifStat, (char *)pRipIfStat,          sizeof(M2_RIP2_IFSTAT_ENTRY));    return (OK);    }/******************************************************************************** m2RipIfConfEntryGet - get MIB-II RIP-group interface entry** This routine retrieves the interface configuration for the interface serving* the subnet of the IP address contained in the M2_RIP2_IFCONF_ENTRY structure* passed to it.  <pRipIfConf> is a pointer to an M2_RIP2_IFCONF_ENTRY * structure which the routine will fill in upon successful completion.** This routine either returns an exact match if <search> is M2_EXACT_VALUE,* or the next value greater than or equal to the value supplied if the* <search> is M2_NEXT_VALUE.** RETURNS: OK, or ERROR if <pRipIfConf> was invalid or the interface was* not found.** ERRNO:*  S_m2Lib_INVALID_PARAMETER*  S_m2Lib_ENTRY_NOT_FOUND** SEE ALSO:* m2RipInit()*/STATUS m2RipIfConfEntryGet    (    int search,    M2_RIP2_IFCONF_ENTRY* pRipIfConf    )    {    struct interface* pIfp;    struct sockaddr_in address;    struct interface* pIfpSaved = NULL;    unsigned long ipAddrSaved = -1;    unsigned long currIpAddr;        address.sin_addr.s_addr = pRipIfConf->rip2IfConfAddress;    address.sin_family = AF_INET;        if (search == M2_EXACT_VALUE)        {                pIfpSaved = ripIfLookup((struct sockaddr *)&address);                if (pIfpSaved == NULL)            {            errnoSet(S_m2Lib_ENTRY_NOT_FOUND);            return (ERROR);            }        }    else        {	for (pIfp = ripIfNet; pIfp; pIfp = pIfp->int_next)            {            currIpAddr = ntohl(((struct sockaddr_in *)&pIfp->int_addr)->sin_addr.s_addr);            if ((currIpAddr >= ntohl(address.sin_addr.s_addr)) &&                (currIpAddr < ipAddrSaved))                {                pIfpSaved = pIfp;                ipAddrSaved = currIpAddr;                }            }        if (pIfpSaved == NULL)            {            errnoSet(S_m2Lib_ENTRY_NOT_FOUND);            return (ERROR);            }        }    bcopy((char *)&pIfpSaved->ifConf, (char *)pRipIfConf,          sizeof(M2_RIP2_IFCONF_ENTRY));    return (OK);    }#if 0void m2RipIfConfTest    (    char* pIpAddr    )    {    M2_RIP2_IFCONF_ENTRY ripIfConf;        ripIfConf.rip2IfConfAddress = inet_addr(pIpAddr);        if (m2RipIfConfEntryGet(M2_EXACT_VALUE, &ripIfConf) != OK)        return;    printf("IP Address: %s\nAuthType: %ld\nAuthKey: %s\nSend: %ld\n",           inet_ntoa(ripIfConf.rip2IfConfAddress),           ripIfConf.rip2IfConfAuthType,           ripIfConf.rip2IfConfAuthKey,           ripIfConf.rip2IfConfSend);    printf("Receive: %ld\nDefault Metric: %ld\nStatus: %ld\n",           ripIfConf.rip2IfConfReceive,           ripIfConf.rip2IfConfDefaultMetric,           ripIfConf.rip2IfConfStatus);        }#endif/******************************************************************************** m2RipIfConfEntrySet - set MIB-II RIP-group interface entry** This routine sets the interface configuration for the interface serving* the subnet of the IP address contained in the M2_RIP2_IFCONF_ENTRY structure.** <pRipIfConf> is a pointer to an M2_RIP2_IFCONF_ENTRY structure which the* routine places into the system based on the <varToSet> value. ** RETURNS: OK, or ERROR if <pRipIfConf> is invalid or the interface cannot* be found.** ERRNO:*  S_m2Lib_INVALID_PARAMETER*  S_m2Lib_ENTRY_NOT_FOUND** SEE ALSO:* m2RipInit()*/STATUS m2RipIfConfEntrySet    (    unsigned int varToSet,    M2_RIP2_IFCONF_ENTRY* pRipIfConf    )    {    struct interface* pIfp;    struct sockaddr_in address;#ifndef VIRTUAL_STACK    IMPORT RIP ripState;#endif    BOOL changeFlag = FALSE; 	/* Changing receive control switch? */    address.sin_addr.s_addr = pRipIfConf->rip2IfConfAddress;    address.sin_family = AF_INET;        pIfp = ripIfLookup((struct sockaddr *)&address);        if (pIfp == NULL)        {        errnoSet(S_m2Lib_ENTRY_NOT_FOUND);        return (ERROR);        }    if (varToSet & M2_RIP2_IF_CONF_DOMAIN)        {        bcopy(pRipIfConf->rip2IfConfDomain, pIfp->ifConf.rip2IfConfDomain,              2);        }    if (varToSet & M2_RIP2_IF_CONF_AUTH_TYPE)        {        pIfp->ifConf.rip2IfConfAuthType = pRipIfConf->rip2IfConfAuthType;        }        if (varToSet & M2_RIP2_IF_CONF_AUTH_KEY)        {        bzero (pIfp->ifConf.rip2IfConfAuthKey, AUTHKEYLEN);        strncpy(pIfp->ifConf.rip2IfConfAuthKey, pRipIfConf->rip2IfConfAuthKey,              AUTHKEYLEN);        }    if (varToSet & M2_RIP2_IF_CONF_SEND)        {        pIfp->ifConf.rip2IfConfSend = pRipIfConf->rip2IfConfSend;        }    if (varToSet & M2_RIP2_IF_CONF_RECEIVE)        {        if (pIfp->ifConf.rip2IfConfReceive != pRipIfConf->rip2IfConfReceive)            changeFlag = TRUE;        if (changeFlag)            {            /* Add to multicast group if changing to RIPv2 packets only. */            if (pRipIfConf->rip2IfConfReceive == M2_rip2IfConfReceive_rip2)                if (ripState.s != 0)                    ripSetInterfaces(ripState.s, (UINT32)RIP_MCAST_ADDR);            /*             * ANVL 16.1 - remove from multicast group if changing to              *             receive any RIPv1 packets.             */            if (pIfp->ifConf.rip2IfConfReceive == M2_rip2IfConfReceive_rip2)                if (ripState.s != 0)                    ripClearInterfaces(ripState.s, (UINT32)RIP_MCAST_ADDR);            pIfp->ifConf.rip2IfConfReceive = pRipIfConf->rip2IfConfReceive;            }        }    if (varToSet & M2_RIP2_IF_CONF_DEFAULT_METRIC)        {        pIfp->ifConf.rip2IfConfDefaultMetric =            pRipIfConf->rip2IfConfDefaultMetric;        }        if (varToSet & M2_RIP2_IF_CONF_STATUS)        {        pIfp->ifConf.rip2IfConfStatus = pRipIfConf->rip2IfConfStatus;        }        return (OK);    }#if 0 void m2RipIfConfSetTest    (    char* pIpAddr,    long authType,         /* Authentication type */    char authKey[15],      /* Key */    long send,             /* What version to send */    long receive,          /* What version to listen to */    long defaultMetric,    /* Default metric for default route */    long status            /* Putting M2_rip2IfConfStatus_invalid */                           /* here turns the interface off */    )    {    M2_RIP2_IFCONF_ENTRY ripIfConf;        ripIfConf.rip2IfConfAddress = inet_addr(pIpAddr);    ripIfConf.rip2IfConfAuthType = authType;    bzero(ripIfConf.rip2IfConfAuthKey, 16);    strcpy(ripIfConf.rip2IfConfAuthKey, authKey);    ripIfConf.rip2IfConfSend = send;    ripIfConf.rip2IfConfReceive = receive;    ripIfConf.rip2IfConfDefaultMetric = defaultMetric;    ripIfConf.rip2IfConfStatus = status;        if (m2RipIfConfEntrySet(0xff, &ripIfConf) != OK)        return;    if (m2RipIfConfEntryGet(M2_EXACT_VALUE, &ripIfConf) != OK)        return;    printf("IP Address: %s\nAuthType: %ld\nAuthKey: %s\nSend: %ld\n",           inet_ntoa(ripIfConf.rip2IfConfAddress),           ripIfConf.rip2IfConfAuthType,           ripIfConf.rip2IfConfAuthKey,           ripIfConf.rip2IfConfSend);    printf ("Receive: %ld\nDefault Metric: %ld\nStatus: %ld\n",            ripIfConf.rip2IfConfReceive,            ripIfConf.rip2IfConfDefaultMetric,            ripIfConf.rip2IfConfStatus);        }#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产人成一区二区三区影院| 免费成人av在线播放| 亚洲国产精品精华液网站| 久久av资源网| 色妞www精品视频| 久久蜜桃av一区二区天堂| 亚洲国产日日夜夜| 成人app在线| 26uuu国产在线精品一区二区| 亚洲精品免费看| 国产成人精品一区二区三区网站观看| 欧美视频一区在线| 亚洲欧美国产毛片在线| 国产成人综合在线观看| 欧美一区二区三区人| 亚洲成av人综合在线观看| 91香蕉视频污| 成人欧美一区二区三区| 成人精品免费视频| 欧美成人女星排名| 日本女优在线视频一区二区| 欧美在线一区二区三区| 国产精品欧美一区二区三区| 国产一区亚洲一区| 日韩美女一区二区三区四区| 亚洲在线免费播放| 99久久精品99国产精品| 久久久久久99久久久精品网站| 亚洲一二三四在线观看| 99久久国产综合色|国产精品| 337p粉嫩大胆色噜噜噜噜亚洲| 久久国产精品色| 欧美xxxxxxxx| 精品在线一区二区| 26uuu精品一区二区在线观看| 精品一区二区三区免费视频| 欧美成人一区二区三区| 国内精品伊人久久久久影院对白| 欧美一级高清片在线观看| 蜜桃视频在线观看一区二区| 欧美一卡2卡3卡4卡| 久久99精品久久久久| 久久影视一区二区| 99视频超级精品| 亚洲自拍偷拍图区| 91精品国产手机| 韩国成人精品a∨在线观看| 国产欧美视频一区二区| 91麻豆123| 首页国产欧美日韩丝袜| 久久影院午夜论| www.99精品| 婷婷成人综合网| 久久亚区不卡日本| 91亚洲男人天堂| 日韩精品一区第一页| 久久婷婷成人综合色| 97超碰欧美中文字幕| 日韩精品电影一区亚洲| 久久嫩草精品久久久精品 | 日韩一卡二卡三卡| 久久国产精品72免费观看| 久久精品视频一区二区| 91蜜桃视频在线| 日韩vs国产vs欧美| 国产婷婷一区二区| av在线一区二区| 日本麻豆一区二区三区视频| 国产色一区二区| 在线看一区二区| 精品在线免费观看| 亚洲免费观看视频| 欧美一级在线观看| 成人ar影院免费观看视频| 视频一区欧美精品| 欧美经典一区二区| 色综合天天综合色综合av | 亚洲最色的网站| 日韩欧美一二三四区| 91偷拍与自偷拍精品| 久久精品国产精品亚洲红杏| 亚洲人123区| 中文字幕乱码日本亚洲一区二区| 欧美日本在线一区| 91最新地址在线播放| 国产精品综合二区| 日本不卡视频在线观看| 亚洲图片另类小说| 久久日一线二线三线suv| 欧美日韩视频第一区| 99re在线精品| 成人v精品蜜桃久久一区| 韩国精品久久久| 蜜桃视频在线观看一区二区| 亚洲成人自拍偷拍| 亚洲视频中文字幕| 国产精品电影一区二区三区| 国产丝袜在线精品| 久久在线观看免费| 久久综合久久综合久久| 欧美大胆人体bbbb| 欧美一区二区女人| 欧美一区日本一区韩国一区| 欧美在线观看视频一区二区三区| 成人免费av资源| 成人精品免费网站| 成人晚上爱看视频| 成人在线视频一区| 高清beeg欧美| 高清在线观看日韩| 国产suv精品一区二区三区| 国产麻豆日韩欧美久久| 国产一区二区三区四区五区入口 | 色婷婷激情久久| 91视视频在线直接观看在线看网页在线看| 国产精品一品二品| 国产成人欧美日韩在线电影| 国产精品888| 不卡视频免费播放| 91免费观看视频在线| 91在线看国产| 日本韩国欧美一区二区三区| 欧美日韩五月天| 欧美成人国产一区二区| 精品福利一二区| 国产日韩精品一区| 中文字幕永久在线不卡| 亚洲综合成人在线视频| 奇米色一区二区三区四区| 极品少妇一区二区三区精品视频 | 欧美在线观看一区| 欧美一区在线视频| 久久日韩粉嫩一区二区三区| 国产精品入口麻豆九色| 亚洲色欲色欲www| 亚洲成a人在线观看| 蜜臀av在线播放一区二区三区| 精品一区二区在线播放| 成人小视频在线| 欧美日韩国产综合视频在线观看 | 欧美变态tickle挠乳网站| 欧美精品一区二区三区蜜臀| 国产精品电影院| 视频在线在亚洲| 国产剧情在线观看一区二区| 99久久精品免费精品国产| 91精品国产欧美一区二区成人| 精品成人一区二区| 亚洲精品国产品国语在线app| 久久精品免费观看| 一本一本大道香蕉久在线精品| 欧美精品久久久久久久多人混战| 久久精品亚洲国产奇米99| 伊人色综合久久天天| 国产在线精品一区二区夜色| 色欧美日韩亚洲| 国产日韩欧美激情| 午夜一区二区三区视频| 丁香六月综合激情| 日韩一区二区免费在线观看| 最新国产の精品合集bt伙计| 日本91福利区| 日本韩国一区二区三区| 久久久av毛片精品| 日韩主播视频在线| 在线看日本不卡| 中文字幕av一区 二区| 麻豆精品在线观看| 欧美亚洲另类激情小说| 国产精品色一区二区三区| 美国毛片一区二区三区| 欧美网站一区二区| 国产精品国产三级国产| 国产精品资源在线| 91精品中文字幕一区二区三区| 亚洲色图丝袜美腿| 成人午夜激情片| 久久―日本道色综合久久| 日本不卡免费在线视频| 欧美三级日韩三级国产三级| 国产精品初高中害羞小美女文| 激情文学综合插| 欧美一级免费观看| 亚洲国产成人va在线观看天堂| kk眼镜猥琐国模调教系列一区二区 | 色欧美日韩亚洲| 亚洲免费在线看| 91同城在线观看| 亚洲欧美另类综合偷拍| 91最新地址在线播放| 亚洲青青青在线视频| 99精品国产91久久久久久| 久久久久国产精品麻豆| 国模大尺度一区二区三区| 欧美xxxxxxxx| 国产呦精品一区二区三区网站| 久久亚洲综合av| 丁香婷婷综合色啪| 国产精品久久午夜| 91在线观看一区二区|