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

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

?? m2iplib.c

?? vxworks的完整的源代碼
?? 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一区二区三区免费野_久草精品视频
亚洲色图在线视频| 久久91精品国产91久久小草| 99re6这里只有精品视频在线观看| 精品日韩欧美在线| 国产成人免费在线观看| 国产精品日日摸夜夜摸av| 91伊人久久大香线蕉| 亚洲国产婷婷综合在线精品| 欧美一卡在线观看| 国产91精品露脸国语对白| 一区二区三区在线观看欧美| 正在播放一区二区| 国产成人免费网站| 亚洲裸体xxx| 91精品国产色综合久久ai换脸| 久久99久久精品欧美| 国产亚洲精品资源在线26u| 91蝌蚪porny| 免费亚洲电影在线| 国产精品久久777777| 欧美性受xxxx黑人xyx性爽| 美国一区二区三区在线播放| 国产欧美一区二区三区在线老狼| 日本久久电影网| 另类小说综合欧美亚洲| 亚洲欧美在线高清| 日韩一区二区在线观看视频| 成人福利电影精品一区二区在线观看| 亚洲精品日产精品乱码不卡| 欧美人牲a欧美精品| 五月天激情综合网| 欧美色男人天堂| 一区二区成人在线观看| 国产精品白丝av| 91麻豆精品国产自产在线观看一区| 国产精品国产精品国产专区不片| 久久精品国产久精国产| 欧美在线视频不卡| 中文字幕一区在线观看| 久久99久久久欧美国产| 一区二区三区日韩| 国产精品一区二区在线观看网站| 亚洲欧洲无码一区二区三区| 精品国产欧美一区二区| 日本高清不卡一区| 国产东北露脸精品视频| 日韩激情视频在线观看| 亚洲色图在线视频| 国产三级精品三级在线专区| 欧美久久久一区| 91福利区一区二区三区| 成人午夜激情在线| 久久99精品久久久久久国产越南| 亚洲图片欧美色图| 亚洲人成网站影音先锋播放| 国产欧美日本一区二区三区| 日韩三级av在线播放| 欧美色电影在线| 色婷婷亚洲精品| 成人黄色免费短视频| 国产美女在线精品| 精品在线观看免费| 美女高潮久久久| 日韩不卡免费视频| 爽好久久久欧美精品| 亚洲18色成人| 午夜精彩视频在线观看不卡| 一区二区在线免费观看| 亚洲天堂a在线| 最新日韩在线视频| 18成人在线观看| 中文字幕在线不卡国产视频| 中文字幕一区在线| 中文字幕一区二区三区视频| 中文幕一区二区三区久久蜜桃| 久久久久国产精品免费免费搜索| 久久亚洲精品小早川怜子| www久久精品| 久久尤物电影视频在线观看| 亚洲精品一线二线三线| 久久影院午夜论| 久久精品亚洲一区二区三区浴池| 欧美精品一区二区三| 久久精品人人做人人爽人人| 欧美www视频| 久久青草国产手机看片福利盒子| 久久精品网站免费观看| 99r精品视频| 久久99精品久久久久婷婷| 国产成人亚洲精品青草天美| 三级成人在线视频| 中文字幕综合网| 欧美国产丝袜视频| 精品国精品国产尤物美女| 欧美日韩一区二区三区在线| 97久久精品人人爽人人爽蜜臀| 极品美女销魂一区二区三区| 蜜桃视频免费观看一区| 国产v综合v亚洲欧| 国产一区二区三区四区在线观看| 免费在线观看视频一区| 精品一区二区三区免费观看| 国产69精品久久777的优势| 成人视屏免费看| 91国产免费看| 91精品国产免费| 国产欧美视频一区二区三区| 亚洲色图清纯唯美| 日韩av午夜在线观看| 高清不卡一区二区| 欧美日韩夫妻久久| 国产日韩av一区| 亚洲国产视频在线| 国产成人免费视频一区| 欧美日韩国产美| 国产婷婷色一区二区三区在线| 亚洲最大色网站| 国产又粗又猛又爽又黄91精品| 99国产精品国产精品久久| 制服丝袜在线91| 国产精品久久久久天堂| 美女国产一区二区| 91麻豆精品一区二区三区| 精品美女一区二区| 亚洲国产精品久久人人爱| 韩国v欧美v亚洲v日本v| 欧美日韩免费一区二区三区 | 久久福利资源站| 91香蕉视频黄| 久久免费看少妇高潮| 亚洲福中文字幕伊人影院| 粉嫩久久99精品久久久久久夜| 欧美日韩一区二区在线视频| 中文字幕一区二区三中文字幕| 另类小说色综合网站| 欧美日韩一区高清| 亚洲欧洲日本在线| 国产伦精品一区二区三区免费迷 | 91日韩在线专区| www亚洲一区| 奇米影视7777精品一区二区| 在线精品视频小说1| 国产成人精品一区二| 精品久久一二三区| 在线观看不卡一区| 日本伊人精品一区二区三区观看方式 | 日本精品一区二区三区高清| 精品乱人伦一区二区三区| 久久电影国产免费久久电影| 91精品久久久久久蜜臀| 国产精品亚洲视频| 欧美精品一区二区三区久久久 | caoporm超碰国产精品| 欧美一级高清片| 午夜欧美一区二区三区在线播放| av不卡一区二区三区| 日本一区二区三区在线不卡| 国产一区二区主播在线| 777xxx欧美| 日韩精品久久久久久| 欧美日韩三级一区| 亚洲国产美女搞黄色| 91电影在线观看| 亚洲一区二区三区在线看| 在线免费观看日本欧美| 亚洲最大成人网4388xx| 色综合天天做天天爱| 亚洲另类中文字| 色吊一区二区三区| 一区二区三区成人| 欧美日韩国产综合草草| 三级久久三级久久| 欧美一区二区黄色| 国产一区免费电影| 国产日韩欧美电影| 91在线小视频| 亚洲国产精品久久久男人的天堂| 欧美久久一二区| 韩国精品主播一区二区在线观看 | 国产欧美精品一区二区色综合朱莉| 国产经典欧美精品| 亚洲人成亚洲人成在线观看图片 | 69av一区二区三区| 老司机午夜精品99久久| 久久五月婷婷丁香社区| 99免费精品视频| 亚洲v中文字幕| 精品奇米国产一区二区三区| 国产成人免费av在线| 亚洲欧美一区二区三区孕妇| 欧美中文字幕不卡| 蜜臀a∨国产成人精品| 久久久久久9999| 日本高清无吗v一区| 石原莉奈一区二区三区在线观看| 欧美精品一区二区三区视频| 色综合网色综合| 免费一区二区视频| 日韩一区有码在线| 欧美区在线观看|