12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

set netif $netif_($t)set mac $mac_($t)set ifq $ifq_($t)set ll $ll_($t)## Initialize ARP table only once.#if { $arptable_ == "" } {set arptable_ [new ARPTable $self $mac]set drpT [cmu-trace Drop "IFQ" $self]$arptable_ drop-target $drpT}## Link Layer#$ll arptable $arptable_$ll mac $mac$ll up-target [$self entry]$ll down-target $ifq## Interface Queue#$ifq target $mac$ifq set qlim_ $qle<strong>ns</strong>et drpT [cmu-trace Drop "IFQ" $self]$ifq drop-target $drpT## Mac Layer#$mac netif $netif$mac up-target $ll$mac down-target $netif$mac nodes $opt(nn)## Network Interface#$netif channel $channel$netif up-target $mac$netif propag<strong>at</strong>ion $pmodel$netif node $self$netif antenna $ant_($t)## Physical Channel#$channel addif $netif;# Propag<strong>at</strong>ion Model;# Bind node interface;# <strong>at</strong>tach antenna;# add to list of interfaces# ============================================================# Setting up trace objects150

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!