Dear all, 

I downloaded NS2 allinone-2.31 version, and is able to install and
validate 
the installation on Redhat linux 2.6.9-42.0.3.EL.   But when I tried to
run NS2 emulation, I always have the following error "pcap/live object
(_o11) couldn't open packet source fxp0: ioctl: No such device",
detailed error msg and test scripts are also listed below. 

I searched the archive, looks like someone has asked this question
before, but no answers, hope this time someone could please help!  

thanks many!
-Ping

1. my test script
--------------------------
#create simulator
set ns [new Simulator]
$ns use-scheduler RealTime

#Emulator address
#set me "10.0.1.1"
set me [exec hostname]

# allocate a BPF type network object and a raw-IP object # BPF: Berkeley
Packet Filter 

#Packet input
set bpf0 [new Network/Pcap/Live]
$bpf0 set promisc_ true
set nd0 [$bpf0 open readonly fxp0]
set filt "(not ip host $me)"
$bpf0 filter $filt

#Packet output
set ipnet [new Network/IP]
$ipnet open writeonly

#Input Agent
set pfa [new Agent/Tap]
$pfa network $bpf0

#Output agent
set ipa [new Agent/Tap]
$ipa network $ipnet

# ICMP ECHO agent
set echoagent [new Agent/PingResponder]

set node0 [$ns node]
set node1 [$ns node]
set node2 [$`ns node]

$ns simplex-link $node0 $node2 10Mb 10ms DropTail $ns simplex-link
$node1 $node2 10Mb 10ms DropTail

$ns attach-agent $node0 $pfa
$ns attach-agent $node1 $ipa
$ns attach-agent $node2 $echoagent

$ns simplex-connect $pfa $echoagent
$ns simplex-connect $ipa $echoagent

#wait for ping to come in...
puts "okey"
$ns run

2. Detailed Error Msg
--------------------------
[10:58 AM] wireless# nse 1.tcl
pcap/live object (_o11) couldn't open packet source fxp0: ioctl: No such
device

    (_o11 cmd line 1)
    invoked from within
"_o11 cmd open readonly fxp0"
    invoked from within
"catch "$self cmd $args" ret"
    invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
    (procedure "_o11" line 2)
    (SplitObject unknown line 2)
    invoked from within
"$bpf0 open readonly fxp0"
    invoked from within
"set nd0 [$bpf0 open readonly fxp0]"
    (file "1.tcl" line 15)


Reply via email to