Creating scripts in NS-3 with DCE support

696 views
Skip to first unread message

ing.milan.bartl

unread,
Sep 24, 2012, 12:21:33 PM9/24/12
to ns-3-...@googlegroups.com
Hi,

I am kinda new to the NS-3 and DCE architecture and at present I am having a problem of creating a new script that is using DCE objects. All I have managed so far is that I have ns-3-dev directory containing NS-3 sources and ns-3-dce directory containing DCE installation.

The problem is that if I build my script in the scratch directory in ns-3-dev, the header file for DCE is located, but the execution itself failes on not finding bodies of the DCE functions. In short, the header file is included, the source file is not linked, though.

I have been trying to compile my .cc file in the ns-3-dce directory without any avail. I did not manage to get command "./waf --run myscript" to work, as it works in the ns-3-dev directory (having the file myscript.cc placed in the scratch directory in the ns-3-dce directory). All the examples of running NS-3 scripts with DCE support that are to be found show only how to run the built-in examples from the ns-3-dce sources. That is not what I am looking for, or is it? Am i supposed to place my script into some special folder and re-run compilation of entire DCE project to retrieve the binary for my script?

Thanks for Your advice.

Daniel Camara

unread,
Sep 24, 2012, 12:28:27 PM9/24/12
to ns-3-...@googlegroups.com
 Hi,

 Did you set properly the the environment variables (PATH, LD_LIBRARY_PATH and PKG_CONFIG_PATH)?

  Best regards...
 
     Daniel


--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/J9ScXyalRvgJ.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.



--
    Best regards...
           
                     Daniel

Hajime Tazaki

unread,
Sep 24, 2012, 9:52:11 PM9/24/12
to ns-3-...@googlegroups.com

Hi,

currently, DCE has no 'scratch folder'-like directory that
users can put a script and run without editing wscript file.

so my suggestion at this moment is that you can edit
'wscript' file to add your script as an example, then
follows the instruction below.

http://www-sop.inria.fr/members/Frederic.Urbani/ns3dceccnx/index.html

-- Hajime

At Mon, 24 Sep 2012 09:21:33 -0700 (PDT),
ing.milan.bartl wrote:
>
> [1 <text/plain; ISO-8859-1 (7bit)>]
> --
> You received this message because you are subscribed to the Google Groups "ns-3-users" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/J9ScXyalRvgJ.
> To post to this group, send email to ns-3-...@googlegroups.com.
> To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.
>
> [2 <text/html; ISO-8859-1 (quoted-printable)>]
>

Hajime Tazaki

unread,
Sep 24, 2012, 10:10:49 PM9/24/12
to ns-3-...@googlegroups.com

Oops, my previous comment was wrong...

there is an ad-hoc script support in dce, so-called
'myscripts'. you can take a look an example in the directory
'ns-3-dce/myscripts/ping' how to put your own script.

-- Hajime

At Tue, 25 Sep 2012 10:52:11 +0900,

Frederic Urbani

unread,
Sep 25, 2012, 4:50:27 AM9/25/12
to ns-3-...@googlegroups.com
On 09/25/2012 04:10 AM, Hajime Tazaki wrote:
> Oops, my previous comment was wrong...
>
> there is an ad-hoc script support in dce, so-called
> 'myscripts'. you can take a look an example in the directory
> 'ns-3-dce/myscripts/ping' how to put your own script.
Some precisions:

1. Put your scenario under a new directory under ns-3-dce/myscripts
2. Put a good wscript
3. run ./waf configure .... IN ORDER to found the new scenario
4. ./waf
5. then play with your scenario directly calling the executable without
using waf run for example: ./build/myscripts/ping/bin/dce-ping

ing.milan.bartl

unread,
Sep 25, 2012, 10:52:51 AM9/25/12
to ns-3-...@googlegroups.com
Thanks a lot guys. The last procedure mentioned worked fine for me, even with Quagga, which is awesome.

Didn't try the other ways, though. Presumably would work as well.

Once again, thank you...

Padmini Gaur

unread,
Dec 3, 2013, 3:30:22 AM12/3/13
to ns-3-...@googlegroups.com
Greetings Sir!
 I am a beginner with NS3. In NS3-DCE, dce-udp-simple, dce-tcp-simple scripts are working exactly fine. But when I try to move forth to the beginner code of ping and try to execute it, the following message appears on the screen:

$ ./waf --run dce-ping
Waf: Entering directory `/home/shobhan/dce/source/ns-3-dce/build'
[ 10/299] lib/pkgconfig/libns3-dev-netlink-debug.pc:  -> build/lib/pkgconfig/libns3-dev-netlink-debug.pc
[ 95/299] lib/pkgconfig/libns3-dev-dce-debug.pc:  -> build/lib/pkgconfig/libns3-dev-dce-debug.pc
Waf: Leaving directory `/home/shobhan/dce/source/ns-3-dce/build'
'build' finished successfully (0.393s)
assert failed. cond="exeFullPath.length () > 0", msg="Executable 'ping' not found !  Please check your DCE_PATH and DCE_ROOT environment variables.", file=../model/dce-manager.cc, line=245
terminate called without an active exception
Command ['/home/shobhan/dce/source/ns-3-dce/build/myscripts/ping/bin/dce-ping'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

when I say:
$ echo $DCE_PATH
Nothing is returned.

How can I execute this example?

Hajime Tazaki

unread,
Dec 16, 2013, 3:02:21 AM12/16/13
to ns-3-...@googlegroups.com

At Tue, 3 Dec 2013 00:30:22 -0800 (PST),
Padmini Gaur wrote:
>
> [1 <text/plain; ISO-8859-1 (7bit)>]
> Greetings Sir!
> I am a beginner with NS3. In NS3-DCE, dce-udp-simple, dce-tcp-simple
> scripts are working exactly fine. But when I try to move forth to the
> beginner code of ping and try to execute it, the following message appears
> on the screen:
>
> $ ./waf --run dce-ping
> Waf: Entering directory `/home/shobhan/dce/source/ns-3-dce/build'
> [ 10/299] lib/pkgconfig/libns3-dev-netlink-debug.pc: ->
> build/lib/pkgconfig/libns3-dev-netlink-debug.pc
> [ 95/299] lib/pkgconfig/libns3-dev-dce-debug.pc: ->
> build/lib/pkgconfig/libns3-dev-dce-debug.pc
> Waf: Leaving directory `/home/shobhan/dce/source/ns-3-dce/build'
> 'build' finished successfully (0.393s)
> assert failed. cond="exeFullPath.length () > 0", msg="Executable 'ping' not
> found ! Please check your DCE_PATH and DCE_ROOT environment variables.",
> file=../model/dce-manager.cc, line=245
> terminate called without an active exception
> Command
> ['/home/shobhan/dce/source/ns-3-dce/build/myscripts/ping/bin/dce-ping']
> terminated with signal SIGIOT. Run it under a debugger to get more
> information (./waf --run <program> --command-template="gdb --args %s
> <args>").

if you built DCE via bake, you should have 'ping' command in
your installation, and should not alert like above.

did you see any errors during bake built, specifically built
during 'iputils' module, which should build ping binary
files ?

> when I say:
> $ echo $DCE_PATH
> Nothing is returned.

the environment variable is automatically configured by waf
command; you don't have to care about it.

-- Hajime
> > > > To post to this group, send email to ns-3-...@googlegroups.com<javascript:>.
> >
> > > > To unsubscribe from this group, send email to
> > ns-3-users+...@googlegroups.com <javascript:>.
> > > > For more options, visit this group at
> > http://groups.google.com/group/ns-3-users?hl=en.
> > > >
> > > > [2 <text/html; ISO-8859-1 (quoted-printable)>]
> > > >
> >
>
> --
> You received this message because you are subscribed to the Google Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
> To post to this group, send email to ns-3-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ns-3-users.
> For more options, visit https://groups.google.com/groups/opt_out.
> [2 <text/html; ISO-8859-1 (quoted-printable)>]
>

Mahfuz

unread,
Jan 10, 2014, 7:44:41 PM1/10/14
to ns-3-...@googlegroups.com, frederi...@inria.fr
I have installed NS-3-DCE1.2 using bake. Everything is compiling fine. When I run ./waf --run dce-ccn-exp3 or ./waf --run dce-ccn-exp2 then it shows error: I have put the the error information below:

Waf: Leaving directory `/home/bosunia/dce1.2/source/ns-3-dce/build'
'build' finished successfully (0.211s)
msg="Unable to open stdin file : /tmp/bigone", file=../model/dce-manager.cc, line=185
terminate called without an active exception

with -vvv options:
Waf: Leaving directory `/home/bosunia/dce1.2/source/ns-3-dce/build'
'build' finished successfully (0.911s)
msg="Unable to open stdin file : /tmp/bigone", file=../model/dce-manager.cc, line=185
terminate called without an active exception
  File "./waf", line 161, in <module>
    Scripting.waf_entry_point(cwd, VERSION, wafdir)
  File "/home/bosunia/dce1.2/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py", line 97, in waf_entry_point
    run_commands()
  File "/home/bosunia/dce1.2/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py", line 155, in run_commands
    run_command('shutdown')
  File "/home/bosunia/dce1.2/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py", line 143, in run_command
    ctx.execute()
  File "/home/bosunia/dce1.2/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Context.py", line 87, in execute
    self.recurse([os.path.dirname(g_module.root_path)])
  File "/home/bosunia/dce1.2/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Context.py", line 128, in recurse
    user_function(self)
  File "/home/bosunia/dce1.2/source/ns-3-dce/wscript", line 854, in shutdown
    visualize=Options.options.visualize)
  File "/home/bosunia/dce1.2/source/ns-3-dce/wutils.py", line 247, in run_program
    return run_argv(execvec, env, cwd=cwd)
  File "/home/bosunia/dce1.2/source/ns-3-dce/wutils.py", line 179, in run_argv
    "(./waf --run <program> --command-template=\"gdb --args %%s <args>\")." % (argv, signame))
 
Command ['/home/bosunia/dce1.2/source/ns-3-dce/build/myscripts/ccn-exp2/bin/dce-ccn-exp2'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").
  File "./waf", line 161, in <module>
Scripting.waf_entry_point(cwd, VERSION, wafdir)
  File "/home/bosunia/dce1.2/source/ns-3-dce/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Scripting.py", line 101, in waf_entry_point
Logs.error(e.msg)


I have tried with different dce-ns3-1.1, dce-ns3-1, dec-linux-dev. It shows the same error. Can you suggest me what can I do? I have installed Ubuntu on virtual machine and ran the source using a administrator account.
Reply all
Reply to author
Forward
0 new messages