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

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

?? riplib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* ripLib.c - Routing Information Protocol (RIP) v1 and v2 library *//* Copyright 1984 - 2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/* * Copyright (c) 1983, 1988, 1993 *	The Regents of the University of California.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by the University of *	California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *//*modification history--------------------02c,22mar02,niq  Merged from Synth view, tor3_x.synth branch, ver 02x02b,24jan02,niq  SPR 72415 - Added support for Route tags                 SPR 62733 - Initialize parameters correctly in ripSplitPacket02a,15oct01,rae  merge from truestack ver 02n, base 01x (SPRs 70188, 69983 etc.) 01z,10nov00,spm  merged from version 02b of tor3_x branch (multiple SPR fixes)01y,06nov00,rae  Fixed SPR #2646201x,16mar99,spm  recovered orphaned code from tor1_0_1.sens1_1 (SPR #25770)01w,05oct98,spm  made task parameters adjustable and optimized stack                  size (SPR #22422)01v,11sep98,spm  general overhaul - moved expanded ripShutdown routine                 from ripTimer.c (SPR #22352); altered ripBuildPacket to                  allow class-based masks for internal supernets (SPR #22350)01u,01sep98,spm  changed ripBuildPacket to include correct netmask for                 classless routing (SPR #22220 and #22065); added support                 for default next hop routers (SPR #21940)01t,26jun98,spm  corrected ripBuildPacket to test version against MIB values                  (allowing RIPv1 updates) and added subnet test to use valid                 router in RIPv2 updates; moved semaphore creation before                  first use; changed RIP_MCAST_ADDR constant from string to                 value; added ripClearInterfaces routine needed to comply                 with ANVL RIP tests; removed compiler warnings01s,14dec97,jdi  doc: cleanup.01r,21oct97,kbw  made minor man page font fix01q,06oct97,gnn  added sendHook routines and cleaned up warnings01p,04aug97,kbw  fixed man page problems found in beta review01o,02jun97,gnn  fixed SPR 8685 so that the timer task does not respawn.01n,16may97,gnn  added code to implement leaking routes.                 modified ripSplitPacket to handle stupid packets (ANVL).                 renamed myHook to ripAuthHook.01m,08may97,gnn  fixed an authentication bug.01l,05may97,rjc  changed error return value to m2Lib stuff.01k,28apr97,gnn  added some descriptive text.01j,20apr97,kbw  fixed man page format, did spell check.01h,18apr97,gnn  removed device specific code.01g,17apr97,gnn  fixed errors pointed out by ANVL.01f,14apr97,gnn  added authentication hook routines.01e,07apr97,gnn  removed device specific code.01d,07apr97,gnn  cleared up some of the more egregious warnings.                 added MIB-II interfaces and options.01c,12mar97,gnn  added multicast support.                 added time variables.01b,24feb97,gnn  added routines for version 2 support.01a,26nov96,gnn  created from BSD4.4 routed main.c*//*DESCRIPTIONThis library implements versions 1 and 2 of the Routing Information Protocol (RIP). The protocol is intended to operate as an interior gateway protocolwithin a relatively small network with a longest path of 15 hops.HIGH-LEVEL INTERFACEThe ripLibInit() routine links this library into the VxWorks image and beginsa RIP session. This happens automatically if INCLUDE_RIP is defined at thetime the image is built. Once started, RIP will maintain the network routing table until deactivated by a call to the ripShutdown() routine, which will remove all route entries and disable the RIP library routines. All RIPrequests and responses are handled as defined in the RFC specifications.RFC 1058 defines the basic protocol operation and RFC 1723 details theextensions that constitute version 2.When acting as a supplier, outgoing route updates are filtered using simplesplit horizon. Split horizon with poisoned reverse is not currently available.Additional route entries may be excluded from the periodic update with theripSendHookAdd() routine. If a RIP session is terminated, the networking subsystem may not function correctly until RIP is restarted with a new call to ripLibInit() unlessrouting information is provided by some other method.CONFIGURATION INTERFACEBy default, a RIP session only uses the network interfaces created before itstarted. The ripIfSearch() routine allows RIP to recognize any interfaces added to the system after that point. If the address or netmask of anexisting interface is changed during a RIP session, the ripIfReset() routine must be used to update the RIP configuration appropriately.The current RIP implementation also automatically performs the bordergateway filtering required by the RFC specification. Those restrictionsprovide correct operation in a mixed environment of RIP-1 and RIP-2 routers.The ripFilterDisable() routine will remove those limitations, and can producemore efficient routing for some topologies. However, you must not use that routine if any version 1 routers are present. The ripFilterEnable() routine will restore the default behavior. AUTHENTICATION INTERFACEBy default, authentication is disabled, but may be activated by an SNMPagent on an interface-specific basis. While authentication is disabled,any RIP-2 messages containing authentication entries are discarded. Whenenabled, all RIP-2 messages without authentication entries are automaticallyrejected. To fully support authentication, an authentication routine shouldbe specified with the ripAuthHookAdd() routine. The specified functionwill be called to screen every RIP-1 message and all unverified RIP-2 messages containing authentication entries. It may be removed with the ripAuthHookDelete() routine. All RIP-1 and unverified RIP-2 messages will be discarded while authentication is enabled unless a hook is present.OPTIONAL INTERFACEThe ripLeakHookAdd() routine allows the use of an alternative routingprotocol that uses RIP as a transport mechanism. The specified functioncan prevent the RIP session from creating any table entries from thereceived messages. The ripLeakHookDelete() routine will restore thedefault operation. DEBUGGING INTERFACEAs required by the RFC specification, the obsolete traceon and traceoff messages are not supported by this implementation. The ripRouteShow()routine will display the contents of the internal RIP routing table.Routines such as mRouteShow() to display the corresponding kernel routing table will also be available if INCLUDE_NET_SHOW is defined when the image is built. If additional information is required, the ripDebugLevelSet() routine will enable predefined debugging messages that will be sent to the standard output.INCLUDE FILES: ripLib.hSEE ALSO: RFC 1058, RFC 1723*//* * Routing Table Management Daemon */#include "vxWorks.h"#include "rip/defs.h"#include "m2Lib.h"#include "sys/ioctl.h"#include "sys/socket.h"#include "inetLib.h"#include "taskLib.h"#include "tickLib.h"#include "sockLib.h"#include "sysLib.h"#include "lstLib.h"#include "routeEnhLib.h"#include "net/if.h"#include "errnoLib.h"#include "errno.h"#include "logLib.h"#include "wdLib.h"#include "semLib.h"#include "ioLib.h"#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#include "netinet/vsRip.h"#endif /* VIRTUAL_STACK */#ifdef RIP_MD5#include "rip/md5.h"#endif /* RIP_MD5 *//* forward declarations. */IMPORT void addrouteforif(register struct interface *ifp);IMPORT void ripRouteMetricSet (struct rt_entry * pRtEntry);void ripIfShow (void);#define SOCKADDR_IN(s) (((struct sockaddr_in*)(s))->sin_addr.s_addr)#define RIP_TASK_PRIORITY		101#define RIP_TIMER_TASK_PRIORITY		100#define RIP_TASK_STACK_SIZE		3750#define RIP_TIMER_TASK_STACK_SIZE	3000#define RIP_TASK_OPTIONS			0#define RIP_TIMER_TASK_OPTIONS		0#ifndef VIRTUAL_STACK/* globals */RIP 	ripState;int	routedDebug = 0;SEM_ID 	ripLockSem;BOOL 	ripFilterFlag = TRUE;LIST 	ripIfExcludeList;/* * Settings for primary and timer tasks. For correct operation, the timer * task must run at a higher priority than the primary task. The stack * sizes are chosen based on the high-water mark measured on a Sparc target, * since the high use of registers in that architecture provides a likely * maximum. The actual values measured were 2524 bytes for the primary task  * and 1824 bytes for the timer task. * * Use a task priority between 100 and 255 as that is the default priority  * range for a user protection domain. */int _ripTaskPriority = RIP_TASK_PRIORITY;int _ripTaskOptions = RIP_TASK_OPTIONS;int _ripTaskStackSize = RIP_TASK_STACK_SIZE;int _ripTimerTaskPriority = RIP_TIMER_TASK_PRIORITY;int _ripTimerTaskOptions = RIP_TIMER_TASK_OPTIONS;int _ripTimerTaskStackSize = RIP_TIMER_TASK_STACK_SIZE;/* locals */LOCAL BOOL ripInitFlag = FALSE;IMPORT struct interface *ripIfNet;IMPORT struct interface **ifnext;#endif /* VIRTUAL_STACK */#ifdef ROUTER_STACKLOCAL char rtmMessages [][16] = {    "ILLEGAL",    "RTM_ADD",    "RTM_DELETE",    "RTM_CHANGE",    "RTM_GET",    "RTM_LOSING",    "RTM_REDIRECT",    "RTM_MISS",    "RTM_LOCK",    "RTM_OLDADD",    "RTM_OLDDEL",    "RTM_RESOLVE",    "RTM_NEWADDR",    "RTM_DELADDR",    "RTM_IFINFO",    "RTM_ADDEXTRA",    "RTM_DELEXTRA",    "RTM_NEWCHANGE",    "RTM_NEWGET",    "RTM_GETALL",    "RTM_NEWIPROUTE",    "RTM_OLDIPROUTE"    };#endif /* ROUTER_STACK *//* defines */#define BUFSPACE 127*1024#define ROUNDUP(a) \        ((a) > 0 ? (1 + (((a) - 1) | (sizeof (long) - 1))) : sizeof (long))#define ADVANCE(x, n) (x += ROUNDUP ((n)->sa_len)) /* forward declarations */   void rtdeleteall ();IMPORT void ripTimer ();int ripTask ();void timevaladd (struct timeval *t1, struct timeval *t2);void timevalsub (struct timeval *t1, struct timeval *t2);void ripTimeSet (struct timeval *pTimer);void process (int fd);#ifdef ROUTER_STACKLOCAL void ripRouteMsgProcess (void);LOCAL BOOL ripRouteSame (struct rt_entry *pRtEntry, struct sockaddr *pDstAddr,                          struct sockaddr *pNetmask, struct sockaddr *pGateway);LOCAL STATUS ripInterfaceUpFlagSet (u_short ifIndex, BOOL up);LOCAL STATUS ripInterfaceDelete (struct interface *pIf);#endif /* ROUTER_STACK */void ripTimerArm (long timeout);int getsocket (int domain, int type, struct sockaddr_in *sin);void routedTableInit ();void rtdefault ();STATUS routedIfInit (BOOL resetFlag, long ifIndex);void routedInput (struct sockaddr *from, register RIP_PKT *rip, int size);void toall (int (*f)(), int rtstate, struct interface *skipif);LOCAL STATUS ripRoutesDelete (struct interface *pIf, BOOL deleteAllRoutes);LOCAL STATUS ripInterfaceIntDelete (struct interface *pIf,                                     struct interface *pPrevIf);void _ripAddrsXtract (caddr_t cp, caddr_t cpLim, struct rt_addrinfo *pRtInfo);/******************************************************************************** ripLibInit - initialize the RIP routing library** This routine creates and initializes the global data structures used by * the RIP routing library and starts a RIP session to maintain routing * tables for a host. You must call ripLibInit() before you can use any other * ripLib routines. A VxWorks image automatically invokes ripLibInit() * if INCLUDE_RIP was defined when the image was built.** The resulting RIP session will monitor all network interfaces that are * currently available for messages from other RIP routers. If the <supplier>* parameter is true, it will also respond to specific requests from other* routers and transmit route updates over every known interface at the * interval specified by <supplyInterval>.** Specifying a <gateway> setting of true establishes this router as a* gateway to the wider Internet, capable of routing packets anywhere within * the local networks. The final <multicast> flag indicates whether the* RIP messages are sent to the pre-defined multicast address of 224.0.0.9* (which requires a <version> setting of 2) or to the broadcast address of * the interfaces.** The <version> parameter determines the format used for outgoing RIP * messages, and also sets the initial settings of the MIB-II compatibility * switches in combination with the <multicast> flag. A <version> of 1 will * restrict all incoming traffic to that older message type. A <version> of * 2 will set the receive switch to accept either type unless <multicast> is * true, which limits reception to version 2 messages only. SNMP agents may * alter those settings on a per-interface basis once startup is complete.** The remaining parameters set various system timers used to maintain the* routing table. All of the values are expressed in seconds, and must be* greater than or equal to 1. The <timerRate> determines how often* the routing table is examined for changes and expired routes. The* <supplyInterval> must be an exact multiple of that value. The* <expire> parameter specifies the maximum time between updates before* a route is invalidated and removed from the kernel table. Expired routes * are then deleted from the internal RIP routing table if no update has* been received within the time set by the <garbage> parameter.** The following configuration parameters determine the initial values for* all these settings. The default timer values match the settings indicated* in the RFC specification.** \ts* Parameter Name    | Default Value   | Configuration Parameter* ------------------+-----------------+------------------------

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91黄色免费网站| 亚洲视频一二三| 日韩欧美国产午夜精品| 欧美日韩免费观看一区三区| 色屁屁一区二区| 色88888久久久久久影院野外| 一本大道久久a久久精二百 | 日本乱码高清不卡字幕| www.视频一区| 不卡的电影网站| 色系网站成人免费| 欧日韩精品视频| 欧美理论片在线| 日韩欧美亚洲一区二区| 精品国产自在久精品国产| 精品国产污网站| 久久久无码精品亚洲日韩按摩| 久久精品综合网| 亚洲日本青草视频在线怡红院| 亚洲精选视频免费看| 亚洲图片欧美综合| 免费日韩伦理电影| 国产98色在线|日韩| 色综合天天综合狠狠| 欧美色手机在线观看| 欧美不卡视频一区| 国产精品的网站| 亚洲一区二区三区三| 蜜臀av一级做a爰片久久| 国产麻豆视频一区二区| 波多野结衣中文字幕一区二区三区| 色综合婷婷久久| 91精品黄色片免费大全| 久久久亚洲国产美女国产盗摄| 中文字幕综合网| 蜜臀av性久久久久蜜臀av麻豆 | 欧美精品一区二区三区四区 | 国产欧美日韩另类一区| 综合网在线视频| 麻豆精品视频在线观看免费| 成人免费va视频| 欧美日韩美女一区二区| 26uuu成人网一区二区三区| 亚洲三级在线免费观看| 蜜桃视频免费观看一区| 成人a区在线观看| 日韩一区二区三区在线视频| 中文无字幕一区二区三区| 一区二区三区电影在线播| 美洲天堂一区二卡三卡四卡视频| 成人黄色av电影| 日韩免费一区二区| 一区二区三区在线免费播放| 国产在线日韩欧美| 欧美午夜不卡视频| 国产精品美女久久久久久| 日韩**一区毛片| 91在线一区二区三区| 精品福利av导航| 偷窥少妇高潮呻吟av久久免费| 粉嫩久久99精品久久久久久夜| 欧美日本在线一区| 亚洲免费在线电影| 国产精品1区2区| 欧美午夜精品一区二区三区| 国产精品久久综合| 国产综合色精品一区二区三区| 欧美日韩极品在线观看一区| 亚洲欧洲一区二区三区| 国产在线不卡一区| 欧美一区二区成人| 亚洲一区在线电影| 91啪九色porn原创视频在线观看| 久久久久久久网| 蜜臀久久99精品久久久久宅男 | 91麻豆精品国产综合久久久久久| 国产网站一区二区| 蜜臀va亚洲va欧美va天堂| 欧美在线免费播放| 中文字幕一区二区在线观看| 国内精品伊人久久久久av一坑| 欧美美女激情18p| 夜夜夜精品看看| 99久久国产免费看| 欧美国产亚洲另类动漫| 国内精品国产成人国产三级粉色| 91精品国产麻豆国产自产在线| 亚洲电影在线免费观看| 欧美在线观看视频一区二区| 18欧美乱大交hd1984| 成人蜜臀av电影| 中文字幕av不卡| 不卡的av电影在线观看| 欧美激情中文字幕一区二区| 国产伦理精品不卡| 欧美va在线播放| 激情欧美一区二区| 精品对白一区国产伦| 国产麻豆精品一区二区| 亚洲精品一区二区三区99| 国产一区二区视频在线| 久久久精品蜜桃| 国产91露脸合集magnet| 国产欧美一区二区精品性色| 国产91精品露脸国语对白| 久久一区二区视频| 国产大陆精品国产| 中文字幕av一区二区三区| a亚洲天堂av| 亚洲精品免费一二三区| 91久久精品一区二区| 亚洲丶国产丶欧美一区二区三区| 欧美伊人久久久久久午夜久久久久| 亚洲午夜一区二区三区| 欧美精品色一区二区三区| 日韩av不卡一区二区| 精品成人在线观看| 成人一区二区三区视频 | 精品一区二区影视| 精品久久99ma| 国产999精品久久久久久绿帽| 中文字幕一区三区| 欧美三级电影精品| 麻豆精品在线看| 欧美—级在线免费片| 91免费国产在线| 日日夜夜精品视频免费| 久久免费偷拍视频| 97久久精品人人澡人人爽| 亚洲午夜久久久久久久久电影网 | 国产欧美精品在线观看| 91香蕉视频mp4| 亚洲成人在线观看视频| 91精品国产综合久久久蜜臀粉嫩| 国模冰冰炮一区二区| 国产精品久久久久久亚洲伦| 在线中文字幕一区二区| 免费xxxx性欧美18vr| 国产女主播一区| 欧美日韩视频在线观看一区二区三区| 免费一级片91| 中文字幕一区二区三区四区| 欧美绝品在线观看成人午夜影视| 久久黄色级2电影| **网站欧美大片在线观看| 欧美精品少妇一区二区三区| 国产风韵犹存在线视精品| 一区二区免费在线| 久久夜色精品国产噜噜av| 色婷婷久久综合| 精品一区二区三区不卡 | 青青草精品视频| 国产精品欧美一级免费| 9191国产精品| 春色校园综合激情亚洲| 日韩在线一区二区| 中文字幕日本乱码精品影院| 56国语精品自产拍在线观看| 成人97人人超碰人人99| 免费看黄色91| 亚洲一区二区在线视频| 国产午夜亚洲精品理论片色戒| 精品视频色一区| av日韩在线网站| 久久99蜜桃精品| 亚洲午夜激情网站| 国产精品无人区| 精品国产一区二区国模嫣然| 欧美影院一区二区三区| 国产不卡视频一区| 九色综合狠狠综合久久| 亚洲国产精品综合小说图片区| 中文字幕精品一区二区精品绿巨人| 91麻豆精品国产91久久久使用方法| 成人免费视频视频在线观看免费| 精品午夜一区二区三区在线观看| 亚洲不卡av一区二区三区| 最新热久久免费视频| 国产午夜三级一区二区三| 欧美老年两性高潮| 欧美性生活久久| 91美女精品福利| 高潮精品一区videoshd| 久久av老司机精品网站导航| 日韩精品国产欧美| 亚洲一二三四在线| 亚洲免费av高清| 亚洲欧美一区二区在线观看| 久久久777精品电影网影网| 欧美电视剧免费全集观看| 5月丁香婷婷综合| 欧美日韩和欧美的一区二区| 色狠狠av一区二区三区| 91蝌蚪国产九色| 91色婷婷久久久久合中文| av电影天堂一区二区在线观看| 成人综合激情网| 国产91综合网| 成人av高清在线| 成人97人人超碰人人99|