At Sat, 14 Nov 2015 15:05:05 -0800 (PST),
SmartBoy wrote:
>
> [1 <multipart/alternative (7bit)>]
> [1.1 <text/plain; UTF-8 (7bit)>]
> Hi,
> I am working on the DCE (ns-3-dce) example ns-3-dce/example/
> dce-mptcp-lte-wifi.cc
> <
https://github.com/direct-code-execution/ns-3-dce/blob/master/example/dce-mptcp-lte-wifi.cc>.
> In the original program, there is one server and one client. I modified the
> code dynamic for multiple clients. The code works fine except one portion
> and that is the case when LTE is disabled i.e. --disLte=1. The program
> build is successful but it doesn't give output in wifi files.
>
> The code portion is like this:
>
>
>
>
>
>
>
> *if (disLte) { cmd_oss.str (""); cmd_oss << "route
> add default via " << if1.GetAddress (1, 0) << " dev sim"
> << devices1.Get (0)->GetIfIndex (); LinuxStackHelper::RunIp
> (nodes.Get (0), Seconds (0.1), cmd_oss.str ().c_str ()); }*
> I modified it to:
> uint32_t devices[n], interfaces[n];
>
>
>
>
>
>
>
>
>
> *for (uint32_t i=0; i<number_of_client_nodes; i++){if (disLte)
> { cmd_oss.str (""); cmd_oss << "route add default via "
> << if1.GetAddress (1, 0) << " dev sim" << devices[i].Get
> (i)->GetIfIndex (); LinuxStackHelper::RunIp (nodes.Get (0),
> Seconds (0.1), cmd_oss.str ().c_str ()); }}*
>
> I am not getting the *dev sim << devices[i].Get (i) -> GetIfIndex()* right.
> Kindly explain this portion of code a bit and correct me.
it looks like devices[n] is not properly generated and can't
find the device to configure the route.
please make it sure how you generated devices[n].
-- Hajime