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

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

?? riptimer.c

?? rip路由在vxworks上的實現源代碼
?? C
字號:
/* ripTimer.c - routines to handle RIP periodic updates*//* 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. * @(#)timer.c	8.1 (Berkeley) 6/5/93 *//*modification history--------------------01l,22mar02,niq  Merged from Synth view, tor3_x.synth branch, ver 01p01k,24jan02,niq  SPR 72415 - Added support for Route tags01j,15oct01,rae  merge from truestack ver 01k, base 01h (VIRTUAL_STACK etc.)01i,10nov00,spm  merged from version 01i of tor3_x branch (SPR #29099 fix)01h,11sep98,spm  moved expanded ripShutdown routine to ripLib.c (SPR #22352);                 added mutual exclusion to prevent collisions with RIP                  message processing (SPR #22350)01g,01sep98,spm  corrected error preventing expiration of routes stored                 in hosthash table (SPR #22066)01f,06oct97,gnn  fixed SPR 9211 and cleaned up warnings01e,11aug97,gnn  name change.01d,02jun97,gnn  fixed SPR 8685 so that the timer task does not respawn.01c,12mar97,gnn  added multicast support.                 added time variables.01b,24feb97,gnn  fixed bugs in interface aging.01a,26nov96,gnn  created from BSD4.4 routed*//*DESCRIPTION*//* * Routing Table Management Daemon */#include "vxWorks.h"#include "rip/defs.h"#include "wdLib.h"#include "semLib.h"#include "intLib.h"#include "logLib.h"#ifdef VIRTUAL_STACK#include "netinet/vsLib.h"#include "netinet/vsRip.h"#endif /* VIRTUAL_STACK *//* globals */#ifndef VIRTUAL_STACKIMPORT int 			routedDebug;IMPORT RIP 			ripState;#endif /* VIRTUAL_STACK *//* forward declarations. */#ifdef VIRTUAL_STACKvoid ripTimer(int stackNum);#elsevoid ripTimer(void);#endif /* VIRTUAL_STACK */IMPORT void ripTimerArm (long timeout);IMPORT STATUS routedIfInit (BOOL resetFlag, long ifIndex);IMPORT void ripTimeSet (struct timeval *pTimer);/* * Timer routine.  Performs routing information supply * duties and manages timers on routing table entries. * Management of the RTS_CHANGED bit assumes that we broadcast * each time called. */void ripTimer    (#ifdef VIRTUAL_STACK    int stackNum#else    void#endif    )    {    register struct rthash *rh;    register struct rt_entry *rt;    struct rthash *base;    int doinghost;    int timetobroadcast;    int diffTime;    int deltaTime;    int time;    int timeLeft;#ifdef VIRTUAL_STACK    /* Assign virtual stack number to access appropriate data structures. */    if (virtualStackNumTaskIdSet (stackNum) == ERROR)        {        if (routedDebug)            logMsg ("ripTimerTask: unable to access stack data.\n",                    0, 0, 0, 0, 0, 0);        return;        }#endif /* VIRTUAL_STACK */    FOREVER         {        /* Wait for the semaphore given by the watchdog routine. */        semTake(ripState.timerSem, WAIT_FOREVER);        /*          * Block until any processing of incoming messages has completed.         * This exclusion guarantees that the routing entries are stable         * during updates and that the timer values shared with the         * triggered update scheduling will be set atomically.         */        semTake (ripLockSem, WAIT_FOREVER);        ripTimeSet (&ripState.now);        /* Calculate the time difference from when we last checked */        diffTime = (u_long)ripState.now.tv_sec - (u_long)ripState.then.tv_sec;        /* If the timer has wrapped around, account for that */        if (diffTime < 0)            diffTime = -diffTime;        /*          * Now round off the time to an integer multiple of timerRate.         * Whatever time remains after rounding off, will be adjusted         * when we restart the timer below         */        if (diffTime < ripState.timerRate)            {            deltaTime = 0;            diffTime = ripState.timerRate;            }        else            {            deltaTime =  diffTime % ripState.timerRate;            diffTime = (diffTime / ripState.timerRate) * ripState.timerRate;            }        /* Record the time we got above */        ripState.then = ripState.now;        /*         * Now check if the time elapsed (diffTime) covers an update         * point. If so we missed an update. We should send an update         * right now. Since the calculation below sends out updates         * only at multiples of the supply interval, we should         * increment the time only to the extent that it becomes an         * integer multiple of the supply interval. After deciding that we need         * to send an update, we'll add the remaining time. Note, that         * if so much time had elapsed such that 2 updates (supplies)         * could have been sent, we still send out only one as in the RIP         * protocol two or more immediate updates are equivalent to         * a single update         *         *        |last update             | new update (scheduled)         *        |                        |         *        |                        |      actual update (delayed)         *        |________________________|_____|________________         *        0              |         30                     | 60         *                       |<-------------->                |         *                       |   diffTime                     | next update         *                       |         *                       fake time         *         */        time = ripState.faketime % ripState.supplyInterval;        if ((time + diffTime) > ripState.supplyInterval)            {            time = ripState.supplyInterval - time;            timeLeft = diffTime - time;            diffTime -= timeLeft;            }        else            timeLeft = 0;        ripState.faketime += diffTime;        if (ripState.lookforinterfaces)            {            if (routedDebug)                logMsg ("Calling routedIfInit.\n", 0, 0, 0, 0, 0, 0);            routedIfInit (FALSE, 0);            }        timetobroadcast = ripState.supplier &&            ((ripState.faketime % ripState.supplyInterval) == 0);        ripState.faketime += timeLeft;        /* Restart the timer. */        ripTimerArm (ripState.timerRate - deltaTime);        base = hosthash;        doinghost = 1;        again:        for (rh = base; rh < &base[ROUTEHASHSIZ]; rh++)            {            rt = rh->rt_forw;            for (; rt != (struct rt_entry *)rh; rt = rt->rt_forw)                {                /*                 * We don't advance time on a routing entry for                 * a passive gateway, or any interface.                 */                if (!(rt->rt_state & RTS_PASSIVE) &&                    !(rt->rt_state & RTS_INTERFACE) &&                    !(rt->rt_state & RTS_OTHER))                    rt->rt_timer += ripState.timerRate;                if (rt->rt_timer >= ripState.garbage)                    {                    rt = rt->rt_back;                    rtdelete (rt->rt_forw);                    continue;                    }                /*                  * If the timer expired, then we should delete the                  * route from the system routing database. The                  * check for inKernel allows us to delete valid routes                 * that were advertised with a metric of 15 (and added                 * to our table with a metric of 16). After deleting the                 * route, rt->inKernel will become FALSE and rt->rt_metric                 * will be set to HOPCNT_INFINITY (16) so that we would                 * not call rtchange again.                 */                if (rt->rt_timer >= ripState.expire &&                     (rt->inKernel || rt->rt_metric < HOPCNT_INFINITY))                    rtchange(rt, &rt->rt_router, HOPCNT_INFINITY, NULL,                             rt->rt_tag, 0, NULL);		/* 		 * Only reset the flag after a broadcast is done		 */                if (timetobroadcast)		    rt->rt_state &= ~RTS_CHANGED;                }            }        if (doinghost)            {            doinghost = 0;            base = nethash;            goto again;            }        /*         * Send a periodic update if necessary and reset the timer         * and flag settings to suppress any pending triggered updates.         */        if (timetobroadcast)            {            toall (supply, 0, (struct interface *)NULL);            ripState.lastbcast = ripState.now;            ripState.lastfullupdate = ripState.now;            ripState.needupdate = 0;            ripState.nextbcast.tv_sec = 0;            }        semGive (ripLockSem); 	/* End of critical section. */        }    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91在线观看| 国产欧美精品区一区二区三区| 国内不卡的二区三区中文字幕| 国产精品毛片a∨一区二区三区| 欧美性猛交xxxxxx富婆| 国产精品一区二区男女羞羞无遮挡| 自拍偷拍国产亚洲| www国产精品av| 91精品久久久久久久91蜜桃 | 成人小视频免费观看| 亚洲成av人片在线观看无码| 中文字幕乱码亚洲精品一区| 日韩精品一区二区三区中文不卡| 欧美视频三区在线播放| 成人听书哪个软件好| 韩国成人福利片在线播放| 天天亚洲美女在线视频| 亚洲精品乱码久久久久| 国产精品日韩成人| 国产区在线观看成人精品| 欧美成人精品福利| 日韩一区二区在线观看| 欧美三级中文字幕在线观看| 欧美视频在线观看一区| 99精品视频一区| 国产福利不卡视频| 国产精品18久久久| 丁香亚洲综合激情啪啪综合| 成人福利电影精品一区二区在线观看 | 成人永久看片免费视频天堂| 国产乱色国产精品免费视频| 日韩精品久久理论片| 日韩在线卡一卡二| 奇米影视在线99精品| 日本欧美一区二区在线观看| 奇米色一区二区| 国产一区二区三区在线观看免费视频| 国产精品一区一区三区| 99久久国产免费看| 色悠悠亚洲一区二区| av电影天堂一区二区在线观看| 99精品一区二区| 欧美亚洲动漫精品| 日韩视频在线观看一区二区| 国产午夜精品一区二区三区嫩草| 国产日本欧洲亚洲| 亚洲免费观看高清| 轻轻草成人在线| 国产精品自在在线| 成人精品一区二区三区中文字幕| 色呦呦网站一区| 欧美一区二区三区视频免费| 中文av一区二区| 一个色在线综合| 久久草av在线| 91麻豆产精品久久久久久| 日本大香伊一区二区三区| 欧美一二三区在线观看| 久久精品一级爱片| 最近日韩中文字幕| 另类中文字幕网| 91女人视频在线观看| 欧美一区二区视频在线观看2022| 欧美国产国产综合| 天天色 色综合| 成人综合婷婷国产精品久久 | 久久这里只有精品视频网| 中文字幕日本不卡| 日本va欧美va精品发布| 93久久精品日日躁夜夜躁欧美| 91精品国产综合久久久久久 | 成人爱爱电影网址| 欧美一区二区三区视频在线观看 | 日本不卡在线视频| 91视频www| 精品国产乱码久久久久久久久| 亚洲日本在线看| 国产精品99久久久久久久女警| 欧美日韩国产大片| 亚洲男女一区二区三区| 国产乱对白刺激视频不卡| 色国产精品一区在线观看| 久久久久9999亚洲精品| 青青国产91久久久久久| 色婷婷综合五月| 亚洲视频小说图片| 国产激情一区二区三区桃花岛亚洲| 67194成人在线观看| 亚洲欧美另类小说| 国产资源在线一区| 日韩一区二区三免费高清| 亚洲黄色av一区| 成人av免费在线播放| 欧美精品一区二区三区高清aⅴ | 精品国产免费一区二区三区香蕉| 亚洲国产日韩综合久久精品| 色网站国产精品| 亚洲黄色av一区| 色视频成人在线观看免| 亚洲精品午夜久久久| 色吧成人激情小说| 亚洲精品va在线观看| 国产成人在线视频播放| 久久蜜桃av一区精品变态类天堂| 国内外精品视频| 久久久久久久久岛国免费| 激情国产一区二区| 国产视频视频一区| 成人动漫精品一区二区| 国产农村妇女精品| 国产69精品一区二区亚洲孕妇 | 中文字幕精品一区二区三区精品| 亚洲www啪成人一区二区麻豆| 在线观看免费成人| 亚洲国产一二三| 欧美妇女性影城| 激情av综合网| 国产精品毛片久久久久久久| 粉嫩嫩av羞羞动漫久久久| 国产精品灌醉下药二区| 日本精品一区二区三区高清| 亚洲图片有声小说| 精品久久99ma| 美女久久久精品| 国产欧美日韩在线观看| 97se狠狠狠综合亚洲狠狠| 亚洲一区二区三区小说| 7777精品伊人久久久大香线蕉的 | 亚洲与欧洲av电影| 在线播放91灌醉迷j高跟美女| 欧美日韩成人一区| 亚洲欧美日韩电影| 久久欧美中文字幕| 欧美日韩一区国产| 成人午夜精品在线| 精品中文字幕一区二区| 夜夜嗨av一区二区三区四季av | 欧美第一区第二区| 91美女在线看| 国产成人精品免费在线| 美女视频黄a大片欧美| 亚洲一区中文日韩| 亚洲激情图片一区| 亚洲欧美日韩国产另类专区| 国产精品免费av| 国产午夜精品福利| 久久综合久久久久88| 日韩一本二本av| 在线播放日韩导航| 欧美日韩一区久久| 欧美主播一区二区三区| 色狠狠一区二区三区香蕉| 成人av网在线| 不卡电影一区二区三区| 国产成人免费在线观看| 国产在线精品一区二区| 麻豆一区二区三区| 蜜桃视频一区二区| 麻豆91在线播放| 美脚の诱脚舐め脚责91 | 国产乱理伦片在线观看夜一区| 裸体一区二区三区| 日本亚洲免费观看| 蜜桃av一区二区| 久久机这里只有精品| 久久国产精品区| 国产精品乡下勾搭老头1| 国产毛片精品一区| 国产99久久久精品| www.欧美色图| 色先锋资源久久综合| 色屁屁一区二区| 欧美情侣在线播放| 日韩欧美激情四射| 久久香蕉国产线看观看99| 久久精品视频网| 综合久久久久久久| 亚洲最大的成人av| 人人精品人人爱| 国产麻豆精品95视频| av中文字幕一区| 欧美日韩一区二区三区免费看 | 精品免费视频一区二区| 国产网站一区二区| 亚洲素人一区二区| 日韩高清在线观看| 国产成人精品网址| 欧美视频一二三区| 2014亚洲片线观看视频免费| 成人免费在线视频| 亚洲va欧美va国产va天堂影院| 美女视频网站黄色亚洲| 99视频热这里只有精品免费| 欧美日韩色综合| 欧美韩国日本不卡| 三级久久三级久久久| 成人影视亚洲图片在线| 欧美日韩国产天堂| 国产精品视频一区二区三区不卡| 亚洲午夜激情网站|