LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   tcl script for VBR traffic (https://www.linuxquestions.org/questions/linux-newbie-8/tcl-script-for-vbr-traffic-4175534576/)

Chinmayi 02-19-2015 10:34 PM

tcl script for VBR traffic
 
how to write tcl script for VBR traffic

knudfl 02-20-2015 05:19 AM

Welcome to LQ.

https://www.google.com/webhp?hl=all&...l=en&q=ns2+vbr

Example : vbr-normal.tcl
http://code.google.com/p/txsys/sourc...vbr-normal.tcl

VBR info ....
. http://www.linuxquestions.org/questions/tags/vbr/
. https://groups.google.com/forum/?fro.../vbr|sort:date
. http://network-simulator-ns-2.7690.n...=vbr&sort=date

Ns2 doc http://www.isi.edu/nsnam/ns/doc/
. http://csis.bits-pilani.ac.in/facult...orials/ns2.htm
. https://www.google.com/webhp?hl=all&...w+to+write+tcl
. http://www.isi.edu/nsnam/ns/tutorial/nsscript1.html

-

Chinmayi 02-20-2015 10:08 AM

Is this the correct code for generating VBR Traffic
 
set vbr [new Application/Traffic/VBR]
$vbr set rate_ 448Kb
$vbr set rate_dev_ 0.25
$vbr set rate_time_ 2.0
$vbr set burst_time_ 1.0
$vbr set n_o_changes_ 10
$vbr set time_dev_ 0.5
$vbr set constant_ false
$vbr set maxrate_ 648Kb
$vbr set packetSize_ 210
$vbr set maxpkts_ 268435456
I have got this code from http://ns2blogger.blogspot.in/2014/0...tation-in.html
I am using NS-2.35 Version

knudfl 02-20-2015 07:23 PM

← ref. #3.

http://ns2blogger.blogspot.in/2014/0...tation-in.html
.. is incomplete. Seems based on
http://code.google.com/p/txsys/sourc...ate%253Dclosed
→ $ svn checkout http://txsys.googlecode.com/svn/trunk/ txsys-read-only
→ txsys-read-only/ubiquitous/ns2/src/{ .., .., vbr_traffic.cc },
txsys-read-only/ubiquitous/ns2/vbr/ \
{ cbr-sim.tcl, vbr-expo.tcl, vbr-normal.tcl, vbr.plot, vbr-uniform.tcl }.


Quote:

Is this the correct code for generating VBR Traffic
I have no idea. Is for you to try out. Then please post again if any issues.


-

Chinmayi 02-21-2015 05:56 AM

Is VBR Traffic and Exponential traffic same?
what are Makefile.in & vbr_traffic.o?
Where can we get them? How to Include vbr_traffic.o in Makefile.in?

knudfl 02-21-2015 06:56 AM

← ref. #3.
Quote:

what are Makefile.in & vbr_traffic.o ?
Makefile.in is used for generating the Makefile.
`vbr_traffic.o´ is an object file.
→ Is the compiled result from vbr_traffic.cc
→ And is linked together with ~400 other objects, into one file : ns.

Please do :
$ svn checkout http://txsys.googlecode.com/svn/trunk/ txsys-read-only
... to get ( also ) ....
txsys-read-only/ubiquitous/ns2/{ Makefile.in, src/vbr_traffic.cc }


Quote:

Is VBR Traffic and Exponential traffic same ?
Please look it up →
https://www.google.com/webhp?hl=all&...l=en&q=ns2+vbr


-

Chinmayi 02-21-2015 07:48 AM

How to include vbr_traffic.cc in Makefile.in

knudfl 02-21-2015 08:31 AM

← ref. #7.

» include vbr_traffic.cc in Makefile.in « : Read the link in your post #3 :
"" 1. Include vbr_traffic.o in Makefile.in "".
I.e. files.cc are not mentioned in a Makefile*. The objects to be created are.

Makefile.in is a text file. Easy to read. Or use 'grep' :
Code:

$ cd txsys-read-only/ubiquitous/ns2/
$ grep -n vbr_traffic.o Makefile.in
179:    tools/expoo.o tools/cbr_traffic.o tools/vbr_traffic.o \

The number, '179' is the line number.
Which you can see in your Editor, when opening Makefile.in for reading.
.... So nothing to add ! vbr_traffic.o is already present.


-

Chinmayi 02-21-2015 09:14 AM

the Makefile in my NS-2.35 has a little difference in code when compared to the Makefile in http://txsys.googlecode.com/svn/trun...s2/Makefile.in. Should I repalce the original with this new one?

knudfl 02-21-2015 10:17 AM

← ref. #9.
Quote:

Makefile.in
.
Should I repalce the original
No. Just add the object to the ns-2.35/Makefile.in :
<TAB>tools/expoo.o tools/cbr_traffic.o tools/vbr_traffic.o \
... and make sure that vbr_traffic.cc is in tools/.

And then run ./install in the top directory ns-allinone-2.35/.


-

Chinmayi 02-21-2015 11:51 AM

what is "Run make depend in ns-allinone-2.35"?How is this done?

knudfl 02-21-2015 05:36 PM

← ref. #11.

All commands are done from the script ns-allinone-2.35/install :
That's the command $ ./install

"install" is a text file, see the ns-2.35 section, lines 531-553,
if you are using the 2011 version ns-allinone-2.35.tar.gz .
If it's the updated version, 2014 : Then the lines 578-587.
Conclusion : The way to run 'make' is $ ./install

Besides that, ./configure && make clean && make doesn't work in ns-2.35.
That was for the earlier ns2 versions.
Also : Saved some time when just running 'make'.
Old slow computer could use ~15 minutes for ./install.
Not an issue with a modern computer.


'make depend' is done automatically in the right way with ./install,
which runs 'make' in ns-2.35/.
A manual 'make depend' has never been attempted.
Somebody wrote 'make depend' many years ago.
And all the young students just repeat it in their texts.
→ → Don't believe everything you read on the Internet.


-

Chinmayi 02-21-2015 09:54 PM

My Makefile is:


#
# Copyright (c) 1991,1993 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the Computer Systems
# Engineering Group at Lawrence Berkeley Laboratory.
# 4. Neither the name of the University nor of the Laboratory may be used
# to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# @(#) $Header: /cvsroot/nsnam/nam-1/Makefile.in,v 1.54 2011/11/02 16:31:26 tom_henderson Exp $
#
Code:

# Top level hierarchy
prefix = @prefix@
exec_prefix = @exec_prefix@
# Pathname of directory to install the binary
BINDEST = @bindir@
# Pathname of directory to install the man page
MANDEST = @mandir@
# Define datarootdir as of autoconf 2.60
datarootdir = @datarootdir@

CC = @CC@
CPP = @CXX@
CCOPT = @V_CCOPT@
MKDEP = ./conf/mkdep
# Have to be the same as that defined in conf/makefile.win
TCL2C = @V_TCL2CPP@
TCLSH = @V_TCLSH@

#
# Remember to add a dependency if you add any tcl sources here.
#
LIB =  \
        @V_LIBS@ \
        @V_LIB_X11@ \
        @V_LIB@ -lm @LIBS@
INCLUDE = \
        -I. @V_INCLUDES@ \
        @V_INCLUDE_X11@

STATIC = @V_STATIC@
DEFINE = -DTCL_TK -DNO_VOID @V_DEFINE@ @V_DEFINES@
CFLAGS = $(CCOPT) $(DEFINE) $(INCLUDE)

INSTALL = @INSTALL@
RANLIB = @V_RANLIB@

BLANK        = # make a blank space.  DO NOT add anything to this line
AR        = ar rc $(BLANK)
LINK        = $(CPP)
LDFLAGS        =
LDOUT        = -o $(BLANK)
PERL        = perl
RM        = rm -f

# Explicitly define compilation rules since SunOS 4's make doesn't like gcc.
# Also, gcc does not remove the .o before forking 'as', which can be a
# problem if you don't own the file but can write to the directory.
.SUFFIXES: .cc $(.SUFFIXES)

.cc.o:
        rm -f $@; $(CPP) -o $@ -c $(CFLAGS) $*.cc

.c.o:
        rm -f $@; $(CC) -o $@ -c $(CFLAGS) $*.c

GEN_DIR = gen/
NAM        = nam

# WIN32: uncomment the following line to include specific make for VC++
# !include <conf/makefile.win>

OBJ_C = tkcompat.o tkUnixInit.o xwd.o

OBJ_CC = \
        netview.o netmodel.o edge.o packet.o node.o main.o \
        trace.o queue.o drop.o animation.o agent.o feature.o \
        route.o transform.o paint.o state.o monitor.o anetmodel.o \
        rng.o view.o graphview.o netgraph.o tracehook.o \
        lan.o psview.o group.o editview.o tag.o address.o animator.o \
        wnetmodel.o nam_stream.o enetmodel.o testview.o parser.o \
        trafficsource.o lossmodel.o queuehandle.o

OBJ_GEN = \
        $(GEN_DIR)version.o $(GEN_DIR)nam_tcl.o
SRC_GEN = \
        $(GEN_DIR)version.c $(GEN_DIR)nam_tcl.cc

OBJ =        $(OBJ_C) $(OBJ_CC) $(OBJ_GEN)
SRC =        $(OBJ_C:.o=.c) $(OBJ_CC:.o=.cc)

CLEANFILES = $(NAM) $(OBJ) $(SRC_GEN) core core.nam

NAM_TCL_LIB = \
        tcl/nam-lib.tcl \
        tcl/nam-default.tcl \
        tcl/balloon.tcl \
        tcl/snapshot.tcl \
        tcl/animator.tcl \
        tcl/anim-ctrl.tcl \
        tcl/netModel.tcl \
        tcl/autoNetModel.tcl \
        tcl/build-ui.tcl \
        tcl/annotation.tcl \
        tcl/node.tcl \
        tcl/monitor.tcl \
        tcl/stats.tcl \
        tcl/www.tcl \
        tcl/menu_file.tcl \
        tcl/menu_view.tcl \
  tcl/NamgraphView.tcl \
  tcl/NamgraphModel.tcl \
  tcl/TimesliderNamgraphView.tcl \
  tcl/TimesliderView.tcl \
  tcl/TimesliderModel.tcl \
  tcl/observer.tcl \
  tcl/observable.tcl \
  tcl/wirelessNetModel.tcl \
  tcl/editorNetModel.tcl \
  tcl/Editor.tcl \
  tcl/Editor-FileParser.tcl

$(NAM):        $(OBJ) $(SCRYOBJ) Makefile
        $(RM) $@
        $(LINK) $(STATIC) $(LDFLAGS) $(LDOUT)$@ \
                $(OBJ) $(SCRYOBJ) $(LIB)

Makefile: Makefile.in
        @echo "Makefile.in is newer than Makefile."
        @echo "You need to re-run configure."
        false

$(GEN_DIR)nam_tcl.cc: $(NAM_TCL_LIB)
        $(RM) $@
        $(TCLSH) bin/tcl-expand.tcl tcl/nam-lib.tcl | $(TCL2C) et_nam > $@

$(GEN_DIR)version.c: VERSION
        $(RM) $@
        $(TCLSH) bin/string2c.tcl version < VERSION > $@

install: force
        $(INSTALL) -m 755 nam $(DESTDIR)$(BINDEST)

clean:
        $(RM) $(CLEANFILES)

distclean:
        $(RM) $(CLEANFILES) Makefile config.cache config.log config.status

tar:        force
        tar=$(TAR_PREFIX)-nam-`cat VERSION`.tar.gz ; \
        rm -f $$tar ; \
        tar cfhF -  $(TAR) | gzip -c > $$tar

depend: $(SRC)
        $(MKDEP) $(CFLAGS) $(SRC)

srctar:
        @cwd=`pwd` ; dir=`basename $$cwd` ; \
            name=nam-`cat VERSION | tr A-Z a-z` ; \
            tar=nam-src-`cat VERSION`.tar.gz ; \
            list="" ; \
            for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
            echo \
            "(rm -f $$tar; cd .. ; ln -s $$dir $$name)" ; \
            (rm -f $$tar; cd .. ; ln -s $$dir $$name) ; \
            echo \
            "(cd .. ; tar cfhz $$tar [lots of files])" ; \
            (cd .. ; tar cfhz - $$list) > $$tar ; \
            echo \
            "rm ../$$name; chmod 444 $$tar" ;  \
            rm ../$$name; chmod 444 $$tar

force:

# Create makefile.vc for Win32 development by replacing:
# "# !include ..."        ->        "!include ..."
makefile.vc: Makefile.in
        $(PERL) bin/gen-vcmake.pl < Makefile.in > makefile.vc
#        $(PERL) -pe 's/^# (\!include)/\!include/o' < Makefile.in > makefile.vc





Where should I include tools/vbr_traffic.o\?

Chinmayi 02-22-2015 03:13 AM

1 Attachment(s)
Ihave run the command ./install
But I am getting some error
Ihave attached the screenshot of the error
Please suggest the solution

knudfl 02-22-2015 04:00 AM

← ref. post #13.

Not Makefile, but 204 random lines from the Makefile.in .
The valid Makefile.in, ns-2.35 has 625 lines.
* Code like post #13 must be in CODE tags.
You can see how code tags look like in post #8.
Please edit post #13 to code tags, or delete the most ..
. http://www.linuxquestions.org/questi....php?do=bbcode
. http://www.linuxquestions.org/questi...gs-4175464257/
I.e. it's the ` # ´ button in the 'Advanced Editor'.
Editing : The 'Edit' button → → "Go Advanced".
.. Or you can type [/code] at code end, and [code] at code text start.


← post #14 : You have missing "ns2 prerequisites".
Which OS are you using ? Name and version, please.

Prerequsites, Ubuntu : $ sudo apt-get install \
g++ g++-4.4 automake patch make libtool libxmu-dev xgraph

Fedora, CentOS :
# yum install gcc-c++ autoconf automake patch make libtool libXmu-devel


-

Chinmayi 02-22-2015 04:54 AM

Is this the correct Makefile.in


# Copyright (c) 1994, 1995, 1996
# The Regents of the University of California. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that: (1) source code distributions
# retain the above copyright notice and this paragraph in its entirety, (2)
# distributions including binary code include the above copyright notice and
# this paragraph in its entirety in the documentation or other materials
# provided with the distribution, and (3) all advertising materials mentioning
# features or use of this software display the following acknowledgement:
# ``This product includes software developed by the University of California,
# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
# the University nor the names of its contributors may be used to endorse
# or promote products derived from this software without specific prior
# written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# @(#) $Header: 2002/10/09 15:34:11

#
# Various configurable paths (remember to edit Makefile.in, not Makefile)
#
Code:

# Top level hierarchy
prefix        = @prefix@
# Pathname of directory to install the binary
BINDEST        = @prefix@/bin
# Pathname of directory to install the man page
MANDEST        = @prefix@/man

BLANK        = # make a blank space.  DO NOT add anything to this line

# The following will be redefined under Windows (see WIN32 lable below)
CC        = @CC@
CPP        = @CXX@
LINK        = $(CPP)
LINK_SHLIB = @SHLIB_LD@
MKDEP        = ./conf/mkdep
TCLSH        = @V_TCLSH@
TCL2C        = @V_TCL2CPP@
AR        = ar rc $(BLANK)

RANLIB        = @V_RANLIB@
INSTALL        = @INSTALL@
LN        = ln
TEST        = test
RM        = rm -f
MV      = mv
PERL        = @PERL@

# for diffusion
#DIFF_INCLUDES = "./diffusion3/main ./diffusion3/lib ./diffusion3/nr ./diffusion3/ns"

CCOPT        = @V_CCOPT@
STATIC        = @V_STATIC@
#LDFLAGS        = $(STATIC)
LDFLAGS        = @LDFLAGS@
LDOUT        = -o $(BLANK)

DEFINE        = -DTCP_DELAY_BIND_ALL -DNO_TK @V_DEFINE@ @V_DEFINES@ @DEFS@ -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=@CPP_NAMESPACE@ -DUSE_SINGLE_ADDRESS_SPACE -Drng_test

INCLUDES = \
        -I. @V_INCLUDE_X11@ \
        -I. \
        @V_INCLUDES@ \
        -I./tcp -I./sctp -I./common -I./link -I./queue \
        -I./adc -I./apps -I./mac -I./mobile -I./trace \
        -I./routing -I./tools -I./classifier -I./mcast \
        -I./diffusion3/lib/main -I./diffusion3/lib \
        -I./diffusion3/lib/nr -I./diffusion3/ns \
        -I./diffusion3/filter_core -I./asim/ -I./qs \
        -I./diffserv -I./satellite \
        -I./wpan


LIB        = \
        @V_LIBS@ \
        @V_LIB_X11@ \
        @V_LIB@ \
        -lm @LIBS@
#        -L@libdir@ \

CFLAGS        += $(CCOPT) $(DEFINE)

# Explicitly define compilation rules since SunOS 4's make doesn't like gcc.
# Also, gcc does not remove the .o before forking 'as', which can be a
# problem if you don't own the file but can write to the directory.
.SUFFIXES: .cc        # $(.SUFFIXES)

.cc.o:
        @rm -f $@
        $(CPP) -c $(CFLAGS) $(INCLUDES) -o $@ $*.cc

.c.o:
        @rm -f $@
        $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $*.c


GEN_DIR        = gen/
LIB_DIR        = lib/
NS        = ns
NSLIB  = @NSLIB@
NSX        = nsx
NSE        = nse
NSTK = nstk

# To allow conf/makefile.win overwrite this macro
# We will set these two macros to empty in conf/makefile.win since VC6.0
# does not seem to support the STL in gcc 2.8 and up.
OBJ_STL = diffusion3/lib/nr/nr.o diffusion3/lib/dr.o \
        diffusion3/filters/diffusion/one_phase_pull.o \
        diffusion3/filters/diffusion/two_phase_pull.o \
        diffusion3/lib/diffapp.o \
        diffusion3/ns/diffagent.o diffusion3/ns/diffrtg.o \
        diffusion3/ns/difftimer.o \
        diffusion3/filter_core/filter_core.o \
        diffusion3/filter_core/iolog.o \
        diffusion3/filter_core/iostats.o \
        diffusion3/lib/main/attrs.o \
        diffusion3/lib/main/events.o \
        diffusion3/lib/main/iodev.o \
        diffusion3/lib/main/iohook.o \
        diffusion3/lib/main/timers.o \
        diffusion3/lib/main/message.o \
        diffusion3/lib/main/tools.o \
        diffusion3/apps/gear_examples/gear_common.o \
        diffusion3/apps/gear_examples/gear_receiver.o \
        diffusion3/apps/gear_examples/gear_sender.o \
        diffusion3/apps/rmst_examples/rmst_sink.o \
        diffusion3/apps/rmst_examples/rmst_source.o \
        diffusion3/apps/ping/1pp_ping_sender.o \
        diffusion3/apps/ping/1pp_ping_receiver.o \
        diffusion3/apps/ping/2pp_ping_sender.o \
        diffusion3/apps/ping/2pp_ping_receiver.o \
        diffusion3/apps/ping/ping_common.o \
        diffusion3/apps/ping/push_receiver.o \
        diffusion3/apps/ping/push_sender.o \
        diffusion3/filters/gear/gear_attr.o \
        diffusion3/filters/gear/gear.o \
        diffusion3/filters/gear/gear_tools.o \
        diffusion3/filters/misc/log.o \
        diffusion3/filters/misc/srcrt.o \
        diffusion3/filters/misc/tag.o \
        diffusion3/filters/rmst/rmst.o \
        diffusion3/filters/rmst/rmst_filter.o \
        delaybox/delaybox.o \
        packmime/packmime_HTTP.o packmime/packmime_HTTP_rng.o \
        packmime/packmime_OL.o packmime/packmime_OL_ranvar.o\
        packmime/packmime_ranvar.o

NS_TCL_LIB_STL = tcl/lib/ns-diffusion.tcl \
        tcl/delaybox/delaybox.tcl \
        tcl/packmime/packmime.tcl


# WIN32: uncomment the following line to include specific make for VC++
# !include <conf/makefile.win>

OBJ_CC = \
        tools/random.o tools/rng.o tools/ranvar.o common/misc.o common/timer-handler.o \
        common/scheduler.o common/object.o common/packet.o \
        common/ip.o routing/route.o common/connector.o common/ttl.o \
        trace/trace.o trace/trace-ip.o \
        classifier/classifier.o classifier/classifier-addr.o \
        classifier/classifier-hash.o \
        classifier/classifier-virtual.o \
        classifier/classifier-mcast.o \
        classifier/classifier-bst.o \
        classifier/classifier-mpath.o mcast/replicator.o \
        classifier/classifier-mac.o \
        classifier/classifier-qs.o \
        classifier/classifier-port.o src_rtg/classifier-sr.o \
        src_rtg/sragent.o src_rtg/hdr_src.o adc/ump.o \
        qs/qsagent.o qs/hdr_qs.o \
        apps/app.o apps/telnet.o tcp/tcplib-telnet.o \
        tools/trafgen.o trace/traffictrace.o tools/pareto.o \
        tools/expoo.o tools/cbr_traffic.o tools/vbr_traffic.o \
        adc/tbf.o adc/resv.o adc/sa.o tcp/saack.o \
        tools/measuremod.o adc/estimator.o adc/adc.o adc/ms-adc.o \
        adc/timewindow-est.o adc/acto-adc.o \
        adc/pointsample-est.o adc/salink.o adc/actp-adc.o \
        adc/hb-adc.o adc/expavg-est.o\
        adc/param-adc.o adc/null-estimator.o \
        adc/adaptive-receiver.o apps/vatrcvr.o adc/consrcvr.o \
        common/agent.o common/message.o apps/udp.o \
        common/session-rtp.o apps/rtp.o tcp/rtcp.o \
        common/ivs.o \
        common/messpass.o common/tp.o common/tpm.o apps/worm.o \
        tcp/tcp.o tcp/tcp-sink.o tcp/tcp-reno.o \
        tcp/tcp-newreno.o \
        tcp/tcp-vegas.o tcp/tcp-rbp.o tcp/tcp-full.o tcp/rq.o \
        baytcp/tcp-full-bay.o baytcp/ftpc.o baytcp/ftps.o \
        tcp/scoreboard.o tcp/scoreboard-rq.o tcp/tcp-sack1.o tcp/tcp-fack.o \
        tcp/linux/tcp_naivereno.o\
        tcp/linux/src/tcp_cong.o\
        tcp/linux/src/tcp_highspeed.o tcp/linux/src/tcp_bic.o tcp/linux/src/tcp_htcp.o tcp/linux/src/tcp_scalable.o tcp/linux/src/tcp_cubic.o\
        tcp/linux/src/tcp_westwood.o tcp/linux/src/tcp_vegas.o tcp/linux/src/tcp_hybla.o\
        tcp/linux/src/tcp_illinois.o tcp/linux/src/tcp_yeah.o \
        tcp/linux/src/tcp_veno.o tcp/linux/src/tcp_compound.o tcp/linux/src/tcp_lp.o\
        tcp/scoreboard1.o tcp/tcp-linux.o tcp/linux/ns-linux-util.o tcp/linux/ns-linux-c.o tcp/linux/ns-linux-param.o\
        tcp/tcp-asym.o tcp/tcp-asym-sink.o tcp/tcp-fs.o \
        tcp/tcp-asym-fs.o \
        tcp/tcp-int.o tcp/chost.o tcp/tcp-session.o \
        tcp/nilist.o \
        sctp/sctp.o apps/sctp_app1.o\
        sctp/sctp-timestamp.o sctp/sctp-hbAfterRto.o \
        sctp/sctp-multipleFastRtx.o sctp/sctp-mfrHbAfterRto.o \
        sctp/sctp-mfrTimestamp.o \
        sctp/sctp-cmt.o \
        sctp/sctpDebug.o \
        tools/integrator.o tools/queue-monitor.o \
        tools/flowmon.o tools/loss-monitor.o \
        queue/queue.o queue/drop-tail.o \
        adc/simple-intserv-sched.o queue/red.o \
        queue/semantic-packetqueue.o queue/semantic-red.o \
        tcp/ack-recons.o \
        queue/sfq.o queue/fq.o queue/drr.o queue/srr.o queue/cbq.o \
        queue/jobs.o queue/marker.o queue/demarker.o \
        link/hackloss.o queue/errmodel.o queue/fec.o\
        link/delay.o tcp/snoop.o \
        gaf/gaf.o \
        link/dynalink.o routing/rtProtoDV.o common/net-interface.o \
        mcast/ctrMcast.o mcast/mcast_ctrl.o mcast/srm.o \
        common/sessionhelper.o queue/delaymodel.o \
        mcast/srm-ssm.o mcast/srm-topo.o \
        routing/alloc-address.o routing/address.o \
        $(LIB_DIR)int.Vec.o $(LIB_DIR)int.RVec.o \
        $(LIB_DIR)dmalloc_support.o \
        webcache/http.o webcache/tcp-simple.o webcache/pagepool.o \
        webcache/inval-agent.o webcache/tcpapp.o webcache/http-aux.o \
        webcache/mcache.o webcache/webtraf.o \
        webcache/webserver.o \
        webcache/logweb.o \
        empweb/empweb.o \
        empweb/empftp.o \
        realaudio/realaudio.o \
        mac/lanRouter.o classifier/filter.o \
        common/pkt-counter.o \
        common/Decapsulator.o common/Encapsulator.o \
        common/encap.o \
        mac/channel.o mac/mac.o mac/ll.o mac/mac-802_11.o \
        mac/mac-802_11Ext.o \
        mac/mac-802_3.o mac/mac-tdma.o mac/smac.o \
        mobile/mip.o mobile/mip-reg.o mobile/gridkeeper.o \
        mobile/propagation.o mobile/tworayground.o \
        mobile/nakagami.o \
        mobile/antenna.o mobile/omni-antenna.o \
        mobile/shadowing.o mobile/shadowing-vis.o mobile/dumb-agent.o \
        common/bi-connector.o common/node.o \
        common/mobilenode.o \
        mac/arp.o mobile/god.o mobile/dem.o \
        mobile/topography.o mobile/modulation.o \
        queue/priqueue.o queue/dsr-priqueue.o \
        mac/phy.o mac/wired-phy.o mac/wireless-phy.o \
        mac/wireless-phyExt.o \
        mac/mac-timers.o trace/cmu-trace.o mac/varp.o \
        mac/mac-simple.o \
        satellite/sat-hdlc.o \
        dsdv/dsdv.o dsdv/rtable.o queue/rtqueue.o \
        routing/rttable.o \
        imep/imep.o imep/dest_queue.o imep/imep_api.o \
        imep/imep_rt.o imep/rxmit_queue.o imep/imep_timers.o \
        imep/imep_util.o imep/imep_io.o \
        tora/tora.o tora/tora_api.o tora/tora_dest.o \
        tora/tora_io.o tora/tora_logs.o tora/tora_neighbor.o \
        dsr/dsragent.o dsr/hdr_sr.o dsr/mobicache.o dsr/path.o \
        dsr/requesttable.o dsr/routecache.o dsr/add_sr.o \
        dsr/dsr_proto.o dsr/flowstruct.o dsr/linkcache.o \
        dsr/simplecache.o dsr/sr_forwarder.o \
        aodv/aodv_logs.o aodv/aodv.o \
        aodv/aodv_rtable.o aodv/aodv_rqueue.o \
        common/ns-process.o \
        satellite/satgeometry.o satellite/sathandoff.o \
        satellite/satlink.o satellite/satnode.o \
        satellite/satposition.o satellite/satroute.o \
        satellite/sattrace.o \
        rap/raplist.o rap/rap.o rap/media-app.o rap/utilities.o \
        common/fsm.o tcp/tcp-abs.o \
        diffusion/diffusion.o diffusion/diff_rate.o diffusion/diff_prob.o \
        diffusion/diff_sink.o diffusion/flooding.o diffusion/omni_mcast.o \
        diffusion/hash_table.o diffusion/routing_table.o diffusion/iflist.o \
        tcp/tfrc.o tcp/tfrc-sink.o mobile/energy-model.o apps/ping.o tcp/tcp-rfc793edu.o \
        queue/rio.o queue/semantic-rio.o tcp/tcp-sack-rh.o tcp/scoreboard-rh.o \
        plm/loss-monitor-plm.o plm/cbr-traffic-PP.o \
        linkstate/hdr-ls.o \
        mpls/classifier-addr-mpls.o mpls/ldp.o mpls/mpls-module.o \
        routing/rtmodule.o classifier/classifier-hier.o \
        routing/addr-params.o \
        nix/hdr_nv.o nix/classifier-nix.o \
        nix/nixnode.o \
        routealgo/rnode.o \
        routealgo/bfs.o \
        routealgo/rbitmap.o \
        routealgo/rlookup.o \
        routealgo/routealgo.o \
        nix/nixvec.o \
        nix/nixroute.o \
        diffserv/dsred.o diffserv/dsredq.o \
        diffserv/dsEdge.o diffserv/dsCore.o \
        diffserv/dsPolicy.o diffserv/ew.o diffserv/dewp.o \
        queue/red-pd.o queue/pi.o queue/vq.o queue/rem.o \
        queue/gk.o \
        pushback/rate-limit.o pushback/rate-limit-strategy.o \
        pushback/ident-tree.o pushback/agg-spec.o \
        pushback/logging-data-struct.o \
        pushback/rate-estimator.o \
        pushback/pushback-queue.o pushback/pushback.o \
        common/parentnode.o trace/basetrace.o \
        common/simulator.o asim/asim.o \
        common/scheduler-map.o common/splay-scheduler.o \
        linkstate/ls.o linkstate/rtProtoLS.o \
        pgm/classifier-pgm.o pgm/pgm-agent.o pgm/pgm-sender.o \
        pgm/pgm-receiver.o mcast/rcvbuf.o \
        mcast/classifier-lms.o mcast/lms-agent.o mcast/lms-receiver.o \
        mcast/lms-sender.o \
        queue/delayer.o \
        xcp/xcpq.o xcp/xcp.o xcp/xcp-end-sys.o \
        wpan/p802_15_4csmaca.o wpan/p802_15_4fail.o \
        wpan/p802_15_4hlist.o wpan/p802_15_4mac.o \
        wpan/p802_15_4nam.o wpan/p802_15_4phy.o \
        wpan/p802_15_4sscs.o wpan/p802_15_4timer.o \
        wpan/p802_15_4trace.o wpan/p802_15_4transac.o \
        apps/pbc.o \
        src/mflood/mflood.o src/mflood/mflood-seqtable.o \
        src/noah/noah.o \
        @V_STLOBJ@


# don't allow comments to follow continuation lines

#  mac-csma.o mac-multihop.o\
#        sensor-nets/landmark.o mac-simple-wireless.o \
#        sensor-nets/tags.o sensor-nets/sensor-query.o \
#        sensor-nets/flood-agent.o \

# what was here before is now in emulate/

OBJ_C =

OBJ_COMPAT = $(OBJ_GETOPT) common/win32.o
#XXX compat/win32x.o compat/tkConsole.o

OBJ_EMULATE_CC = \
        emulate/net-ip.o \
        emulate/net.o \
        emulate/tap.o \
        emulate/ether.o \
        emulate/internet.o \
        emulate/ping_responder.o \
        emulate/arp.o \
        emulate/icmp.o \
        emulate/net-pcap.o \
        emulate/nat.o  \
        emulate/iptap.o \
        emulate/tcptap.o

OBJ_EMULATE_C = \
        emulate/inet.o

OBJ_GEN = $(GEN_DIR)version.o $(GEN_DIR)ns_tcl.o $(GEN_DIR)ptypes.o

SRC =        $(OBJ_C:.o=.c) $(OBJ_CC:.o=.cc) \
        $(OBJ_EMULATE_C:.o=.c) $(OBJ_EMULATE_CC:.o=.cc) \
        common/tclAppInit.cc common/tkAppInit.cc

OBJ =        $(OBJ_C) $(OBJ_CC) $(OBJ_GEN) $(OBJ_COMPAT)

CLEANFILES = ns nse nsx ns.dyn $(OBJ) $(OBJ_EMULATE_CC) \
        $(OBJ_EMULATE_C) common/tclAppInit.o \
        common/tkAppInit.o nstk \
        $(GEN_DIR)* $(NS).core core core.$(NS) core.$(NSX) core.$(NSE) \
        common/ptypes2tcl common/ptypes2tcl.o

SUBDIRS=\
        indep-utils/cmu-scen-gen/setdest \
        indep-utils/webtrace-conv/dec \
        indep-utils/webtrace-conv/epa \
        indep-utils/webtrace-conv/nlanr \
        indep-utils/webtrace-conv/ucb

BUILD_NSE = @build_nse@

all: $(NS) $(BUILD_NSE) $(NSTK) all-recursive Makefile


all-recursive:
        for i in $(SUBDIRS); do ( cd $$i; $(MAKE) all; ) done




ifeq ($(NSLIB),libns.dll)

# This is for cygwin

NS_CPPFLAGS = -DNSLIBNAME=\"$(NSLIB)\"
NS_LIBS =  @DL_LIBS@

$(NSLIB): $(OBJ) common/tclAppInit.o
        $(LINK) -shared $(LDFLAGS) \
                $(LDOUT)$@  \
                -Wl,--export-all-symbols \
                -Wl,--enable-auto-import \
                -Wl,--out-implib=$@.a \
                -Wl,--whole-archive $^ \
                -Wl,--no-whole-archive @V_IMPORT_LIBS@

$(NS): $(NSLIB) common/main-modular.cc
        $(LINK) $(NS_CPPFLAGS) $(LDFLAGS) $(LDOUT)$@ common/main-modular.cc $(NS_LIBS)

else

# default for all systems but cygwin

$(NS): $(OBJ) common/tclAppInit.o common/main-monolithic.o
        $(LINK) $(LDFLAGS) $(LDOUT)$@ $^ $(LIB)

endif



Makefile: Makefile.in
        @echo "Makefile.in is newer than Makefile."
        @echo "You need to re-run configure."
        false

$(NSE): $(OBJ) common/tclAppInit.o common/main-monolithic.o $(OBJ_EMULATE_CC) $(OBJ_EMULATE_C)
        $(LINK) $(LDFLAGS) $(LDOUT)$@ $^ $(LIB)

$(NSTK): $(OBJ) common/tkAppInit.o
        $(LINK) $(LDFLAGS) $(LDOUT)$@ $^ $(LIB)

ns.dyn: $(OBJ) common/tclAppInit.o common/main-monolithic.o
        $(LINK) $(LDFLAGS) -o $@ $^ $(LIB)

PURIFY        = purify -cache-dir=/tmp
ns-pure: $(OBJ) common/tclAppInit.o common/main-monolithic.o
        $(PURIFY) $(LINK) $(LDFLAGS) -o $@ $^ $(LIB)

NS_TCL_LIB = \
        tcl/lib/ns-compat.tcl \
        tcl/lib/ns-default.tcl \
        tcl/lib/ns-errmodel.tcl \
        tcl/lib/ns-lib.tcl \
        tcl/lib/ns-link.tcl \
        tcl/lib/ns-mobilenode.tcl \
        tcl/lib/ns-sat.tcl \
        tcl/lib/ns-cmutrace.tcl \
        tcl/lib/ns-node.tcl \
        tcl/lib/ns-rtmodule.tcl \
        tcl/lib/ns-hiernode.tcl \
        tcl/lib/ns-packet.tcl \
        tcl/lib/ns-queue.tcl \
        tcl/lib/ns-source.tcl \
        tcl/lib/ns-nam.tcl \
        tcl/lib/ns-trace.tcl \
        tcl/lib/ns-agent.tcl \
        tcl/lib/ns-random.tcl \
        tcl/lib/ns-namsupp.tcl \
        tcl/lib/ns-address.tcl \
        tcl/lib/ns-intserv.tcl \
        tcl/lib/ns-autoconf.tcl \
        tcl/rtp/session-rtp.tcl \
        tcl/lib/ns-mip.tcl \
        tcl/rtglib/dynamics.tcl \
        tcl/rtglib/route-proto.tcl \
        tcl/rtglib/algo-route-proto.tcl \
        tcl/rtglib/ns-rtProtoLS.tcl \
        tcl/interface/ns-iface.tcl \
        tcl/mcast/BST.tcl \
        tcl/mcast/ns-mcast.tcl \
        tcl/mcast/McastProto.tcl \
        tcl/mcast/DM.tcl \
        tcl/mcast/srm.tcl \
        tcl/mcast/srm-adaptive.tcl \
        tcl/mcast/srm-ssm.tcl \
        tcl/mcast/timer.tcl \
        tcl/mcast/McastMonitor.tcl \
        tcl/mobility/dsdv.tcl \
        tcl/mobility/dsr.tcl \
        tcl/ctr-mcast/CtrMcast.tcl \
        tcl/ctr-mcast/CtrMcastComp.tcl \
        tcl/ctr-mcast/CtrRPComp.tcl \
        tcl/rlm/rlm.tcl \
        tcl/rlm/rlm-ns.tcl \
        tcl/session/session.tcl \
        tcl/lib/ns-route.tcl \
        tcl/emulate/ns-emulate.tcl \
        tcl/lan/vlan.tcl \
        tcl/lan/abslan.tcl \
        tcl/lan/ns-ll.tcl \
        tcl/lan/ns-mac.tcl \
        tcl/webcache/http-agent.tcl \
        tcl/webcache/http-server.tcl \
        tcl/webcache/http-cache.tcl \
        tcl/webcache/http-mcache.tcl \
        tcl/webcache/webtraf.tcl \
        tcl/webcache/empweb.tcl \
        tcl/webcache/empftp.tcl \
        tcl/plm/plm.tcl \
        tcl/plm/plm-ns.tcl \
        tcl/plm/plm-topo.tcl \
        tcl/mpls/ns-mpls-classifier.tcl \
        tcl/mpls/ns-mpls-ldpagent.tcl \
        tcl/mpls/ns-mpls-node.tcl \
        tcl/mpls/ns-mpls-simulator.tcl \
        tcl/lib/ns-pushback.tcl \
        tcl/lib/ns-srcrt.tcl \
        tcl/mcast/ns-lms.tcl \
        tcl/lib/ns-qsnode.tcl \
        @V_NS_TCL_LIB_STL@

$(GEN_DIR)ns_tcl.cc: $(NS_TCL_LIB)
        $(TCLSH) bin/tcl-expand.tcl tcl/lib/ns-lib.tcl @V_NS_TCL_LIB_STL@ | $(TCL2C) et_ns_lib > $@

$(GEN_DIR)version.c: VERSION
        $(RM) $@
        $(TCLSH) bin/string2c.tcl version_string < VERSION > $@

$(GEN_DIR)ptypes.cc: common/ptypes2tcl common/packet.h
        ./common/ptypes2tcl > $@

common/ptypes2tcl: common/ptypes2tcl.o
        $(LINK) $(LDFLAGS) $(LDOUT)$@ common/ptypes2tcl.o

common/ptypes2tcl.o: common/ptypes2tcl.cc common/packet.h

dirs:
        for d in $(DESTDIR)$(MANDEST)/man1; do \
                if [ ! -d $$d ]; then \
                        mkdir -p $$d ;\
                fi;\
        done


install: dirs force install-ns install-man

install-ns: force
        $(INSTALL) -m 755 ns $(DESTDIR)$(BINDEST)

install-man: force
        $(INSTALL) -m 644 ns.1 $(DESTDIR)$(MANDEST)/man1

install-recursive: force
        for i in $(SUBDIRS); do ( cd $$i; $(MAKE) install; ) done

clean:
        $(RM) $(CLEANFILES)

AUTOCONF_GEN = tcl/lib/ns-autoconf.tcl
distclean: distclean-recursive
        $(RM) $(CLEANFILES) Makefile config.cache config.log config.status \
            autoconf.h gnuc.h os-proto.h $(AUTOCONF_GEN); \
        $(MV) .configure .configure- ;\
        echo "Moved .configure to .configure-"

distclean-recursive:
        for i in $(SUBDIRS); do ( cd $$i; $(MAKE) clean; $(RM) Makefile; ) done

tags:        force
        ctags -wtd *.cc *.h webcache/*.cc webcache/*.h dsdv/*.cc dsdv/*.h \
        dsr/*.cc dsr/*.h webcache/*.cc webcache/*.h lib/*.cc lib/*.h \
        ../Tcl/*.cc ../Tcl/*.h

TAGS:        force
        etags *.cc *.h webcache/*.cc webcache/*.h dsdv/*.cc dsdv/*.h \
        dsr/*.cc dsr/*.h webcache/*.cc webcache/*.h lib/*.cc lib/*.h \
        ../Tcl/*.cc ../Tcl/*.h

tcl/lib/TAGS:        force
        ( \
                cd tcl/lib; \
                $(TCLSH) ../../bin/tcl-expand.tcl ns-lib.tcl | grep '^### tcl-expand.tcl: begin' | awk '{print $$5}' >.tcl_files; \
                etags --lang=none -r '/^[ \t]*proc[ \t]+\([^ \t]+\)/\1/' `cat .tcl_files`; \
                etags --append --lang=none -r '/^\([A-Z][^ \t]+\)[ \t]+\(instproc\|proc\)[ \t]+\([^ \t]+\)[ \t]+/\1::\3/' `cat .tcl_files`; \
        )

depend: $(SRC)
        $(MKDEP) $(CFLAGS) $(INCLUDES) -- $(SRC) 2>&1 > /dev/null

srctar:
        @cwd=`pwd` ; dir=`basename $$cwd` ; \
            name=ns-`cat VERSION | tr A-Z a-z` ; \
            tar=ns-src-`cat VERSION`.tar.gz ; \
            list="" ; \
            for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
            echo \
            "(rm -f $$tar; cd .. ; ln -s $$dir $$name)" ; \
            (rm -f $$tar; cd .. ; ln -s $$dir $$name) ; \
            echo \
            "(cd .. ; tar cfhz $$tar [lots of files])" ; \
            (cd .. ; tar cfhz - $$list) > $$tar ; \
            echo \
            "rm ../$$name; chmod 444 $$tar" ;  \
            rm ../$$name; chmod 444 $$tar

force:

test:        force
        ./validate

# Create makefile.vc for Win32 development by replacing:
# "# !include ..."        ->        "!include ..."
makefile.vc:        Makefile.in
        $(PERL) bin/gen-vcmake.pl < Makefile.in > makefile.vc
#        $(PERL) -pe 's/^# (\!include)/\!include/o' < Makefile.in > makefile.vc


Chinmayi 02-22-2015 04:58 AM

I am using Ubuntu 12.04
should I install g++ g++-4.4 automake patch make libtool libxmu-dev xgraph

knudfl 02-22-2015 05:07 AM

No answers until you have edited posts #13 and #16.
Code tags ! Or delete the "Makefile.in´s".

And no reason at all to show any Makefile.in´s.
A Makefile.in is unique, can be specified as e.g. ns-2.35/Makefile.in
Or : txsys-read-only/ubiquitous/ns2/Makefile.in

If you edited a line in a Makefile.in :
Show one line, with line number.


-

Chinmayi 02-22-2015 06:06 AM

Code:

OBJ_GEN = \
$(GEN_DIR)version.o $(GEN_DIR)nam_tcl.o
SRC_GEN = \
$(GEN_DIR)version.c $(GEN_DIR)nam_tcl.cc


Chinmayi 02-22-2015 07:21 AM

please tell me what is
g++ g++-4.4 automake patch make libtool libxmu-dev xgraph
I am new to ubuntu and ns2

knudfl 02-22-2015 07:28 AM

Please read posts #15 and #18 ....

You will have to edit posts #13 and #16.

Editing : That's the 'Edit' button.

Chinmayi 02-22-2015 08:02 AM

I have kept the code in posts 13 and 16 in code tags

knudfl 02-22-2015 08:39 AM

← ref. post #20.
Quote:

what is g++ g++-4.4 automake patch make libtool libxmu-dev xgraph
You can use Google to look up all those packages.
Or use the on-line "Ubuntu Search" :
http://packages.ubuntu.com/precise/gcc
The default Ubuntu 12.04 gcc is version 4.6.3 .
The extra gcc/g++ packages for 1204 are : g++-4.4, g++-4.5
http://packages.ubuntu.com/precise/g++-4.4
-----------


HOWTO ns-2.35 + VBR :
$ tar xvf ns-allinone-2.35_gcc482.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ cd ns-allinone-2.35/
$ patch -p0 < vbr_ns235.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ ./install
$ cd ns-2.35/
$ cp ns ns235-vbr
$ sudo cp ns235-vbr /usr/local/bin/

You can copy the folder txsys-read-only/ubiquitous/ns2/vbr/ to any location.
And run the .tcl examples in vbr/ : $ vbr-normal.tcl ,, etc.
Visual : $ xgraph vbr-normal.out

Nam : $ cd ns-allinone-2.35/nam-1.15/ && sudo make install
The nam files will open OK, but no activity : $ nam vbr-normal.nam

About the patch, vbr_ns235.patch : Is a text file, you can read the changes:
ns-2.35/{ Makefile.in, common/package.h, tcl/lib/ns-default.tcl }
( And the added file tools/vbr_traffic.cc : No changes, just added.)


-

knudfl 02-22-2015 09:38 AM

There is a VBR simulation example here ...
http://ns2homeworkforbeginner.blogspot.com/

Will open two xgraph windows, and a nam window with activity.

Uploaded as example-VBR.tcl ...
https://drive.google.com/file/d/0B7S...ew?usp=sharing

Chinmayi 02-22-2015 09:57 AM

Now I should install the below packages:
g++-4.4, automake, patch, make libtool, libxmu-dev, xgraph
Is that true?

I couldnot understand the below part.Please explain me clearly.

HOWTO ns-2.35 + VBR :
$ tar xvf ns-allinone-2.35_gcc482.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ cd ns-allinone-2.35/
$ patch -p0 < vbr_ns235.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ ./install
$ cd ns-2.35/
$ cp ns ns235-vbr
$ sudo cp ns235-vbr /usr/local/bin/

You can copy the folder txsys-read-only/ubiquitous/ns2/vbr/ to any location.
And run the .tcl examples in vbr/ : $ vbr-normal.tcl ,, etc.
Visual : $ xgraph vbr-normal.out

Nam : $ cd ns-allinone-2.35/nam-1.15/ && sudo make install
The nam files will open OK, but no activity : $ nam vbr-normal.nam

About the patch, vbr_ns235.patch : Is a text file, you can read the changes:
ns-2.35/{ Makefile.in, common/package.h, tcl/lib/ns-default.tcl }
( And the added file tools/vbr_traffic.cc : No changes, just added.)

Chinmayi 02-22-2015 10:11 AM

Which architecture should I download: amd64 or i386
The https://launchpad.net/ubuntu/+archivemirrors is showing 373 mirrors. From which, I should download g++-4.4 package?
Please tell me.

knudfl 02-22-2015 12:04 PM

← ref. #26.

Post #17 says : "I am using Ubuntu 12.04".
Please show the reply from the command $ uname -a
And please read post #15 : $ sudo apt-get install \
g++ g++-4.4 automake patch make libtool libxmu-dev xgraph
? Why haven't you done that ?
( No prerequisites installed → no building no ns2 ! )


Quote:

From which, I should download g++-4.4 package ?
You are not supposed to download any Ubuntu packages.
Some packages are available in the application 'Muon Software Center'.
All ~38,000 packages will be visible in Synaptic → →
$ sudo apt-get install synaptic

( When using ns-allinone-2.35_gcc482.tar.gz, g++-4.4 can be omitted.)


← post #25 : What is it you don't understand in post #23 ? ?
... You will have to do / try something yourself at some stage.
Please download the two files ns-allinone-2.35_gcc482.tar.gz and vbr_ns235.patch.
And unpack ns-allinone-2.35_gcc482.tar.gz in /home/<user-name>/ with :
$ tar xvf ns-allinone-2.35_gcc482.tar.gz
... etc. etc.


-

Chinmayi 02-23-2015 03:14 AM

2 Attachment(s)
I have installed synaptic and g++ g++-4.4 automake patch make libtool libxmu-dev xgraph
But i am getting this error(I have enclosed in the attachment)
My version is (I have enclosed in the attachment)
please help me

knudfl 02-23-2015 03:53 AM

← ref. #28.

! No black images, please. Not readable. Cannot be copied / quoted !
? I guess you know how to copy/paste a text ?
And you should now be able to use 'code tags'.

Quote:

invalid command name "Application/Traffic/VBR
The wrong executable 'ns' is used.
Read post #23 : There is a reason for "ns235-vbr".
* All simulations can be done like $ ns235-vbr file.tcl
» invalid command name "Application/Traffic/VBR « can also mean a failed build.
If you did something different from post #23.
..... Then just start from scratch.
You don't have to delete your current ns-allinone-2.35/ :
You can have as many ns-allinone-2.xx as you want, installed at the same time.


-

Chinmayi 02-23-2015 07:34 AM

I installed ns-allinone package successfully.
After that Ihave copied files from ns to ns235-vbr
Code:

/Downloads/ns-allinone-2.35/diffusion3$ cp ns/diffagent.cc ns235-vbr
/Downloads/ns-allinone-2.35/diffusion3$ cp ns/diffagent.o ns235-vbr
/Downloads/ns-allinone-2.35/diffusion3$ cp ns/diffagent.h ns235-vbr
/Downloads/ns-allinone-2.35/diffusion3$ cp ns/diffrtg.cc ns235-vbr
/Downloads/ns-allinone-2.35/diffusion3$ cp ns/diffrtg.o ns235-vbr
/Downloads/ns-allinone-2.35/diffusion3$ cp ns/diffrtg.h ns235-vbr
/Downloads/ns-allinone-2.35/diffusion3$ cp ns/difftimer.cc ns235-vbr
/Downloads/ns-allinone-2.35/diffusion3$ cp ns/difftimer.o ns235-vbr
/Downloads/ns-allinone-2.35/diffusion3$ cp ns/difftimer.h ns235-vbr

After that I tried the step
Code:

sudo cp ns235-vbr /usr/local/bin/
it has showed:
Code:

[sudo] password for ubuntu:
cp: omitting directory 'ns235-vbr'

I think i did something wrong in this step
Please explain me

Chinmayi 02-23-2015 07:45 AM

i have got it correct. I have got the simulation sir.
Thak you very much for your help sir

rimonece 09-21-2015 08:05 AM

hi,

I installed vbr patch according to post #23. All changes seemed ok like :

ns-2.35/{ Makefile.in, common/package.h, tcl/lib/ns-default.tcl }
( And the added file tools/vbr_traffic.cc : No changes, just added.)


but, it shows the error

munjure@munjure-ThinkCentre-M58p:~/test/running/cbr_vbr$ ns235-vbr test1.tcl
ns:
[code omitted because of length]
: invalid command name "Application/Traffic/VBR"
while executing
"Application/Traffic/VBR set rate_ 448Kb "


can u plz suggest?


I have 2 others ns executable.

knudfl 09-21-2015 12:11 PM

Re post #32, @rimonece.

The usable VBR examples are, AFAIK : example-VBR.tcl, vbr-normal.tcl
* I don't know what "test1.tcl" is !

Besides that, "invalid command name "Application/Traffic/VBR" " indicates a failed build.
And "[code omitted because of length]"
... is usually when you add an unused protocol to ns-default.tcl.


'vbr-examples.tar.gz' https://drive.google.com/file/d/0B7S...ew?usp=sharing


-

haitam09 11-19-2018 05:25 AM

vbr traffic in leach protocol
 
Hi Freinds,
I want to apply vbr traffic for 100 nodes in NS2.34.
Please share with me the vbr_trafic.cc and vbr_trafic.h script (for 100 nodes) and the deployment procedure.
Thank you very much for the help.

knudfl 11-19-2018 12:29 PM

Re #34, @haitam09.

The files {vbr_trafic.cc, vbr_trafic.h} are C++ source code, not scripts.

The number of nodes are not decided in these files, but in simulations.tcl .

Build example, please see post #23.


-

knudfl 11-19-2018 04:45 PM

Re #34.

I scanned the 3000 simulations archive ....
[000-All-examples-4]$ grep -in vbr *

... and found more examples with "vbr", some with many nodes.
→ → →
vbr-examples-2.tar.gz https://drive.google.com/file/d/1C1k...ew?usp=sharing

The "3000 simulations package" https://drive.google.com/file/d/1Qbe...ew?usp=sharing
Tree https://drive.google.com/drive/folde...Ws?usp=sharing

-

haitam09 11-20-2018 03:38 AM

Thanks Sir Knudfl for the help.
I already have leach protcol installed in NS2.34.
I want to apply vbr traffic to my protocol especially in NS2.34 because you have already said in this forum that NS2.34 gives better results compared to NS2.35, is not it?
leach uses the leach_test script, which also uses wireless.tcl.
How can I integrate vbr_normal.tcl or vb-expo.tcl in this case?
Is it necessary to upgrade to NS2.35 with mannasim?
That's why I'm looking for sources code vbr_traffic.cc and vbr_traffic.h?
Thanks in advances.
Best regards.

knudfl 11-20-2018 04:48 AM

Re #37.

Leach works with ns-2.34 / Ubuntu 10.04 - i386, 32bits OS.
Leach doesn't work with ns-2.35 : No usable simulation result.

`vbr_traffic.cc´ : Setup an ns-allinone-2.35, and patch with VBR.
If you read the text file/the patch, you will know that vbr_traffic.cc is in ns-2.35/tools/.
There is also a copy here (so far) :
https://drive.google.com/file/d/0B6a...lHc3cyUEU/edit
! There is no file `vbr_traffic.h´ !

Original link http://ns2blogger.blogspot.dk/2014_04_01_archive.html
... Please note the vbr links at the site ...
→ For vbr .cc file, Click here
→ For ns-default.tcl, Click here (When ns-2.34: Add changes to end of ns-default.tcl).

Documentation : "VARIABLE BIT RATE [VBR]" → VBR__2014_04_01_archive.html.gz
https://www.dropbox.com/s/nyye0s0gg8...e.html.gz?dl=0
Or : https://www.dropbox.com/s/xvnyu4x0vv...hive.html?dl=0
... VBR is the fourth chapter at the above site: 1.OLSR, 2.NSG2, 3.Bonnmotion, 4.VBR.

Documentation details : The patch, vbr_ns235.patch .

Ns2-INFO https://drive.google.com/file/d/1FCj...ew?usp=sharing

-

haitam09 11-26-2018 05:33 AM

Hi Sir Knudfl,
Thank you for the help.
I installed vbr_traffic.cc in NS2.34/Ubuntu10.04 with leach protcol successfully.
The vbr traffic by using example-CBR.tcl is tested. It's OK
Please can you help me how to generate vbr (for 100 nodes) for this protocol?
can I use
../ns-2.34/indep-utils/cmu-scen-gen$ ns cbrgen.tcl -type vbr -nn 100 -seed 1.0 -mc 20 -rate 4.0
or
how to integrate VBR tcl script in this protocol?
I did some research but I have not found answers.

Thank you in advances.

Best regards

Quote:

Originally Posted by knudfl (Post 5927944)
Re #37.

Leach works with ns-2.34 / Ubuntu 10.04 - i386, 32bits OS.
Leach doesn't work with ns-2.35 : No usable simulation result.

`vbr_traffic.cc´ : Setup an ns-allinone-2.35, and patch with VBR.
If you read the text file/the patch, you will know that vbr_traffic.cc is in ns-2.35/tools/.
There is also a copy here (so far) :
https://drive.google.com/file/d/0B6a...lHc3cyUEU/edit
! There is no file `vbr_traffic.h´ !

Original link http://ns2blogger.blogspot.dk/2014_04_01_archive.html
... Please note the vbr links at the site ...
→ For vbr .cc file, Click here
→ For ns-default.tcl, Click here (When ns-2.34: Add changes to end of ns-default.tcl).

Documentation : "VARIABLE BIT RATE [VBR]" → VBR__2014_04_01_archive.html.gz
https://www.dropbox.com/s/nyye0s0gg8...e.html.gz?dl=0
Or : https://www.dropbox.com/s/xvnyu4x0vv...hive.html?dl=0
... VBR is the fourth chapter at the above site: 1.OLSR, 2.NSG2, 3.Bonnmotion, 4.VBR.

Documentation details : The patch, vbr_ns235.patch .

Ns2-INFO https://drive.google.com/file/d/1FCj...ew?usp=sharing

-


knudfl 11-27-2018 08:37 AM

Re #39.

The one and only example using the "Application/Traffic/VBR" is vbr-normal.tcl .

Maximum nodes, vbr-normal.tcl is 15 : set val(nn) 15.
... And that's still with traffic / communication for node 1, 2 only.

-

haitam09 01-17-2019 05:41 AM

Traffic cbr in leach protocol under NS2
 
Hi ALL,
Please can someone give the optimal values of : rate, seed, i, mc(number of connections)to generate cbr traffic for 100 nodes specially for leach protocol by this command :

$ns cbrgen.tcl -type cbr -nn 100 -seed 1.0 -mc 25 -rate 4.0 > cbr-traffic-100-25

This traffic is called in wireless.tcl by:
set opt(cp) "/home/leach/ns-allinone-2.34/ns-2.34/tcl/mobility/scene/cbr-traffic-100-25"


./leach_test uses the parameters :
topology_file="mit/uAMPS/sims/new100nodes.txt"
#stop is the time to stop the simulation if it is still running
stop=1000
# number of nodes in the scenario.
num_clusters=5
# energy values. How much energy does each node have initially
eq_energy=1
init_energy=2
# x,y is the size of the field
x=100
y=100
# bs_x, bs_y is the location of the base station in the field.
bs_x=75
bs_y=175
# Number of nodes. WARNING! This should be 1 higher then the number
# of nodes generated in the scenario.
nn=101

when I call this file when running ./leach_test, it returns as results:
leach.err WITHOUT ERROR
$cat leach.err
mac/chanel.cc: INITIALIZE THE LIST xListHead
SORTING LISTS ...DONE!

leach.tr with size of 386 ko

leach.out with size of 81 ko

leach.alive, leach.energy, leach.data ====> EMPTY WITH 0 ko ??????

Is this normal?
Else what's the solution?

==============================================================
This script returns the following file extract :

#
# nodes: 100, max conn: 25, send rate: 0.25, seed: 1.0
#
#
# 1 connecting to 2 at time 2.5568388786897245
#
set udp_(0) [new Agent/UDP]
$ns_ attach-agent $node_(1) $udp_(0)
set null_(0) [new Agent/Null]
$ns_ attach-agent $node_(2) $null_(0)
set cbr_(0) [new Application/Traffic/CBR]
$cbr_(0) set packetSize_ 512
$cbr_(0) set interval_ 0.25
$cbr_(0) set random_ 1
$cbr_(0) set maxpkts_ 10000
$cbr_(0) attach-agent $udp_(0)
$ns_ connect $udp_(0) $null_(0)
$ns_ at 2.5568388786897245 "$cbr_(0) start"
#
# 4 connecting to 5 at time 56.333118917575632
#
set udp_(1) [new Agent/UDP]
$ns_ attach-agent $node_(4) $udp_(1)
set null_(1) [new Agent/Null]
$ns_ attach-agent $node_(5) $null_(1)
set cbr_(1) [new Application/Traffic/CBR]
$cbr_(1) set packetSize_ 512
$cbr_(1) set interval_ 0.25
$cbr_(1) set random_ 1
$cbr_(1) set maxpkts_ 10000
$cbr_(1) attach-agent $udp_(1)
$ns_ connect $udp_(1) $null_(1)
$ns_ at 56.333118917575632 "$cbr_(1) start"
...


# 28 connecting to 29 at time 47.128346453946243
#
set udp_(24) [new Agent/UDP]
$ns_ attach-agent $node_(28) $udp_(24)
set null_(24) [new Agent/Null]
$ns_ attach-agent $node_(29) $null_(24)
set cbr_(24) [new Application/Traffic/CBR]
$cbr_(24) set packetSize_ 512
$cbr_(24) set interval_ 0.25
$cbr_(24) set random_ 1
$cbr_(24) set maxpkts_ 10000
$cbr_(24) attach-agent $udp_(24)
$ns_ connect $udp_(24) $null_(24)
$ns_ at 47.128346453946243 "$cbr_(24) start"
#
#Total sources/connections: 17/25

Thank you very much for your help.
Best regards

haitam09 01-31-2019 01:48 PM

traffic cbr and RandomWalk for leach protocol
 
Hi knudfl,
I want to generate traffic cbr and simultaneously create the mobility of these nodes by bonmotion for leach protocol in NS2, the commands used are:

1) for traffic cbr

$ ns cbrgen.tcl -type cbr -nn 100 -seed 1.0 -mc 10 -rate 4.0 > cbr-traffic-100

2) for mobility RW:

sudo ./bm -f scen100RW RandomWalk -n 100 -d 1000 -i 3600 -t 10 -x 100 -y 100 -p 0

when I run ./leach_test, it returns as results:

leach.err WITHOUT ERROR

$cat leach.err

mac/chanel.cc: INITIALIZE THE LIST xListHead

SORTING LISTS ...DONE!

The results give :

leach.tr with size of 332 ko

leach.out with size of 121 ko

BUT,

leach.alive, leach.energy, leach.data ====> with size 0 ko ??????

Is this normal?

what's the solution?

You will find attached theses files.

Creating sensor nodes... - uAMPS.tcl
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 (100 == BS) - uAMPS.tcl
Loading connection pattern...- wireless.tcl
Loading scenario file... - wireless.tcl
Node 0: (28.966110725405674,24.851641536155551)
Node 1: (15.019677307000235,14.671639639265669)
Node 2: (4.0031449422254903,89.491353877583208)
Node 3: (82.035129322686757,86.27648697526962)
Node 4: (22.729005209509751,64.713598445390161)
Node 5: (53.275216162798564,71.05466628961949)
...
....

#In end of leach.out, i have :
.....
.....
86 sending data {86 , 2.5523460159393112} to 74 at 2.5523460159393112 (dist = 4.7817933662924341) - ns-leach.tcl
46 sending data {46 , 2.5533700895928586} to 78 at 2.5533700895928586 (dist = 26.877857658542712) - ns-leach.tcl
1 rcvd ADV_CH from at 2.5568388786897245 - ns-leach.tcl
ns: _o50 recv 0 0 512 : can't read "node_()": no such element in array
while executing
"nodeDist $node_($chID) $node_($nodeID)"
(procedure "_o50" line 14)
(Application/LEACH recvADV_CH line 14)
invoked from within
"$self recvADV_CH $msg"
(procedure "_o50" line 16)
(Application/LEACH recv line 16)
invoked from within
"_o50 recv 0 0 512 "
num_nodes is set 101
mac/channel.cc: sendUp - Calc highestAntennaZ_ and distCST_
mac/channel.cc: highestAntennaZ_ = 1.5, distCST_ = 222.
8


Thank you very much for the help.
Best regards


All times are GMT -5. The time now is 02:52 AM.