[ns] installation problem:miss files

2006-08-01 Thread pyramidal

 
Hello,
 
When I install ns-2.28,the following infomation displays:
 
luded from ./mac/channel.h:47,
 from ./mac/phy.h:60,
 from ./mac/mac.h:48,
 from trace/trace-ip.cc:39:
./mac/node.h:94:25: wired-flows.h: no that file or directory
In file included from ./mac/channel.h:47,
 from ./mac/phy.h:60,
 from ./mac/mac.h:48,
 from trace/trace-ip.cc:39:
./mac/node.h:201: error: ISO C++ forbids declaration of `SLList' with no type
./mac/node.h:201: error: expected `;' before '*' token
make: *** [trace/trace-ip.o] error 1
Ns make failed!
Any one would like to tell me where the problem lies?Thank you in advance!
 
Regards
 
Li An
 

[ns] Broadcast problem - HELP

2006-08-01 Thread [EMAIL PROTECTED]

Hi list!

I got a problem handling broadcast packets. Here it is the code:

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


proc finish {} {
global ns f nf
$ns flush-trace
close $f
close $nf
exit 0
}

set node1 [$ns node]
set node2 [$ns node]
set node3 [$ns node]
set node4 [$ns node]
set node5 [$ns node]
set node6 [$ns node]


#Network objects to access the TAP devices at the link layer
set raw1 [new Network/Raw]
set raw2 [new Network/Raw]
set raw3 [new Network/Raw]
set raw4 [new Network/Raw]

$raw1 open tap0 readwrite
$raw2 open tap1 readwrite
$raw3 open tap2 readwrite
$raw4 open tap3 readwrite

#Tap Agent for each node
Agent/Tap set maxpkt_ 3100
set a1 [new Agent/Tap/Raw FE:FD:0A:00:00:02]
set a2 [new Agent/Tap/Raw FE:FD:0A:00:00:03]
set a3 [new Agent/Tap/Raw FE:FD:0A:00:00:04]
set a4 [new Agent/Tap/Raw FE:FD:0A:00:00:05]

puts install nets into taps...
#Assign network objects to TAP agents
$a1 network $raw1
$a2 network $raw2
$a3 network $raw3
$a4 network $raw4


#Assign TAP agents to ns-2 nodes
$ns attach-agent $node1 $a1
$ns attach-agent $node2 $a2
$ns attach-agent $node3 $a3
$ns attach-agent $node4 $a4


# Setup connections between the nodes
$ns duplex-link $node1 $node5 2Mb 2ms DropTail
$ns duplex-link $node2 $node5 2Mb 2ms DropTail
$ns duplex-link $node5 $node6 2Mb 15ms DropTail
$ns duplex-link $node6 $node3 2Mb 2ms DropTail
$ns duplex-link $node6 $node4 2Mb 2ms DropTail



$ns at 20.0 finish

$ns run


I'm using a nse extension to have some real (UML) machines talking each other 
via ns-2. If I use this code I get the error:

[EMAIL PROTECTED] ns2emulation]# ../nse mah.tcl
Using gettimeofday() insdead of the CPU cycle counter to guarantee portability
install nets into taps...
TapAgent: changing the src and dst address to 0:0 --- -1:0
0.478134: Tap(_o33): recvpkt, writing to target: _o13
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o13: no target for slot -1
_o13 type: Classifier/Hash/Dest
content dump:
classifier _o13
0 offset
0 shift
2147483647 mask
1 slots
slot 0: _o37 (Classifier/Port)
-1 default
-- Finished standard no-slot{} default handler --

Usually I get this error when something is not correctly linked. If on the UML 
machines I set the ARP statically, it's work (I get the error  on the 
arp-request Who has 10.0.0.2...that is broadcast)

The code than handle this is:

void
RawTapAgent::processpkt (Packet* p, const NodeInfo srcinfo) {

hdr_cmn* ch = HDR_CMN(p);
hdr_ip* ip = HDR_IP(p);
NodeInfo dstinfo = ((uint8_t*)p-accessdata ());
if (dstinfo.mac () == NodeInfo::broadcast_addr) { //A broadcast packet
ip-daddr () = IP_BROADCAST;
ip-dport () = 0;
TDEBUG5 (TapAgent: changing the src and dst address to %d:%d 
--- %d:%d\n, srcinfo.get_node_addr (), 0, -1, 0);
} else {
nit = lower_bound (nodes.begin (), nodes.end (), dstinfo);
if (nit == nodes.end () || (dstinfo  *nit)) { //Destination 
address not found in the map table
Packet::free (p);
TDEBUG (Dropped packet: invalid destination\n);
return;
}
ip-daddr () = (*nit).get_node_addr ();
ip-dport () = 0;
TDEBUG5 (TapAgent: changing the src and dst address to %d:%d 
--- %d:%d\n, srcinfo.get_node_addr (), 0, (*nit).get_node_addr (), 0);
}

ip-saddr () = srcinfo.get_node_addr ();
ip-sport () = 0;

TDEBUG4(%f: Tap(%s): recvpkt, writing to target: %s\n,
now(), name(), target_-name());

Scheduler::instance().sync ();
ch-timestamp() = now();
target_-recv(p);

return;
}


How can I solve this? Please, I really need a soluzione for this!
If I use the wireless scenario they provided me, all works fine.

Regards,
  Paolo Carpo 



Re: [ns] How to Send only ONE packet ???

2006-08-01 Thread lei Liang

U can use sendmsg function of a udp agent. see 37.2.3 in the ns manuel.

Cheers,
lei

On Mon, 2006-07-31 at 19:27 +0100, Nicholas Loulloudes wrote:
 Hello,
 
 Is there a way i can send from one node to an other node only ONE UDP
 packet?
 
 Best Regards,
 



[ns] ns-2 examples

2006-08-01 Thread sanaz helmi

i'll appreciate if someone guides me how I can find some ns-2 samples for 
each OSI level which can be compiled correctly in NS-2.
Sincerely,
sanaz

_
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/



[ns] adding trace analysis to the following wireless TCL code...any help?

2006-08-01 Thread Muth S

Hi all
   
  I want to add a trace analysis foe the following tcl code... i wnat to tract 
TCP packets from node 0 and know how much delay its consuming to send the 
packet... can any one help me in that
   
  
#Create a simulator object
set ns [new Simulator]
  set tf [open tcp1.tr w]
$ns trace-all $tf
  set nf [open tcp1.nam w]
#$ns namtrace-all $nf
$ns namtrace-all-wireless $nf 7 7
  Simulator set MacTrace_ ON
Simulator set RouterTrace_ ON
  $ns node-config -macType Mac/BNEP
  set node(0) [$ns node 0]
set node(1) [$ns node 1]
  $node(0) set-statist 10 30 1
$node(1) set-statist 10 30 1
  $node(0) rt AODV
$node(1) rt AODV
  $node(0) LossMod BlueHoc
 $node(0) trace-all-NULL on
 $node(0) trace-all-POLL on
# $node(0) trace-all-in-air on
  # [$node(1) set bb_] set T_w_inquiry_scan_ 4096
# [$node(1) set bb_] set T_inquiry_scan_ 4096
  $ns at 0.0002 $node(0) on 
$ns at 0.0005 $node(1) on
  set tcp0 [ new Agent/TCP]
$ns attach-agent $node(0) $tcp0
set ftp0 [new Application/FTP]
$ftp0 attach-agent $tcp0
  set null0 [ new Agent/TCPSink]
$ns attach-agent $node(1) $null0
  $ns connect $tcp0 $null0
$tcp0 set packetSize_ 5000
$tcp0 set tcpip_base_hdr_size_ 72
  
# $ns at 1.0 $ftp0 start
set nscmd $ftp0 start
  [$node(1) set l2cap_] set ifq_limit_ 30
[$node(0) set l2cap_] set ifq_limit_ 40
  set ifq_ [new Queue/DropTail]
$ifq_ set limit_ 20
  $ns at 0.100 $node(0) make-bnep-connection $node(1) DH5 DH3 noqos $ifq_ 
$nscmd 
  $ns at 30.1 finish
  proc finish {} {
 global node ns nf tf 
 $node(0) print-all-stat
 $node(1) print-all-stat
 $close nf
 exec nam tcp1.nam 
 
 exit 0
}
  $ns run
   
   
  thanx in advance


[img]http://zonix.jeeran.com/hands.jpg[/img]

 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


[ns] ns 2.26 installation problem

2006-08-01 Thread sara MA

Hi there, I was trying to install ns2.26 on cygwin, and during the ./install 
procedure I got this error... can anyone help me please... (Thanks)



In file included from tclcl.h:48,
 from Tcl.cc:47:
tclcl-mappings.h: In static member function `static int 
TclObjectHelperT::disp
atch_(void*, Tcl_Interp*, int, char**)':
tclcl-mappings.h:51: error: incomplete type `Tcl' used in nested name 
specifier
tclcl-mappings.h:52: error: invalid use of undefined type `struct Tcl'
tclcl-mappings.h:41: error: forward declaration of `struct Tcl'
tclcl-mappings.h:57: error: invalid use of undefined type `struct Tcl'
tclcl-mappings.h:41: error: forward declaration of `struct Tcl'
make: *** [Tcl.o] Error 1
tclcl-1.0b13 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

_
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/