Re: [ns] ns-2.34 installation problem

2011-07-11 Thread ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed

see that 
 
Set environment variables $ gedit ~/.bashrc 
Add the following lines to the end of the file. Remember replace /your/path 
by the folder where you have stored extracted the ns-2 file (For example, if 
your Linux account name is purple, and you have extracted the file to your home 
directory, you have to change /your path to /home/purple) # 
LD_LIBRARY_PATHOTCL_LIB=/your/path/ns-allinone-2.34/otcl-1.13NS2_LIB=/your/path/ns-allinone-2.34/libX11_LIB=/usr/X11R6/libUSR_LOCAL_LIB=/usr/local/libexport
 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB # 
TCL_LIBRARYTCL_LIB=/your/path/ns-allinone-2.34/tcl8.4.18/libraryUSR_LIB=/usr/libexport
 TCL_LIBRARY=$TCL_LIB:$USR_LIB # 
PATHXGRAPH=/your/path/ns-allinone-2.34/bin:/your/path/ns-allinone-2.34/tcl8.4.18/unix:/your/path/ns-allinone-2.34/tk8.4.18/unixNS=/your/path/ns-allinone-2.34/ns-2.34/NAM=/your/path/ns-allinone-2.34/nam-1.14/PATH=$PATH:$XGRAPH:$NS:$NAM


--- On Mon, 7/11/11, shwta jain shwe...@sac.isro.gov.in wrote:


From: shwta jain shwe...@sac.isro.gov.in
Subject: [ns] ns-2.34 installation problem
To: ns-users@ISI.EDU
Date: Monday, July 11, 2011, 1:02 AM



Hi all,

I was facing ns-installation problem on vm ware .

As I am suggested by the ns-users to set enviournment path  variable .

When I did it still error is coming that is 



B:/usr /X11R6/lib:/usr/local/lib':not a valid identifier



Plz help me regarding it





Regards,

Shweta Jain



Re: [ns] problem in adding a new protocol in ns2.34

2011-07-11 Thread ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed

ok no probem but first please explain what are rules for this protocols and 
where is used to try to help you and send to me the code to try to help
 
Good Luck

--- On Sun, 7/10/11, M.Mehran Ajmal meh...@ciit.net.pk wrote:


From: M.Mehran Ajmal meh...@ciit.net.pk
Subject: [ns] problem in adding a new protocol in ns2.34
To: ns-users@ISI.EDU
Date: Sunday, July 10, 2011, 6:05 PM



i am adding a new protocol in ns2.34 after removing all the errors during 
make. it started compiling and an unknown error occured without reference to 



the line which is as follows.

corp/corp.o: In function 
`Corp::Corp(int)':
corp.cc:(.text+0x5b): undefined reference to 
`Corp_rtable::Corp_rtable()'
collect2: ld returned 1 exit status
make: 


*** [ns] Error 1
the code of corp.cc is as follows in which 
error is coming if any one can help i will be great full.

//int 
corp_pkt;
int hdr_corp_pkt::offset_;
static class CorpHeaderClass : 
public PacketHeaderClass {
public:
CorpHeaderClass() : 
PacketHeaderClass(PacketHeader/Corp,
sizeof(hdr_corp_pkt)) {

bind_offset(hdr_corp_pkt::offset_);
}
} class_rtProtoCorp_hdr;




static class CorpClass : public TclClass {
    
public:
        CorpClass() : 
TclClass(Agent/Corp) {}
        
TclObject* create(int argc, const char*const* argv) {
    
    assert(argc == 5);
    
    return (new 
Corp((nsaddr_t)Address::instance().str2addr(argv[4])));

        }
    } 
class_rtProtoCorp;
// Timers
    void

    Corp_PktTimer::expire(Event* e) {
    
agent_-send_corp_pkt();
    
agent_-reset_corp_pkt_timer();
    }


//constructor

    Corp::Corp(nsaddr_t id) : 
Agent(PT_CORP), pkt_timer_(this) {
    
bind_bool(accessible_var_, accessible_var_);
    
ra_addr_ = id;
    }
//Command
    
int
    Corp::command(int argc, const char*const* 
argv) {
    if (argc == 2) {
    if 
(strcasecmp(argv[1], start) == 0) {
    
pkt_timer_.resched(0.0);
    return TCL_OK;

    }

    else if (strcasecmp(argv[1], 
print_rtable) == 0) {
    if (logtarget_ != 0) {

    sprintf(logtarget_-pt_-buffer(), P %f _%d_ 
Routing Table,CURRENT_TIME,ra_addr());
    
logtarget_-pt_-dump();
    
rtable_.print(logtarget_);
    }
    
else {
    fprintf(stdout, %f _%d_ If you want to print 
this routing table you must create a trace file in your tcl 
script,CURRENT_TIME,ra_addr());
    }

    return TCL_OK;
    }

    }
    else if (argc == 3) {


    // Obtains corresponding dmux to carry packets to upper 
layers

    if (strcmp(argv[1], port-dmux) == 0) {



    dmux_ = (PortClassifier*)TclObject::lookup(argv[2]);

    if (dmux_ == 0) {

    
fprintf(stderr, %s: %s lookup of %s failed\n,__FILE__,argv[1],argv[2]);



    return TCL_ERROR;
    }

    return TCL_OK;
    }
// Obtains 
corresponding tracer
    else if (strcmp(argv[1], 
log-target) == 0 ||
    strcmp(argv[1], tracetarget) 
== 0) {
    logtarget_ = 
(Trace*)TclObject::lookup(argv[2]);
    if (logtarget_ == 
0)
    return TCL_ERROR;
    return 
TCL_OK;
    }
    }
// Pass the 
command to the base class
    return Agent::command(argc, 
argv);
    }


//Recive
    
void
    Corp::recv(Packet* p, Handler* h) {

    struct hdr_cmn* ch = HDR_CMN(p);
    
struct hdr_ip* ih= HDR_IP(p);
    if (ih-saddr() == 
ra_addr()) {
    // If there exists a loop, must drop the 
packet
    if (ch-num_forwards()  0) {

    drop(p, DROP_RTR_ROUTE_LOOP);
    
return;
    }
    // else if this is a 
packet I am originating, must add IP header
    else if 
(ch-num_forwards() == 0)
    ch-size() += 
IP_HDR_LEN;
    }
    // If it is a corp 


packet, must process it
    if (ch-ptype() == 
PT_CORP)
    recv_corp_pkt(p);
    // 
Otherwise, must forward the packet (unless TTL has reached zero)

    else {
    ih-ttl_--;

    if (ih-ttl_ == 0) {
    drop(p, 
DROP_RTR_TTL);
    return;
    }

    forward_data(p);
    }

    }

// Recv Corp pkt
    void

    Corp::recv_corp_pkt(Packet* p) {
    
struct hdr_ip* ih= HDR_IP(p);
    struct hdr_corp_pkt* ph 
= HDR_CORP_PKT(p);
    // All routing messages are sent 
from and to port RT_PORT,
    // so we check it.

    assert(ih-sport() == RT_PORT);
    
assert(ih-dport() == RT_PORT);
    /* ... processing 
of corp packet ... */
    // Release resources

    Packet::free(p);
    }
//Send Corp 
pkt

    void
    
Corp::send_corp_pkt() {
    Packet* p= allocpkt();

    struct hdr_cmn* ch= HDR_CMN(p);
    
struct hdr_ip* ih= HDR_IP(p);
    struct hdr_corp_pkt* ph 
= HDR_CORP_PKT(p);
    ph-pkt_src()= ra_addr();

    ph-pkt_len()= 7;
    
ph-pkt_seq_num()= seq_num_++;
    ch-ptype()= 
PT_CORP;
    ch-direction() = hdr_cmn::DOWN;

    ch-size() = IP_HDR_LEN + ph-pkt_len();

    ch-error() = 0;
    
ch-next_hop() = IP_BROADCAST;
    ch-addr_type() = 


NS_AF_INET;
    ih-saddr() = ra_addr();

    ih-daddr() = IP_BROADCAST;
    
ih-sport() = RT_PORT;
    ih-dport() = RT_PORT;



    ih-ttl() = IP_DEF_TTL;
    
Scheduler::instance().schedule(target_, p, JITTER);
    
}
//Reset Timer
    void
    
Corp::reset_corp_pkt_timer() {
    

Re: [ns] what is causing this error in installation of ns2? it says....undefined reference to `__stack_chk_fail_local

2011-07-11 Thread ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed

i advise you to delete the installed files and try to setup again with the 
following step by step and you must access the internet 
 
First, we download the ns-2 all-in-one file [54.4 MB]. $ wget 
http://nchc.dl.sourceforge.net/sourceforge/nsnam/ns-allinone-2.34.tar.gz$ tar 
-xzvf ns-allinone-2.34.tar.gz$ cd ns-allinone-2.34$ sudo apt-get install 
build-essential autoconf automake libxmu-dev$ ./install
If your ubuntu version is 9.10, you must change the variable of environment CC 
$ export CC=gcc-4.3
 
Set environment variables $ gedit ~/.bashrc 
Add the following lines to the end of the file. Remember replace /your/path 
by the folder where you have stored extracted the ns-2 file (For example, if 
your Linux account name is purple, and you have extracted the file to your home 
directory, you have to change /your path to /home/purple) # 
LD_LIBRARY_PATHOTCL_LIB=/your/path/ns-allinone-2.34/otcl-1.13NS2_LIB=/your/path/ns-allinone-2.34/libX11_LIB=/usr/X11R6/libUSR_LOCAL_LIB=/usr/local/libexport
 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB # 
TCL_LIBRARYTCL_LIB=/your/path/ns-allinone-2.34/tcl8.4.18/libraryUSR_LIB=/usr/libexport
 TCL_LIBRARY=$TCL_LIB:$USR_LIB # 
PATHXGRAPH=/your/path/ns-allinone-2.34/bin:/your/path/ns-allinone-2.34/tcl8.4.18/unix:/your/path/ns-allinone-2.34/tk8.4.18/unixNS=/your/path/ns-allinone-2.34/ns-2.34/NAM=/your/path/ns-allinone-2.34/nam-1.14/PATH=$PATH:$XGRAPH:$NS:$NAM
Ensure that it immediately takes effect: $ source ~/.bashrc
Note: the previous step is important; else you cannot successfully run ns-2. 
(Alternatively, you may have to restart your X-windows, that is logout, and 
then login, or restart your computer.) 
Now, the installation has been completed. Try: $ ns
The % symbol appears on the screen. Type exit to quit. 


--- On Mon, 7/11/11, ketan telang ketan6...@gmail.com wrote:


From: ketan telang ketan6...@gmail.com
Subject: [ns] what is causing this error in installation of ns2? it 
saysundefined reference to `__stack_chk_fail_local
To: ns-users@ISI.EDU
Date: Monday, July 11, 2011, 2:35 AM



Hi
I am installing ns-allinone-2.34 on ubuntu. I am getting this error. Could
anyone figure out what is causing?


/home/prithviraj/Documents/NS2/ns-allinone-2.34/otcl-1.13/otcl.c:495:
undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/prithviraj/Documents/NS2/ns-allinone-2.34/otcl-1.13/otcl.c:2284:
undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [libotcl.so] Error 1



Thanks


Re: [ns] Installing multiple version of ns2 in one machine

2011-07-11 Thread ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed



--- On Mon, 7/11/11, ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed teto...@yahoo.com wrote:


From: ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed teto...@yahoo.com
Subject: Re: [ns] Installing multiple version of ns2 in one machine
To: saai...@um.edu.my
Date: Monday, July 11, 2011, 2:53 AM






yes, you can install two version its very easy, only install the version in 
independent folder and in the terminal you can choice what is the version can 
access and each vesion dont relate with another

--- On Sun, 7/10/11, saai...@um.edu.my saai...@um.edu.my wrote:


From: saai...@um.edu.my saai...@um.edu.my
Subject: [ns] Installing multiple version of ns2 in one machine
To: ns-users@ISI.EDU
Date: Sunday, July 10, 2011, 8:53 PM



Good day,

Is is possible to install multiple of version of ns2 in one machine
using the same username? If possible, how do we configure it (if any
manual included, i appreciate if anyone can give me this)...thx in
advanced..




Re: [ns] add extra field in GPSR packet header

2011-07-10 Thread ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed

Hi, there is file gpsr_pkt.h , here you can extra field as you want .

--- On Thu, 7/7/11, Zakia Khalfallah zakia_khalfal...@hotmail.fr wrote:


From: Zakia Khalfallah zakia_khalfal...@hotmail.fr
Subject: [ns] add extra field in GPSR packet header
To: NS Hassan gpsr aslinda.has...@mun.ca, NS user ns-users@ISI.EDU
Date: Thursday, July 7, 2011, 9:19 AM




Hi all,
I'm simulating GPSR protocol. I need to calculate delay through Timestamp in 
real time during the simulation. So i need to add the timestamp field in the 
GPSR packet header.
How can i add that ?
Thank you,
Zak
              


Re: [ns] installation problem

2011-07-10 Thread ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed

HI , i suggest to you install ns2 on any environment related to linux such as 
ubuntu and there is some steps must be followed to run ns2 , and you must have 
internet on the pc that download ns2 on it 
 
here the steps :-
First, we download the ns-2 all-in-one file [54.4 MB]. $ wget 
http://nchc.dl.sourceforge.net/sourceforge/nsnam/ns-allinone-2.34.tar.gz$ tar 
-xzvf ns-allinone-2.34.tar.gz$ cd ns-allinone-2.34$ sudo apt-get install 
build-essential autoconf automake libxmu-dev$ ./install
If your ubuntu version is 9.10, you must change the variable of environment CC 
$ export CC=gcc-4.3
 
Set environment variables $ gedit ~/.bashrc 
Add the following lines to the end of the file. Remember replace /your/path 
by the folder where you have stored extracted the ns-2 file (For example, if 
your Linux account name is purple, and you have extracted the file to your home 
directory, you have to change /your path to /home/purple) # 
LD_LIBRARY_PATHOTCL_LIB=/your/path/ns-allinone-2.34/otcl-1.13NS2_LIB=/your/path/ns-allinone-2.34/libX11_LIB=/usr/X11R6/libUSR_LOCAL_LIB=/usr/local/libexport
 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB # 
TCL_LIBRARYTCL_LIB=/your/path/ns-allinone-2.34/tcl8.4.18/libraryUSR_LIB=/usr/libexport
 TCL_LIBRARY=$TCL_LIB:$USR_LIB # 
PATHXGRAPH=/your/path/ns-allinone-2.34/bin:/your/path/ns-allinone-2.34/tcl8.4.18/unix:/your/path/ns-allinone-2.34/tk8.4.18/unixNS=/your/path/ns-allinone-2.34/ns-2.34/NAM=/your/path/ns-allinone-2.34/nam-1.14/PATH=$PATH:$XGRAPH:$NS:$NAM
Ensure that it immediately takes effect: $ source ~/.bashrc
Note: the previous step is important; else you cannot successfully run ns-2. 
(Alternatively, you may have to restart your X-windows, that is logout, and 
then login, or restart your computer.) 
Now, the installation has been completed. Try: $ ns
The % symbol appears on the screen. Type exit to quit. 
Validation 
To run the ns validation suite: $ cd ns-2.34$ ./validate


--- On Fri, 7/8/11, shwta jain shwe...@sac.isro.gov.in wrote:


From: shwta jain shwe...@sac.isro.gov.in
Subject: [ns] installation problem
To: ns-users@ISI.EDU
Date: Friday, July 8, 2011, 6:27 AM



Hi 

Following error is coming during installation of ns-2.34.

Can anybody help me regarding this error





* Build Stanford GraphBase



Making sgb

if test -r gb_io.ch; then ctangle gb_io.w gb_io.ch; else ctangle gb_io.w; fi

/bin/sh: line 1: ctangle: command not found

make: *** [gb_io.c] Error 127

Unable to create sgb library, but it's optional, so continuing...



* Build GT-ITM



sgb lib not found. gt-itm  sgb2ns could not be installed. Continuing..



* Build zlib



Checking for gcc...

Building static library libz.a version 1.2.3 with cc.

Checking for unistd.h... No.

Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()

Checking for snprintf() in stdio.h... No.

  WARNING: snprintf() not found, falling back to sprintf(). zlib

  can build but will be open to possible buffer-overflow security

  vulnerabilities.

Checking for return value of sprintf()... No.

  WARNING: apparently sprintf() does not return a value. zlib

  can build but will be open to possible string-format security

  vulnerabilities.

Checking for errno.h... No.

Checking for mmap support... No.

cc -O -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H   -c -o example.o
example.c

make: cc: Command not found

make: *** [example.o] Error 127

Zlib make failed, but it's optional Continue ...



* Build tcl8.4.18



./install: line 431: autoconf: command not found

loading cache ./config.cache

checking whether to use symlinks for manpages... no

checking whether to compress the manpages... no

checking whether to add a package name suffix for the manpages... no

checking for gcc... no

checking for cc... no

configure: error: no acceptable cc found in $PATH

tcl8.4.18 configuration failed! Exiting ...

Tcl is not part of the ns project.  Please see www.Scriptics.com

to see if they have a fix for your platform.

[shweta@localhost ns-allinone-2.34]$





Re: [ns] trace2stats for awk

2011-07-10 Thread ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed

hi the number of columns not correspond to new trace format node_id not the 
colume number 5 , you must recorrect the esquence of the number that match to 
new trace format 

--- On Sat, 7/9/11, umair shah meetuas...@yahoo.com wrote:


From: umair shah meetuas...@yahoo.com
Subject: [ns] trace2stats for awk
To: nsusers ns-users@ISI.EDU
Date: Saturday, July 9, 2011, 2:38 AM



http://perso.citi.insa-lyon.fr/mfiore/research.html
the website has A set of AWK scripts to get node-to-node statistics from the
                    tracefiles generated by the ns-2 network simulat
,the awk script for instant throughput,instant jitter and avgstats but when I 
run any of them i don't get the results in any case just blank lines ,I'm using 
the new trace format as stated in readme file .
this is from instant throughput script in awk 
# Trace line format: new
    if ($2 == -t) {
        event = $1
        time = $3
        node_id = $5
        flow_id = $39
        pkt_id = $41
        pkt_size = $37
        flow_t = $45
        level = $19
I have a question is this the correct field setting values because I think $5!= 
node id 
if it is ,then why is it note working please reply .


Re: [ns] INSPECT installation in ns2.34

2011-07-10 Thread ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed

we are need ispect beacuse the ns2 is very poor in related to visualizing of 
wirless only you can show the number of node and the movement , but using 
inspect you can show many of properties such as  the position of node at any 
time and many features

--- On Sat, 7/9/11, umair shah meetuas...@yahoo.com wrote:


From: umair shah meetuas...@yahoo.com
Subject: [ns] INSPECT installation in ns2.34
To: nsusers ns-users@ISI.EDU
Date: Saturday, July 9, 2011, 4:42 AM



Hey how can I install visualizing  Wireless simulations  on ns2 is iNSpect in 
ns2 2.34 ?Is it better than nam visualizer ?and why do I need that ?


Re: [ns] Error in new protocol addition (ns 2.34 on red hat linux )

2011-06-26 Thread ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed

this error mine : the new routing not dofined well , you read how to modify new 
routing protocol or not there is many files inside ns2 must be changed such as 
packet.h,priqueue.cc,ns-lib.tcl , andetc , do you do that , explain 
more what is the type of routing protocol that implemented

--- On Sat, 6/25/11, research simulate research.simul...@gmail.com wrote:


From: research simulate research.simul...@gmail.com
Subject: [ns] Error in new protocol addition (ns 2.34 on red hat linux )
To: ns-users@ISI.EDU
Date: Saturday, June 25, 2011, 8:59 AM



Dear all

I am using ns 2.34 on red hat linux. All the wireless simulation codes on
AODV or existing protocols are working fine. But when I am adding new
protocol, I am able to make the simulator fter running ./configure  make
clean  make. But during execution of tcl file with new protocol code I am
getting following errors. I have carefully implemented code step by step by
thoroughly reading ns material on internet and ebooks. I shall be highly
thankful to you.

Thanks
N B

num_nodes is set 100

(_o14 cmd line 1)
invoked from within
_o14 cmd addr
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 “_o14″ line 2)
(SplitObject unknown line 2)
invoked from within
_o14 addr
(eval body line 1)
invoked from within
eval $node addr $args
(default arm line 2)
invoked from within
switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 $node start-dsr
}
AODV {
set ragent [$self cre...
(procedure _o3 line 11)
(Simulator create-wireless-node line 11)
invoked from within
_o3 create-wireless-node
(eval body line 1)
invoked from within
eval $self create-wireless-node $args
(procedure _o3 line 23)
(Simulator node line 23)
invoked from within
$ns node
(for body line 2)
invoked from within
for {set i 0} {$i  $val(nn) }  { incr i } {
sey mnode_($i) [$ns node]
}
.


Re: [ns] Trace Analyzer

2011-06-26 Thread ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed

Hi , after getting the trace file from ns2 , to anlayze these trace to compute 
important information such as delay - throughput , you must used awk code that 
used to analyze the trace file each awk code is specialist to do thing such as 
there is awk code to compute delay and another to compute throughput and so on 
search for this on google if you dont have inform me 
 
Good Luck

--- On Thu, 6/23/11, Aayushi Shashi aayushi_sha...@hotmail.com wrote:


From: Aayushi Shashi aayushi_sha...@hotmail.com
Subject: [ns] Trace Analyzer
To: ns-users@ISI.EDU
Date: Thursday, June 23, 2011, 4:51 PM




Hello everybody,

I'm making some simulations, and i 'll need to analyze. So I have been 
searching trace analyzers, and I wanted to know if you could recommend some 
trace analyzer that calculates the total average delay.

I hope you can help me.
thank you! 
              


Re: [ns] Ns-users Digest, Vol 90, Issue 23

2011-06-26 Thread ÞÕÇÏ Úíäì Ýì ßá ãßÇä mohammed

First I advise you to run ns2.34 inside linux (ubuntu-redhat) because in cygwin 
make alot of problem , Second are you sure the ns2 is installed successfully or 
not , and do you have any changed on files of ns2 or not 

--- On Sat, 6/25/11, Shaktijeet Mahapatra shaktijeetmahapa...@gmail.com wrote:


From: Shaktijeet Mahapatra shaktijeetmahapa...@gmail.com
Subject: Re: [ns] Ns-users Digest, Vol 90, Issue 23
To: ns-users@ISI.EDU
Date: Saturday, June 25, 2011, 3:26 AM



Hi,
I am using ns-allinone-2.34 with Cygwin. When i run make It shows an
error:

Makefile: *** commands commence before the first target. Stop

I am unable to understand the source of error as the Makefile or Makefile.in
has not been changed by me.

Please help...

-- 
Shaktijeet Mahapatra