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

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

?? ns-mobilenode.tcl

?? ns 2.28 下 SPAN節能協議源碼
?? TCL
?? 第 1 頁 / 共 2 頁
字號:
# -*-	Mode:tcl; tcl-indent-level:8; tab-width:8; indent-tabs-mode:t -*-## Copyright (c) 1998-2000 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 MASH Research# 	Group at the University of California Berkeley.# 4. Neither the name of the University nor of the Research Group 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.## $Header: /nfs/jade/vint/CVSROOT/ns-2/tcl/lib/ns-mobilenode.tcl,v 1.50 2005/01/25 23:29:14 haldar Exp $## Ported from CMU-Monarch project's mobility extensions -Padma, 10/98.## IT IS NOT ENCOURAGED TO SUBCLASSS MOBILENODE CLASS DEFINED IN THIS FILE#======================================================================# The ARPTable class#======================================================================ARPTable instproc init args {	eval $self next $args		;# parent class constructor}ARPTable set bandwidth_         0ARPTable set delay_             5us#======================================================================# The Node/MobileNodeNode class#======================================================================Node/MobileNode instproc init args {#  	# I don't care about address classifier; it's not my business#  	# All I do is to setup port classifier so we can do broadcast, #  	# and to set up interface stuff.#  	$self attach-node $node#  	$node port-notify $self	eval $self next $args	$self instvar nifs_ arptable_ X_ Y_ Z_ nodetype_	set X_ 0.0	set Y_ 0.0	set Z_ 0.0        set arptable_ ""                ;# no ARP table yet	set nifs_	0		;# number of network interfaces	# Mobile IP node processing        $self makemip-New$nodetype_}#----------------------------------------------------------------------# XXX Following are the last remnant of nodetype_. Need to be completely # removed, however, we need a better mechanism to distinguish vanilla # mobile node from MIP base station, and MIP mobile host.Node/MobileNode instproc makemip-NewMobile {} {}Node/MobileNode instproc makemip-NewBase {} {}Node/MobileNode instproc makemip-New {} {}Node/MobileNode instproc makemip-NewMIPBS {} {	$self instvar regagent_ encap_ decap_ agents_ id_	set dmux [new Classifier/Port/Reserve]	$dmux set mask_ 0x7fffffff	$dmux set shift_ 0	$self install-demux $dmux   	set regagent_ [new Agent/MIPBS $self]	$self attach $regagent_ [Node/MobileNode set REGAGENT_PORT]	$self attach-encap 	$self attach-decap}Node/MobileNode instproc attach-encap {} {	$self instvar encap_ 		set encap_ [new MIPEncapsulator]	$encap_ set mask_ [AddrParams NodeMask 1]	$encap_ set shift_ [AddrParams NodeShift 1]	#set mask 0x7fffffff	#set shift 0	set nodeaddr [AddrParams addr2id [$self node-addr]]	$encap_ set addr_ [expr ( ~([AddrParams NodeMask 1] << \			[AddrParams NodeShift 1]) & $nodeaddr )]	$encap_ set port_ 1	$encap_ target [$self entry]	$encap_ set node_ $self}Node/MobileNode instproc attach-decap {} {	$self instvar decap_ dmux_ agents_	set decap_ [new Classifier/Addr/MIPDecapsulator]	lappend agents_ $decap_	$decap_ set mask_ [AddrParams NodeMask 1]	$decap_ set shift_ [AddrParams NodeShift 1]	$dmux_ install [Node/MobileNode set DECAP_PORT] $decap_}Node/MobileNode instproc makemip-NewMIPMH {} {	$self instvar regagent_ 	set dmux [new Classifier/Port/Reserve]	$dmux set mask_ 0x7fffffff	$dmux set shift_ 0	$self install-demux $dmux	set regagent_ [new Agent/MIPMH $self]	$self attach $regagent_ [Node/MobileNode set REGAGENT_PORT]	$regagent_ set mask_ [AddrParams NodeMask 1]	$regagent_ set shift_ [AddrParams NodeShift 1] 	$regagent_ set dst_addr_ [expr (~0) << [AddrParams NodeShift 1]]	$regagent_ set dst_port_ 0	$regagent_ node $self}#----------------------------------------------------------------------Node/MobileNode instproc reset {} {	$self instvar arptable_ nifs_ netif_ mac_ ifq_ ll_ imep_        for {set i 0} {$i < $nifs_} {incr i} {		$netif_($i) reset		$mac_($i) reset		$ll_($i) reset		$ifq_($i) reset		if { [info exists opt(imep)] && $opt(imep) == "ON" } { 			$imep_($i) reset 		}	}	if { $arptable_ != "" } {		$arptable_ reset 	}}## Attach an agent to a node.  Pick a port and# bind the agent to the port number.# if portnumber is 255, default target is set to the routing agent#Node/MobileNode instproc add-target { agent port } {	$self instvar dmux_ imep_ toraDebug_ 	set ns [Simulator instance]	set newapi [$ns imep-support]	$agent set sport_ $port	# special processing for TORA/IMEP node	set toraonly [string first "TORA" [$agent info class]] 	if {$toraonly != -1 } {		$agent if-queue [$self set ifq_(0)]  ;# ifq between LL and MAC		#		# XXX: The routing protocol and the IMEP agents needs handles		# to each other.		#		$agent imep-agent [$self set imep_(0)]		[$self set imep_(0)] rtagent $agent	}		# Special processing for AODV	set aodvonly [string first "AODV" [$agent info class]] 	if {$aodvonly != -1 } {		$agent if-queue [$self set ifq_(0)]   ;# ifq between LL and MAC	}		#<zheng: add>	# Special processing for ZBR	#set zbronly [string first "ZBR" [$agent info class]] 	#if {$zbronly != -1 } {	#	$agent if-queue [$self set ifq_(0)]   ;# ifq between LL and MAC	#}	#</zheng: add>	if { $port == [Node set rtagent_port_] } {					# Ad hoc routing agent setup needs special handling		$self add-target-rtagent $agent $port		return	}	# Attaching a normal agent	set namfp [$ns get-nam-traceall]	if { [Simulator set AgentTrace_] == "ON" } {		#		# Send Target		#		if {$newapi != ""} {			set sndT [$self mobility-trace Send "AGT"]		} else {			set sndT [cmu-trace Send AGT $self]		}		if { $namfp != "" } {			$sndT namattach $namfp		}		$sndT target [$self entry]		$agent target $sndT		#		# Recv Target		#		if {$newapi != ""} {			set rcvT [$self mobility-trace Recv "AGT"]		} else {			set rcvT [cmu-trace Recv AGT $self]		}		if { $namfp != "" } {			$rcvT namattach $namfp		}		$rcvT target $agent		$dmux_ install $port $rcvT	} else {		#		# Send Target		#		$agent target [$self entry]		#		# Recv Target		#		$dmux_ install $port $agent	}}Node/MobileNode instproc add-target-rtagent { agent port } {	$self instvar imep_ toraDebug_ 	set ns [Simulator instance]	set newapi [$ns imep-support]	set namfp [$ns get-nam-traceall]	set dmux_ [$self demux]	set classifier_ [$self entry]	# let the routing agent know about the port dmux	$agent port-dmux $dmux_	if { [Simulator set RouterTrace_] == "ON" } {		#		# Send Target		#		if {$newapi != ""} {			set sndT [$self mobility-trace Send "RTR"]		} else {			set sndT [cmu-trace Send "RTR" $self]		}		if { $namfp != "" } {			$sndT namattach $namfp		}		if { $newapi == "ON" } {			$agent target $imep_(0)			$imep_(0) sendtarget $sndT			# second tracer to see the actual			# types of tora packets before imep packs them			if { [info exists toraDebug_] && $toraDebug_ == "ON"} {				set sndT2 [$self mobility-trace Send "TRP"]				$sndT2 target $imep_(0)				$agent target $sndT2			}		} else {  ;#  no IMEP			$agent target $sndT		}		$sndT target [$self set ll_(0)]		#		# Recv Target		#		if {$newapi != ""} {			set rcvT [$self mobility-trace Recv "RTR"]		} else {			set rcvT [cmu-trace Recv "RTR" $self]		}		if { $namfp != "" } {			$rcvT namattach $namfp		}		if {$newapi == "ON" } {			[$self set ll_(0)] up-target $imep_(0)			$classifier_ defaulttarget $agent			# need a second tracer to see the actual			# types of tora packets after imep unpacks them			# no need to support any hier node			if {[info exists toraDebug_] && $toraDebug_ == "ON" } {				set rcvT2 [$self mobility-trace Recv "TRP"]				$rcvT2 target $agent				$classifier_ defaulttarget $rcvT2			}		} else {			$rcvT target $agent			$classifier_ defaulttarget $rcvT			$dmux_ install $port $rcvT		}	} else {		#		# Send Target		#		# if tora is used		if { $newapi == "ON" } {			$agent target $imep_(0)			# second tracer to see the actual			# types of tora packets before imep packs them			if { [info exists toraDebug_] && $toraDebug_ == "ON"} {				set sndT2 [$self mobility-trace Send "TRP"]				$sndT2 target $imep_(0)				$agent target $sndT2			}			$imep_(0) sendtarget [$self set ll_(0)]					} else {  ;#  no IMEP			$agent target [$self set ll_(0)]		}    		#		# Recv Target		#		if {$newapi == "ON" } {			[$self set ll_(0)] up-target $imep_(0)			$classifier_ defaulttarget $agent			# need a second tracer to see the actual			# types of tora packets after imep unpacks them			# no need to support any hier node			if {[info exists toraDebug_] && $toraDebug_ == "ON" } {				set rcvT2 [$self mobility-trace Recv "TRP"]				$rcvT2 target $agent				[$self set classifier_] defaulttarget $rcvT2			}		} else {			$classifier_ defaulttarget $agent			$dmux_ install $port $agent		}	}}## The following setups up link layer, mac layer, network interface# and physical layer structures for the mobile node.#Node/MobileNode instproc add-interface { channel pmodel lltype mactype \		qtype qlen iftype anttype topo inerrproc outerrproc fecproc} {	$self instvar arptable_ nifs_ netif_ mac_ ifq_ ll_ imep_ inerr_ outerr_ fec_	global ns_ MacTrace opt		set ns [Simulator instance]	set imepflag [$ns imep-support]	set t $nifs_	incr nifs_	set netif_($t)	[new $iftype]		;# interface	set mac_($t)	[new $mactype]		;# mac layer	set ifq_($t)	[new $qtype]		;# interface queue	set ll_($t)	[new $lltype]		;# link layer        set ant_($t)    [new $anttype]	$ns mac-type $mactype	set inerr_($t) ""	if {$inerrproc != ""} {		set inerr_($t) [$inerrproc]	}	set outerr_($t) ""	if {$outerrproc != ""} {		set outerr_($t) [$outerrproc]	}	set fec_($t) ""	if {$fecproc != ""} {		set fec_($t) [$fecproc]	}	set namfp [$ns get-nam-traceall]        if {$imepflag == "ON" } {              		# IMEP layer		set imep_($t) [new Agent/IMEP [$self id]]		set imep $imep_($t)		set drpT [$self mobility-trace Drop "RTR"]		if { $namfp != "" } {			$drpT namattach $namfp		}		$imep drop-target $drpT		$ns at 0.[$self id] "$imep_($t) start"   ;# start beacon timer        }	#	# Local Variables	#	set nullAgent_ [$ns set nullAgent_]	set netif $netif_($t)	set mac $mac_($t)	set ifq $ifq_($t)	set ll $ll_($t)	set inerr $inerr_($t)	set outerr $outerr_($t)	set fec $fec_($t)	#	# Initialize ARP table only once.	#	if { $arptable_ == "" } {		set arptable_ [new ARPTable $self $mac]		# FOR backward compatibility sake, hack only		if {$imepflag != ""} {			set drpT [$self mobility-trace Drop "IFQ"]		} else {			set drpT [cmu-trace Drop "IFQ" $self]		}		$arptable_ drop-target $drpT		if { $namfp != "" } {			$drpT namattach $namfp		}        }	#	# Link Layer	#	$ll arptable $arptable_

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级二级三级乱码| 成人听书哪个软件好| 黄网站免费久久| 91久久一区二区| 久久亚洲一区二区三区四区| 一区二区免费在线播放| 国产精品一区二区视频| 日韩一区二区三区观看| 亚洲精品成人在线| gogogo免费视频观看亚洲一| 精品日韩在线观看| 五月激情丁香一区二区三区| 91亚洲精品久久久蜜桃| 久久九九久久九九| 精品一区二区三区的国产在线播放 | 成人国产精品免费网站| 精品国产91洋老外米糕| 婷婷丁香激情综合| 欧美日本视频在线| 午夜一区二区三区视频| 91黄色免费看| 一片黄亚洲嫩模| 色综合久久88色综合天天6| 欧美国产日本视频| 成人av电影观看| 国产精品乱人伦| 国产+成+人+亚洲欧洲自线| 欧美mv日韩mv| 韩国三级在线一区| 久久伊人中文字幕| 国产精品白丝jk黑袜喷水| 久久婷婷成人综合色| 国产高清久久久| 欧美激情在线一区二区| 成人激情动漫在线观看| 国产亚洲成aⅴ人片在线观看| 激情五月婷婷综合| 国产午夜一区二区三区| 成人免费视频一区二区| 中文字幕一区二区三区av | 久久超级碰视频| 日韩欧美国产小视频| 精品伊人久久久久7777人| 精品国精品国产| 成人自拍视频在线观看| 亚洲人午夜精品天堂一二香蕉| 91美女福利视频| 五月天亚洲精品| 日韩欧美高清在线| 成人午夜免费av| 亚洲尤物视频在线| 日韩欧美亚洲一区二区| 国产剧情在线观看一区二区 | 精品日韩在线一区| 成人午夜av在线| 亚洲综合区在线| 欧美xxxx在线观看| 粉嫩aⅴ一区二区三区四区| 亚洲色图在线视频| 91精品国产综合久久精品性色| 狠狠色丁香久久婷婷综合_中| 亚洲国产精品传媒在线观看| 色94色欧美sute亚洲线路一久| 日韩精品乱码av一区二区| 久久综合99re88久久爱| 在线观看精品一区| 国产精一区二区三区| 亚洲综合清纯丝袜自拍| 久久婷婷成人综合色| 欧美午夜免费电影| 懂色中文一区二区在线播放| 天天av天天翘天天综合网 | 日韩和的一区二区| 欧美激情艳妇裸体舞| 欧美天堂一区二区三区| 韩国午夜理伦三级不卡影院| 亚洲夂夂婷婷色拍ww47| 久久免费国产精品 | 91网站最新地址| 蜜臀av一区二区在线免费观看 | 久久综合一区二区| 欧美色视频在线| 成人av资源在线观看| 蜜桃久久精品一区二区| 亚洲国产精品久久不卡毛片| 国产三级一区二区| 精品国产精品网麻豆系列| 欧美性生活久久| 91色乱码一区二区三区| 国产一区福利在线| 日韩精品一区第一页| 亚洲美女淫视频| 中文在线资源观看网站视频免费不卡| 欧美色图激情小说| 91国产精品成人| av不卡在线观看| 国产成人午夜视频| 麻豆视频观看网址久久| 视频一区视频二区中文| 午夜精品一区在线观看| 亚洲男人天堂av| 国产精品国产三级国产aⅴ入口| 精品福利在线导航| 日韩久久久精品| 日韩欧美一卡二卡| 欧美一区二区在线免费播放| 欧美系列日韩一区| 欧美性受xxxx黑人xyx性爽| 色婷婷亚洲精品| 色婷婷综合中文久久一本| 99久久精品免费看国产| 成人免费福利片| 成人晚上爱看视频| 91色九色蝌蚪| 欧美视频一区二区三区四区 | 日韩免费电影网站| 欧美videofree性高清杂交| 欧美一区二区视频免费观看| 欧美精品v国产精品v日韩精品| 欧美性猛片xxxx免费看久爱| 欧美日韩一区国产| 欧美一级在线视频| 精品久久久久久亚洲综合网 | 国产精品亚洲午夜一区二区三区| 久久99国产精品久久99| 国产一区二区在线观看视频| 国产成人精品aa毛片| 色综合久久中文字幕综合网| 91免费国产视频网站| 欧美手机在线视频| 欧美变态口味重另类| 久久久久久久av麻豆果冻| 国产蜜臀av在线一区二区三区| 综合欧美亚洲日本| 亚洲福中文字幕伊人影院| 久久精品免费看| 波多野结衣在线一区| 欧洲生活片亚洲生活在线观看| 欧美日韩视频第一区| 欧美成人女星排行榜| 中文字幕av一区 二区| 亚洲高清视频中文字幕| 国产在线麻豆精品观看| 91免费版在线看| 精品三级av在线| 伊人开心综合网| 国内外成人在线视频| 99在线热播精品免费| 91.成人天堂一区| 欧美激情在线一区二区| 日韩精品一二区| av一区二区三区| 91精品欧美一区二区三区综合在| 中文字幕国产一区| 日韩有码一区二区三区| 99精品久久只有精品| 欧美一区二区三区在线看| 国产精品久线观看视频| 老司机精品视频导航| 一本到不卡免费一区二区| 亚洲精品一区在线观看| 亚洲午夜成aⅴ人片| 不卡的电影网站| 精品盗摄一区二区三区| 亚洲国产精品视频| 成人国产在线观看| 欧美不卡视频一区| 亚洲精品中文在线| 国产91丝袜在线播放九色| 91精品国产黑色紧身裤美女| 伊人一区二区三区| 成人免费毛片app| 欧美精品一区二区在线播放| 亚洲国产欧美在线人成| 99国产精品久久久| 国产欧美一区二区在线| 久久国产乱子精品免费女| 欧美四级电影网| 亚洲综合丁香婷婷六月香| 成人激情图片网| 国产片一区二区三区| 国内一区二区在线| 欧美大片日本大片免费观看| 亚洲电影欧美电影有声小说| 色婷婷久久99综合精品jk白丝| 久久精品综合网| 国产精品一二三在| 国产情人综合久久777777| 国产一区二区美女| 久久久亚洲精品石原莉奈| 久久精品免费观看| 欧美精品一区二区不卡| 久久精品国产99久久6| 日韩视频不卡中文| 蜜臀精品一区二区三区在线观看 | 亚洲欧美视频在线观看| 成人黄色网址在线观看| 中文一区一区三区高中清不卡| 精品一区二区免费视频| 久久青草国产手机看片福利盒子|