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

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

?? m2riplib.c

?? rip路由在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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久亚洲精华国产精华液 | 国产福利一区二区| 亚洲一级二级三级在线免费观看| 国产精品―色哟哟| 国产精品麻豆网站| 《视频一区视频二区| 国产精品久久久久精k8| 中文字幕中文在线不卡住| 中文字幕一区二区三| 亚洲欧美综合另类在线卡通| 久久不见久久见免费视频7| 另类小说色综合网站| 秋霞成人午夜伦在线观看| 国产精品久久久久久久久久免费看| 久久久久高清精品| 国产欧美一区二区精品性| 国产精品久久毛片av大全日韩| 欧美国产97人人爽人人喊| 亚洲人成伊人成综合网小说| 免费精品视频最新在线| 中文字幕亚洲区| 国产精品乱人伦一区二区| 亚洲天堂精品视频| 亚洲欧美一区二区三区孕妇| 亚洲一区二区中文在线| 奇米777欧美一区二区| 国产一区二三区好的| 96av麻豆蜜桃一区二区| 欧美日韩在线播放| 日本美女一区二区三区| 在线电影欧美成精品| 亚洲一区在线播放| 欧美在线高清视频| 亚洲国产精品人人做人人爽| 日本二三区不卡| 亚洲在线视频网站| 欧美日韩国产成人在线免费| 亚洲一区二区三区免费视频| 色狠狠一区二区三区香蕉| 一区二区三区四区av| 91久久精品国产91性色tv| 蜜臀va亚洲va欧美va天堂| 欧美精品在线观看播放| 蜜臀av在线播放一区二区三区 | 亚洲一区二区在线播放相泽| 色狠狠桃花综合| 亚洲一区二区中文在线| 4438x成人网最大色成网站| 欧美bbbbb| 久久久精品国产免大香伊 | 国内精品国产成人| 久久欧美一区二区| 99综合电影在线视频| 中文字幕五月欧美| 欧美日韩国产综合草草| 秋霞影院一区二区| 久久久www成人免费毛片麻豆 | 久久国产精品72免费观看| 久久尤物电影视频在线观看| 成人午夜在线播放| 亚洲黄色小视频| 欧美日本免费一区二区三区| 蜜桃91丨九色丨蝌蚪91桃色| 国产欧美日韩另类视频免费观看| thepron国产精品| 香蕉久久夜色精品国产使用方法| 日韩一区二区免费电影| 国产成人在线电影| 亚洲成人自拍偷拍| 26uuu色噜噜精品一区二区| 波波电影院一区二区三区| 五月综合激情日本mⅴ| 久久久国产一区二区三区四区小说| av在线一区二区三区| 日本一不卡视频| 国产欧美日韩不卡免费| 欧美日韩一区二区不卡| 国产精品主播直播| 亚洲国产综合91精品麻豆| wwwwww.欧美系列| 欧美午夜在线一二页| 国产一区二区精品久久91| 亚洲国产精品久久久久秋霞影院 | 午夜精品久久久久久不卡8050 | 欧美三级日韩在线| 国产成人精品一区二区三区四区| 亚洲青青青在线视频| 亚洲精品一区二区三区四区高清| 91视视频在线观看入口直接观看www | 久久精品国产**网站演员| 日韩美女视频一区二区| 欧美大尺度电影在线| 91美女视频网站| 国产精品77777| 免费看日韩精品| 亚洲国产精品久久不卡毛片| 中文字幕精品一区二区三区精品| 欧美精品在线观看播放| 99免费精品在线| 国产成人精品亚洲午夜麻豆| 免费观看在线综合| 亚洲成a人片在线不卡一二三区| 国产精品美女久久久久久久网站| 欧美成va人片在线观看| 91精品一区二区三区久久久久久| 91美女精品福利| 不卡影院免费观看| 国产91富婆露脸刺激对白| 激情图区综合网| 久久激情五月婷婷| 美国毛片一区二区三区| 日韩福利电影在线观看| 亚洲mv在线观看| 亚洲综合小说图片| 一二三区精品福利视频| 亚洲精选在线视频| 亚洲欧洲制服丝袜| 亚洲免费三区一区二区| 曰韩精品一区二区| 一区二区三区在线视频免费| 亚洲视频在线观看三级| 亚洲三级理论片| 亚洲伦理在线精品| 亚洲一区二区三区中文字幕| 亚洲综合在线第一页| 亚洲午夜视频在线观看| 亚洲成人av一区二区| 无吗不卡中文字幕| 免费成人av在线| 国产一区二区影院| 东方欧美亚洲色图在线| 成人免费高清视频在线观看| bt欧美亚洲午夜电影天堂| 91老师国产黑色丝袜在线| 欧美性大战久久| 日韩一二三四区| 久久伊99综合婷婷久久伊| 国产亚洲一区二区在线观看| 亚洲欧洲一区二区三区| 亚洲乱码国产乱码精品精98午夜| 亚洲国产日韩综合久久精品| 日韩vs国产vs欧美| 国产中文一区二区三区| 成年人国产精品| 欧美色涩在线第一页| 欧美成人福利视频| 国产精品久久久久四虎| 亚洲午夜视频在线观看| 精彩视频一区二区三区 | 久久99九九99精品| 成人18视频在线播放| 欧美日韩国产影片| 久久先锋影音av| 亚洲欧美激情插| 久久草av在线| 欧美在线free| 久久亚洲一区二区三区四区| 亚洲免费av高清| 麻豆精品国产91久久久久久| 岛国精品在线观看| 欧美丰满少妇xxxxx高潮对白| 久久久久97国产精华液好用吗 | 中文字幕免费观看一区| 午夜精品久久久| 国产成人精品免费视频网站| 欧美在线999| 中文字幕av不卡| 日韩国产在线观看一区| 成人精品视频一区二区三区 | 精品国产一区二区三区不卡| 中文字幕在线观看不卡| 麻豆中文一区二区| 在线视频你懂得一区二区三区| 精品久久久久久久久久久久久久久| 国产精品久久看| 国产做a爰片久久毛片| 欧美午夜精品理论片a级按摩| 国产目拍亚洲精品99久久精品| 日韩精品电影在线| 色婷婷亚洲一区二区三区| 国产亚洲精品中文字幕| 免费看欧美美女黄的网站| 91网站在线观看视频| 国产日韩欧美制服另类| 麻豆精品久久久| 3d动漫精品啪啪1区2区免费| 亚洲在线成人精品| www.久久久久久久久| 欧美国产综合一区二区| 久久成人精品无人区| 日韩亚洲欧美综合| 婷婷开心激情综合| 欧美色中文字幕| 亚洲欧美电影一区二区| 成人av动漫在线| 国产精品视频你懂的| 粉嫩高潮美女一区二区三区| 久久久亚洲精品一区二区三区| 美脚の诱脚舐め脚责91 | 久久久亚洲欧洲日产国码αv|