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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? flowstruct.cc

?? 修改的dsr源文件,需要的趕快下載啦
?? CC
字號(hào):
/* * flowstruct.cc * Copyright (C) 2000 by the University of Southern California * $Id: flowstruct.cc,v 1.4 2005/08/25 18:58:04 johnh Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * * The copyright of this module includes the following * linking-with-specific-other-licenses addition: * * In addition, as a special exception, the copyright holders of * this module give you permission to combine (via static or * dynamic linking) this module with free software programs or * libraries that are released under the GNU LGPL and with code * included in the standard release of ns-2 under the Apache 2.0 * license or under otherwise-compatible licenses with advertising * requirements (or modified versions of such code, with unchanged * license).  You may copy and distribute such a system following the * terms of the GNU GPL for this module and the licenses of the * other code concerned, provided that you include the source code of * that other code when and as the GNU GPL requires distribution of * source code. * * Note that people who make modified versions of this module * are not obligated to grant this special exception for their * modified versions; it is their choice whether to do so.  The GNU * General Public License gives permission to release a modified * version without this exception; this exception also makes it * possible to release a modified version which carries forward this * exception. * *///// Other copyrights might apply to parts of this software and are so// noted when applicable.//// Ported from CMU/Monarch's code, appropriate copyright applies.  #include "flowstruct.h"FlowTable::FlowTable(int size_) : DRTab(size_) {	assert (size_ > 0);	size = 0;	maxSize = size_;	table = new TableEntry[size_];	counter = 0;}FlowTable::~FlowTable() {	delete table;}TableEntry &FlowTable::operator[](int index) {	assert(index >= 0 && index < size);	return table[index];}int FlowTable::find(nsaddr_t source, nsaddr_t destination, u_int16_t flow) {	register int i;	for (i=size-1; i>=0; i--)		if (table[i].sourceIP == source &&		    table[i].destinationIP == destination &&		    table[i].flowId == flow)			break;	return i;}int FlowTable::find(nsaddr_t source, nsaddr_t destination, const Path &route) {	register int i;	for (i=size-1; i>=0; i--)		if (table[i].sourceIP == source &&		    table[i].destinationIP == destination &&		    table[i].sourceRoute == route)			break;	return i;}void FlowTable::grow() {	assert(0);	TableEntry *temp;	if (!(temp = new TableEntry[maxSize*2]))		return;	bcopy(table, temp, sizeof(TableEntry)*maxSize);	delete table;	maxSize *= 2;	table = temp;}u_int16_t FlowTable::generateNextFlowId(nsaddr_t destination, bool allowDefault) {	if ((counter&1)^allowDefault) // make sure parity is correct		counter++;	assert((counter & 1) == allowDefault);	return counter++;}int FlowTable::createEntry(nsaddr_t source, nsaddr_t destination, 			   u_int16_t flow) {	if (find(source, destination, flow) != -1)		return -1;	if (size == maxSize)		grow();	if (size == maxSize)		return -1;	table[size].sourceIP = source;	table[size].destinationIP = destination;	table[size].flowId = flow;	if (flow & 1)		DRTab.insert(source, destination, flow);	return size++;}void FlowTable::noticeDeadLink(const ID &from, const ID &to) {	double now = Scheduler::instance().clock();	for (int i=0; i<size; i++)		if (table[i].timeout >= now && table[i].sourceIP == net_addr)			for (int n=0; n < (table[i].sourceRoute.length()-1); n++)				if (table[i].sourceRoute[n] == from &&				    table[i].sourceRoute[n+1] == to) {					table[i].timeout = now - 1;					// XXX ych rediscover??? 5/2/01				}}// if ent represents a default flow, bad things are going down and we need// to rid the default flow table of them.static void checkDefaultFlow(DRTable &DRTab, const TableEntry &ent) {	u_int16_t flow;	if (!DRTab.find(ent.sourceIP, ent.destinationIP, flow))		return;	if (flow == ent.flowId)		DRTab.flush(ent.sourceIP, ent.destinationIP);}void FlowTable::cleanup() {	int front, back;	double now = Scheduler::instance().clock();	return; // it's messing up path orders...	// init front to the first expired entry	for (front=0; (front<size) && (table[front].timeout >= now); front++)		;	// init back to the last unexpired entry	for (back = size-1; (front<back) && (table[back].timeout < now); back--)		checkDefaultFlow(DRTab, table[back]);	while (front < back) {		checkDefaultFlow(DRTab, table[front]);		bcopy(table+back, table+front, sizeof(TableEntry)); // swap		back--;		// next expired entry		while ((front<back) && (table[front].timeout >= now))			front++;		while ((front<back) && (table[back].timeout < now)) {			checkDefaultFlow(DRTab, table[back]);			back--;		}	}	size = back+1;}void FlowTable::setNetAddr(nsaddr_t net_id) {	net_addr = net_id;}bool FlowTable::defaultFlow(nsaddr_t source, nsaddr_t destination, 			    u_int16_t &flow) {	return DRTab.find(source, destination, flow);}DRTable::DRTable(int size_) {	assert (size_ > 0);	size = 0;	maxSize = size_;	table = new DRTabEnt[size_];}DRTable::~DRTable() {	delete table;}bool DRTable::find(nsaddr_t src, nsaddr_t dst, u_int16_t &flow) {	for (int i = 0; i < size; i++)		if (src == table[i].src && dst == table[i].dst) {			flow = table[i].fid;			return true;		}	return false;}void DRTable::grow() {	assert(0);	DRTabEnt *temp;	if (!(temp = new DRTabEnt[maxSize*2]))		return;	bcopy(table, temp, sizeof(DRTabEnt)*maxSize);	delete table;	maxSize *= 2;	table = temp;}void DRTable::insert(nsaddr_t src, nsaddr_t dst, u_int16_t flow) {	assert(flow & 1);	for (int i = 0; i < size; i++) {		if (src == table[i].src && dst == table[i].dst) {			if ((short)((flow) - (table[i].fid)) > 0) {				table[i].fid = flow;			} else {			}			return;		}	}	if (size == maxSize)		grow();	assert(size != maxSize);	table[size].src = src;	table[size].dst = dst;	table[size].fid = flow;	size++;}void DRTable::flush(nsaddr_t src, nsaddr_t dst) {	for (int i = 0; i < size; i++)		if (src == table[i].src && dst == table[i].dst) {			table[i].src = table[size-1].src;			table[i].dst = table[size-1].dst;			table[i].fid = table[size-1].fid;			size--;			return;		}	assert(0);}ARSTable::ARSTable(int size_) {	size = size_;	victim = 0;	table = new ARSTabEnt[size_];	bzero(table, sizeof(ARSTabEnt)*size_);}ARSTable::~ARSTable() {	delete table;}void ARSTable::insert(int uid, u_int16_t fid, int hopsEarly) {	int i = victim;	assert(hopsEarly);		do {		if (!table[i].hopsEarly)			break; // we found a victim		i = (i+1)%size;	} while (i != victim);	if (table[i].hopsEarly) // full. need extreme measures.		victim = (victim+1)%size;	table[i].hopsEarly = hopsEarly;	table[i].uid       = uid;	table[i].fid	   = fid;}int ARSTable::findAndClear(int uid, u_int16_t fid) {	int i, retval;	for (i=0; i<size; i++) {	        if (table[i].hopsEarly && table[i].uid == uid) {		        if (table[i].fid == fid) {			        retval = table[i].hopsEarly;				table[i].hopsEarly = 0;				return retval;			} else {				table[i].hopsEarly = 0;				return 0;			}		}	}	return 0;}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文在线一区二区| 日韩一本二本av| 亚洲欧洲av在线| av一二三不卡影片| 亚洲欧洲精品一区二区精品久久久| 国产成人在线视频播放| 久久精品一区四区| 国产成人免费av在线| 中文乱码免费一区二区| 成人黄色综合网站| 亚洲夂夂婷婷色拍ww47| 欧美另类videos死尸| 乱中年女人伦av一区二区| 久久久久久久久久久久电影 | 久久综合九色综合97婷婷女人 | 欧美日韩精品一区二区天天拍小说 | 欧美日本一区二区| 日日摸夜夜添夜夜添国产精品| 91精品国产色综合久久久蜜香臀| 美女视频黄频大全不卡视频在线播放| 久久夜色精品国产欧美乱极品| 成人性生交大片免费看中文网站| 亚洲免费在线视频一区 二区| 欧美日韩视频在线观看一区二区三区| 免费人成精品欧美精品| 久久欧美中文字幕| 91浏览器打开| 男女男精品视频| 中文字幕在线观看一区二区| 欧美日韩一区二区三区在线| 黄色小说综合网站| 国产精品久久久久一区二区三区| 欧美日韩国产另类一区| 国内精品国产成人| 亚洲精品写真福利| 精品成人一区二区| 欧美天天综合网| 国产伦理精品不卡| 性久久久久久久久久久久| 2021久久国产精品不只是精品| 91浏览器入口在线观看| 久久成人久久爱| 亚洲免费看黄网站| 精品久久久影院| 欧美制服丝袜第一页| 国产精品影视天天线| 亚洲第一久久影院| 国产精品视频一二三区| 日韩一区二区免费在线观看| 91小视频免费观看| 国产一区二区网址| 日韩av不卡一区二区| 中文字幕制服丝袜一区二区三区| 日韩视频免费直播| 日本电影欧美片| 成人精品国产一区二区4080| 欧美日韩成人激情| 成人午夜私人影院| 激情图区综合网| 日韩**一区毛片| 亚洲成a人片综合在线| 亚洲少妇中出一区| 国产精品情趣视频| 久久伊人中文字幕| 日韩女优av电影| 欧美一三区三区四区免费在线看 | 国产精品久久久久久久久久免费看| 在线不卡的av| 欧美视频中文字幕| 色94色欧美sute亚洲线路一ni| 国产91精品免费| 国产寡妇亲子伦一区二区| 另类成人小视频在线| 青青草国产精品97视觉盛宴| 亚洲 欧美综合在线网络| 亚洲免费观看高清完整 | 国产精品久久久一区麻豆最新章节| 欧美精品一区二区三区一线天视频| 91麻豆精品国产91久久久使用方法| 欧美色爱综合网| 欧美视频第二页| 欧美日韩一区二区三区不卡| 日本高清无吗v一区| 91福利在线观看| 欧美日韩一区二区电影| 欧美日韩成人综合| 日韩一区二区三区免费看| 欧美一级久久久| 精品国产亚洲在线| 久久久一区二区| 国产精品全国免费观看高清 | 精品国产网站在线观看| 精品福利视频一区二区三区| 久久久久国产精品厨房| 国产无遮挡一区二区三区毛片日本| 国产欧美一区二区精品性色超碰| 国产日韩欧美激情| 18成人在线视频| 亚洲国产欧美另类丝袜| 男人的天堂亚洲一区| 国产毛片精品视频| 国产成人综合亚洲91猫咪| 99久久伊人精品| 欧美丝袜第三区| 欧美一区二区三区免费视频| 久久久久久久久99精品| 成人欧美一区二区三区视频网页| 亚洲小说春色综合另类电影| 美女性感视频久久| 国产99久久久国产精品潘金网站| 不卡高清视频专区| 欧美三级中文字幕在线观看| 精品福利一区二区三区免费视频| 中文字幕av一区二区三区高| 一区二区三区波多野结衣在线观看| 亚洲1区2区3区视频| 国产精品亚洲视频| 日本道精品一区二区三区 | 91麻豆精品秘密| 日韩欧美国产综合在线一区二区三区| 久久精品亚洲麻豆av一区二区| 一个色在线综合| 国产精品一线二线三线精华| 色又黄又爽网站www久久| 日韩欧美一级在线播放| 国产精品高潮呻吟| 日本成人在线不卡视频| 99久久精品国产麻豆演员表| 日韩欧美一区中文| 国产精品传媒入口麻豆| 免费久久99精品国产| 91麻豆免费视频| 精品1区2区在线观看| 亚洲最新视频在线播放| 国产老女人精品毛片久久| 欧美三级在线看| 国产精品短视频| 国产在线精品一区二区三区不卡| 中文字幕一区二区在线观看| 日本欧美一区二区| 91色porny| 欧美国产一区二区在线观看| 热久久国产精品| 欧美无砖砖区免费| 中文字幕一区二区三区不卡 | 亚洲精品一区在线观看| 亚洲一级二级三级| www.亚洲免费av| 久久综合国产精品| 日韩电影一区二区三区四区| 欧美在线一区二区| 国产精品网友自拍| 国产乱码精品一区二区三区忘忧草 | 亚洲综合色婷婷| 白白色亚洲国产精品| 精品国产三级a在线观看| 全国精品久久少妇| 欧美日韩一区二区不卡| 亚洲精品乱码久久久久久久久| 国产91丝袜在线播放九色| 日韩免费看网站| 久久精工是国产品牌吗| 欧美视频在线一区二区三区| 亚洲高清三级视频| 色婷婷av一区| 亚洲精品第1页| 一本久道中文字幕精品亚洲嫩| 中文一区二区在线观看| 欧美一区二区播放| 偷拍一区二区三区四区| 欧美日韩一区久久| 首页国产丝袜综合| 欧美日韩国产乱码电影| 日日摸夜夜添夜夜添亚洲女人| 欧美日本乱大交xxxxx| 亚洲va欧美va天堂v国产综合| 欧美色成人综合| 日韩国产一二三区| 日韩一级欧美一级| 美女mm1313爽爽久久久蜜臀| 日韩欧美国产麻豆| 久久精品国产精品青草| 国产午夜精品久久久久久免费视 | 精品三级av在线| 国模大尺度一区二区三区| 久久这里只有精品视频网| 国产精品自在在线| 国产精品人妖ts系列视频| 94色蜜桃网一区二区三区| 依依成人精品视频| 欧美电影在哪看比较好| 毛片av一区二区| 国产一区在线观看麻豆| 中文字幕巨乱亚洲| 一本一道综合狠狠老| 肉色丝袜一区二区| 2023国产精品自拍| 91在线视频观看| 日韩av中文字幕一区二区三区| 精品国产电影一区二区|