examples/ipv6/radvd.cc
changeset 10131 0dc090fc749d
parent 10129 5d1521685ad9
child 10136 71b625bfe8c7
equal deleted inserted replaced
10130:17cfc5197ff8 10131:0dc090fc749d
    90   Ipv6InterfaceContainer iic1 = ipv6.AssignWithoutAddress (tmp); /* n0 interface */
    90   Ipv6InterfaceContainer iic1 = ipv6.AssignWithoutAddress (tmp); /* n0 interface */
    91 
    91 
    92   NetDeviceContainer tmp2;
    92   NetDeviceContainer tmp2;
    93   tmp2.Add (d1.Get (1)); /* R */
    93   tmp2.Add (d1.Get (1)); /* R */
    94   Ipv6InterfaceContainer iicr1 = ipv6.Assign (tmp2); /* R interface to the first subnet is just statically assigned */
    94   Ipv6InterfaceContainer iicr1 = ipv6.Assign (tmp2); /* R interface to the first subnet is just statically assigned */
    95   iicr1.SetRouter (0, true);
    95   iicr1.SetForwarding (0, true);
       
    96   iicr1.SetDefaultRouteInAllNodes (0);
    96   iic1.Add (iicr1);
    97   iic1.Add (iicr1);
    97 
    98 
    98   /* second subnet R - n1 */
    99   /* second subnet R - n1 */
    99   ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64));
   100   ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64));
   100   NetDeviceContainer tmp3;
   101   NetDeviceContainer tmp3;
   101   tmp3.Add (d2.Get (0)); /* R */
   102   tmp3.Add (d2.Get (0)); /* R */
   102   Ipv6InterfaceContainer iicr2 = ipv6.Assign (tmp3); /* R interface */
   103   Ipv6InterfaceContainer iicr2 = ipv6.Assign (tmp3); /* R interface */
   103   iicr2.SetRouter (0, true);
   104   iicr2.SetForwarding (0, true);
       
   105   iicr2.SetDefaultRouteInAllNodes (0);
   104 
   106 
   105   NetDeviceContainer tmp4;
   107   NetDeviceContainer tmp4;
   106   tmp4.Add (d2.Get (1)); /* n1 */
   108   tmp4.Add (d2.Get (1)); /* n1 */
   107   Ipv6InterfaceContainer iic2 = ipv6.AssignWithoutAddress (tmp4); 
   109   Ipv6InterfaceContainer iic2 = ipv6.AssignWithoutAddress (tmp4); 
   108   iic2.Add (iicr2);
   110   iic2.Add (iicr2);