Re: [ns] DeferTimer and BackoffTimerr

2006-02-27 Thread ozgur ekici

Hi,

In the DCF media access, the node must sense the wireless channel to
be idle for a DIFS period before it can attempt to transmit. If the
medium is determined to be busy (either NAV or physical carrier sense)
the terminal waits until the end of the current transmission before
initiating a backoff procedure. THIS IS CALLED DEFERAL. After sensing
the channel available at least DIFS period, then the station randomly
selects a backoff counter and goes into BACKOFF stage.

On 2/27/06, Mohamed Youssef <[EMAIL PROTECTED]> wrote:
>
>
>
> Hello,
>
>
>
> I am trying to modify the code of the MAC layer in ns-2. I am getting
> confused about the difference between "DeferTimer" and "BackoffTimer". I
> have the impression that ns-2 is backing off twice before sending a packet.
> Anyone can help??
>
>
>
>
>
> Mohamed Youssef
>
> Université de Sherbrooke
>
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 2/24/2006
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 2/24/2006
>
>



[ns] nam on ason

2006-02-27 Thread nuri azlia

hi ns users,
 
if anyone know how to command the 'nam' programming for ason nodes.. i tried 
before and there is a problems that have failure in the link. by the way,i'm 
using the usual command for nam in order to see how the systems work..
 
hope anyone that have used the ason nodes can help
 
advance thanks for ypur cooperation.
 
-nuri-
QoS on GMPLS


[ns] DeferTimer and BackoffTimerr

2006-02-27 Thread Mohamed Youssef

 

Hello, 

 

I am trying to modify the code of the MAC layer in ns-2. I am getting
confused about the difference between “DeferTimer” and “BackoffTimer”. I
have the impression that ns-2 is backing off twice before sending a packet.
Anyone can help??

 

 

Mohamed Youssef

Université de Sherbrooke

 


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 2/24/2006



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 2/24/2006
 


Re: [ns] tk8.4.11 make failed!

2006-02-27 Thread Cenker Demir


Try a different version of tk, you might need to change some parameters 
with configure, or install (if it is an allinone-2.29)


Emanuele Vecchio wrote:


>
>On Mon, 27 Feb 2006 20:36:44 -, Kevin.McGrath wrote
>> Help ... please
>[snip]
>> For problems with Tcl/Tk see http://www.scriptics.com
>> 
>
>First: have you searched http://www.tcl.tk/ for help?
>
>Second: maybe we could help you if you post the parameters and output of
>./configure
>
>--
> Emanuele  Vecchio 
>Happy Debian GNU/Linux User
>: [EMAIL PROTECTED] ::
>
>



Re: [ns] wireless2.tcl example in Marc Geis' tutorial

2006-02-27 Thread Sasan

change

"../mobility/scene/scen-3-test"

in the script to point to the exact location of the scenario file

S.


On 2/27/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
>
> I tried this example and I got the follwoing error:
> ***
> [EMAIL PROTECTED] ~
> $ ns wireless2.tcl
> num_nodes is set 4
> warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
> INITIALIZE THE LIST xListHead
> *** NOTE: no connection pattern specified.
> Loading scenario file...
> couldn't read file "../mobility/scene/scen-3-test": no such file or
> directory
>while executing
> "source.orig ../mobility/scene/scen-3-test"
>("uplevel" body line 1)
>invoked from within
> "uplevel source.orig [list $fileName]"
>invoked from within
> "if [$instance_ is_http_url $fileName] {
> set buffer [$instance_ read_url $fileName]
> uplevel eval $buffer
> } else {
> uplevel source.orig [list $fileName]
> ..."
>(procedure "source" line 8)
>invoked from within
> "source $opt(sc)"
>invoked from within
> "if { $opt(sc) == "" } {
>puts "*** NOTE: no scenario file specified."
>set opt(sc) "none"
> } else {
>puts "Loading scenario file..."
>source $op..."
>(file "wireless2.tcl" line 183)
>
> ***
> the scenario file is available in my computer, I changed the path for
> several
> and different ways. I don't know what's the correct path for this file.
> in my pc the path is:
>
> C:\cygwin\home\Administrator\ns-allinone-2.29\ns-2.29\tcl\mobility\scene
>
> I read before that there is an error in this example ??!!
> thank you in advance
>
>
> 
> This message was sent using IMP, the Internet Messaging Program.
>
>


--
Plan for things to go wrong, Design for things to go right
S+


Re: [ns] tk8.4.11 make failed!

2006-02-27 Thread Emanuele Vecchio

On Mon, 27 Feb 2006 20:36:44 -, Kevin.McGrath wrote
> Help ... please
[snip]
> For problems with Tcl/Tk see http://www.scriptics.com
> 

First: have you searched http://www.tcl.tk/ for help?

Second: maybe we could help you if you post the parameters and output of
./configure

--
 Emanuele  Vecchio 
Happy Debian GNU/Linux User
: [EMAIL PROTECTED] ::



[ns] modified RED error

2006-02-27 Thread Jaewoo Park

Dear ns-users
  I've modified RED in ns-2.28 in a recent version of Red Hat.
  But I get messages such as
   
  ***glibc detected***corrupted double-linked list: 0x09b70ec0***
  Aborted
  ***glibc detected***malloc(): memory corruption (fast): 0x0977f510***
  Aborted
   
  when I run the tcl script.
  What does this indicate?
   
  I appreciate your help in advance.
  Sincerely
  Jae
   


-
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!


Re: [ns] tk8.4.11 make failed!

2006-02-27 Thread Kevin.McGrath


Help ... please!





-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin.McGrath
Sent: 26 February 2006 21:24
To: ns-users@ISI.EDU
Subject: [ns] tk8.4.11 make failed!


 

 

Hi 

 

I attempted to install ns-2 (v2.29) on a linux workstation (distro fc3,
with gcc version 3.4.2) here, unfortunately the following error
appeared. Suggestions appreciated

Regards

Kevin

 

 

..

 

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:1391: 

error: invalid operands to binary *

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:1391: 

error: syntax error before ')' token

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:1394: 

error: request for member `borderTable' in something not a structure or
union

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:1394: 

error: request for member `borderTable' in something not a structure or
union

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:1396: 

error: syntax error before ')' token

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c: 

In function `Tk_Get3DBorder':

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:193: 

warning: statement with no effect

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c: 

In function `Tk_Draw3DPolygon':

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:850: 

warning: value computed is not used

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:850: 

warning: value computed is not used

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c: 

At top level:

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:1134: 

error: storage size of `shiftTable' isn't known

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:31: 

warning: 'BorderInit' declared `static' but never defined

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:35: 

warning: 'Intersect' declared `static' but never defined

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:38: 

warning: 'ShiftLine' declared `static' but never defined

/home/kpmcgrath/workarea/ns-allinone-2.29/tk8.4.11/unix/../generic/tk3d.
c:1120: 

warning: 'shiftTable' defined but not used

make: *** [tk3d.o] Error 1

tk8.4.11 make failed! Exiting ...

For problems with Tcl/Tk see http://www.scriptics.com
  [EMAIL PROTECTED] ns-allinone-2.29]$

 

 



Re: [ns] using awk with Aodv

2006-02-27 Thread Emanuele Vecchio

On Mon, 27 Feb 2006 23:04:24 +0500, venusian . wrote
> And besides can anyone tell me how can i calculate the dropped,
> received,sent packets using awk script. if anyone has the awk script 
> to calculate them then plz send me.

Have you searched the NS source directory? I've found several awk script in
"tcl/ex" tree, and some of them are directly included in .tcl files. Read the
source to find which of them suites your needs: I tested none.

BTW, if you have Perl installed you can have a look at this:
http://mailman.isi.edu/pipermail/ns-users/2006-February/054151.html
http://mailman.isi.edu/pipermail/ns-users/2006-February/054155.html

Hope it helps,
--
 Emanuele  Vecchio 
Happy Debian GNU/Linux User
: [EMAIL PROTECTED] ::



[ns] wireless2.tcl example in Marc Geis' tutorial

2006-02-27 Thread qadous

Hi all,

I tried this example and I got the follwoing error:
***
[EMAIL PROTECTED] ~
$ ns wireless2.tcl
num_nodes is set 4
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
*** NOTE: no connection pattern specified.
Loading scenario file...
couldn't read file "../mobility/scene/scen-3-test": no such file or directory
while executing
"source.orig ../mobility/scene/scen-3-test"
("uplevel" body line 1)
invoked from within
"uplevel source.orig [list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig [list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source $opt(sc)"
invoked from within
"if { $opt(sc) == "" } {
puts "*** NOTE: no scenario file specified."
set opt(sc) "none"
} else {
puts "Loading scenario file..."
source $op..."
(file "wireless2.tcl" line 183)

***
the scenario file is available in my computer, I changed the path for several
and different ways. I don't know what's the correct path for this file.
in my pc the path is:

C:\cygwin\home\Administrator\ns-allinone-2.29\ns-2.29\tcl\mobility\scene

I read before that there is an error in this example ??!!
thank you in advance



This message was sent using IMP, the Internet Messaging Program.



[ns] Compiling error NS-2 on Solaris 9

2006-02-27 Thread Sasan Sahraei

Hi,

I get the following when compiling on Solaris 9. Which header should I
replace? Any comments? idea? will be very appreciated.

Undefined   first referenced
 symbol in file
operator new[](unsigned)tools/ranvar.o
operator new(unsigned)  common/tclAppInit.o
sqrtf   mobile/shadowing-vis.o
std::basic_ifstream >::~basic_ifstream
[in-charge]()mobile/shadowing-vis.o
std::__default_alloc_template<(bool)1, (int)0>::deallocate(void*,
unsigned)nix/nixnode.o
vtable for __cxxabiv1::__si_class_type_infotools/rng.o
std::basic_ostream
>::operator<<(std::ios_base& (*)(std::ios_base&))routealgo/rbitmap.o
std::__throw_length_error(char const*)routealgo/rlookup.o
std::basic_ostream
>::operator<<(short)routealgo/rbitmap.o
std::basic_ostream >::operator<<(int)mpls/ldp.o
std::basic_ostream
>::operator<<(unsigned)routealgo/rlookup.o
std::basic_ostream >::operator<<(unsigned
long)routealgo/rbitmap.o
std::basic_istream >::get(char*, int,
char)mobile/shadowing-vis.o
__cxa_end_catch routealgo/bfs.o
__cxa_begin_catch   routealgo/bfs.o
et_tclobject   
/home/ssahra01/mysrc/ns-allinone-2.29/tclcl-1.17/libtclcl.a(Tcl.o)
operator delete[](void*)common/scheduler.o
operator delete(void*)  common/tclAppInit.o
std::__default_alloc_template<(bool)1,
(int)0>::allocate(unsigned)nix/nixnode.o
std::basic_istream >& std::operator>> >(std::basic_istream
>&, char*)mobile/shadowing-vis.o
std::basic_istream
>::operator>>(int&)mobile/shadowing-vis.o
vtable for __cxxabiv1::__vmi_class_type_infocommon/object.o
std::cerr   mpls/ldp.o
std::cout   asim/asim.o
std::basic_ios >::fail()
constmobile/shadowing-vis.o
vtable for __cxxabiv1::__class_type_infocommon/timer-handler.o
std::ios_base::Init::~Init [in-charge]()classifier/classifier-qs.o
std::ios_base::Init::Init[in-charge]()classifier/classifier-qs.o
__gxx_personality_v0common/tclAppInit.o
std::basic_ostream >& std::operator<<
 >(std::basic_ostream
>&, char const*)mpls/ldp.o
__cxa_pure_virtual  tools/ranvar.o
std::basic_ifstream
>::close()mobile/shadowing-vis.o
__cxa_rethrow   routealgo/bfs.o
std::basic_istream
>::get(char&)mobile/shadowing-vis.o
std::basic_ifstream
>::basic_ifstream[in-charge](char const*,
std::_Ios_Openmode)mobile/shadowing-vis.o
ld: fatal: Symbol referencing errors. No output written to ns
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `ns'
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

Thanks,
Sasan



[ns] TO CREATE YOUR OWN .cc FILES AND ASSOCIATED .tcl SCRIPTS in ns-2.29

2006-02-27 Thread Saurabh Sinha

---
HOW TO CREATE YOUR OWN .cc FILES AND ASSOCIATED .tcl SCRIPTS

 in ns2.29  (Checked on ns-allinone-ns-2.29)
---


Files you need to create :

1) test.cc
2) own-test.tcl

(*Code present at the end of this document, Just pastethe code and create
the files)


---
START
---

step 1:
create own .cc file : "test.cc"
say save at : ~/ns-2.29/test.cc


step 2:

In ~/ns-2.29/Makefile.in
Add at :

OBJ_CC
test.o \


step 3:

./configure

step 4:
make


step 5:
create your own .tcl script
say save at: ~/ns-2.29/own-test.tcl

step 6:
Now run this .tcl file :

./ns own-test.tcl


step 7:
You will get this output:

*
warning: no class variable Agent/MyVar::x_tcl

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

warning: no class variable Agent/MyVar::y_tcl

 From add()

 x=5   y = 10x+y = 15
*

step 8:
The reason for the warning is : that x_tcl, y_tcl needs to be
given some default values.


step 9:
To give the default values to the tcl variables used (x_tcl,
y_tcl)

Goto the file : ~/ns-2.29/tcl/lib/ns-default.tcl

Add in this file :

Agent/MyVar set x_tcl 0
Agent/MyVar set y_tcl 0



##Note : The name "Agent/MyVar" should be same, the one used in
 MyAgentClass() constructor , i,e your .cc file
 Also the name is used in the .tcl scripts to access
  these variable (x_tcl, y_tcl) and member function (add())


step 10:
After adding default values in ns-default.tcl,
you need to re-make:

make



step 11:
Now run your .tcl script :

./ns own-test.tcl


step 12:

Correct  Output comes as :
*

 From add()

 x=5   y = 10x+y = 15

*



   END


   /*** CODE LISTING ***/

-1-

//
test.cc (copy this and save as a file named :test.cc)
//

#include 
#include 
#include "agent.h"

/*  Contents   */

/* Class : MyAgent (Your own Class) */
/* Member Functions : */
/*MyAgent() : bind()*/
/*command()*/
/*add() (Your function)*/

/* static Class : MyAgentClass (Your class defined appened with Class) */
/*  e.g if the class name above was : xyz then this static class will  */
/*  be called   xyzClass*/
/*  Member Function*/
/*  MyAgentClass()*/
/*create()*/


class MyAgent : public Agent
{
 private:
  int x,y;
  void add();
 protected:
  int command(int argc, const char* const* argv);
 public:
  MyAgent();
};


/* Constructor of Class MyAgent */
/* Used to bind the variables used */
MyAgent::MyAgent() : Agent(PT_UDP)
{
 bind("x_tcl", &x);
 bind("y_tcl", &y);
}


static class MyAgentClass: public TclClass
{
 public:
  MyAgentClass():TclClass("Agent/MyVar") {}

  TclObject* create (int, const char*const*)
 {
 return (new MyAgent());
 }
}my_obj;




int MyAgent::command(int argc, const char*const* argv)
{   if(argc==2)
  {
   if(strcmp(argv[1] ,"add") ==0)
   {
 add();
 return (TCL_OK);
}
  }
 return(Agent::command(argc, argv));
}

/* Your member function */
void MyAgent::add()
{
 Tcl& tcl = Tcl::instance();
 tcl.eval("puts \" \n From add() \"");
 printf("\n x=%d   y = %dx+y = %d", x,y,x+y);
}


//
 END OF "test.cc"
//



-2-

//
 own-test.tcl  (your associated .tcl script)
/*/

set ns [new Simulator]
set myobj [new Agent/MyVar]

$myobj set x_tcl 5
$myobj set y_tcl 10
$myobj add

$ns run

//
 END OF "own-test.tcl"
/*/






--
Saurabh Sinha
Department of Computer Science,
University of Delhi.


Re: [ns] is there a methode to calculate number of hops to a route ?

2006-02-27 Thread Sasan Sahraei

Use $ns_ new-trace and then from the trace file -Pf represents the number
of hops.

S.
>
>
>
>  hi all ,
>   we want to calculate number  of hops in a route , in ns .Is ther a
> methode to do this with tcl in ns ?
>
>   Please is there any one to do this ?
>
>   THANK u in advance
>
>
>
>
> -
>  Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> tarifs exceptionnels pour appeler la France et
> l'international.Téléchargez la version beta.
>




[ns] wireless scripts

2006-02-27 Thread ravi kumar

  
hi,
how can i run *.tr file.

i am working in WLAN. i am facing a problem to configure access point. 
can anybody send me the wireless scripts,especially access point.sothat 

i could continue my work. 


Re: [ns] Link Layer Reports Route Failed - AODV

2006-02-27 Thread Kanthi

Hi Mohamed,

Thanks for the reply and many thanks for the link to the paper. The paper
you mentioned offers a very lucid and clear explanation of 802.11
implementation in NS.

So, I guess the simulation is indeed correct since with the current
implementation of 802.11 MAC and with RTS/CTS turned on, we will probably
face this problem even in real networks.

Thanks again.
Regards,
Kanthi

>The problem is originated in the MAC layer due to the problems of
> hidden/exposed nodes. When the MAC layer fails in delivering the packet
> after the several transmissions, it will stop its trials and alerts the
> network layer. The network layer will consider this as a route failure
> -although the route always exists- and restarts its route calculation. You
> can find more details in this paper: "Revealing the problems with 802.11
> medium access control protocol in multi-hop wireless ad hoc networks" for
> Shugong Xua and Tarek Saadawi.
>
> Regards,
>
> Mohamed Youssef
> Université de Sherbrooke
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Kanthi
> Sent: Monday, February 27, 2006 7:48 AM
> To: ns-users@ISI.EDU
> Subject: [ns] Link Layer Reports Route Failed - AODV
>
>
> Hi All,
>
> I am using NS-2.28 and default AODV implementation on it. During some
> simulations, when number of nodes are high, there are a lot of dropped
> packets and repeated RREQ packets.
>
> The reason logged indicates that the link layer reports that a route
> failed.
>
> Although, routes are again found, this seriously hampers the throughput. I
> am not sure that this is "correct" simulation.
>
> My scenario has static nodes (no mobility and no change in topology during
> the simulation), no error model and a simple two-ray ground propogation
> model.
>
> Why should link layer conditions change at all in such a scenario and why
> should there be drops due to that ?
>
> It would be really great if somebody could provide some insight.
>
> Thanks and Regards,
> Kanthi
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 2/24/2006
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 2/24/2006
>
>
>


-- 
" I gave my life to become the person I am right now. Was it worth it? "
 - Richard Bach



[ns] using awk with Aodv

2006-02-27 Thread venusian .

hieee,

i'm using tracegraph to find the dropped/recevied and send packet of AODV. 
when i try to load a file tracegraph gives me the error

"Index exceeds matrix dimensions"

how to deal with this error ... is it because of large size of trace 
file

And besides can anyone tell me how can i calculate the dropped,received,sent 
packets using awk script. if anyone has the awk script to calculate them 
then plz send me.



thanking in Advance

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



Re: [ns] CBR over TCP ?

2006-02-27 Thread kaibai

I got similar question as Alaeddine. For example, if I want to compare the
performance of TCP and UDP under some scenarios, which kind of application
should I attach? 

Regards,
Kai

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Sasan
Sent: Monday, February 27, 2006 10:03 AM
To: alaeddine abdallah
Cc: ns users
Subject: Re: [ns] CBR over TCP ?


TCP has its own estimation of stable link and suitable time to send the
packet, so usually it is avoided. at least it is the case with me.

S.


On 2/27/06, alaeddine abdallah <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> In my knowledge in NS, we use UDP to simulate CBR traffic  since it is a
> Constant Bit Rate. But if we simulate CBR with TCP as a transport agent,
> the
> simulation works but only the packet size declared int the TCP layer is
> considered and not that of the CBR traffic.
>
>
> So my question is:is it logic to simulate CBR traffic with TCP or not?
>
> and conversaly , can we simulate FTP application with UDP ?
>
> thanks a lot.
>
> regards  Alaeddine
>



--
Plan for things to go wrong, Design for things to go right
S+



[ns] Problem in comliling rudimentary PPM code on NS-2...

2006-02-27 Thread rajesh bachani

Hello All.

I am trying to simulate the PPM schemes under NS-2, as part of my
B-Tech. Project, and am stranded in the initial phase itself.

I have written a very basic code for the simulation, and have made the
necessary modifications in the various NS-2 files, but to my
dissappointment, there are some compile errors which I am unable to
digest.

The file names of my code are ppm.cc and ppm.h, and I am encountering
the following errors when I run make:

ppm/ppm.cc:16: two or more data types in declaration of `class_ppmhdr'
ppm/ppm.cc: In member function `virtual TclObject* PPMClass::create(int, const
   char* const*)':
ppm/ppm.cc:24: parse error before `;' token
ppm/ppm.cc: At global scope:
ppm/ppm.cc:29: syntax error before `::' token
ppm/ppm.cc:35: syntax error before `::' token
ppm/ppm.cc:39: `pkt' was not declared in this scope
ppm/ppm.cc:42: `pkt' was not declared in this scope
ppm/ppm.cc:44: parse error before `if'
ppm/ppm.cc:52: syntax error before `->' token
ppm/ppm.cc:58: `pkt' was not declared in this scope
ppm/ppm.cc:58: ISO C++ forbids declaration of `send' with no type
ppm/ppm.cc:58: initializer list being treated as compound expression
ppm/ppm.cc:59: parse error before `}' token
make: *** [ppm/ppm.o] Error 1

-

The directory structure for my code files is /root/ns-allinone-2.27/ns-2.27/ppm/

Also, here is the ppm.cc contents:

#include "ppm.h"

static class PPMHeaderClass : public PacketHeaderClass {
public:
PPMHeaderClass() : PacketHeaderClass("PacketHeader/PPM",
sizeof(hdr_ppm))
{
bind_offset(&hdr_ppm::offset_);
}

} class_ppmhdr;


static class PPMClass : public TclClass {
public:
PPMClass() : TclClass("Agent/PPM") {}
TclObject* create(int, const char*const*)
{
return (new PPMAgent));
}
} class_ppm;


PPMAgent::PPMAgent() : Agent(PT_PPM)
{
bind("packetSize_", &size_);
}
void PPMAgent::recv(Packet* pkt, Handler*)
{
printf("Recieved a packed on PPM Agent");
// Access the IP header for the received packet:
hdr_ip* hdrip = hdr_ip::access(pkt);

// Access the PPM header for the received packet:
hdr_ppm* hdr = hdr_ppm::access(pkt);

if(hdr_ppm->marked == 1)
{
printf("Packet is already marked");
}

else
{
hdr_ppm->marked = 1;
hdr->time_marked = Scheduler::instance().clock();
}

send(pkt,0);
}

-

The PPM Agent is to be attached to the routers which would primarily
mark the packets it receives. Also, all the relevant headers have been
included in the ppm.h file.

Can anyone suggest what sort of an error this points to be.

I would be grateful.

Sincerely,

Rajesh Bachani


--
Rajesh Bachani
DA-IICT 4th Year (Bachelor of Technology)
+919824407356



Re: [ns] CBR over TCP ?

2006-02-27 Thread Sasan

TCP has its own estimation of stable link and suitable time to send the
packet, so usually it is avoided. at least it is the case with me.

S.


On 2/27/06, alaeddine abdallah <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> In my knowledge in NS, we use UDP to simulate CBR traffic  since it is a
> Constant Bit Rate. But if we simulate CBR with TCP as a transport agent,
> the
> simulation works but only the packet size declared int the TCP layer is
> considered and not that of the CBR traffic.
>
>
> So my question is:is it logic to simulate CBR traffic with TCP or not?
>
> and conversaly , can we simulate FTP application with UDP ?
>
> thanks a lot.
>
> regards  Alaeddine
>



--
Plan for things to go wrong, Design for things to go right
S+


[ns] CBR over TCP ?

2006-02-27 Thread alaeddine abdallah

Hi,

In my knowledge in NS, we use UDP to simulate CBR traffic  since it is a
Constant Bit Rate. But if we simulate CBR with TCP as a transport agent, the
simulation works but only the packet size declared int the TCP layer is
considered and not that of the CBR traffic.


So my question is:is it logic to simulate CBR traffic with TCP or not?

and conversaly , can we simulate FTP application with UDP ?

thanks a lot.

regards  Alaeddine


[ns] how to specify a color for a particular packet for visualization in nam

2006-02-27 Thread vishnupriya padmanabhan

  
hi all,
i want to know how to specify a color for a particular packet for visualization 
in nam.

any help is highly appreciated
thanks in advance

vishnu priya


[ns] AODV packts and ADIJKSTRA tcl code

2006-02-27 Thread mohd hammad

Dear Sir 
My problem is who to send a packet using AODV protocol
for more than 50 node and who to write ADIJKSTRA tcl 
code to do the same as AODV 
 


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



[ns] Need help in clustering

2006-02-27 Thread raja priya


Hi,
  
  I want to perform clustering in ad hoc networks. I have found the 
base  paper. I want to know whether some clustering algorithms are  
implemented. If so i want the code of the already implemented  clustering 
algorithm.
  
  Please help me
  
  Regards
  S.Rajapriya
  

-
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 


[ns] Link Layer Reports Route Failed - AODV

2006-02-27 Thread Kanthi

Hi All,

I am using NS-2.28 and default AODV implementation on it. During some
simulations, when number of nodes are high, there are a lot of dropped
packets and repeated RREQ packets.

The reason logged indicates that the link layer reports that a route failed.

Although, routes are again found, this seriously hampers the throughput. I
am not sure that this is "correct" simulation.

My scenario has static nodes (no mobility and no change in topology during
the simulation), no error model and a simple two-ray ground propogation
model.

Why should link layer conditions change at all in such a scenario and why
should there be drops due to that ?

It would be really great if somebody could provide some insight.

Thanks and Regards,
Kanthi



[ns] is there a methode to calculate number of hops to a route ?

2006-02-27 Thread hamdi benmessaoud

 

 hi all , 
  we want to calculate number  of hops in a route , in ns .Is ther a methode to 
do this with tcl in ns ?
   
  Please is there any one to do this ?
   
  THANK u in advance 
   
   


-
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.Téléchargez la version 
beta.


Re: [ns] Fwd: wireless emulator

2006-02-27 Thread Emanuele Vecchio

Il giorno lun, 27/02/2006 alle 14.26 +0530, anil reddy ha scritto:
>how to calculate no of lost data packets in ns2 mathematically?

http://mailman.isi.edu/pipermail/ns-users/2006-February/054151.html
http://mailman.isi.edu/pipermail/ns-users/2006-February/054155.html

-- 
 Emanuele  Vecchio 
Happy Debian GNU/Linux User
: [EMAIL PROTECTED] ::



Re: [ns] mathematical calculations of droped pcks.

2006-02-27 Thread Emanuele Vecchio

Il giorno lun, 27/02/2006 alle 13.54 +0530, A Anupama ha scritto:
> I want to count the no.of cbr packets dropped. For that what I have to
> use in the place 'granularity' and what is 'node'. ?

First: *please* answer to the list, not directly to my address. You
aren't the only one interested in this topic.

Second: have you read the manual I suggested you? It says:
«The program averages the throughput over periods defined by a
parameter called "granularity". As input it takes three
arguments: the name of a trace file (e.g. out.tr), the node at
which we wish to check the throughput [of TCP], and the
granularity»

Third: if you have just a CBR source (on a UDP agent) and you want to
monitor the *global* loss, use my script in a way simliar to:
./throughput.pl out.tr any 0.1 udp
Note that if you have several type of traffic (TCP, UDP, etc ...) in
your simulation my script it's not what you need: write your own.

Fourth: RTFS! http://www.catb.org/~esr/jargon/html/R/RTFS.html

-- 
 Emanuele  Vecchio 
Happy Debian GNU/Linux User
: [EMAIL PROTECTED] ::



[ns] Fwd: wireless emulator

2006-02-27 Thread anil reddy

-- Forwarded message --
From: anil reddy <[EMAIL PROTECTED]>
Date: Mon, 27 Feb 2006 11:14:47 +0530
Subject: wireless emulator
To: ns-users@isi.edu

hi,
   how to calculate no of lost data packets in ns2 mathematically



[ns] Fwd: wireless emulator

2006-02-27 Thread anil reddy

-- Forwarded message --
From: anil reddy <[EMAIL PROTECTED]>
Date: Mon, 27 Feb 2006 11:14:47 +0530
Subject: wireless emulator
To: ns-users@isi.edu

hi,
   how to calculate no of lost data packets in ns2 mathematically



[ns] x-graph by trace file

2006-02-27 Thread minaxi rawat

hi
  we want to collect the data by trace file.can  it is possible we seprate the 
all colume of trace file .which script is needed for that.can any one give me a 
code for that so we generate axgraph for my file.please help me


-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.


Re: [ns] mathematical calculations of droped pcks.

2006-02-27 Thread Emanuele Vecchio

Il giorno dom, 26/02/2006 alle 21.04 -0800, S RAVIKIRAN ha scritto:
> is there any in built fn. to count the no. of droped/
> recived packets if know how to get the count using
> mathematicaly

I've found a solution in the manual "NS for beginner", which is linked
in the homepage of NS:
http://www-sop.inria.fr/maestro/personnel/Eitan.Altman/COURS-NS/n3.pdf

Since your question appears frequently on this list, I send the script I
use, inspired on that manual.

#!/usr/bin/perl -w
#
# USAGE: throughput.pl
#
# EXAMPLE: throughput.pl out.tr 1 0.1 udp
#
# HINT: if packet-type == any, it computes the overall throughput
#   if packet-type == dropped, it counts the dropped packets

use strict;

my $infile = $ARGV[0];
my $tonode = $ARGV[1];
my $granularity = $ARGV[2];
my $packet_type = $ARGV[3];

# we compute how many bytes were transmitted during time interval
# specified by granularity parameter in seconds
my ($sum, $clock, $throughput) = (0,0,0);
my @x;
open (DATA, "<$infile") or die "Can't open $infile: $!\n";
while () {
 @x = split;

 # map column   ==> data:
 #  0  event-type (r,+,-,d)
 #  1  time
 #  2  from-node
 #  3  to-node
 #  4  packet-type
 #  5  packet-size (bytes)
 #  6  flags
 #  7  flow id in IPv6
 #  8  source address in form "node.port"
 #  9  destination address in form "node.port"
 # 10  packet sequence number (network layer protocol)
 # 11  packet unique id

 if ($x[1] - $clock <= $granularity) {
  if ($packet_type ne 'dropped') {
   if ($x[0] eq 'r') {
if (($x[3] == $tonode) or ($tonode eq 'any')){
 if (($x[4] eq $packet_type) or ($packet_type eq 'any')) {
  $sum += $x[5];
 }
}
   }
  } else {
   if ($x[0] eq 'd') {
if (($x[3] == $tonode) or ($tonode eq 'any')){
 $sum += $x[5];
}
   }
  }
 } else {
  $throughput = $sum / $granularity;
  $throughput /= 100; # just for Mbps ...
  print "$x[1] $throughput\n";
  $clock += $granularity;
  $sum = 0;
 }
}
$throughput = $sum / $granularity;
$throughput /= 100; # just for Mbps ...
print "$x[1] $throughput\n";

close DATA;
exit 0;


Hope it helps,
-- 
 Emanuele  Vecchio 
Happy Debian GNU/Linux User
: [EMAIL PROTECTED] ::