Re: [ns] after recompiling

2009-01-15 Thread Phenix

Hi,

You can add these two statements at the beginning of proxytrace2any.cc:

extern int IsLittleEndian(void);
extern void ToOtherEndian(TEntry *e);

It'll works well. However, I don't know the reason. If you know, please
let me know.

Regards,
Phenix

--
From: eng Rony rania_kamal...@yahoo.com
Sent: Thursday, January 15, 2009 1:25 AM
To: ns-users@ISI.EDU
Subject: [ns] after recompiling




 Eng Rony

 hi
 i have to recompile ns2 after i make some changes in ns2 files by typing 
 make in ns2 directory and appear to me some warning msgs and errors:

 gpsr/gpsr_neighbor.cc:393 : warning: int format, nsaddr_t arg arg 3.
 gpsr/gpsr.h:114: warning: 'GPSRAgent:: query_timer_' will be initialized 
 after.
 gpsr/gpsr.h:101: warning: 'nsaddr_t GPSRAgent:: my_id_'.
 gpsr/gpsr.h:241: warning: comparison between sign and unsigned integer 
 expression.
 proxytrace2any.cc:112: error: 'ISLittleEndian undeclared first use this 
 function.
 proxytrace2any.cc:112: error: each undeclared identifier is reported only 
 once for each function it appears in..
 proxytrace2any.cc:120: error: 'ToOtherEndian undeclared first use this 
 function.
 make[1]: *** proxeytrace2any.o [Error1].

 i wait ur solutions





 



[ns] ns2 emulation -Unable to use RealTime Scheduler

2009-01-15 Thread Madhuri Venkatesh

Hi,
im a beginner at ns2 and i need to use the emulator for my project.
i downloaded this example from the ns-manual

set ns [new Simulator]
$ns use-scheduler RealTime
set me [exec hostname]
set bpf0 [new Network/Pcap/Live]
$bpf0 set promisc_ true
set ipnet [new Network/IP]
set nd0 [$bpf open readonly fxp0]
$ipnet open writeonly
set filt (not ip host $me)
$bpf0 filter $filt
set a0 [new Agent/Tap]
$a0 network $bpf0
set n0 [$ns node]
$ns attach-agent $n0 $a0
$ns run

but i got the output:

warning: no class variable Scheduler/RealTime::adjust_new_width_interval_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Scheduler/RealTime::min_bin_width_

invalid command name Network/Pcap/Live
while executing
Network/Pcap/Live create _o11 
invoked from within
catch $className create $o $args msg
invoked from within
if [catch $className create $o $args msg] {
if [string match __FAILED_SHADOW_OBJECT_ $msg] {
delete $o
return 
}
global errorInfo
error class $...
(procedure new line 3)
invoked from within
new Network/Pcap/Live
invoked from within
set bpf0 [new Network/Pcap/Live]
(file rt3.tcl line 4)

the same thing happens for the other emulation examples ive tried.The
simulation examples run fine.Ive downloaded and installed
ns-allinone-2.33.Please help me out.
Thanks

-- 
Fourth Year Undergraduate Student,Computer Science and
Engineering,RVCE,Bangalore.




-- 
Fourth Year Undergraduate Student,Computer Science and
Engineering,RVCE,Bangalore.
Ph:9886336272


[ns] ns2 emulation -cant use real time scheduler

2009-01-15 Thread Madhuri Venkatesh

Hi,
im a beginner at ns2 and i need to use the emulator for my project.
i downloaded this example from the ns-manual

set ns [new Simulator]
$ns use-scheduler RealTime
set me [exec hostname]
set bpf0 [new Network/Pcap/Live]
$bpf0 set promisc_ true
set ipnet [new Network/IP]
set nd0 [$bpf open readonly fxp0]
$ipnet open writeonly
set filt (not ip host $me)
$bpf0 filter $filt
set a0 [new Agent/Tap]
$a0 network $bpf0
set n0 [$ns node]
$ns attach-agent $n0 $a0
$ns run

but i got the output:

warning: no class variable Scheduler/RealTime::adjust_new_width_interval_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Scheduler/RealTime::min_bin_width_

invalid command name Network/Pcap/Live
while executing
Network/Pcap/Live create _o11 
invoked from within
catch $className create $o $args msg
invoked from within
if [catch $className create $o $args msg] {
if [string match __FAILED_SHADOW_OBJECT_ $msg] {
delete $o
return 
}
global errorInfo
error class $...
(procedure new line 3)
invoked from within
new Network/Pcap/Live
invoked from within
set bpf0 [new Network/Pcap/Live]
(file rt3.tcl line 4)

the same thing happens for the other emulation examples ive tried.The
simulation examples run fine.Ive downloaded and installed
ns-allinone-2.33.Please help me out.
Thanks


[ns] LAN Nodes placement

2009-01-15 Thread Syed Faraz Hasan

Hi Everybody,

I am running the following code bu every time I run, nodes appear in different 
positions and overall visualization is very bad. How can I fix the positions of 
which node to appear where (while it is still part of LAN!). Also, I send data 
between two nodes, which goes to the main bus and is distributed to all nodes. 
How can I restrict the communication between two specific nodes only.

Please reply soon.

Faraz

set ns [new Simulator]

set tracefd [open topology.tr w]
$ns trace-all $tracefd

set nf [open out.nam w]
$ns namtrace-all $nf

proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam out.nam 
exit 0
}

set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
set n5 [$ns node]


$ns make-lan $n1 $n2 $n3 $n4 $n5 25Mb 200ms LL Queue/DropTail Mac/Csma/Cd


set udp0 [new Agent/UDP]
$ns attach-agent $n1 $udp0

set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetSize_ 1000
$cbr0 set interval_ 0.005
$cbr0 attach-agent $udp0

set null0 [new Agent/Null]
$ns attach-agent $n3 $null0

$ns connect $udp0 $null0

$ns at 0.1 $cbr0 start
$ns at 4 $cbr0 stop
$ns at 4.1 finish


$ns run


[ns] problem during NS-2.27 installation

2009-01-15 Thread fatemeh kazemeiny

Hi,

I need to install ns-2.27 on SuSe Linux, but I get this error during 
installation:

tclcl-1.15 make failed!

how can I solve this problem?
Thank you in advanced.

Fatemeh.
 


  


[ns] LAN Nodes not being placed in order

2009-01-15 Thread Syed Faraz Hasan

Hi.

I am running the following code bu every time I run, nodes appear in different 
positions and overall visualization is very bad. How can I fix the positions of 
which node to appear where (while it is still part of LAN!). Also, I send data 
between two nodes, which goes to the main bus and is distributed to all nodes. 
How can I restrict the communication between two specific nodes only.

Please reply soon.

Faraz

set ns [new Simulator]

set tracefd [open topology.tr w]
$ns trace-all $tracefd

set nf [open out.nam w]
$ns namtrace-all $nf

proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam out.nam 
exit 0
}

set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
set n5 [$ns node]


$ns make-lan $n1 $n2 $n3 $n4 $n5 25Mb 200ms LL Queue/DropTail Mac/Csma/Cd


set udp0 [new Agent/UDP]
$ns attach-agent $n1 $udp0

set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetSize_ 1000
$cbr0 set interval_ 0.005
$cbr0 attach-agent $udp0

set null0 [new Agent/Null]
$ns attach-agent $n3 $null0

$ns connect $udp0 $null0

$ns at 0.1 $cbr0 start
$ns at 4 $cbr0 stop
$ns at 4.1 finish


$ns run



[ns] Help: use ns2 emulation --error

2009-01-15 Thread Harry P

Hi,everyone:
 I write a script 5.tcl (use ns2 emulation function),get this error
below:

TapAgent(_o105): linked sock 5 as READABLE
TapAgent(_o108): linked sock 7 as READABLE
TapAgent(_o111): linked sock 9 as READABLE
TapAgent(_o114): linked sock 11 as READABLE
*pcap/live object (_o118) couldn't open packet source lnc4: (no devices
found) /dev/bpf4: No such file or directory*

(_o118 cmd line 1)
invoked from within
_o118 cmd open readonly lnc4
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 _o118 line 2)
(SplitObject unknown line 2)
invoked from within
$bpf5 open readonly lnc4
invoked from within
set dev5  [$bpf5 open readonly lnc4]
(file 5.tcl line 73)
=
*Here is  5.tcl*

# Testing passing real world traffic through the
# 1  --0--9--8
# 2  --0--9--8
# 3  --0--9--8
# 4  --0--9--8
# 5  --0--9--8
#
#
set ns [new Simulator]
$ns use-scheduler RealTime
set f [open out.tr w]
$ns trace-all $f
set nf [open out.nam w]
$ns namtrace-all $nf
# Create the nodes needed to the transducer
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
set n5 [$ns node]
set n0 [$ns node]
set n9 [$ns node]
set n8 [$ns node]
# Setup connections between the nodes
$ns simplex-link $n1 $n0 10Mb 5ms DropTail
$ns simplex-link $n2 $n0 10Mb 5ms DropTail
$ns simplex-link $n3 $n0 10Mb 5ms DropTail
$ns simplex-link $n4 $n0 10Mb 5ms DropTail
$ns simplex-link $n5 $n0 10Mb 5ms DropTail
$ns simplex-link $n0 $n9 10Mb 5ms DropTail
$ns simplex-link $n9 $n8 10Mb 5ms DropTail
# Configure  entry node  1
set tap1 [new Agent/Tap]; # Create the TCPTap Agent
set bpf1 [new Network/Pcap/Live];   # Create the bpf
set dev1  [$bpf1 open readonly lnc0]
$bpf1 filter src 192.168.152.1 and src port 5001 and dst 192.168.184.1 
$tap1 network $bpf1;# Connect bpf to TCPTap Agent
$ns attach-agent $n1 $tap1; # Attach TCPTap Agent to the node
# Configure  entry node  2
set tap2 [new Agent/Tap]; # Create the TCPTap Agent
set bpf2 [new Network/Pcap/Live];   # Create the bpf
set dev2  [$bpf2 open readonly lnc1]
$bpf2 filter src 192.168.152.1 and src port 5002 and dst 192.168.184.1 
$tap2 network $bpf2;# Connect bpf to TCPTap Agent
$ns attach-agent $n2 $tap2; # Attach TCPTap Agent to the node
# Configure  entry node  3
set tap3 [new Agent/Tap]; # Create the TCPTap Agent
set bpf3 [new Network/Pcap/Live];   # Create the bpf
set dev3  [$bpf3 open readonly lnc2]
$bpf3 filter src 192.168.152.1 and src port 5003 and dst 192.168.184.1 
$tap3 network $bpf3;# Connect bpf to TCPTap Agent
$ns attach-agent $n3 $tap3; # Attach TCPTap Agent to the node
# Configure  entry node  4
set tap4 [new Agent/Tap]; # Create the TCPTap Agent
set bpf4 [new Network/Pcap/Live];   # Create the bpf# Configure  entry node
set dev4  [$bpf4 open readonly lnc3]
$bpf4 filter src 192.168.152.1 and src port 5004 and dst 192.168.184.1 
$tap4 network $bpf4;# Connect bpf to TCPTap Agent
$ns attach-agent $n4 $tap4; # Attach TCPTap Agent to the node

# Configure  entry node  5
set tap5 [new Agent/Tap]; # Create the TCPTap Agent
set bpf5 [new Network/Pcap/Live];   # Create the bpf
set dev5  [$bpf5 open readonly lnc4]
$bpf5 filter src 192.168.152.1 and src port 5005 and dst 192.168.184.1 
$tap5 network $bpf5;# Connect bpf to TCPTap Agent
$ns attach-agent $n5 $tap5; # Attach TCPTap Agent to the node

# Configure the  exit node
set tap8 [new Agent/Tap]; # Create a TCPTap Agent
set ipnet8 [new Network/IP];# Create a Network agent
$ipnet8 open writeonly
$tap8 network $ipnet8;  # Connect network agent to tap agent
$ns attach-agent $n8 $tap8; # Attach agent to the node.

# Connect the agents.
$ns simplex-connect $tap1 $tap8
$ns simplex-connect $tap2 $tap8
$ns simplex-connect $tap3 $tap8
$ns simplex-connect $tap4 $tap8
$ns simplex-connect $tap5 $tap8
$ns at 600.0 finish
proc finish {} {
global ns f nf
$ns flush-trace
close $f
close $nf
exit 0
}
$ns run
===
*when i comment  entry node  5 , it is OK , Why?*

# Configure  entry node  5
# set tap5 [new Agent/Tap]; # Create the TCPTap Agent
# set bpf5 [new Network/Pcap/Live];   # Create the bpf
# set dev5  [$bpf5 open readonly lnc4]
# $bpf5 filter src 192.168.152.1 and src port 5005 and dst 192.168.184.1 
# $tap5 network $bpf5;# Connect bpf to TCPTap Agent
# $ns attach-agent $n5 $tap5; # Attach TCPTap Agent to the node


My ip setting:

lnc0 : flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
inet 192.168.224.129 netmask 0xff00 broadcast 192.168.224.255
inet6 fe80::20c:29ff:fee6:6007%lnc0 

Re: [ns] problem during NS-2.27 installation

2009-01-15 Thread Dalton Cézane

Hi... I already had problems with NS-2.27 intallation too, but a friend
helped me, doing the installation.
In this case, I was using Ubuntu 8.04 and the most of problems that appeared
was because my version of gcc...
Now, I'm using another computer, with Ubuntu 8.10, and have to install the
NS-2.27 again. In these next days I'm going to install with his help (my
friend)... If you don't have solved your problem yet, maybe I can help you!

Good luck!

-- 
===
Dalton Cézane - Voip UFCG: 1075-2005
Mestrando em Ciência da Computação
Bacharel em Ciência da Computação
Universidade Federal de Campina Grande - UFCG