> > > I have been trying to run 'iperf' with ns-3-dceand I am stuck at the
> > NS3DCEcatch call to libc and should simulate every symbol of libc ,
> > but as libc is big not all symbols are present for now,
>
> > If you need do add a symbol follow this little guide:
>
> > for example to add *sscanf* emulation first look the man to have the
> > good function prototype :
>
> > $ man sscanf
>
> > int sscanf(const char *str, const char *format, ...);
>
> > Then add a function pointer to the same prototype in the struct Libc in
> > the file model/libc.h :
>
> > int (*sscanf_fn) (const char *str, const char *format, ...);
>
> > in file libc.c add the function like the real one :
>
> > int sscanf(const char *str, const char *format, ...)
> > {
> > va_list ap;
> > va_start (ap, format);
> > int retval = glibc.sscanf_fn( str, format, ap);
> > va_end (ap);
> > return retval;
>
> > }
>
> > then in libc-dce.c affect thedceimplementation of the new method :
>
> > libc->sscan_fn = vsscanf;
>
> > In this example sscanf is a function that do not have possible
> > interraction with the simulation world, the implementation
> > is done by calling the real vsscanf (not sscanf because of va_list ...).
> > But for example if you call socket function the implementation is
> > dce_socket with interract much with NS3 simulate world and is more
> > difficult to implement :)
>
> > That's All.
>
> > -- Frederic
>
> Thanks for the succinct guide!
>
> I'll try this path and post the results back.
>
> ~
> Ut
Hi,
Thanks to help from Frederic, Hajime and others in this group, I have
been able to successfully compile and run 'ip' ns-3-dce-old using the
examle file ./build/debug/src/dce/example/dce-linux-simple.
The files in the folder `files-0` in case of './ip' is as expected
(taking cue from `mathieu/ns-3-dce/doc/dce.rst`):
------------------------------------------------------------------
utkarsh@ns3-testbed:~/repos/ns-3-allinone/ns-3-dce-old$ cat files-0/
var/log/*/stdout
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet
127.0.0.1/8 scope host lo
broadcast 127.255.255.255 dev lo table local proto kernel scope
link src 127.0.0.1
broadcast 127.0.0.0 dev lo table local proto kernel scope link src
127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src
127.0.0.1
local
127.0.0.0/8 dev lo table local proto kernel scope host src
127.0.0.1
did read all buffers
did write all buffers
------------------------------------------------------------------
So that is a milestone and I will write the exact steps I followed and
collect the stumbling blocks together.
However, the simulation does not come to a halt while experimenting
with './iperf'.
I have tried changing the Simulator::Stop(.) parameter to various
values and testing without success.
After killing the simulator, the logs look as if iperf was started
normally, but no output was produced:
-------------------------------------------------------------------------------------------------------------------------
utkarsh@ns3-testbed:~/repos/ns-3-allinone/ns-3-dce-old$ cat files-*/*/
*/*/*
build/debug/iperf -c 10.1.1.2 -y C -i 1
build/debug/iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 0.00 Byte (default)
------------------------------------------------------------
<EOF>
-------------------------------------------------------------------------------------------------------------------------
iperf when run independently seems to work fine.
Any idea what might be causing this behavior and/or how to start
debugging it?
Thanks!
~
Ut