I have run the following code,but i'm getting the following error.i have
been stuck with this error since 10 days.please help me out.


--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
        _o20: no target for slot 1
        _o20 type: Classifier/Addr
content dump:
classifier _o20
        0 offset
        22 shift
        511 mask
        1 slots
                slot 0: _o21 (Classifier/Addr)
---------- Finished standard no-slot{} default handler ----------
==========================================================================================
#mycode.tcl
# 
#  w(0)==BS(0)----BS(1)==W(1)
#
# simulation of a wired-cum-wireless scenario 
# ======================================================================
# Define options
# ======================================================================
set opt(chan)           Channel/WirelessChannel    ;# channel type
set opt(prop)           Propagation/TwoRayGround   ;# radio-propagation
model
set opt(netif)          Phy/WirelessPhy            ;# network interface type
set opt(mac)            Mac/802_11                 ;# MAC type
set opt(ifq)            Queue/DropTail/PriQueue    ;# interface queue type
set opt(ll)             LL                         ;# link layer type
set opt(ant)            Antenna/OmniAntenna        ;# antenna model
set opt(ifqlen)         50                         ;# max packet in ifq
#set opt(nn)             2                          ;# number of
wirelessnodes
set opt(adhocRouting)   DSDV                       ;# routing protocol
set opt(x)              1000                       ;# x coordinate of
topology
set opt(y)              700                        ;# y coordinate of
topology
set opt(stop)           150                        ;# time to stop
simulation
set opt(ftp1-start)     30.0
set num_wired_nodes      2
set num_bs_nodes         2
#
============================================================================

# create simulator instance
set ns_   [new Simulator]

# set up for hierarchical routing
$ns_ node-config -addressType hierarchical
AddrParams set domain_num_ 2              ;# number of domains
lappend cluster_num 1 1               ;# number of clusters in each domain
AddrParams set cluster_num_ $cluster_num
lappend no_of_nodes 2 2               ;# number of nodes in each domain
AddrParams set nodes_num_ $no_of_nodes    ;

set tracefd  [open mine.tr w]
set namtrace [open mine.nam w]
$ns_ trace-all $tracefd
$ns_ namtrace-all-wireless $namtrace $opt(x) $opt(y)

# Create topography object
set topo   [new Topography]

# define topology
$topo load_flatgrid $opt(x) $opt(y)

# create God
create-god $num_bs_nodes

#create wired nodes
set temp {0.0.0 1.0.0}        ;# hierarchical addresses for wired domain
for {set i 0} {$i < $num_wired_nodes} {incr i} {
    set W($i) [$ns_ node [lindex $temp $i]] 
}

# configure for base-station node
$ns_ node-config -adhocRouting $opt(adhocRouting) \
                 -llType $opt(ll) \
                 -macType $opt(mac) \
                 -ifqType $opt(ifq) \
                 -ifqLen $opt(ifqlen) \
                 -antType $opt(ant) \
                 -propType $opt(prop) \
                 -phyType $opt(netif) \
                 -channelType $opt(chan) \
                 -topoInstance $topo \
                 -wiredRouting ON \
                 -agentTrace ON \
                 -routerTrace OFF \
                 -macTrace OFF 

#create base-station node
set temp1 {0.0.1}   ;# hier address to be used for wireless domain
set BS(0) [$ns_ node [lindex $temp1 0]]
$BS(0) random-motion 0               ;# disable random motion
#provide some co-ord (fixed) to base station node
$BS(0) set X_ 200.0
$BS(0) set Y_ 200.0
$BS(0) set Z_ 0.0

set temp2 {1.0.1 }   ;
set BS(1) [$ns_ node [lindex $temp2 0]]
$BS(1) random-motion 0               ;# disable random motion
#provide some co-ord (fixed) to base station node
$BS(1) set X_ 400.0
$BS(1) set Y_ 200.0
$BS(1) set Z_ 0.0

#create links between wired and BS nodes
$ns_ duplex-link $W(0) $BS(0) 5Mb 2ms DropTail
$ns_ duplex-link $W(1) $BS(1) 5Mb 2ms DropTail
$ns_ duplex-link-op $W(0) $BS(0) orient right
$ns_ duplex-link-op $W(1) $BS(1) orient right

# setup TCP connections
set tcp1 [new Agent/TCP]
$tcp1 set class_ 2
set sink1 [new Agent/TCPSink]
$ns_ attach-agent $W(0) $tcp1
$ns_ attach-agent $W(1) $sink1
$ns_ connect $tcp1 $sink1
set ftp1 [new Application/FTP]
$ftp1 attach-agent $tcp1
$ns_ at $opt(ftp1-start) "$ftp1 start"


$ns_ at $opt(stop).0002 "puts \"NS EXITING...\" ; $ns_ halt"
$ns_ at $opt(stop).0001 "stop"

proc stop {} {
    global ns_ tracefd namtrace
    $ns_ flush-trace
    close $tracefd
    close $namtrace
    exec nam wireless2-out.nam &
    exit 0
}

puts "Starting Simulation..."
$ns_ run
http://old.nabble.com/file/p34296908/TOPO.png 
-- 
View this message in context: 
http://old.nabble.com/Wireless-Link-to-Neighboring-AP-tp34296908p34296908.html
Sent from the ns-users mailing list archive at Nabble.com.

Reply via email to