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

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

?? riplib.c

?? vxwork源代碼
?? 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一区二区三区免费野_久草精品视频
欧美性欧美巨大黑白大战| 亚洲成a人片在线观看中文| 国产麻豆精品在线| 久久久亚洲高清| 国产乱码精品1区2区3区| 精品国产乱码久久久久久久| 国产一区二区h| 中文字幕亚洲电影| 欧美日韩一级片网站| 另类小说色综合网站| 国产亚洲精品bt天堂精选| 99久久精品免费看国产| 亚洲一区在线电影| 日韩一区二区三区四区五区六区| 韩国一区二区视频| 中文字幕国产精品一区二区| 日本韩国欧美三级| 久久99久久99小草精品免视看| 久久伊人蜜桃av一区二区| 不卡的av网站| 日韩激情av在线| 久久精品人人做人人综合| 91麻豆视频网站| 玖玖九九国产精品| 国产精品无遮挡| 欧美久久一二区| 成人午夜免费av| 天天影视色香欲综合网老头| 国产午夜精品久久| 欧美日韩视频第一区| 国产91清纯白嫩初高中在线观看| 一区二区日韩av| 国产亚洲欧美日韩俺去了| 欧美日韩一级黄| 成人黄页在线观看| 蜜臀av性久久久久蜜臀aⅴ四虎| 中文字幕精品三区| 日韩一区二区高清| 色一情一乱一乱一91av| 国内精品久久久久影院一蜜桃| 一区二区三区日韩在线观看| 久久这里只有精品视频网| 欧美色图一区二区三区| 成人av网址在线观看| 蜜桃av噜噜一区| 亚洲最大成人网4388xx| 精品福利一区二区三区免费视频| 欧美亚洲自拍偷拍| www.久久精品| 国产成人免费xxxxxxxx| 亚洲福利电影网| 日本一区二区不卡视频| 91精品国产aⅴ一区二区| 色综合久久久久久久| 成人自拍视频在线观看| 国产乱码精品1区2区3区| 日本一道高清亚洲日美韩| 亚洲综合色丁香婷婷六月图片| 国产精品污污网站在线观看| 久久亚洲捆绑美女| 欧美国产丝袜视频| 精品日韩欧美在线| 777a∨成人精品桃花网| 欧美视频完全免费看| 一本大道久久精品懂色aⅴ| 粉嫩av亚洲一区二区图片| 国内精品不卡在线| 国产美女精品人人做人人爽| 麻豆国产精品777777在线| 日本一不卡视频| 奇米色一区二区| 男女激情视频一区| 男男视频亚洲欧美| 另类调教123区| 九九精品一区二区| 激情成人综合网| 国产精品一区二区久久精品爱涩| 激情av综合网| 国产91富婆露脸刺激对白| 国产精品一级二级三级| 国产精品66部| 不卡一卡二卡三乱码免费网站 | 成人欧美一区二区三区黑人麻豆 | 国产在线精品一区二区三区不卡 | 亚洲伦理在线精品| 椎名由奈av一区二区三区| 玉米视频成人免费看| 一区二区三区产品免费精品久久75| 亚洲人快播电影网| 一区二区三区四区国产精品| 亚洲五月六月丁香激情| 蜜芽一区二区三区| 国产综合久久久久久久久久久久| 国产又黄又大久久| 成人黄色综合网站| 日本道色综合久久| 91精品国产高清一区二区三区| 欧美岛国在线观看| 国产精品伦理一区二区| 亚洲一区电影777| 久久99久久久久| 国产99一区视频免费| 色综合久久九月婷婷色综合| 欧美日韩一区二区三区在线看| 欧美一级午夜免费电影| 国产欧美精品日韩区二区麻豆天美| 中文字幕的久久| 国产精品88888| 日本高清不卡一区| 日韩欧美中文字幕公布| 国产精品狼人久久影院观看方式| 亚洲综合成人在线| 国产精品一卡二卡| 91黄视频在线| 久久综合成人精品亚洲另类欧美 | 亚洲欧美日韩在线不卡| 日日欢夜夜爽一区| 成人一区二区视频| 制服丝袜中文字幕亚洲| 欧美国产在线观看| 日韩精品欧美成人高清一区二区| 国产成人免费在线| 91麻豆精品国产无毒不卡在线观看| 久久久精品人体av艺术| 亚洲不卡在线观看| youjizz久久| 精品国产乱子伦一区| 亚洲国产精品久久久久秋霞影院 | 免费在线观看成人| 99re8在线精品视频免费播放| 日韩一区二区三区四区| 一区二区三区在线视频观看 | 中文字幕日本乱码精品影院| 日本欧美在线观看| 91美女福利视频| 亚洲国产精品ⅴa在线观看| 免费看黄色91| 欧美日韩中文一区| 亚洲色图一区二区三区| 国产高清久久久| 欧美一区二区播放| 亚洲综合色成人| 91一区在线观看| 中文字幕不卡一区| 国产福利一区二区三区视频| 欧美一区二区三区在线观看视频| 一区二区三区在线播放| 国产精品亚洲成人| 精品日韩一区二区三区| 视频一区二区国产| 欧美性一二三区| 亚洲精品高清在线| 91免费观看视频在线| 国产欧美一区二区精品婷婷| 精品一区二区在线免费观看| 欧美一区二区三区四区五区| 亚洲不卡在线观看| 欧美日韩专区在线| 亚洲gay无套男同| 精品视频1区2区3区| 亚洲成人1区2区| 欧美日韩免费高清一区色橹橹 | 午夜电影网亚洲视频| 91电影在线观看| 一区二区欧美国产| 欧美中文字幕一区二区三区亚洲| 亚洲人精品午夜| 91国偷自产一区二区使用方法| 亚洲视频图片小说| 91成人在线观看喷潮| 一区二区视频在线看| 日韩视频在线一区二区| 蜜桃视频一区二区三区| 精品日韩av一区二区| 国产一区二区不卡在线| 中文字幕欧美激情一区| caoporm超碰国产精品| 亚洲欧美日韩中文播放 | 石原莉奈在线亚洲三区| 日韩视频免费直播| 国产精品一区三区| 《视频一区视频二区| 91麻豆产精品久久久久久| 亚洲综合在线五月| 日韩亚洲欧美一区| 国产精品一区二区免费不卡| 国产精品另类一区| 欧美网站大全在线观看| 日本美女视频一区二区| 久久一区二区三区四区| 成人免费av网站| 亚洲va韩国va欧美va精品| 精品少妇一区二区三区免费观看| 国产综合色视频| 亚洲精品欧美在线| 欧美一区二区网站| 岛国av在线一区| 日日摸夜夜添夜夜添国产精品 | 在线成人免费观看| 紧缚奴在线一区二区三区|