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

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

?? m2iplib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
/* m2IpLib.c - MIB-II IP-group API for SNMP agents *//* Copyright 1984 - 2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01o,06mar02,vvv  fixed m2IpAtransTblEntryGet to retrieve all entries		 (SPR #72963)01n,15oct01,rae  merge from truestack ver 02b, base 01k (SPRs 69556, 63629,                 68525, 67888, etc)01m,24oct00,niq  Merging RFC2233 changes from tor2_0.open_stack-f1 branch                 01o,18may00,pul  modified m2IpRouteTblEntrySet() to pass                  FALSE to routeEntryFill to support addition of network routes.                 01n,18may00,ann  merging from post R1 to include RFC223301l,07feb00,ann  changing the references to the code in m2IfLib01k,16mar99,spm  recovered orphaned code from tor1_0_1.sens1_1 (SPR #25770)01j,29sep98,spm  added support for dynamic routing protocols (SPR #9374)01i,30dec97,vin  fixed SPR 2009001h,26aug97,spm  removed compiler warnings (SPR #7866)01g,17may96,rjc  routeEntryFill called with 1 less parmam. fixed.01f,03apr96,rjc  set the m2RouteSem semaphore to NULL in in m2IpDelete01e,25jan95,jdi  doc cleanup.01d,11nov94,rhp  fixed typo in library man page01c,11nov94,rhp  edited man pages01b,03mar94,elh  modifed m2IpRouteTblEntrySet to return ERROR if rtioctl		 failed.01a,08dec93,jag  written*//*DESCRIPTIONThis library provides MIB-II services for the IP group.  It providesroutines to initialize the group, access the group scalar variables, readthe table IP address, route and ARP table.  The route and ARP table canalso be modified.  For a broader description of MIB-II services,see the manual entry for m2Lib.To use this feature, include the following component:INCLUDE_MIB2_IPUSING THIS LIBRARYTo use this library, the MIB-II interface group must also be initialized;see the manual entry for m2IfLib.  This library (m2IpLib) can beinitialized and deleted by calling m2IpInit() and m2IpDelete()respectively, if only the IP group's services are needed.  If full MIB-IIsupport is used, this group and all other groups can be initialized anddeleted by calling m2Init() and m2Delete().The following example demonstrates how to access and change IP scalarvariables:.CS    M2_IP   ipVars;    int     varToSet;    if (m2IpGroupInfoGet (&ipVars) == OK)	/@ values in ipVars are valid @/    /@ if IP is forwarding packets (MIB-II value is 1) turn it off @/    if (ipVars.ipForwarding == M2_ipForwarding_forwarding)	{				    /@ Not forwarding (MIB-II value is 2) @/	ipVars.ipForwarding = M2_ipForwarding_not_forwarding;      	varToSet |= M2_IPFORWARDING;	}    /@ change the IP default time to live parameter @/    ipVars.ipDefaultTTL = 55;    if (m2IpGroupInfoSet (varToSet, &ipVars) == OK)	/@ values in ipVars are valid @/.CEThe IP address table is a read-only table.  Entries to this table can be retrieved as follows:.CS    M2_IPADDRTBL ipAddrEntry;    /@ Specify the index as zero to get the first entry in the table @/    ipAddrEntry.ipAdEntAddr = 0;       /@ Local IP address in host byte order @/    /@ get the first entry in the table @/    if ((m2IpAddrTblEntryGet (M2_NEXT_VALUE, &ipAddrEntry) == OK)	/@ values in ipAddrEntry in the first entry are valid  @/    /@ Process first entry in the table @/    /@      * For the next call, increment the index returned in the previous call.     * The increment is to the next possible lexicographic entry; for     * example, if the returned index was 147.11.46.8 the index passed in the     * next invocation should be 147.11.46.9.  If an entry in the table     * matches the specified index, then that entry is returned.     * Otherwise the closest entry following it, in lexicographic order,     * is returned.     @/    /@ get the second entry in the table @/    if ((m2IpAddrTblEntryGet (M2_NEXT_VALUE, &ipAddrEntryEntry) == OK)	/@ values in ipAddrEntry in the second entry are valid  @/.CEThe IP Address Translation Table (ARP table) includes the functionality ofthe AT group plus additional functionality.  The AT group is supportedthrough this MIB-II table.  Entries in this table can be added anddeleted.  An entry is deleted (with a set operation) by setting the`ipNetToMediaType' field to the MIB-II "invalid" value (2).  The following example shows how to delete an entry:.CSM2_IPATRANSTBL        atEntry;    /@ Specify the index for the connection to be deleted in the table @/    atEntry.ipNetToMediaIfIndex     = 1       /@ interface index @/    /@ destination IP address in host byte order @/    atEntry.ipNetToMediaNetAddress  = 0x930b2e08;					    /@ mark entry as invalid @/    atEntry.ipNetToMediaType        = M2_ipNetToMediaType_invalid;     /@ set the entry in the table @/    if ((m2IpAtransTblEntrySet (&atEntry) == OK)	/@ Entry deleted successfully @/.CEThe IP route table allows for entries to be read, deleted, and modified.  Thisexample demonstrates how an existing route is deleted:.CS    M2_IPROUTETBL        routeEntry;    /@ Specify the index for the connection to be deleted in the table @/    /@ destination IP address in host byte order @/    routeEntry.ipRouteDest       = 0x930b2e08;						/@ mark entry as invalid @/    routeEntry.ipRouteType       = M2_ipRouteType_invalid;    /@ set the entry in the table @/    if ((m2IpRouteTblEntrySet (M2_IP_ROUTE_TYPE, &routeEntry) == OK)	/@ Entry deleted successfully @/.CEINCLUDE FILES: m2Lib.h SEE ALSO:m2Lib, m2SysLib, m2IfLib, m2IcmpLib, m2UdpLib, m2TcpLib*//* includes */#include "vxWorks.h"#include "stdlib.h"#include "m2Lib.h"#include "private/m2LibP.h"#include "netLib.h"#include <netinet/in_systm.h>#include <netinet/ip.h>#include <netinet/ip_var.h>#include <net/route.h>#include <net/radix.h>#include <netinet/in_var.h>#include <netinet/if_ether.h>#include <net/if_dl.h>#include <net/if_arp.h>#include "ioctl.h"#include "net/mbuf.h"#include "tickLib.h"#include "sysLib.h"#include "routeLib.h"#include "semLib.h"#include "errnoLib.h"#include "memPartLib.h"#include "routeEnhLib.h"#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#endif /* VIRTUAL_STACK */#ifdef ROUTER_STACK#include "wrn/fastPath/fastPathLib.h"#endif /* ROUTER_STACK *//* defines */#define M2_MAX_ROUTE_DEFAULT 	40/* globals */#ifndef VIRTUAL_STACKLOCAL int 		m2RouteTableSaved;LOCAL int		m2RouteTableSize;LOCAL int		m2NumRouteEntries;LOCAL M2_IPROUTETBL   * m2RouteTable;LOCAL SEM_ID            m2RouteSem;#endif /* VIRTUAL_STACK *//* * The zero object id is used throught out the MIB-II library to fill OID  * requests when an object ID is not provided by a group variable. */LOCAL M2_OBJECTID ipZeroObjectId = { 2, {0,0} };/* forward declarations */LOCAL int       m2RouteTableGet();LOCAL int 	routeCacheInit (struct radix_node *rn, void *	pRtArg);/* external declarations */#ifndef VIRTUAL_STACKextern SEM_ID		m2InterfaceSem;IMPORT struct radix_node_head *rt_tables[]; /* table of radix nodes */IMPORT struct	llinfo_arp llinfo_arp; IMPORT int  _ipCfgFlags; IMPORT int  ipMaxUnits;#endif /* VIRTUAL_STACK */IMPORT int 	arpioctl (int, caddr_t);IMPORT void routeEntryFill (struct ortentry *, int, int, BOOL);/******************************************************************************** m2IpInit - initialize MIB-II IP-group access** This routine allocates the resources needed to allow access to the MIB-II* IP variables.  This routine must be called before any IP variables* can be accessed.  The parameter <maxRouteTableSize> is used to increase the* default size of the MIB-II route table cache.** RETURNS:* OK, or ERROR if the route table or the route semaphore cannot be allocated.** ERRNO:* S_m2Lib_CANT_CREATE_ROUTE_SEM** SEE ALSO:* m2IpGroupInfoGet(), m2IpGroupInfoSet(), m2IpAddrTblEntryGet(),* m2IpAtransTblEntrySet(),  m2IpRouteTblEntryGet(), m2IpRouteTblEntrySet(), * m2IpDelete()*/STATUS m2IpInit    (    int		maxRouteTableSize 	/* max size of routing table */     )    {    /* initialize the routing table stuff */    if (m2RouteTable == NULL)	{	/* only initialized the first time called */        m2RouteTableSaved = 0;	m2RouteTableSize = (maxRouteTableSize == 0) ? 			   M2_MAX_ROUTE_DEFAULT :  maxRouteTableSize ;    	m2RouteTable = (M2_IPROUTETBL *) KHEAP_ALLOC(m2RouteTableSize *				   	             sizeof (M2_IPROUTETBL));	if (m2RouteTable == NULL)	    {	    return (ERROR);	    }        bzero ((char *)m2RouteTable, m2RouteTableSize * sizeof (M2_IPROUTETBL));	}        if (m2RouteSem == NULL)            {	    m2RouteSem = semMCreate (SEM_Q_PRIORITY | SEM_INVERSION_SAFE |				   SEM_DELETE_SAFE);	    if (m2RouteSem == NULL)		{	        errnoSet (S_m2Lib_CANT_CREATE_ROUTE_SEM);		return (ERROR);		}	    }    (void) m2RouteTableGet (m2RouteTable, m2RouteTableSize);    return (OK);    }/******************************************************************************** m2IpGroupInfoGet - get the MIB-II IP-group scalar variables** This routine fills in the IP structure at <pIpInfo> with the* values of MIB-II IP global variables.** RETURNS: OK, or ERROR if <pIpInfo> is not a valid pointer.** ERRNO:* S_m2Lib_INVALID_PARAMETER** SEE ALSO: m2IpInit(), m2IpGroupInfoSet(), m2IpAddrTblEntryGet(),* m2IpAtransTblEntrySet(), m2IpRouteTblEntryGet(), m2IpRouteTblEntrySet(),* m2IpDelete()*/STATUS m2IpGroupInfoGet    (    M2_IP * pIpInfo	/* pointer to IP MIB-II global group variables */    )    {     /* Validate Pointer to IP structure */     if (pIpInfo == NULL)	{	errnoSet (S_m2Lib_INVALID_PARAMETER);        return (ERROR);	}     if (_ipCfgFlags & IP_DO_FORWARDING)        pIpInfo->ipForwarding       = M2_ipForwarding_forwarding;    else        pIpInfo->ipForwarding       = M2_ipForwarding_not_forwarding;     pIpInfo->ipDefaultTTL       = ipTimeToLive;#ifdef VIRTUAL_STACK    pIpInfo->ipInReceives       = _ipstat.ips_total;     pIpInfo->ipInHdrErrors      = _ipstat.ips_badsum + _ipstat.ips_tooshort +                                  _ipstat.ips_toosmall + _ipstat.ips_badhlen +                                  _ipstat.ips_badlen + _ipstat.ips_badoptions +				  _ipstat.ips_badvers;    pIpInfo->ipInAddrErrors     = _ipstat.ips_cantforward;    pIpInfo->ipForwDatagrams    = _ipstat.ips_forward;    pIpInfo->ipReasmReqds       = _ipstat.ips_fragments;    pIpInfo->ipReasmFails       = _ipstat.ips_fragdropped +                                  _ipstat.ips_fragtimeout;    pIpInfo->ipReasmOKs         = _ipstat.ips_reassembled;     pIpInfo->ipInDiscards       = _ipstat.ips_toosmall;    pIpInfo->ipInUnknownProtos  = _ipstat.ips_noproto;     pIpInfo->ipInDelivers       = _ipstat.ips_delivered;     pIpInfo->ipOutRequests      = _ipstat.ips_localout;    pIpInfo->ipFragOKs          = _ipstat.ips_fragmented;    pIpInfo->ipFragFails        = _ipstat.ips_cantfrag;    pIpInfo->ipFragCreates      = _ipstat.ips_ofragments;    pIpInfo->ipOutDiscards      = _ipstat.ips_odropped;    pIpInfo->ipOutNoRoutes      = _ipstat.ips_noroute;#else    pIpInfo->ipInReceives       = ipstat.ips_total;     pIpInfo->ipInHdrErrors      = ipstat.ips_badsum + ipstat.ips_tooshort +                                  ipstat.ips_toosmall + ipstat.ips_badhlen +                                  ipstat.ips_badlen + ipstat.ips_badoptions +				  ipstat.ips_badvers;     pIpInfo->ipInAddrErrors     = ipstat.ips_cantforward;    pIpInfo->ipForwDatagrams    = ipstat.ips_forward;    pIpInfo->ipReasmReqds       = ipstat.ips_fragments;    pIpInfo->ipReasmFails       = ipstat.ips_fragdropped +                                  ipstat.ips_fragtimeout;    pIpInfo->ipReasmOKs         = ipstat.ips_reassembled;     pIpInfo->ipInDiscards       = ipstat.ips_toosmall;    pIpInfo->ipInUnknownProtos  = ipstat.ips_noproto;     pIpInfo->ipInDelivers       = ipstat.ips_delivered;     pIpInfo->ipOutRequests      = ipstat.ips_localout;    pIpInfo->ipFragOKs          = ipstat.ips_fragmented;    pIpInfo->ipFragFails        = ipstat.ips_cantfrag;    pIpInfo->ipFragCreates      = ipstat.ips_ofragments;    pIpInfo->ipOutDiscards      = ipstat.ips_odropped;    pIpInfo->ipOutNoRoutes      = ipstat.ips_noroute;#endif /* VIRTUAL_STACK */    pIpInfo->ipReasmTimeout     = IPFRAGTTL;     /*      * The MIB-II defines this variable to be the number of routing entries     * that were discarded to free up buffer space.  The BSD VxWorks      * implementation does not free routes to free buffer space.     */    pIpInfo->ipRoutingDiscards  = 0;     return (OK);    }/******************************************************************************** m2IpGroupInfoSet - set MIB-II IP-group variables to new values** This routine sets one or more variables in the IP group, as specified in the* input structure <pIpInfo> and the bit field parameter <varToSet>.** RETURNS: OK, or ERROR if <pIpInfo> is not a valid pointer, or <varToSet> has* an invalid bit field.** ERRNO:*  S_m2Lib_INVALID_PARAMETER*  S_m2Lib_INVALID_VAR_TO_SET** SEE ALSO: m2IpInit(), m2IpGroupInfoGet(), m2IpAddrTblEntryGet(), * m2IpAtransTblEntrySet(), m2IpRouteTblEntryGet(),* m2IpRouteTblEntrySet(), m2IpDelete()*/STATUS m2IpGroupInfoSet    (    unsigned int varToSet,   /* bit field used to set variables */    M2_IP * pIpInfo	     /* ptr to the MIB-II IP group global variables */    )    {     /* Validate pointer and variable */     if (pIpInfo == NULL ||        (varToSet & (M2_IPFORWARDING | M2_IPDEFAULTTTL)) == 0)	{	if (pIpInfo == NULL)	    errnoSet (S_m2Lib_INVALID_PARAMETER);	else	    errnoSet (S_m2Lib_INVALID_VAR_TO_SET);        return (ERROR);	}     /*     * This variable is toggle from NOT forwarding to forwarding, and vice versa     */    if (varToSet & M2_IPFORWARDING)        {        if (pIpInfo->ipForwarding == M2_ipForwarding_not_forwarding)            _ipCfgFlags &= (~IP_DO_FORWARDING);        else            _ipCfgFlags |= IP_DO_FORWARDING; 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区在线视频观看58| 极品尤物av久久免费看| 捆绑变态av一区二区三区| 日韩视频免费观看高清完整版 | 久久 天天综合| 91啦中文在线观看| 男人的j进女人的j一区| 一色屋精品亚洲香蕉网站| 国产精品久久久久久久久久免费看 | 国产精品自在在线| 在线观看日韩一区| 国产精品免费人成网站| 麻豆久久久久久久| 欧美日韩mp4| 亚洲男同性视频| 国产风韵犹存在线视精品| 欧美一区二区在线播放| 亚洲免费观看高清完整| 成人av电影在线观看| 精品成人在线观看| 秋霞午夜av一区二区三区| 欧美无砖专区一中文字| 亚洲色大成网站www久久九九| 成人夜色视频网站在线观看| 久久久久久久综合狠狠综合| 老司机午夜精品| 精品理论电影在线观看 | 337p亚洲精品色噜噜| 亚洲自拍与偷拍| 欧美亚洲国产一区二区三区va| 亚洲欧美在线另类| 99精品国产91久久久久久| 亚洲欧洲色图综合| 99国产精品视频免费观看| 国产精品久久国产精麻豆99网站| 国产激情一区二区三区四区 | 国产精品自产自拍| 色域天天综合网| 成人精品一区二区三区中文字幕| 免费日韩伦理电影| 亚洲一区二区三区美女| 欧美国产禁国产网站cc| 国产精品福利av| 国产网站一区二区三区| 亚洲精品久久7777| 亚洲品质自拍视频| 美女视频黄久久| 精品国产a毛片| 国产激情视频一区二区三区欧美 | 国产成人av电影在线| 欧美激情一区二区三区蜜桃视频 | 国产精品正在播放| 国产精品私人影院| 一本大道久久a久久综合婷婷| 亚洲男人天堂一区| 欧美日韩久久久一区| 免费人成精品欧美精品| 精品国产3级a| av不卡在线观看| 天堂蜜桃91精品| 久久久午夜精品| 色综合久久综合网欧美综合网| 色综合久久66| 国产亚洲一区二区在线观看| 久久亚洲精华国产精华液| 久久综合九色综合97婷婷| 久久精品视频一区| 99久久精品国产一区| 午夜精品福利一区二区三区蜜桃| 欧美一级高清大全免费观看| 国产成人免费xxxxxxxx| 亚洲精品五月天| 日韩精品自拍偷拍| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲视频在线一区观看| 欧美丰满少妇xxxxx高潮对白| 欧美喷潮久久久xxxxx| 精品国产欧美一区二区| 国产成人免费网站| 欧美精品99久久久**| 日韩一区在线播放| 丰满少妇久久久久久久| 欧美成人猛片aaaaaaa| 日韩精品亚洲专区| 欧美性三三影院| 亚洲一区二区三区中文字幕在线| 欧美日韩国产小视频在线观看| 依依成人精品视频| 91福利国产成人精品照片| 日本一区二区高清| 精品中文字幕一区二区| 日韩午夜av一区| 日韩电影在线观看一区| 日韩美女久久久| 久久成人久久鬼色| 成人性视频网站| 韩国精品在线观看| 亚洲欧美一区二区三区极速播放| 国产毛片精品一区| 亚洲精品视频一区| 亚洲综合色噜噜狠狠| 国产亚洲综合性久久久影院| 久久电影国产免费久久电影| 一区二区三区日韩在线观看| 欧美日韩在线免费视频| 中文字幕在线视频一区| 风间由美一区二区av101| 国产精品乱人伦| 国产成人综合亚洲网站| 国产欧美日韩在线| 日韩一二在线观看| 亚洲自拍与偷拍| 日韩免费性生活视频播放| 高清不卡一区二区| 亚洲精品视频在线| 久久99国产精品久久99果冻传媒| 国产美女视频91| 18欧美亚洲精品| 国产成人av电影免费在线观看| 免费在线观看一区| 日韩伦理av电影| 蜜桃一区二区三区在线观看| 成人av资源站| 亚洲视频中文字幕| 久久久三级国产网站| 欧美激情综合五月色丁香| 国产精品天美传媒| 蜜臀av一区二区在线免费观看| 岛国精品在线观看| 26uuu色噜噜精品一区二区| 亚洲一区二区三区国产| 91蝌蚪porny| 亚洲天天做日日做天天谢日日欢| 久色婷婷小香蕉久久| 91小视频免费观看| 97久久精品人人爽人人爽蜜臀| 91丨九色porny丨蝌蚪| 国产精品麻豆久久久| jvid福利写真一区二区三区| 亚洲国产成人私人影院tom| 国产不卡视频在线播放| 国产精品国模大尺度视频| 99re这里只有精品视频首页| 亚洲人一二三区| 91首页免费视频| 一区二区三区四区激情| 亚洲高清免费一级二级三级| 国v精品久久久网| 久久久久久久综合| 免费在线观看精品| 久久这里只有精品6| 国产精品网曝门| 奇米色777欧美一区二区| 久久er99精品| 99re66热这里只有精品3直播 | 亚洲美女在线一区| 欧美aaaaa成人免费观看视频| 91网上在线视频| 亚洲一区二区三区爽爽爽爽爽| 成人av在线影院| 亚洲色大成网站www久久九九| 99国产精品久久久久久久久久 | 久久久久久久久久电影| 国内一区二区视频| 中文一区二区完整视频在线观看| 成人一区在线看| 亚洲综合无码一区二区| 欧美无砖砖区免费| 国产乱国产乱300精品| 国产精品情趣视频| 欧美久久一二区| 国产精品一卡二卡| 亚洲一区中文日韩| 亚洲精品在线观看网站| 色婷婷综合久久久中文字幕| 免费高清成人在线| 亚洲美女屁股眼交3| 精品国产免费视频| 日本大香伊一区二区三区| 捆绑调教美女网站视频一区| 欧美—级在线免费片| 在线播放亚洲一区| 日本道精品一区二区三区| 一区二区三区蜜桃| 色综合天天在线| 欧美tickling网站挠脚心| 激情文学综合丁香| 久久综合色8888| 国产在线播精品第三| 国产精品高潮呻吟久久| 欧美视频完全免费看| 国产一区二区导航在线播放| 亚洲色欲色欲www| 国产精品久久久久久久久快鸭 | 亚洲一区二区三区自拍| 色噜噜狠狠成人网p站| 亚洲午夜在线电影| 2014亚洲片线观看视频免费| 99久久国产综合精品女不卡| 日本欧美在线观看|