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

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

?? ls.h

?? 鏈路狀態路由選擇協議的目的是映射互連網絡的拓撲結構。每個鏈路狀態路由器提供關于它鄰居的拓撲結構的信息。
?? H
?? 第 1 頁 / 共 2 頁
字號:
/* * ls.h * Copyright (C) 2000 by the University of Southern California * $Id: ls.h,v 1.8 2005/08/25 18:58:06 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.////  Copyright (C) 1998 by Mingzhou Sun. All rights reserved.//  This software is developed at Rensselaer Polytechnic Institute under //  DARPA grant No. F30602-97-C-0274//  Redistribution and use in source and binary forms are permitted//  provided that the above copyright notice and this paragraph are//  duplicated in all such forms and that any documentation, advertising//  materials, and other materials related to such distribution and use//  acknowledge that the software was developed by Mingzhou Sun at the//  Rensselaer  Polytechnic Institute.  The name of the University may not //  be used to endorse or promote products derived from this software //  without specific prior written permission.//// $Header: /nfs/jade/vint/CVSROOT/ns-2/linkstate/ls.h,v 1.8 2005/08/25 18:58:06 johnh Exp $#ifndef ns_ls_h#define ns_ls_h#include <sys/types.h> #include <list>#include <map>#include <utility>#include "timer-handler.h"const int LS_INVALID_COUNT = -1;const int LS_INIT_ACCESS_COUNT = 3;const int LS_INVALID_NODE_ID = 65535;const int LS_INVALID_COST = 65535;const int LS_MIN_COST = 0;const int LS_MAX_COST = 65534;const int LS_MESSAGE_CENTER_SIZE_FACTOR = 4; // times the number of nodes const int LS_DEFAULT_MESSAGE_SIZE = 100; // in bytesconst int LS_LSA_MESSAGE_SIZE = 100; // in bytesconst double LS_RTX_TIMEOUT = 0.002;  // default to 2ms to begin withconst int LS_TIMEOUT_FACTOR = 3;   // x times of one-way total delay// Topo message is not too long due to incremental updateconst int LS_TOPO_MESSAGE_SIZE = 200; // in bytesconst int LS_ACK_MESSAGE_SIZE = 20; // in bytesconst unsigned int LS_INVALID_MESSAGE_ID = 0;const unsigned int LS_BIG_NUMBER = 1048576;const unsigned int LS_WRAPAROUND_THRESHOLD = 1073741824; // 2^30const unsigned int LS_MESSAGE_TYPES = 6;enum ls_status_t { 	LS_STATUS_DOWN = 0, 	LS_STATUS_UP = 1};enum ls_message_type_t { 	LS_MSG_INVALID = 0, 	LS_MSG_LSA = 1,		// Link state advertisement	LS_MSG_TPM = 2,		// Topology map message	LS_MSG_LSAACK = 3,	// Link state advertisement ACK	LS_MSG_TPMACK = 4, 	LS_MSG_LSM = 5, };template <class _Tp>class LsList : public list<_Tp> {public:	typedef list<_Tp> baseList;	LsList() : baseList() {}	LsList(const _Tp& x) : baseList(1, x) {}	void eraseAll() { 		baseList::erase(baseList::begin(), baseList::end()); 	}	LsList<_Tp>& operator= (const LsList<_Tp> & x) {		return (LsList<_Tp> &)baseList::operator= (x);	}};template<class Key, class T>class LsMap : public map<Key, T, less<Key> > {public:	typedef less<Key> less_key;	typedef map<Key, T, less_key> baseMap;	LsMap() : baseMap() {}	// this next typedef of iterator seems extraneous but is required by gcc-2.96	typedef typename map<Key, T, less<Key> >::iterator iterator;	typedef pair<iterator, bool> pair_iterator_bool;	iterator insert(const Key & key, const T & item) {		typename baseMap::value_type v(key, item);		pair_iterator_bool ib = baseMap::insert(v);		return ib.second ? ib.first : baseMap::end();	}	void eraseAll() { erase(baseMap::begin(), baseMap::end()); }	T* findPtr(Key key) {		iterator it = baseMap::find(key);		return (it == baseMap::end()) ? (T *)NULL : &((*it).second);	}};/*  LsNodeIdList -- A list of int 's. It manages its own memory*/class LsNodeIdList : public LsList<int> {public:	int appendUnique (const LsNodeIdList& x);};  /* -------------------------------------------------------------------*//*    LsLinkState -- representing a link, contains neighborId, cost and status*/struct LsLinkState {	// public data	int neighborId_;  	ls_status_t status_;	int cost_;	u_int32_t sequenceNumber_;  	// public methods	LsLinkState() : neighborId_(LS_INVALID_NODE_ID),		status_(LS_STATUS_DOWN), cost_(LS_INVALID_COST) {}	LsLinkState(int id, ls_status_t s, int c) : neighborId_(id), 		status_(s), cost_(c) {}	void init (int nbId, ls_status_t s, int c){		neighborId_ = nbId;		status_ = s;		cost_ =c;	}} ;/*    LsLinkStateList */typedef LsList<LsLinkState> LsLinkStateList;/* -------------------------------------------------------------------*//*  LsTopoMap  the Link State Database, the representation of the  topology within the protocol */typedef LsMap<int, LsLinkStateList> LsLinkStateListMap;class LsTopoMap : public LsLinkStateListMap {public:	// constructor / destructor 	// the default ones 	LsTopoMap() : LsLinkStateListMap() {}  	//   // map oeration	//   iterator begin() { return LsLinkStateListMap::begin();}	//   iterator end() { return LsLinkStateListMap::end();}	//  iterator begin() { return baseMap::begin();}	//   const_iterator begin() const { return  baseMap::begin();}	//   iterator end() { return baseMap::end();}	//   const_iterator end() const { return baseMap::end();}	// insert one link state each time 	LsLinkStateList* insertLinkState(int nodeId, 					 const LsLinkState& linkState);	// update returns true if there's change	bool update(int nodeId, const LsLinkStateList& linkStateList);	//   friend ostream & operator << ( ostream & os, LsTopoMap & x) ;	void setNodeId(int id) { myNodeId_ = id ;}private:	int myNodeId_; // for update()};typedef LsTopoMap LsTopology;typedef LsTopoMap* LsTopoMapPtr;/*  LsPath - A struct with destination, cost, nextHop*/struct LsPath {	LsPath() : destination (LS_INVALID_NODE_ID) {}	LsPath(int dest, int c, int nh)		: destination (dest), cost(c), nextHop(nh) {}	// methods	bool isValid() { 		return ((destination != LS_INVALID_NODE_ID) && 			(cost != LS_INVALID_COST) && 			(nextHop != LS_INVALID_COST));	}	// public data	int destination;	int cost;	int nextHop;};/*  LsEqualPaths -- A struct with one cost and a list of multiple next hops  Used by LsPaths*/struct LsEqualPaths {public:	int  cost;	LsNodeIdList nextHopList;	// constructors	LsEqualPaths() : cost(LS_INVALID_COST) {}	LsEqualPaths(int c, int nh) : cost(c), nextHopList() {		nextHopList.push_back(nh);	}	LsEqualPaths(const LsPath & path) : cost (path.cost), nextHopList() {		nextHopList.push_back(path.nextHop);	}	LsEqualPaths(int c, const LsNodeIdList & nhList) 		: cost(c), nextHopList(nhList) {}  	LsEqualPaths& operator = (const LsEqualPaths & x ) {		cost = x.cost;		nextHopList = x.nextHopList;		return *this;	}	// copy 	LsEqualPaths& copy(const LsEqualPaths & x) { return operator = (x) ;}	// appendNextHopList 	int appendNextHopList(const LsNodeIdList & nhl) {		return nextHopList.appendUnique (nhl);	}};/*    LsEqualPathsMap -- A map of LsEqualPaths*/typedef LsMap< int, LsEqualPaths > LsEqualPathsMap;/*  LsPaths -- enhanced LsEqualPathsMap, used in LsRouting*/class LsPaths : public LsEqualPathsMap {public:	LsPaths(): LsEqualPathsMap() {}  	// -- map operations 	iterator begin() { return LsEqualPathsMap::begin();}	iterator end() { return LsEqualPathsMap::end();}	// -- specical methods that facilitates computeRoutes of LsRouting	// lookupCost	int lookupCost(int destId) {		LsEqualPaths * pEP = findPtr (destId);		if ( pEP == NULL ) return LS_MAX_COST + 1;		// else		return pEP->cost;	}	// lookupNextHopListPtr	LsNodeIdList* lookupNextHopListPtr(int destId) {		LsEqualPaths* pEP = findPtr(destId);		if (pEP == NULL ) 			return (LsNodeIdList *) NULL;		// else		return &(pEP->nextHopList);	}  	// insertPath without checking validity	iterator insertPathNoChecking(int destId, int cost, int nextHop) {		LsEqualPaths ep(cost, nextHop);		iterator itr = insert(destId, ep);		return itr; // for clarity	}     	// insertPathNoChekcing()	iterator insertPathNoChecking (const LsPath & path) {		return insertPathNoChecking(path.destination, path.cost, 					    path.nextHop);	}	// insertPath(), returns end() if error, else return iterator 	iterator insertPath(int destId, int cost, int nextHop);	iterator insertPath(const LsPath& path) {		return insertPath(path.destination, path.cost, path.nextHop);	}	// insertNextHopList 	iterator insertNextHopList(int destId, int cost, 				   const LsNodeIdList& nextHopList);};/*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频在线一区二区| 蜜桃视频免费观看一区| 五月开心婷婷久久| 粉嫩在线一区二区三区视频| 精品人伦一区二区色婷婷| 亚洲国产精品v| 美洲天堂一区二卡三卡四卡视频| 成人a级免费电影| 亚洲精品一区在线观看| 亚洲国产成人av网| 91美女视频网站| 国产精品色呦呦| 国产精品一区久久久久| 欧美日韩你懂得| 亚洲精品免费看| 99久久婷婷国产精品综合| 久久久久九九视频| 另类中文字幕网| 日韩一区二区免费在线电影 | av资源网一区| 欧美精品一区二区在线播放| 图片区小说区区亚洲影院| 99热精品国产| 国产精品进线69影院| 国产乱人伦偷精品视频免下载 | 成人av动漫在线| 国产亚洲精品福利| 欧美三级韩国三级日本三斤| 国产精品久久久久久久午夜片 | 日韩专区一卡二卡| 欧美系列亚洲系列| 亚洲尤物视频在线| 欧美视频中文字幕| 亚洲.国产.中文慕字在线| 欧美在线免费视屏| 亚洲一区二区三区四区中文字幕| 91福利精品第一导航| 一区二区三区中文字幕精品精品| 色综合久久久久久久久久久| 亚洲欧洲成人自拍| 色综合激情久久| 亚洲一区免费在线观看| 欧美日韩在线综合| 蜜乳av一区二区| 国产亚洲精品aa午夜观看| 国产成人综合在线播放| 国产精品九色蝌蚪自拍| 一本色道久久加勒比精品| 一区二区三区欧美激情| 欧美麻豆精品久久久久久| 蜜臀a∨国产成人精品| 久久日韩粉嫩一区二区三区| 成人免费av网站| 夜夜嗨av一区二区三区网页| 91麻豆精品国产| 国产老妇另类xxxxx| 综合欧美一区二区三区| 欧美午夜精品久久久| 免费在线成人网| 国产婷婷精品av在线| 91久久精品国产91性色tv | 91小视频免费观看| 中文字幕一区在线| 欧美美女黄视频| 国产麻豆成人精品| 亚洲免费视频成人| 日韩午夜激情电影| 99精品视频一区二区三区| 婷婷夜色潮精品综合在线| 久久这里只精品最新地址| 色婷婷久久99综合精品jk白丝| 日韩av网站免费在线| 成人欧美一区二区三区在线播放| 欧美日韩国产精品成人| 福利一区在线观看| 日韩av午夜在线观看| 国产精品福利一区| 26uuuu精品一区二区| 在线国产电影不卡| 国产91在线看| 美腿丝袜亚洲三区| 一区二区三区视频在线观看| 久久久电影一区二区三区| 欧美丝袜自拍制服另类| 成人妖精视频yjsp地址| 亚洲电影一区二区| 日韩一区有码在线| 亚洲精品在线免费播放| 欧美精品aⅴ在线视频| k8久久久一区二区三区| 国产麻豆精品在线观看| 日韩在线一区二区| 一区二区三区在线看| 国产精品久久久久久亚洲伦| 精品福利一区二区三区| 51精品视频一区二区三区| 色综合久久久网| av午夜精品一区二区三区| 久久99精品国产麻豆婷婷洗澡| 亚洲国产sm捆绑调教视频| 自拍视频在线观看一区二区| 亚洲狠狠爱一区二区三区| 国产精品丝袜一区| 久久久九九九九| 亚洲精品在线观| 欧美一卡在线观看| 3atv一区二区三区| 欧美人体做爰大胆视频| 欧美日韩精品久久久| 91福利精品视频| 在线亚洲欧美专区二区| 一本久道久久综合中文字幕| caoporen国产精品视频| 成人av电影免费在线播放| 大陆成人av片| 国产精品一区二区三区99| 国产一区亚洲一区| 国产酒店精品激情| 国产麻豆精品久久一二三| 国产精品一级黄| 成人综合婷婷国产精品久久蜜臀 | 亚洲一区二区三区视频在线| 亚洲品质自拍视频网站| 亚洲精品第一国产综合野| 亚洲视频每日更新| 亚洲电影视频在线| 石原莉奈在线亚洲二区| 久久精品国产亚洲aⅴ| 免费成人av在线播放| 国产一区二区在线视频| 国产一区不卡精品| 99久久免费国产| 欧美吻胸吃奶大尺度电影| 欧美日韩成人在线一区| 日韩视频在线永久播放| 久久精品亚洲一区二区三区浴池 | 成人福利电影精品一区二区在线观看| 91精品国产综合久久精品图片| 欧美高清视频www夜色资源网| 欧美精品在欧美一区二区少妇| 91精品黄色片免费大全| 国产午夜亚洲精品理论片色戒 | 9191久久久久久久久久久| 欧美va日韩va| 1区2区3区欧美| 天堂资源在线中文精品| 极品少妇xxxx偷拍精品少妇| 成人激情校园春色| 91麻豆精品国产91| 国产精品无人区| 三级在线观看一区二区| 成人一区二区三区| 欧美日韩免费高清一区色橹橹 | 欧美日韩一级视频| 久久中文娱乐网| 一区二区三区精品视频| 精彩视频一区二区| 色中色一区二区| 欧美精品一区二区精品网| 亚洲天天做日日做天天谢日日欢| 日本视频免费一区| 99综合电影在线视频| 日韩三级免费观看| 自拍偷拍欧美激情| 久久99精品网久久| 欧美天天综合网| 国产精品毛片久久久久久| 日韩主播视频在线| 色综合天天天天做夜夜夜夜做| 欧美一级黄色录像| 亚洲自拍偷拍av| 不卡的av在线播放| 26uuu国产电影一区二区| 亚洲午夜电影网| 91老师片黄在线观看| 久久先锋影音av鲁色资源| 视频一区视频二区中文| 99久久精品免费精品国产| 久久伊99综合婷婷久久伊| 日韩和的一区二区| 国产人成亚洲第一网站在线播放| 亚洲午夜一区二区三区| 99精品欧美一区二区三区小说| 精品国产乱子伦一区| 日日夜夜精品视频天天综合网| 色诱亚洲精品久久久久久| 国产日产欧美精品一区二区三区| 蜜臀久久99精品久久久画质超高清| 一本色道久久综合狠狠躁的推荐 | 亚洲欧美日韩小说| 国产成人免费9x9x人网站视频| 欧美一区二区三区成人| 五月婷婷久久综合| 欧美日韩亚洲高清一区二区| 亚洲日本韩国一区| 9久草视频在线视频精品| 国产精品久久久久三级| 成人黄色片在线观看| 国产精品久久久久永久免费观看 | 污片在线观看一区二区|