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

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

?? riptimer.c

?? 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一区二区三区免费野_久草精品视频
欧美在线观看视频一区二区| 色综合久久88色综合天天| 99久久精品国产观看| 欧美色图一区二区三区| 欧美一级免费观看| 亚洲黄色在线视频| 国产一区二区三区免费看| 欧美日韩午夜在线| 中文字幕不卡的av| 国产一区二区主播在线| 欧美特级限制片免费在线观看| 91麻豆国产福利在线观看| 国产日韩欧美一区二区三区乱码 | 欧美日韩激情在线| 欧美激情一区二区在线| 日产精品久久久久久久性色| 在线视频欧美精品| 欧美国产日本韩| 国产精品1024| 欧美一区二区三区系列电影| 午夜欧美2019年伦理| 91在线porny国产在线看| 国产日韩视频一区二区三区| 免费美女久久99| 91丨porny丨国产入口| 亚洲欧洲成人精品av97| 国产一区二区网址| 久久夜色精品国产欧美乱极品| 亚洲福中文字幕伊人影院| 国内一区二区在线| 91精品国产综合久久福利软件 | 91精品国产综合久久国产大片| 亚洲欧洲在线观看av| 一区二区三区在线观看网站| 99久久精品国产一区| 国产精品国产三级国产普通话99| 岛国av在线一区| 国产亚洲成aⅴ人片在线观看| 国产一区二区三区精品欧美日韩一区二区三区 | 成人激情小说乱人伦| 亚洲国产精品成人久久综合一区| 丝袜美腿亚洲综合| 91精品国产综合久久久蜜臀粉嫩| 亚洲午夜免费福利视频| 成人福利视频网站| 亚洲美女少妇撒尿| 欧美丝袜自拍制服另类| 裸体一区二区三区| 日韩精品一区二区三区视频在线观看| 国产综合色精品一区二区三区| 日韩视频免费直播| 成人av免费在线| 亚洲欧美成aⅴ人在线观看| av男人天堂一区| 亚洲精品ww久久久久久p站| 91久久线看在观草草青青| 一级做a爱片久久| 99久久免费精品高清特色大片| 国产日产欧美一区| 99r国产精品| 日韩理论片网站| 欧美日韩三级视频| 久久99精品视频| 1000精品久久久久久久久| 91久久线看在观草草青青| 日韩精品福利网| 精品国产乱码久久久久久浪潮| 国产久卡久卡久卡久卡视频精品| 国产精品三级在线观看| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 菠萝蜜视频在线观看一区| 伊人婷婷欧美激情| 91精品欧美福利在线观看| 成人精品免费看| 亚洲成年人影院| 欧美经典一区二区| 欧美三级在线播放| 久久只精品国产| 欧美情侣在线播放| 成人永久aaa| 精品一区二区免费看| 亚洲欧美精品午睡沙发| 精品国产1区二区| 色噜噜偷拍精品综合在线| 夫妻av一区二区| 视频一区二区三区中文字幕| 亚洲欧美经典视频| 久久蜜臀中文字幕| 日韩午夜在线观看| 色综合久久久久网| 国产成人精品1024| 美国十次综合导航| 国产亚洲福利社区一区| 91精品国产一区二区三区蜜臀 | 欧美精品99久久久**| 色综合久久久久| 国产精品系列在线观看| 亚洲一区二区三区三| 欧美极品xxx| 欧美电影在哪看比较好| 欧美午夜片在线观看| 国产**成人网毛片九色| 日韩av午夜在线观看| 亚洲一二三四在线观看| 日韩一区中文字幕| 国产日产精品一区| 2020日本不卡一区二区视频| 欧美不卡视频一区| 欧美精品乱码久久久久久 | 成人性生交大合| 国产美女精品一区二区三区| 亚洲欧洲成人自拍| 中文字幕不卡一区| 国产视频一区不卡| 日韩欧美美女一区二区三区| 欧美日韩高清一区二区不卡| 色婷婷综合五月| 97成人超碰视| 成人激情视频网站| 9久草视频在线视频精品| 久久国产精品99久久人人澡| 亚洲一区二区三区美女| 亚洲影视在线观看| 中文字幕精品一区二区三区精品| 欧美精品一区二区三区在线播放 | |精品福利一区二区三区| 久久婷婷久久一区二区三区| 欧美中文字幕一区| 欧美日韩在线三区| 欧美亚洲综合网| 日韩视频永久免费| 日韩精品专区在线影院重磅| 国产性做久久久久久| 国产精品午夜电影| 亚洲成人一区二区| 亚洲天堂成人在线观看| 亚洲最新在线观看| 午夜久久福利影院| 久久精品免费观看| 国产米奇在线777精品观看| 国产激情精品久久久第一区二区 | 亚洲欧洲在线观看av| 亚洲亚洲人成综合网络| 丝袜亚洲另类丝袜在线| 国产经典欧美精品| 色婷婷国产精品| 91精品国模一区二区三区| 精品国产一区二区三区久久影院| 久久久久久久久久看片| 国产精品久久久久久久久免费相片 | 在线播放国产精品二区一二区四区| 日韩午夜激情免费电影| 久久青草欧美一区二区三区| 亚洲男帅同性gay1069| 午夜天堂影视香蕉久久| 国产剧情一区在线| 91美女福利视频| 久久―日本道色综合久久| 精品久久久久久亚洲综合网| 日韩精品一区国产麻豆| 亚洲精品乱码久久久久久| 免费观看一级欧美片| 91麻豆视频网站| 精品成人佐山爱一区二区| 亚洲一卡二卡三卡四卡| 无码av免费一区二区三区试看 | 日本一区二区视频在线| 亚洲精品日日夜夜| 麻豆视频一区二区| 91一区二区在线| 欧美电影免费观看完整版| 国产一区二区中文字幕| 久久久久久电影| 1区2区3区欧美| 日本不卡中文字幕| 国产高清不卡一区| 欧美女孩性生活视频| 国产日韩欧美一区二区三区乱码| 国产精品网站导航| 久久疯狂做爰流白浆xx| 欧美精品xxxxbbbb| 亚洲日本va午夜在线影院| 乱中年女人伦av一区二区| 国产一区二区三区四区在线观看| 欧美综合一区二区三区| 国产拍欧美日韩视频二区| 亚洲成人综合网站| av在线播放不卡| 久久品道一品道久久精品| 亚洲国产精品一区二区尤物区| 国产99久久久精品| 欧美性感一类影片在线播放| 国产精品成人在线观看| 精品无码三级在线观看视频| 欧美色图免费看| 日韩电影在线观看电影| 欧美影院午夜播放| 亚洲已满18点击进入久久| 福利一区二区在线| 日本韩国欧美在线|