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

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

?? mac-timers.cc

?? ns2 中802.11 mac層的實現代碼!
?? CC
字號:
/* -*-	Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- *//* * Copyright (c) 1997 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 Computer Systems *	Engineering Group at Lawrence Berkeley Laboratory. * 4. Neither the name of the University nor of the Laboratory 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. *//* Ported from CMU/Monarch's code, nov'98 -Padma.*//* * Code contained within lines such as the below *  // wqos - <date> - dugdale  // wqos - changes by dugdale ends * * or *  // wqos - <date> - almquist  // wqos - changes by almquist ends * * have been changed or added to implement the PCF mode of IEEE 802.11 and is * Copyright (c) 2001 Anders Lindgren and Andreas Almquist. * * 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 above disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the above disclaimer in the *    documentation and/or other materials provided with the distribution. * *    The disclaimer above apply to the modifications made to the source code *    by Anders Lindgren and Andreas Almquist as well as to the rest of the code. */#include <delay.h>#include <connector.h>#include <packet.h>#include <random.h> // #define DEBUG//#include <debug.h>#include <arp.h>#include <ll.h>#include <mac.h>#include <mac-timers.h>#include <mac-802_11.h> /* * Force timers to expire on slottime boundries. */// #define USE_SLOT_TIME#define ROUND_TIME()	\	{								\		assert(slottime);					\		double rmd = remainder(s.clock() + rtime, slottime);	\		if(rmd > 0.0)						\			rtime += (slottime - rmd);			\		else							\			rtime += (-rmd);				\	}/* ======================================================================   Timers   ====================================================================== */voidMacTimer::start(double time){	Scheduler &s = Scheduler::instance();	assert(busy_ == 0);	busy_ = 1;	paused_ = 0;	stime = s.clock();	rtime = time;	assert(rtime >= 0.0);	s.schedule(this, &intr, rtime);}voidMacTimer::stop(void){	Scheduler &s = Scheduler::instance();	assert(busy_);	if(paused_ == 0)		s.cancel(&intr);	busy_ = 0;	paused_ = 0;	stime = 0.0;	rtime = 0.0;}/* ======================================================================   Defer Timer   ====================================================================== */voidDeferTimer::start(double time){	Scheduler &s = Scheduler::instance();	assert(busy_ == 0);	busy_ = 1;	paused_ = 0;	stime = s.clock();	rtime = time;#ifdef USE_SLOT_TIME	ROUND_TIME();#endif	assert(rtime >= 0.0);	s.schedule(this, &intr, rtime);}void    DeferTimer::handle(Event *){       	busy_ = 0;	paused_ = 0;	stime = 0.0;	rtime = 0.0;	mac->deferHandler();}/* ======================================================================   NAV Timer   ====================================================================== */void    NavTimer::handle(Event *){       	busy_ = 0;	paused_ = 0;	stime = 0.0;	rtime = 0.0;	mac->navHandler();}/* ======================================================================   Receive Timer   ====================================================================== */void    RxTimer::handle(Event *){       	busy_ = 0;	paused_ = 0;	stime = 0.0;	rtime = 0.0;	mac->recvHandler();}/* ======================================================================   Send Timer   ====================================================================== */void    TxTimer::handle(Event *){       	busy_ = 0;	paused_ = 0;	stime = 0.0;	rtime = 0.0;	mac->sendHandler();}// wqos - Tue 26 Sep 00, 16:42 - dugdale/* ======================================================================   Beacon Timer   ====================================================================== */void    BeaconTimer::handle(Event *){       	busy_ = 0;	paused_ = 0;	stime = 0.0;	rtime = 0.0;	mac->beaconHandler();}// wqos - changes by dugdale ends/* ======================================================================   Interface Timer   ====================================================================== */voidIFTimer::handle(Event *){	busy_ = 0;	paused_ = 0;	stime = 0.0;	rtime = 0.0;	mac->txHandler();}/* ======================================================================   Backoff Timer   ====================================================================== */voidBackoffTimer::handle(Event *){	busy_ = 0;	paused_ = 0;	stime = 0.0;	rtime = 0.0;	difs_wait = 0.0;	mac->backoffHandler();}voidBackoffTimer::start(int cw, int idle){	Scheduler &s = Scheduler::instance();	assert(busy_ == 0);	busy_ = 1;	paused_ = 0;	stime = s.clock();		rtime = (Random::random() % cw) * mac->phymib_->SlotTime;#ifdef USE_SLOT_TIME	ROUND_TIME();#endif	difs_wait = 0.0;	if(idle == 0)		paused_ = 1;	else {		assert(rtime >= 0.0);		s.schedule(this, &intr, rtime);	}}voidBackoffTimer::pause(){	Scheduler &s = Scheduler::instance();	//the caculation below make validation pass for linux though it	// looks dummy	double st = s.clock();	double rt = stime + difs_wait;	double sr = st - rt;        double mst = (mac->phymib_->SlotTime);        int slots = int (sr/mst);    //int slots = (int) ((s.clock() - (stime + difs_wait)) / mac->phymib_->SlotTime);	if(slots < 0)		slots = 0;	assert(busy_ && ! paused_);	paused_ = 1;	rtime -= (slots * mac->phymib_->SlotTime);	assert(rtime >= 0.0);	difs_wait = 0.0;	s.cancel(&intr);}voidBackoffTimer::resume(double difs){	Scheduler &s = Scheduler::instance();	assert(busy_ && paused_);	paused_ = 0;	stime = s.clock();	/*	 * The media should be idle for DIFS time before we start	 * decrementing the counter, so I add difs time in here.	 */	difs_wait = difs;	/*#ifdef USE_SLOT_TIME	ROUND_TIME();#endif	*/	assert(rtime + difs_wait >= 0.0);       	s.schedule(this, &intr, rtime + difs_wait);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品免费看国产免费软件| 一区在线中文字幕| 欧美日韩视频在线观看一区二区三区 | 91免费版在线看| 国产成人久久精品77777最新版本| 国内外成人在线| 国产精品一线二线三线| 国产经典欧美精品| 成人动漫中文字幕| av激情综合网| 欧美午夜精品久久久久久孕妇| 色婷婷综合久久久| 91精品国产综合久久精品图片| 欧美一区二区福利视频| 久久久精品综合| 中文字幕一区二区视频| 亚洲一区二区三区视频在线播放 | 韩国三级在线一区| 白白色 亚洲乱淫| 欧洲av一区二区嗯嗯嗯啊| 欧美日韩国产在线播放网站| 91精品国产一区二区三区蜜臀| 欧美va亚洲va| 亚洲啪啪综合av一区二区三区| 亚洲制服欧美中文字幕中文字幕| 丝袜美腿一区二区三区| 国产乱人伦精品一区二区在线观看| 国产成人免费xxxxxxxx| 欧美视频日韩视频| 国产日韩欧美一区二区三区综合| 中文字幕视频一区二区三区久| 亚洲综合无码一区二区| 国产真实乱偷精品视频免| 不卡视频一二三四| 91精品国产欧美一区二区18| 中文字幕精品三区| 美女精品一区二区| 色综合久久综合网欧美综合网| 7777精品伊人久久久大香线蕉经典版下载 | 欧美日韩久久久| 久久精品亚洲精品国产欧美| 亚洲狠狠丁香婷婷综合久久久| 日本欧美肥老太交大片| 99麻豆久久久国产精品免费| 日韩丝袜美女视频| 一区二区三区鲁丝不卡| 国内精品在线播放| 欧美欧美欧美欧美首页| 国产精品的网站| 国产精品一品视频| 欧美一区二区大片| 香蕉久久一区二区不卡无毒影院 | 欧美三级一区二区| 国产精品国产自产拍高清av王其| 美女网站色91| 欧美日韩精品一区视频| 亚洲欧美区自拍先锋| 国产99精品视频| 精品对白一区国产伦| 爽爽淫人综合网网站| 在线日韩av片| 亚洲激情五月婷婷| 91免费看视频| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 亚洲一区二区三区视频在线播放 | 欧美成人三级在线| 日韩影院在线观看| 欧美另类久久久品| 婷婷久久综合九色国产成人| 91福利在线看| 亚洲国产裸拍裸体视频在线观看乱了 | 亚洲综合在线第一页| 99久久免费国产| 综合中文字幕亚洲| 色综合久久久久久久久久久| 亚洲精品久久7777| 欧美日韩一卡二卡三卡 | av电影一区二区| 中文字幕一区二区三区av| 成人午夜激情视频| 国产精品久久一卡二卡| 91玉足脚交白嫩脚丫在线播放| 中文字幕av资源一区| 99久久99久久久精品齐齐| 一区二区三区在线免费视频| 在线观看中文字幕不卡| 婷婷成人激情在线网| 欧美一级片在线| 国产一区福利在线| 精品国产乱码久久久久久浪潮| 水蜜桃久久夜色精品一区的特点| 欧美久久久久中文字幕| 日本不卡一区二区| 久久综合资源网| 波多野结衣中文字幕一区二区三区 | 国产精品福利影院| 色婷婷综合久久久久中文一区二区| 亚洲午夜在线电影| 欧美大片一区二区三区| 成人听书哪个软件好| 中文字幕欧美日韩一区| 欧美少妇xxx| 国产尤物一区二区| 成人免费在线播放视频| 欧美久久免费观看| 成人精品一区二区三区四区| 亚洲精品免费一二三区| 日韩欧美在线网站| 91视视频在线观看入口直接观看www | 免费看日韩精品| 国产日韩精品一区二区三区在线| 色婷婷久久久久swag精品| 蜜臀av亚洲一区中文字幕| 国产视频一区在线播放| 欧美色偷偷大香| 成人污视频在线观看| 亚洲午夜久久久久久久久久久| 精品国产伦一区二区三区观看体验| 白白色亚洲国产精品| 精品写真视频在线观看| 午夜电影网一区| 国产精品视频看| 欧美成va人片在线观看| 欧美伊人久久久久久久久影院| 麻豆精品在线看| 自拍偷拍欧美精品| 久久精品视频免费观看| 91麻豆精品国产自产在线| 91浏览器打开| 国产jizzjizz一区二区| 麻豆国产精品视频| 亚洲综合在线视频| 最近中文字幕一区二区三区| 26uuu久久综合| 91精品国产全国免费观看| 欧美色视频在线| 欧美三级乱人伦电影| 91国产精品成人| 91麻豆福利精品推荐| 成人精品国产一区二区4080| 韩国成人在线视频| 日韩中文欧美在线| 午夜视频一区二区| 亚洲午夜视频在线观看| 亚洲综合激情另类小说区| 自拍偷拍欧美激情| 亚洲黄色在线视频| 亚洲女同一区二区| 亚洲欧美日韩国产综合| 亚洲天堂2014| 综合久久一区二区三区| 欧美国产一区二区| 国产精品视频你懂的| 国产精品久久久久7777按摩 | 波多野洁衣一区| 粉嫩高潮美女一区二区三区 | 欧美成人a∨高清免费观看| 欧美麻豆精品久久久久久| 精品视频999| 欧美日本免费一区二区三区| 欧美一区二区久久| 久久久国产精品不卡| 日本一区二区视频在线| 中文字幕视频一区| 亚洲国产成人高清精品| 日本怡春院一区二区| 另类小说色综合网站| 国产美女娇喘av呻吟久久| 成人精品国产福利| 欧洲一区二区三区在线| 欧美一区二区三区啪啪| 久久婷婷国产综合精品青草| 亚洲国产精华液网站w| 亚洲男帅同性gay1069| 欧美96一区二区免费视频| 韩国av一区二区| 日本韩国精品一区二区在线观看| 欧美视频在线观看一区| 亚洲精品在线观看网站| 日韩一区中文字幕| 日本vs亚洲vs韩国一区三区| 国产福利91精品一区二区三区| 99在线视频精品| 日韩一区二区中文字幕| 国产精品欧美经典| 奇米888四色在线精品| 成人av综合在线| 欧美电影在线免费观看| 中文字幕av不卡| 免费的成人av| 99re66热这里只有精品3直播| 欧美视频第二页| 欧美国产日本韩| 卡一卡二国产精品 | 国产精品丝袜久久久久久app| 亚洲妇女屁股眼交7| 风间由美一区二区三区在线观看 | 成人h精品动漫一区二区三区| 欧洲国内综合视频| 国产精品国产三级国产有无不卡|