Skip to content

Instantly share code, notes, and snippets.

@thehajime
Created December 22, 2013 03:04
Show Gist options
  • Save thehajime/8078008 to your computer and use it in GitHub Desktop.
Save thehajime/8078008 to your computer and use it in GitHub Desktop.
diff -r a1527ef7aacd .hgignore
--- a/.hgignore Thu Mar 29 13:55:03 2012 +0900
+++ b/.hgignore Thu Mar 29 13:55:22 2012 +0900
@@ -8,3 +8,4 @@
^files-
^.waf-
^.lock-
+pcap
diff -r a1527ef7aacd 3967.weights.intra
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/3967.weights.intra Thu Mar 29 13:55:22 2012 +0900
@@ -0,0 +1,294 @@
+San+Jose,+CA471 Santa+Clara,+CA444 4.5
+San+Jose,+CA471 Santa+Clara,+CA389 4
+San+Jose,+CA471 San+Jose,+CA472 3.5
+San+Jose,+CA471 Oak+Brook,+IL301 14.5
+San+Jose,+CA472 San+Jose,+CA471 3.5
+San+Jose,+CA472 Santa+Clara,+CA430 2
+San+Jose,+CA472 Santa+Clara,+CA389 3.5
+San+Jose,+CA472 Santa+Clara,+CA431 2.5
+Weehawken,+NJ543 New+York,+NY293 8
+Weehawken,+NJ543 Atlanta,+GA127 18.5
+Weehawken,+NJ543 New+York,+NY294 2.5
+Weehawken,+NJ543 Weehawken,+NJ544 2
+Weehawken,+NJ543 Weehawken,+NJ552 2
+Weehawken,+NJ543 Oak+Brook,+IL300 12
+Weehawken,+NJ543 Jersey+City,+NJ244 2
+Oak+Brook,+IL307 Oak+Brook,+IL315 2
+Oak+Brook,+IL307 Oak+Brook,+IL300 2
+Oak+Brook,+IL307 Oak+Brook,+IL301 2
+Herndon,+VA193 Herndon,+VA496 3
+Herndon,+VA193 Atlanta,+GA126 4.5
+Herndon,+VA193 Atlanta,+GA127 7.5
+Weehawken,+NJ544 Jersey+City,+NJ245 2
+Weehawken,+NJ544 London274 4
+Weehawken,+NJ544 London275 4.5
+Weehawken,+NJ544 London276 4
+Weehawken,+NJ544 Weehawken,+NJ543 2
+Weehawken,+NJ544 Weehawken,+NJ552 2
+Weehawken,+NJ544 New+York,+NY293 5
+Weehawken,+NJ544 Herndon,+VA495 4
+Oak+Brook,+IL308 Oak+Brook,+IL315 2
+Oak+Brook,+IL308 Oak+Brook,+IL300 2
+Oak+Brook,+IL308 Oak+Brook,+IL301 2
+Toronto,+Canada537 Waltham,+MA555 1
+Oak+Brook,+IL309 Oak+Brook,+IL300 2
+Oak+Brook,+IL309 Oak+Brook,+IL301 2.5
+Toronto,+Canada538 Oak+Brook,+IL300 1
+Palo+Alto,+CA317 Santa+Clara,+CA388 3
+Palo+Alto,+CA317 Palo+Alto,+CA104 2.5
+Palo+Alto,+CA317 Santa+Clara,+CA336 2.5
+Palo+Alto,+CA317 Palo+Alto,+CA318 2
+Palo+Alto,+CA318 Santa+Clara,+CA363 2
+Palo+Alto,+CA318 Santa+Clara,+CA364 2
+Palo+Alto,+CA318 Palo+Alto,+CA317 2
+Amsterdam119 London274 2
+Amsterdam119 London275 5.5
+Amsterdam119 Frankfurt185 1
+Tukwila,+WA508 Tukwila,+WA509 2
+Tukwila,+WA508 Santa+Clara,+CA429 7
+Tukwila,+WA508 Chicago,+IL155 9
+Oak+Brook,+IL310 Oak+Brook,+IL300 2
+Oak+Brook,+IL310 Oak+Brook,+IL301 3.5
+Tukwila,+WA509 Chicago,+IL155 6
+Tukwila,+WA509 Tukwila,+WA508 2
+Santa+Clara,+CA388 Santa+Clara,+CA430 2
+Santa+Clara,+CA388 Santa+Clara,+CA389 2.5
+Santa+Clara,+CA388 Palo+Alto,+CA317 3
+Santa+Clara,+CA388 San+Jose,+CA460 3
+Palo+Alto,+CA104 Santa+Clara,+CA444 2.5
+Palo+Alto,+CA104 Santa+Clara,+CA365 2
+Palo+Alto,+CA104 Palo+Alto,+CA317 2.5
+Palo+Alto,+CA104 Santa+Clara,+CA403 2
+Santa+Clara,+CA389 San+Jose,+CA471 4
+Santa+Clara,+CA389 Santa+Clara,+CA388 2.5
+Santa+Clara,+CA389 San+Jose,+CA472 3.5
+Santa+Clara,+CA389 Santa+Clara,+CA443 4
+Santa+Clara,+CA389 Santa+Clara,+CA403 3
+Oak+Brook,+IL315 Oak+Brook,+IL307 2
+Oak+Brook,+IL315 Oak+Brook,+IL300 2
+Oak+Brook,+IL315 Oak+Brook,+IL308 2
+Oak+Brook,+IL315 Oak+Brook,+IL301 2.5
+Weehawken,+NJ552 Weehawken,+NJ543 2
+Weehawken,+NJ552 Weehawken,+NJ544 2
+Weehawken,+NJ552 Oak+Brook,+IL300 13
+Chicago,+IL155 Tukwila,+WA509 6
+Chicago,+IL155 Oak+Brook,+IL301 2
+Chicago,+IL155 Chicago,+IL156 2.5
+Chicago,+IL155 Tukwila,+WA508 9
+Chicago,+IL156 Oak+Brook,+IL300 2
+Chicago,+IL156 Fort+Worth,+TX189 7
+Chicago,+IL156 Chicago,+IL155 2.5
+Fort+Worth,+TX189 Irvine,+CA228 17
+Fort+Worth,+TX189 Austin,+TX137 4
+Fort+Worth,+TX189 Fort+Worth,+TX190 2
+Fort+Worth,+TX189 Chicago,+IL156 7
+Fort+Worth,+TX189 Santa+Clara,+CA403 16
+Fort+Worth,+TX189 Fort+Worth,+TX191 3.5
+Herndon,+VA495 Herndon,+VA496 2
+Herndon,+VA495 Herndon,+VA208 5
+Herndon,+VA495 Weehawken,+NJ544 4
+Jersey+City,+NJ244 Jersey+City,+NJ261 4
+Jersey+City,+NJ244 Frankfurt184 1
+Jersey+City,+NJ244 Jersey+City,+NJ245 2
+Jersey+City,+NJ244 Weehawken,+NJ543 2
+Jersey+City,+NJ244 Waltham,+MA568 5
+Jersey+City,+NJ244 London277 1
+Jersey+City,+NJ244 Waltham,+MA569 2
+Herndon,+VA496 Santa+Clara,+CA429 22.5
+Herndon,+VA496 Herndon,+VA193 3
+Herndon,+VA496 Herndon,+VA495 2
+Irvine,+CA212 El+Segundo,+CA163 1
+Tokyo525 Santa+Clara,+CA404 2.5
+Tokyo525 Tokyo526 2
+Irvine,+CA213 Santa+Clara,+CA404 10
+Irvine,+CA213 Irvine,+CA228 4
+Irvine,+CA213 El+Segundo,+CA164 2
+Jersey+City,+NJ245 Jersey+City,+NJ261 3
+Jersey+City,+NJ245 London274 2
+Jersey+City,+NJ245 New+York,+NY294 2.5
+Jersey+City,+NJ245 London275 2.5
+Jersey+City,+NJ245 London276 2
+Jersey+City,+NJ245 Weehawken,+NJ544 2
+Jersey+City,+NJ245 Jersey+City,+NJ244 2
+Tokyo526 Tokyo525 2
+Tokyo526 Santa+Clara,+CA336 2.5
+Tokyo526 San+Jose,+CA460 2
+Waltham,+MA555 Waltham,+MA556 2
+Waltham,+MA555 Waltham,+MA568 2
+Waltham,+MA555 Oak+Brook,+IL300 13
+Waltham,+MA555 Toronto,+Canada537 1
+Waltham,+MA556 Oak+Brook,+IL300 10
+Waltham,+MA556 Waltham,+MA569 7
+Waltham,+MA556 Waltham,+MA555 2
+Herndon,+VA206 New+York,+NY293 2
+Herndon,+VA206 Herndon,+VA208 2
+Santa+Clara,+CA429 Herndon,+VA496 22.5
+Santa+Clara,+CA429 Santa+Clara,+CA430 2
+Santa+Clara,+CA429 Santa+Clara,+CA431 5.5
+Santa+Clara,+CA429 San+Jose,+CA459 2
+Santa+Clara,+CA429 Tukwila,+WA508 7
+Santa+Clara,+CA429 Santa+Clara,+CA403 4.5
+Herndon,+VA208 Herndon,+VA206 2
+Herndon,+VA208 New+York,+NY293 4
+Herndon,+VA208 Herndon,+VA495 5
+Atlanta,+GA126 Atlanta,+GA127 3
+Atlanta,+GA126 Herndon,+VA193 4.5
+Atlanta,+GA126 Atlanta,+GA133 4
+Miami,+FL285 New+York,+NY293 5
+Miami,+FL285 Miami,+FL286 8
+Atlanta,+GA127 Atlanta,+GA126 3
+Atlanta,+GA127 Miami,+FL286 2.5
+Atlanta,+GA127 Weehawken,+NJ543 18.5
+Atlanta,+GA127 Herndon,+VA193 7.5
+Atlanta,+GA127 Fort+Worth,+TX190 3.5
+Atlanta,+GA127 Atlanta,+GA133 2
+Miami,+FL286 Miami,+FL285 8
+Miami,+FL286 Atlanta,+GA127 2.5
+Fort+Worth,+TX190 Irvine,+CA228 14
+Fort+Worth,+TX190 Atlanta,+GA127 3.5
+Fort+Worth,+TX190 Irvine,+CA229 16
+Fort+Worth,+TX190 Austin,+TX136 1
+Fort+Worth,+TX190 Fort+Worth,+TX189 2
+Fort+Worth,+TX190 Fort+Worth,+TX191 2.5
+San+Jose,+CA459 Santa+Clara,+CA429 2
+San+Jose,+CA459 San+Jose,+CA460 6
+Fort+Worth,+TX191 Fort+Worth,+TX189 3.5
+Fort+Worth,+TX191 Fort+Worth,+TX190 2.5
+New+York,+NY293 Miami,+FL285 5
+New+York,+NY293 Herndon,+VA206 2
+New+York,+NY293 Herndon,+VA208 4
+New+York,+NY293 New+York,+NY294 5.5
+New+York,+NY293 Weehawken,+NJ543 8
+New+York,+NY293 Weehawken,+NJ544 5
+New+York,+NY294 Jersey+City,+NJ245 2.5
+New+York,+NY294 New+York,+NY293 5.5
+New+York,+NY294 Weehawken,+NJ543 2.5
+London274 Jersey+City,+NJ245 2
+London274 Amsterdam119 2
+London274 Weehawken,+NJ544 4
+London275 Jersey+City,+NJ245 2.5
+London275 Amsterdam119 5.5
+London275 Weehawken,+NJ544 4.5
+Santa+Clara,+CA430 Santa+Clara,+CA404 4.5
+Santa+Clara,+CA430 Santa+Clara,+CA364 5.5
+Santa+Clara,+CA430 Santa+Clara,+CA429 2
+Santa+Clara,+CA430 Santa+Clara,+CA388 2
+Santa+Clara,+CA430 San+Jose,+CA472 2
+Santa+Clara,+CA430 Santa+Clara,+CA336 2.5
+Santa+Clara,+CA430 Santa+Clara,+CA443 3.5
+London276 Jersey+City,+NJ245 2
+London276 Weehawken,+NJ544 4
+Santa+Clara,+CA431 Santa+Clara,+CA363 2
+Santa+Clara,+CA431 Santa+Clara,+CA429 5.5
+Santa+Clara,+CA431 Santa+Clara,+CA364 2
+Santa+Clara,+CA431 Santa+Clara,+CA365 4
+Santa+Clara,+CA431 San+Jose,+CA472 2.5
+Santa+Clara,+CA431 Santa+Clara,+CA443 4
+London277 Jersey+City,+NJ244 1
+Santa+Clara,+CA363 Santa+Clara,+CA431 2
+Santa+Clara,+CA363 Palo+Alto,+CA318 2
+Irvine,+CA228 Irvine,+CA213 4
+Irvine,+CA228 Irvine,+CA229 2
+Irvine,+CA228 Irvine,+CA237 2
+Irvine,+CA228 Irvine,+CA230 3
+Irvine,+CA228 Irvine,+CA231 2
+Irvine,+CA228 Fort+Worth,+TX189 17
+Irvine,+CA228 Fort+Worth,+TX190 14
+Santa+Clara,+CA364 Santa+Clara,+CA430 5.5
+Santa+Clara,+CA364 Santa+Clara,+CA431 2
+Santa+Clara,+CA364 Palo+Alto,+CA318 2
+Irvine,+CA229 Irvine,+CA228 2
+Irvine,+CA229 El+Segundo,+CA164 3
+Irvine,+CA229 Fort+Worth,+TX190 16
+Santa+Clara,+CA365 Palo+Alto,+CA104 2
+Santa+Clara,+CA365 Santa+Clara,+CA431 4
+Waltham,+MA568 Waltham,+MA569 2
+Waltham,+MA568 Jersey+City,+NJ244 5
+Waltham,+MA568 Waltham,+MA555 2
+Waltham,+MA569 Waltham,+MA556 7
+Waltham,+MA569 Waltham,+MA568 2
+Waltham,+MA569 Jersey+City,+NJ244 2
+Atlanta,+GA133 Atlanta,+GA126 4
+Atlanta,+GA133 Atlanta,+GA127 2
+San+Jose,+CA460 Tokyo526 2
+San+Jose,+CA460 Santa+Clara,+CA388 3
+San+Jose,+CA460 San+Jose,+CA459 6
+San+Jose,+CA460 Santa+Clara,+CA443 2.5
+El+Segundo,+CA163 Irvine,+CA212 1
+El+Segundo,+CA163 Santa+Clara,+CA404 5
+El+Segundo,+CA163 Santa+Clara,+CA405 3
+El+Segundo,+CA163 El+Segundo,+CA164 2
+El+Segundo,+CA163 Austin,+TX137 16
+Austin,+TX136 Fort+Worth,+TX190 1
+El+Segundo,+CA164 Irvine,+CA213 2
+El+Segundo,+CA164 Irvine,+CA229 3
+El+Segundo,+CA164 Irvine,+CA230 2
+El+Segundo,+CA164 Irvine,+CA231 3
+El+Segundo,+CA164 El+Segundo,+CA163 2
+El+Segundo,+CA164 Santa+Clara,+CA403 9
+El+Segundo,+CA164 Santa+Clara,+CA443 6
+Austin,+TX137 El+Segundo,+CA163 16
+Austin,+TX137 Fort+Worth,+TX189 4
+Santa+Clara,+CA403 Santa+Clara,+CA444 2.5
+Santa+Clara,+CA403 Santa+Clara,+CA404 2
+Santa+Clara,+CA403 Santa+Clara,+CA429 4.5
+Santa+Clara,+CA403 Santa+Clara,+CA405 5
+Santa+Clara,+CA403 Palo+Alto,+CA104 2
+Santa+Clara,+CA403 Santa+Clara,+CA389 3
+Santa+Clara,+CA403 Fort+Worth,+TX189 16
+Santa+Clara,+CA403 El+Segundo,+CA164 9
+Jersey+City,+NJ261 Jersey+City,+NJ245 3
+Jersey+City,+NJ261 Jersey+City,+NJ244 4
+Santa+Clara,+CA404 Santa+Clara,+CA444 4.5
+Santa+Clara,+CA404 Irvine,+CA213 10
+Santa+Clara,+CA404 Tokyo525 2.5
+Santa+Clara,+CA404 Santa+Clara,+CA430 4.5
+Santa+Clara,+CA404 El+Segundo,+CA163 5
+Santa+Clara,+CA404 Santa+Clara,+CA443 3
+Santa+Clara,+CA404 Santa+Clara,+CA403 2
+Santa+Clara,+CA405 El+Segundo,+CA163 3
+Santa+Clara,+CA405 Santa+Clara,+CA403 5
+Irvine,+CA230 Irvine,+CA228 3
+Irvine,+CA230 El+Segundo,+CA164 2
+Irvine,+CA231 Irvine,+CA228 2
+Irvine,+CA231 Irvine,+CA237 3
+Irvine,+CA231 El+Segundo,+CA164 3
+Santa+Clara,+CA336 Tokyo526 2.5
+Santa+Clara,+CA336 Santa+Clara,+CA430 2.5
+Santa+Clara,+CA336 Palo+Alto,+CA317 2.5
+Santa+Clara,+CA443 Santa+Clara,+CA444 2.5
+Santa+Clara,+CA443 Santa+Clara,+CA404 3
+Santa+Clara,+CA443 Santa+Clara,+CA430 3.5
+Santa+Clara,+CA443 Santa+Clara,+CA431 4
+Santa+Clara,+CA443 Santa+Clara,+CA389 4
+Santa+Clara,+CA443 El+Segundo,+CA164 6
+Santa+Clara,+CA443 San+Jose,+CA460 2.5
+Santa+Clara,+CA444 Santa+Clara,+CA404 4.5
+Santa+Clara,+CA444 San+Jose,+CA471 4.5
+Santa+Clara,+CA444 Palo+Alto,+CA104 2.5
+Santa+Clara,+CA444 Santa+Clara,+CA443 2.5
+Santa+Clara,+CA444 Santa+Clara,+CA403 2.5
+Frankfurt184 Jersey+City,+NJ244 1
+Irvine,+CA237 Irvine,+CA228 2
+Irvine,+CA237 Irvine,+CA231 3
+Frankfurt185 Amsterdam119 1
+Oak+Brook,+IL300 Weehawken,+NJ543 12
+Oak+Brook,+IL300 Oak+Brook,+IL307 2
+Oak+Brook,+IL300 Oak+Brook,+IL315 2
+Oak+Brook,+IL300 Weehawken,+NJ552 13
+Oak+Brook,+IL300 Oak+Brook,+IL308 2
+Oak+Brook,+IL300 Oak+Brook,+IL309 2
+Oak+Brook,+IL300 Chicago,+IL156 2
+Oak+Brook,+IL300 Toronto,+Canada538 1
+Oak+Brook,+IL300 Waltham,+MA555 13
+Oak+Brook,+IL300 Waltham,+MA556 10
+Oak+Brook,+IL300 Oak+Brook,+IL301 2.5
+Oak+Brook,+IL300 Oak+Brook,+IL310 2
+Oak+Brook,+IL301 San+Jose,+CA471 14.5
+Oak+Brook,+IL301 Oak+Brook,+IL307 2
+Oak+Brook,+IL301 Oak+Brook,+IL315 2.5
+Oak+Brook,+IL301 Oak+Brook,+IL308 2
+Oak+Brook,+IL301 Chicago,+IL155 2
+Oak+Brook,+IL301 Oak+Brook,+IL309 2.5
+Oak+Brook,+IL301 Oak+Brook,+IL300 2.5
+Oak+Brook,+IL301 Oak+Brook,+IL310 3.5
diff -r a1527ef7aacd example/dce-fga-crawdad.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/dce-fga-crawdad.cc Thu Mar 29 13:55:22 2012 +0900
@@ -0,0 +1,233 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+#include "ns3/core-module.h"
+#include "ns3/mobility-module.h"
+#include "ns3/crawdad-mobility-helper.h"
+#include "ns3/dce-module.h"
+#include "ns3/mip6d-helper.h"
+#include "ns3/csma-helper.h"
+#include "ns3/wifi-helper.h"
+#include "ns3/yans-wifi-helper.h"
+#include "ns3/mgt-headers.h"
+#include "ns3/nqos-wifi-mac-helper.h"
+
+#include <sys/resource.h>
+
+using namespace ns3;
+NS_LOG_COMPONENT_DEFINE ("DceFgaCrawdad");
+
+#include <iomanip>
+void Progress ()
+{
+ Time now = Simulator::Now ();
+ Simulator::Schedule (Seconds (1), MakeEvent (&Progress));
+ fprintf (stderr, "Elapsed: %.3f sec\r", now.GetSeconds ());
+}
+static void
+SetRlimit ()
+{
+ int ret;
+ struct rlimit limit;
+ limit.rlim_cur = 1000000;
+ limit.rlim_max = 1000000;
+
+ ret = setrlimit(RLIMIT_NOFILE, &limit);
+ if (ret == -1)
+ {
+ perror ("setrlimit");
+ }
+ return;
+}
+
+
+
+static void RunIp (Ptr<Node> node, Time at, std::string str)
+{
+ DceApplicationHelper process;
+ ApplicationContainer apps;
+ process.SetBinary ("ip");
+ process.SetStackSize (1<<16);
+ process.ResetArguments();
+ process.ParseArguments(str.c_str ());
+ apps = process.Install (node);
+ apps.Start (at);
+}
+
+static void AddAddress (Ptr<Node> node, Time at, uint32_t sim_suffix, const char *address)
+{
+ std::ostringstream oss;
+ oss << "-f inet6 addr add " << address << " dev sim" << sim_suffix;
+ RunIp (node, at, oss.str ());
+ oss.str("");
+ oss << "link set sim" << sim_suffix << " up";
+ RunIp (node, Seconds (at.GetSeconds () + 0.1), oss.str ());
+}
+
+static void AddRoute (Ptr<Node> node, Time at, const char *dest, const char *gw, uint32_t sim_suffix)
+{
+ std::ostringstream oss;
+ oss << "-6 route add " << dest << " via " << gw << " dev sim" << sim_suffix;
+ RunIp (node, at, oss.str ());
+}
+
+static void RunIp6Tables (Ptr<Node> node, Time at, std::string str)
+{
+ // return;
+ DceApplicationHelper process;
+ ApplicationContainer apps;
+ process.SetBinary ("ip6tables");
+ process.SetStackSize (1<<16);
+ process.ResetArguments();
+ process.ParseArguments(str.c_str ());
+ apps = process.Install (node);
+ apps.Start (at);
+}
+
+std::string mnp_base = "2001:200:0:";
+std::string hoa_base = "2001:500:0:";
+bool isDebug = false;
+int numRFR = 1;
+
+void
+ConfigureMRs (NodeContainer mr)
+{
+ //
+ // NetDevice Conf
+ //
+ WifiHelper wifi = WifiHelper::Default ();
+ wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
+ wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
+ "DataMode",StringValue("DsssRate1Mbps"),
+ "ControlMode",StringValue("DsssRate1Mbps"));
+ YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
+ YansWifiChannelHelper phyChannel = YansWifiChannelHelper::Default ();
+ NqosWifiMacHelper mac;
+ // For Egress interface (adhoc)
+ mac.SetType ("ns3::AdhocWifiMac", "Ssid", SsidValue (Ssid ("manemo-eiei")));
+ phy.SetChannel (phyChannel.Create ());
+ wifi.Install (phy, mac, mr);
+
+ // For Ingress (AP)
+ // mac.SetType ("ns3::ApWifiMac", "Ssid", SsidValue (Ssid ("manemo-ingress")));
+ // phy.SetChannel (phyChannel.Create ());
+ // wifi.Install (phy, mac, mr);
+
+ //
+ // Upper Layers
+ //
+ Mip6dHelper mip6d;
+ for (uint32_t i = 0; i< mr.GetN (); i++)
+ {
+ //
+ // IP address configuration
+ //
+ std::ostringstream mnp;
+
+ // Ingress Interface (FIXME)
+ CsmaHelper csma;
+ csma.Install (mr.Get (i));
+
+ // others
+ RunIp (mr.Get (i), Seconds (0.15), "link set lo up");
+ RunIp (mr.Get (i), Seconds (0.2), "link set ip6tnl0 up");
+ RunIp (mr.Get (i), Seconds (0.25), "addr");
+
+ // EI interface
+ mnp.str ("");
+ mnp << mnp_base << std::hex << i;
+ AddAddress (mr.Get (i), Seconds (0.6), 0, (mnp.str () + "::1/128").c_str ());
+
+ // Ingress
+ AddAddress (mr.Get (i), Seconds (0.8), 1, (mnp.str () + "::1/64").c_str ());
+
+
+ // zebra
+ QuaggaHelper quagga;
+ quagga.EnableRadvd (mr.Get (i), "sim0", "");
+ // quagga.EnableRadvd (mr.Get (i), "sim1", (mnp.str () + "::/64").c_str ());
+ quagga.EnableTdpNina (mr.Get (i));
+ quagga.EnableEgressIF (mr.Get (i), "sim0");
+// quagga.EnableNat (mr.Get (i));
+ if (isDebug||1)
+ {
+ quagga.EnableZebraDebug (mr.Get (i));
+ }
+ if (i < numRFR)
+ {
+ quagga.EnableTdpFixedRouter (mr.Get (i));
+ }
+ quagga.Install (mr.Get (i));
+
+ // mip6d
+#if 0
+ std::ostringstream hoa;
+ hoa << hoa_base << std::hex << i;
+ mip6d.AddMobileNetworkPrefix (mr.Get (i), Ipv6Address ((mnp.str () + "::/64").c_str()), Ipv6Prefix (64));
+ mip6d.AddHomeAgentAddress (mr.Get (i), Ipv6Address ((hoa.str () + "::1/64").c_str ()));
+
+ mip6d.AddHomeAddress (mr.Get (i), Ipv6Address ((hoa.str () + "::2/64").c_str ()), Ipv6Prefix (64));
+ mip6d.AddEgressInterface (mr.Get (i), "sim0");
+
+ mip6d.EnableMR (mr.Get (i));
+ mip6d.Install (mr.Get (i));
+#endif
+ }
+
+ if (isDebug)
+ phy.EnablePcapAll ("pcap/dce-fga-crawdad");
+
+ return;
+}
+
+// Example to use ns2 traces file in ns3
+int main (int argc, char *argv[])
+{
+ std::string traceDir = "/home/tazaki/Downloads/crawdad/cabspottingdata/";
+ // int nodeNum=20;
+ int nodeNum=536;
+ int trial = 1;
+ int duration = 1213089934 - 1211018404;
+
+ // Parse command line attribute
+ CommandLine cmd;
+ cmd.AddValue ("traceDir", "Crawdad movement trace directory", traceDir);
+ cmd.AddValue ("trial", "Set num of trial", trial);
+ cmd.AddValue ("isDebug", "Debug mode", isDebug);
+ cmd.AddValue ("numRFR", "The number of Root FR", numRFR);
+ cmd.AddValue ("nodeNum", "The number of node", nodeNum);
+ cmd.Parse (argc,argv);
+
+ // Enable logging from the crawdad helper
+ LogComponentEnable ("CrawdadMobilityHelper",LOG_LEVEL_WARN);
+
+ SetRlimit ();
+ std::cout << "Random seed will " << trial << std::endl;
+ SeedManager::SetSeed (trial);
+ SeedManager::SetRun (trial + 2);
+
+
+ // Create mobile routers.
+ NodeContainer mr;
+ mr.Create (nodeNum);
+ CrawdadMobilityHelper crawdad = CrawdadMobilityHelper (traceDir);
+ crawdad.Install (); // MR with Crawdad Trace
+ ConfigureMRs (mr);
+
+
+ DceManagerHelper dceMng;
+ dceMng.SetTaskManagerAttribute ("FiberManagerType",
+ EnumValue (0));
+ dceMng.SetAttribute ("MinimizeOpenFiles", BooleanValue (true));
+ dceMng.SetLoader ("ns3::DlmLoaderFactory");
+ dceMng.SetNetworkStack("ns3::LinuxSocketFdFactory",
+ "Library", StringValue ("libnet-next-2.6.so"));
+ dceMng.Install (mr);
+
+
+ if (isDebug || 1)
+ Simulator::ScheduleNow (Progress);
+ Simulator::Stop (Seconds (duration));
+ Simulator::Run ();
+ Simulator::Destroy ();
+
+ return 0;
+}
diff -r a1527ef7aacd example/dce-fga.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/dce-fga.cc Thu Mar 29 13:55:22 2012 +0900
@@ -0,0 +1,829 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+#include "ns3/network-module.h"
+#include "ns3/core-module.h"
+#include "ns3/internet-module.h"
+#include "ns3/dce-module.h"
+#include "ns3/mip6d-helper.h"
+#include "ns3/csma-helper.h"
+#include "ns3/wifi-helper.h"
+#include "ns3/yans-wifi-helper.h"
+#include "ns3/nqos-wifi-mac-helper.h"
+#include "ns3/mobility-module.h"
+#include "ns3/ping6-helper.h"
+#include "ns3/topology-read-module.h"
+#include "ns3/mgt-headers.h" // from wifi module
+
+#include <iomanip>
+#include <sys/resource.h>
+
+using namespace ns3;
+NS_LOG_COMPONENT_DEFINE ("mip6d-rf");
+
+static void RunIp (Ptr<Node> node, Time at, std::string str)
+{
+ DceApplicationHelper process;
+ ApplicationContainer apps;
+ process.SetBinary ("ip");
+ process.SetStackSize (1<<16);
+ process.ResetArguments();
+ process.ParseArguments(str.c_str ());
+ apps = process.Install (node);
+ apps.Start (at);
+}
+
+static void AddAddress (Ptr<Node> node, Time at, uint32_t sim_suffix, const char *address)
+{
+ std::ostringstream oss;
+ oss << "-f inet6 addr add " << address << " dev sim" << sim_suffix;
+ RunIp (node, at, oss.str ());
+ oss.str("");
+ oss << "link set sim" << sim_suffix << " up";
+ RunIp (node, Seconds (at.GetSeconds () + 0.1), oss.str ());
+}
+
+static void AddRoute (Ptr<Node> node, Time at, const char *dest, const char *gw, uint32_t sim_suffix)
+{
+ std::ostringstream oss;
+ oss << "-6 route add " << dest << " via " << gw << " dev sim" << sim_suffix;
+ RunIp (node, at, oss.str ());
+}
+
+static void RunIp6Tables (Ptr<Node> node, Time at, std::string str)
+{
+ // return;
+ DceApplicationHelper process;
+ ApplicationContainer apps;
+ process.SetBinary ("ip6tables");
+ process.SetStackSize (1<<16);
+ process.ResetArguments();
+ process.ParseArguments(str.c_str ());
+ apps = process.Install (node);
+ apps.Start (at);
+}
+
+static void
+SetRlimit ()
+{
+ int ret;
+ struct rlimit limit;
+ limit.rlim_cur = 1000000;
+ limit.rlim_max = 1000000;
+
+ ret = setrlimit(RLIMIT_NOFILE, &limit);
+ if (ret == -1)
+ {
+ perror ("setrlimit");
+ }
+ return;
+}
+
+static void
+SetVelocity (Ptr<Node> node, Vector vel)
+{
+ Ptr<ConstantVelocityMobilityModel> mobility =
+ node->GetObject<ConstantVelocityMobilityModel> ();
+ mobility->SetVelocity (vel);
+}
+
+
+
+uint32_t useAdhoc = 0; // 0: E-I (nemobs), 1: EI-EI (nat-manemo), 2: E-I (nat-manemo)
+uint32_t useMobility = 0;
+int stopTime = 800;
+double ping6_interval = 1.0;
+bool doPing = true;
+bool doPerf = false;
+double startTime = 50.0;
+int trial = 1;
+uint32_t mrNodes = 7;
+bool mobilityDebug = false;
+
+std::string bgp_sim0_base ("2001:300:0:");
+std::string ha_sim0_base ("2001:200:0:8a");
+std::string mnp_base ("2001:200:0:88");
+std::string ar_arcore = "3000:1000:500:100::1/64";
+std::string ar_arcore2 = "3000:1000:500:100::2/64";
+std::string ar0_mnet = "4000:1000:500:100::1/64";
+std::string cn_network = "5000:100:0:1000::1/64";
+std::string ar1_wifi_net = "4000:2000:500:100::/64";
+std::string ar1_wifi_link = "4000:2000:500:100::3/64";
+std::string ar0_ar1_link = "6000:500:200:0::";
+uint32_t ar0_attatch_rtr = 60;
+uint32_t cn_attatch_rtr = 61;
+uint32_t diff_x = 100;
+uint32_t diff_y = 100;
+double move_start = 550.0;
+double move_end = 600.0;
+
+NodeContainer
+CreateAccessNetwork ()
+{
+ Ptr<TopologyReader> inFile = 0;
+ TopologyReaderHelper topoHelp;
+
+ NodeContainer nodes;
+
+ std::string format ("Rocketfuel");
+ std::string input ("examples/topology-read/RocketFuel_toposample_1239_weights.txt");
+
+ input = "3967.weights.intra";
+
+ topoHelp.SetFileName(input);
+ topoHelp.SetFileType(format);
+ inFile = topoHelp.GetTopologyReader();
+
+ if (inFile != 0)
+ {
+ nodes = inFile->Read ();
+ }
+
+ if (nodes.GetN () == 0)
+ {
+ NS_LOG_ERROR ("Problems reading node information the topology file. Failing.");
+ return nodes;
+ }
+ if (inFile->LinksSize () == 0)
+ {
+ NS_LOG_ERROR ("Problems reading the topology file. Failing.");
+ return nodes;
+ }
+ NS_LOG_INFO ("Rocketfuel topology created with " << nodes.GetN () << " nodes and " <<
+ inFile->LinksSize () << " links (from " << input << ")");
+
+ //
+ // Step 1
+ // Node Basic Configuration
+ //
+
+ DceManagerHelper processManager;
+ processManager.SetTaskManagerAttribute ("FiberManagerType",
+ EnumValue (0));
+ processManager.SetAttribute ("MinimizeOpenFiles", BooleanValue (true));
+ // processManager.SetLoader ("ns3::DlmLoaderFactory");
+ processManager.SetNetworkStack("ns3::LinuxSocketFdFactory",
+ "Library", StringValue ("libnet-next-2.6.so"));
+ processManager.Install (nodes);
+
+ //
+ // Step 2
+ // Address Configuration
+ //
+ //
+
+ int totlinks = inFile->LinksSize ();
+ NS_LOG_INFO ("creating node containers");
+ NodeContainer nc[totlinks];
+ TopologyReader::ConstLinksIterator iter;
+ int i = 0;
+ for (iter = inFile->LinksBegin (); iter != inFile->LinksEnd (); iter++, i++ )
+ {
+ nc[i] = NodeContainer (iter->GetFromNode (), iter->GetToNode ());
+ // NS_LOG_INFO ("Node " << iter->GetFromNode ()->GetId () << " and Node "<< iter->GetToNode ()->GetId () << " is paired");
+ }
+
+ NS_LOG_INFO ("creating net device containers");
+ NetDeviceContainer ndc[totlinks];
+ NodeContainer gnodes = NodeContainer::GetGlobal ();
+ CsmaHelper csma;
+ MobilityHelper mobility;
+ // mobility.Install (nodes);
+ // Configure process
+ QuaggaHelper quagga;
+ quagga.EnableBgp (nodes);
+
+ for (int i = 0; i < totlinks; i++)
+ {
+ csma.SetChannelAttribute ("DataRate", DataRateValue (5000000));
+ csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (0.20)));
+ ndc[i] = csma.Install (nc[i]);
+
+ uint32_t n1 = nc[i].Get (0)->GetId ();
+ uint32_t n2 = nc[i].Get (1)->GetId ();
+
+ // IP address
+ std::stringstream cmdstr;
+ std::stringstream n1_v6, n2_v6;
+
+ n1_v6 << bgp_sim0_base << std::setw(4) << std::setfill('0') << std::hex << i << "::1/64";
+ AddAddress (gnodes.Get (n1), Seconds (0.1), ndc[i].Get (0)->GetIfIndex (), n1_v6.str ().c_str ());
+ RunIp (gnodes.Get (n1), Seconds (0.11), "link set lo up");
+ cmdstr << "link set sim" << ndc[i].Get (0)->GetIfIndex () << " up";
+ RunIp (gnodes.Get (n1), Seconds (0.11), cmdstr.str());
+
+
+ n2_v6 << bgp_sim0_base << std::setw(4) << std::setfill('0') << std::hex << i << "::2/64";
+ AddAddress (gnodes.Get (n2), Seconds (0.1), ndc[i].Get (1)->GetIfIndex (), n2_v6.str ().c_str ());
+ RunIp (gnodes.Get (n2), Seconds (0.11), "link set lo up");
+ cmdstr.str ("");
+ cmdstr << "link set sim" << ndc[i].Get (1)->GetIfIndex () << " up";
+ RunIp (gnodes.Get (n2), Seconds (0.11), cmdstr.str());
+
+ // bgp peer
+ std::string n1_nbr = n1_v6.str ().replace (n1_v6.str ().find ("/"), 3, " ");
+ std::string n2_nbr = n2_v6.str ().replace (n2_v6.str ().find ("/"), 3, " ");
+ quagga.BgpAddNeighbor(gnodes.Get (n1), n2_nbr, quagga.GetAsn(gnodes.Get (n2)));
+ quagga.BgpAddNeighbor(gnodes.Get (n2), n1_nbr, quagga.GetAsn(gnodes.Get (n1)));
+ }
+
+ quagga.EnableZebraDebug (nodes);
+ // Config IF later
+ // MR
+ std::stringstream oss;
+ oss.str ("");
+ oss << "sim" << std::dec << nodes.Get (ar0_attatch_rtr)->GetNDevices ();
+ quagga.EnableRadvd (nodes.Get (ar0_attatch_rtr), oss.str ().c_str (),
+ "4000:1000:500:100::/64");
+
+ // CN
+ oss.str ("");
+ oss << "sim" << std::dec << nodes.Get (nodes.GetN ()-1)->GetNDevices ();
+ quagga.EnableRadvd (nodes.Get (nodes.GetN () - 1), oss.str ().c_str (),
+ "5000:100:0:1000::/64");
+
+ // HAs
+ for (uint32_t i = 0; i< mrNodes; i++)
+ {
+ oss.str ("");
+ oss << "sim" << std::dec << nodes.Get (i)->GetNDevices ();
+#ifdef FIXME
+ quagga.EnableRadvd (nodes.Get (i), oss.str ().c_str(),
+ "/64");
+#endif
+ quagga.EnableHomeAgentFlag (nodes.Get (i), oss.str ().c_str());
+ }
+
+ oss.str ("");
+ oss << "sim" << std::dec << nodes.Get (cn_attatch_rtr)->GetNDevices ();
+#ifdef FIXME
+ quagga.EnableRadvd (nodes.Get (cn_attatch_rtr), oss.str ().c_str ());
+#endif
+ if (!mobilityDebug)
+ {
+ quagga.Install (nodes);
+ }
+
+ return nodes;
+}
+
+int main (int argc, char *argv[])
+{
+ ApplicationContainer sinkApp;
+ CommandLine cmd;
+ cmd.AddValue ("useAdhoc", "use EIEI or not", useAdhoc);
+ cmd.AddValue ("useMobility", "use movement", useMobility);
+ cmd.AddValue ("stopTime", "Duration of simulation", stopTime);
+ cmd.AddValue ("startTime", "Start time of the perf transmission", startTime);
+ cmd.AddValue ("trial", "Set num of trial", trial);
+ cmd.AddValue ("mrNodes", "num of node", mrNodes);
+ cmd.AddValue ("mobilityDebug", "stop BGP session", mobilityDebug);
+ cmd.Parse (argc, argv);
+ LogComponentEnable ("mip6d-rf", LOG_LEVEL_INFO);
+
+ if (mrNodes < 6)
+ {
+ NS_LOG_WARN ("mrNodes must be >= 6");
+ return 0;
+ }
+
+ SetRlimit ();
+
+ std::cout << "Random seed will " << trial << std::endl;
+ SeedManager::SetSeed (trial);
+ SeedManager::SetRun (trial + 2);
+
+ if (useMobility)
+ {
+ ping6_interval = 1.0;
+ }
+ else
+ {
+ ping6_interval = 1.0;
+ }
+
+ NodeContainer arCore = CreateAccessNetwork ();
+
+ std::ostringstream oss;
+ NodeContainer mr, ha, ar;
+ ha.Create (mrNodes);
+ ar.Create (2);
+ mr.Create (mrNodes);
+ NodeContainer mnn, cn;
+ cn.Create (1);
+ mnn.Create (1);
+
+ MobilityHelper mobility;
+ Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
+ for (uint32_t i = 0; i < ha.GetN (); i++)
+ {
+ positionAlloc->Add (Vector (50.0 * i, 0.0, 0.0)); // HA0
+ }
+ positionAlloc->Add (Vector (75.0, 300.0, 0.0)); // AR0
+ positionAlloc->Add (Vector (275.0, 300.0, 0.0)); // AR1
+ positionAlloc->Add (Vector (-50.0, 300.0, 0.0)); // CN
+ mobility.SetPositionAllocator (positionAlloc);
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
+ mobility.Install (ha);
+ mobility.Install (ar);
+ mobility.Install (cn);
+
+
+ Ptr<ListPositionAllocator> mr_position = CreateObject<ListPositionAllocator> ();
+ mr_position->Add (Vector (70.0, 350.0, 0.0)); // MR0
+ mr_position->Add (Vector (70.0 - 1 * diff_x, 350.0 + 1 * diff_y, 0.0)); // MR1, another branch
+ mr_position->Add (Vector (70.0 + 2.5 * diff_x + 50, 350.0 + 0.5 * diff_y, 0.0)); // MR2, another floating ground
+ mobility.SetPositionAllocator (mr_position);
+ if (useMobility == 0)
+ {
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
+ mobility.Install (mr.Get (0));
+ }
+ else if (useMobility == 1)
+ {
+ mobility.SetMobilityModel ("ns3::ConstantVelocityMobilityModel");
+ mobility.Install (mr.Get (0));
+ Simulator::Schedule (Seconds (move_start), &SetVelocity, mr.Get (0), Vector (6.0,0.0,0.0));
+ Simulator::Schedule (Seconds (move_end), &SetVelocity, mr.Get (0), Vector (0.0,0.0,0.0));
+ }
+ else if (useMobility == 2)
+ {
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
+ mobility.Install (mr.Get (0));
+ }
+ else if (useMobility == 3)
+ {
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
+ mobility.Install (mr.Get (0));
+ }
+ else if (useMobility == 4)
+ {
+ mobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel",
+ "Bounds", RectangleValue (Rectangle (0, 300, 300, 350)),
+ "Distance", DoubleValue (20.0),
+ "Speed", RandomVariableValue (ConstantVariable (5)));
+ mobility.Install (mr.Get (0));
+ }
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
+ mobility.Install (mr.Get (1));
+ mobility.Install (mr.Get (2));
+
+ mobility.PushReferenceMobilityModel (mr.Get (0));
+ // Lower MR
+ for (uint32_t i = 3; i< mr.GetN (); i++)
+ {
+ if (useMobility == 2)
+ {
+ if (i == 5)
+ {
+ mobility.PopReferenceMobilityModel ();
+ mr_position = CreateObject<ListPositionAllocator> ();
+ mr_position->Add (Vector (70.0 + 1 * diff_x, 350.0 + 3 * diff_y, 0.0)); // MR4
+ mobility.SetPositionAllocator (mr_position);
+ mobility.SetMobilityModel ("ns3::ConstantVelocityMobilityModel");
+ mobility.Install (mr.Get (i));
+ mobility.PushReferenceMobilityModel (mr.Get (i));
+
+ Simulator::Schedule (Seconds (move_start), &SetVelocity, mr.Get (i), Vector (5.0,-2.4,0.0));
+ Simulator::Schedule (Seconds (move_end), &SetVelocity, mr.Get (i), Vector (0.0,0.0,0.0));
+ continue;
+ }
+
+ }
+
+ if (useMobility == 3)
+ {
+ if (i == 5)
+ {
+ mobility.PopReferenceMobilityModel ();
+ mr_position = CreateObject<ListPositionAllocator> ();
+ mr_position->Add (Vector (70.0 + 1 * diff_x, 350.0 + 3 * diff_y, 0.0)); // MR4
+ mobility.SetPositionAllocator (mr_position);
+ mobility.SetMobilityModel ("ns3::ConstantVelocityMobilityModel");
+ mobility.Install (mr.Get (i));
+ mobility.PushReferenceMobilityModel (mr.Get (i));
+
+ Simulator::Schedule (Seconds (move_start), &SetVelocity, mr.Get (i), Vector (-5.0,-2.5,0.0));
+ Simulator::Schedule (Seconds (move_end), &SetVelocity, mr.Get (i), Vector (0.0,0.0,0.0));
+ continue;
+ }
+ }
+
+ Vector pos;
+ Ptr<ListPositionAllocator> positionAllocMr =
+ CreateObject<ListPositionAllocator> ();
+ if (i == 3)
+ pos.x = (1.0) * diff_x;
+ else
+ pos.x = 0;
+ pos.y = diff_y;
+ positionAllocMr->Add (pos);
+ mobility.SetPositionAllocator (positionAllocMr);
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
+
+ mobility.Install (mr.Get (i));
+ pos = mr.Get (i)->GetObject<MobilityModel> ()->GetPosition ();
+ std::cout << "pos of " << i-1 << " is " << pos.x << ":" << pos.y << std::endl;
+ mobility.PopReferenceMobilityModel ();
+ mobility.PushReferenceMobilityModel (mr.Get (i));
+ }
+
+ // MNN
+ mobility.PushReferenceMobilityModel (mr.Get (mr.GetN () -1));
+ Ptr<MobilityModel> parentMobility = mr.Get (mr.GetN () -1)->GetObject<MobilityModel> ();
+ Vector pos = parentMobility->GetPosition ();
+ Ptr<ListPositionAllocator> positionAllocMnn =
+ CreateObject<ListPositionAllocator> ();
+ pos.x = 5;
+ pos.y = 20;
+ positionAllocMnn->Add (pos);
+ mobility.SetPositionAllocator (positionAllocMnn);
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
+ mobility.Install (mnn);
+
+
+ //
+ // NetDevice Conf
+ //
+ WifiHelper wifi = WifiHelper::Default ();
+ // wifi.EnableLogComponents ();
+ wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
+ wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
+ "DataMode",StringValue("DsssRate1Mbps"),
+ "ControlMode",StringValue("DsssRate1Mbps"));
+ YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
+
+ YansWifiChannelHelper phyChannel = YansWifiChannelHelper::Default ();
+ NqosWifiMacHelper mac;
+ CsmaHelper csma;
+ csma.SetChannelAttribute ("DataRate", DataRateValue (5000000));
+ csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (0.20)));
+
+ NetDeviceContainer arcore_dev = csma.Install (NodeContainer (ar.Get (0), arCore.Get (ar0_attatch_rtr)));
+
+ for (uint32_t i = 0; i < ha.GetN (); i++)
+ {
+ if (i == cn_attatch_rtr || i == ar0_attatch_rtr)
+ continue;
+ csma.Install (NodeContainer (arCore.Get (i), ha.Get (i)));
+ }
+
+ // For Egress interface (sta-wifi)
+ Ptr<YansWifiChannel> mr0sta;
+ Ssid ssid = Ssid ("manemo-ingress");
+ // AP (ingress)
+ mac.SetType ("ns3::ApWifiMac", "Ssid", SsidValue (ssid));
+ phy.SetChannel (mr0sta = phyChannel.Create ());
+ wifi.Install (phy, mac, ar.Get (0));
+ // STA (egress)
+ mac.SetType ("ns3::StaWifiMac",
+ "Ssid", SsidValue (ssid),
+ "MaxMissedBeacons", UintegerValue (5),
+ "ActiveProbing", BooleanValue (false));
+ phy.SetChannel (mr0sta);
+ wifi.Install (phy, mac, mr.Get (0));
+ wifi.Install (phy, mac, mr.Get (2));
+
+
+ // For Ingress interface (wifi-ap) and AR
+ Ptr<YansWifiChannel> nextap;
+ Ptr<YansWifiChannel> mr0adhoc;
+ Ptr<YansWifiChannel> mr0ap, mr1ap;
+ for (uint32_t i = 0; i < mr.GetN (); i++)
+ {
+ // STA (egress), sim0
+ mac.SetType ("ns3::StaWifiMac",
+ "Ssid", SsidValue (ssid),
+ "MaxMissedBeacons", UintegerValue (5),
+ "ActiveProbing", BooleanValue (false));
+ if (i != 0 && i != 2)
+ {
+ if (useAdhoc == 1)
+ {
+ phy.SetChannel (phyChannel.Create ());
+ }
+ else
+ {
+ phy.SetChannel (nextap);
+ }
+ wifi.Install (phy, mac, mr.Get(i));
+ }
+
+ // Adhoc (EIEI), sim1
+ mac.SetType ("ns3::AdhocWifiMac");
+ if (useAdhoc == 1)
+ {
+ if (mr0adhoc == 0)
+ {
+ mr0adhoc = phyChannel.Create ();
+ }
+ phy.SetChannel (mr0adhoc);
+ }
+ else
+ {
+ phy.SetChannel (phyChannel.Create ());
+ }
+
+ if (useMobility != 1 || i != 2)
+ wifi.Install (phy, mac, mr.Get (i));
+
+ // AP (ingress), sim2
+ mac.SetType ("ns3::ApWifiMac", "Ssid", SsidValue (ssid));
+ if (i == 2 || i == 4)
+ phy.SetChannel (mr1ap);
+ else
+ phy.SetChannel (nextap = phyChannel.Create ());
+
+ if (useMobility != 1 || i != 2)
+ wifi.Install (phy, mac, mr.Get(i));
+ if (i == 0)
+ {
+ mr0ap = nextap;
+ }
+ else if (i == 1)
+ {
+ mr1ap = nextap;
+ }
+ else if (i == 2)
+ {
+ nextap = mr0ap;
+ }
+ else if (i == 4)
+ {
+ nextap = mr1ap;
+ }
+ }
+
+ // AR0 Link for CN
+ NetDeviceContainer cn_devices = csma.Install (NodeContainer (arCore.Get (cn_attatch_rtr), cn.Get (0)));
+
+ // For AR1
+ // csma.SetChannelAttribute ("DataRate", DataRateValue (5000000));
+ csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (20)));
+ csma.Install (NodeContainer (ar.Get (0), ar.Get (1)));
+ // For MR0's Egress interface (wifi)
+ phy.SetChannel (mr0sta);
+ wifi.Install (phy, mac, ar.Get (1));
+
+ // setup MNN (sta)
+ mac.SetType ("ns3::StaWifiMac",
+ "Ssid", SsidValue (ssid),
+ "ActiveProbing", BooleanValue (false));
+ phy.SetChannel (nextap);
+ NetDeviceContainer mnn_devices = wifi.Install (phy, mac, mnn.Get(0));
+
+
+
+ //
+ // ProcessManager Configuration
+ //
+ DceManagerHelper processManager;
+ processManager.SetTaskManagerAttribute ("FiberManagerType",
+ EnumValue (0));
+ processManager.SetAttribute ("MinimizeOpenFiles", BooleanValue (true));
+ // processManager.SetLoader ("ns3::DlmLoaderFactory");
+ processManager.SetNetworkStack("ns3::LinuxSocketFdFactory",
+ "Library", StringValue ("libnet-next-2.6.so"));
+ processManager.Install (mr);
+ processManager.Install (ha);
+ processManager.Install (ar);
+
+ // Prefix configuration
+ std::vector <std::string> *ha_links = new std::vector <std::string>;
+ std::vector <std::string> *ar_links = new std::vector <std::string>;
+ std::vector <std::string> *mnps = new std::vector <std::string>;
+
+ uint32_t i = 0;
+ for (i = 0; i < mr.GetN (); i++)
+ {
+ std::ostringstream oss;
+ oss << ha_sim0_base << std::setw(2) << std::setfill('0') << std::hex << i << "::1/64";
+ ha_links->push_back (oss.str ());
+
+ oss.str ("");
+ oss << ha_sim0_base << std::setw(2) << std::setfill('0') << std::hex << i << "::2/64";
+ ar_links->push_back (oss.str ());
+
+ oss.str ("");
+ oss << mnp_base << std::setw(2) << std::setfill('0') << std::hex << i << "::" << (i+16);
+ mnps->push_back (oss.str ());
+ }
+
+ // For HA
+ for (uint32_t i = 0; i< ha.GetN (); i++)
+ {
+ // ArCore
+ AddAddress (arCore.Get (i), Seconds (0.5 * (i + 1)), arCore.Get (i)->GetNDevices () - 1, ar_links->at (i).c_str ());
+ std::string gw = ha_links->at (i);
+ gw.replace (gw.find ("/"), 3, " ");
+ std::string dst = mnps->at (i);
+ dst.append ("/64");
+ AddRoute (arCore.Get (i), Seconds (0.5 * (i + 1)), dst.c_str (), gw.c_str (), arCore.Get (i)->GetNDevices () - 1);
+
+ if (i == cn_attatch_rtr || i == ar0_attatch_rtr)
+ continue;
+
+ // HA
+ AddAddress (ha.Get (i), Seconds (0.1), 0, ha_links->at (i).c_str ());
+ gw = ar_links->at (i);
+ gw.replace (gw.find ("/"), 3, " ");
+ AddRoute (ha.Get (i), Seconds (0.3), "default", gw.c_str (), 0);
+ }
+
+ // For AR0 (the intermediate node)
+ AddAddress (ar.Get (0), Seconds (0.05), 1, ar0_mnet.c_str ());
+ AddAddress (ar.Get (0), Seconds (0.15), 2, (ar0_ar1_link + "2/64").c_str ());
+ AddRoute (ar.Get (0), Seconds (mrNodes*0.15+2), ar1_wifi_net.c_str (), (ar0_ar1_link+"3").c_str (), 2);
+ RunIp (ar.Get (0), Seconds (10.15), "route show table all");
+ RunIp (ar.Get (0), Seconds (10.15), "neig show all");
+ RunIp (ar.Get (0), Seconds (10.15), "addr");
+
+ // For AR1
+ AddAddress (ar.Get (1), Seconds (0.1), 0, (ar0_ar1_link + "3/64").c_str ());
+ AddAddress (ar.Get (1), Seconds (0.1), 1, ar1_wifi_link.c_str ());
+ AddRoute (ar.Get (1), Seconds (0.15), "default", (ar0_ar1_link + "2").c_str (), 0);
+
+ // For MR
+ for (uint32_t i = 0; i< mr.GetN (); i++)
+ {
+ // EI interface
+ // XXX: we need to add sim1 first since netlink notification won't come sometimes
+ oss.str ("");
+ oss << mnps->at (i) << "/128";
+ AddAddress (mr.Get (i), Seconds (1.6), 1, oss.str ().c_str ());
+
+ // Egress
+ RunIp (mr.Get (i), Seconds (0.15), "link set sim0 up");
+ RunIp (mr.Get (i), Seconds (0.2), "link set ip6tnl0 up");
+
+ // Ingress
+ std::string iif = mnps->at (i);
+ oss.str ("");
+ oss << iif << "/64";
+ AddAddress (mr.Get (i), Seconds (0.4), 2, oss.str ().c_str ());
+ }
+
+ // ARCore and AR0
+ AddAddress (ar.Get (0), Seconds (0.3), arcore_dev.Get (0)->GetIfIndex (), ar_arcore.c_str ());
+ std::string gw = ar_arcore2;
+ gw.replace (gw.find ("/"), 3, " ");
+ AddRoute (ar.Get (0), Seconds (0.3), "default", gw.c_str (), arcore_dev.Get (0)->GetIfIndex ());
+
+ AddAddress (arCore.Get (ar0_attatch_rtr), Seconds (0.3), arcore_dev.Get (1)->GetIfIndex (), ar_arcore2.c_str ());
+ gw = ar_arcore;
+ gw.replace (gw.find ("/"), 3, " ");
+ AddRoute (arCore.Get (ar0_attatch_rtr), Seconds (0.3), ar0_mnet.c_str (), gw.c_str (), arcore_dev.Get (1)->GetIfIndex ());
+ AddRoute (arCore.Get (ar0_attatch_rtr), Seconds (0.4), ar1_wifi_net.c_str (), gw.c_str (), arcore_dev.Get (1)->GetIfIndex ());
+
+ // Process Configuration
+ DceApplicationHelper process;
+ ApplicationContainer apps;
+ QuaggaHelper quagga;
+ Mip6dHelper mip6d;
+ if (useAdhoc)
+ {
+ mip6d.SetBinary ("mip6d.natmanemo");
+ }
+
+ // HA
+ for (uint32_t i = 0; i< ha.GetN (); i++)
+ {
+ mip6d.AddHaServedPrefix (ha.Get (i), Ipv6Address (mnps->at (i).c_str ()), Ipv6Prefix (64));
+ mip6d.EnableHA (ha.Get (i));
+ mip6d.Install (ha.Get (i));
+ }
+
+ // AR
+ // for MR
+#ifdef FIXME
+ quagga.EnableRadvd (ar.Get (0), "sim1");
+#endif
+ // for CN
+#ifdef FIXME
+ quagga.EnableRadvd (ar.Get (1), "sim1");
+#endif
+ quagga.EnableZebraDebug (ar);
+ quagga.Install (ar);
+
+ // MR
+ for (uint32_t i = 0; i< mr.GetN (); i++)
+ {
+ mip6d.AddMobileNetworkPrefix (mr.Get (i), Ipv6Address (mnps->at (i).c_str()), Ipv6Prefix (64));
+ std::ostringstream oss;
+ oss << ha_sim0_base << std::setw(2) << std::setfill('0') << std::hex << i << "::1/64";
+ std::string ha_addr = oss.str();
+ ha_addr.replace (ha_addr.find ("/"), 3, "\0 ");
+ mip6d.AddHomeAgentAddress (mr.Get (i), Ipv6Address (ha_addr.c_str ()));
+
+ oss.str ("");
+ oss << ha_sim0_base << std::setw(2) << std::setfill('0') << std::hex << i << "::2/64";
+ std::string hoa = oss.str();
+ hoa.replace (hoa.find ("/"), 4, "000\0");
+ mip6d.AddHomeAddress (mr.Get (i), Ipv6Address (hoa.c_str ()), Ipv6Prefix (64));
+ mip6d.AddEgressInterface (mr.Get (i), "sim0");
+ if (i != 0)
+ mip6d.AddEgressInterface (mr.Get (i), "sim1");
+ }
+ mip6d.EnableMR (mr);
+ mip6d.Install (mr);
+
+ if (useAdhoc)
+ {
+ quagga.EnableNat (mr.Get (0));
+ quagga.EnableNat (mr.Get (2));
+
+ RunIp (ha.Get (1), Seconds (30.1), "route show table all");
+
+ for (uint32_t i = 0; i< mr.GetN (); i++)
+ {
+ std::string proxy_addr = ar0_mnet;
+ proxy_addr.replace (proxy_addr.find ("/") - 1, 4, "\0\0\0\0");
+ oss.str ("");
+ oss << "-6 neighbor add proxy " << proxy_addr << std::hex << (i+16) << " dev sim0";
+ RunIp (mr.Get (0), Seconds (20.1 + 0.01 * i), oss.str ().c_str ());
+ RunIp (mr.Get (2), Seconds (20.1 + 0.01 * i), oss.str ().c_str ());
+
+ proxy_addr = ar1_wifi_link;
+ proxy_addr.replace (proxy_addr.find ("/") - 1, 4, "\0\0\0\0");
+ oss.str ("");
+ oss << "-6 neighbor add proxy " << proxy_addr << std::hex << (i+16) << " dev sim0";
+ RunIp (mr.Get (0), Seconds (20.1 + 0.01 * i), oss.str ().c_str ());
+ RunIp (mr.Get (2), Seconds (20.1 + 0.01 * i), oss.str ().c_str ());
+
+ }
+ RunIp (mr.Get (0), Seconds (100.1), "-6 neighbor");
+ RunIp (mr.Get (2), Seconds (100.1), "-6 neighbor");
+ }
+ else
+ {
+ RunIp6Tables (mr.Get (0), Seconds (100.1), "-F -t nat");
+ }
+
+ for (uint32_t i = 0; i< mr.GetN (); i++)
+ {
+ quagga.EnableEgressIF (mr.Get (i), "sim0");
+#ifdef FIXME
+ quagga.EnableRadvd (mr.Get (i), "sim1");
+#endif
+ quagga.EnableEgressIF (mr.Get (i), "sim1");
+#ifdef FIXME
+ quagga.EnableRadvd (mr.Get (i), "sim2");
+#endif
+ RunIp (mr.Get (i), Seconds (200), "route show table all");
+ RunIp (mr.Get (i), Seconds (200), "addr list");
+ }
+ quagga.EnableZebraDebug (mr);
+ quagga.EnableTdpNina (mr);
+ if (!mobilityDebug)
+ {
+ quagga.Install (mr);
+ }
+
+ // MNN and CN
+ /* Install IPv4/IPv6 stack */
+ InternetStackHelper internetv6;
+ internetv6.SetIpv4StackInstall (false);
+ internetv6.Install (mnn);
+ internetv6.Install (cn);
+
+ // MNN
+ Ipv6AddressHelper ipv6;
+ Ipv6InterfaceContainer src = ipv6.AssignWithoutAddress (mnn_devices.Get (0));
+
+ // CN
+ AddAddress (arCore.Get (cn_attatch_rtr), Seconds (0.3), cn_devices.Get (0)->GetIfIndex (), cn_network.c_str ());
+ cn_network.replace (cn_network.find ("/") - 1, 4, "\0 ");
+ ipv6.NewNetwork (Ipv6Address (cn_network.c_str ()), 64);
+ Ipv6InterfaceContainer dst = ipv6.Assign (cn_devices.Get (1));
+
+ if (doPing)
+ {
+ LogComponentEnable ("Ping6Application", LOG_LEVEL_INFO);
+ // Ping6
+ uint32_t packetSize = 64;
+ uint32_t maxPacketCount = 5000;
+ Time interPacketInterval = Seconds (ping6_interval);
+ Ping6Helper ping6;
+
+ ping6.SetLocal (Ipv6Address::GetAny ());
+ ping6.SetRemote (dst.GetAddress (0, 1));
+
+ ping6.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount));
+ ping6.SetAttribute ("Interval", TimeValue (interPacketInterval));
+ ping6.SetAttribute ("PacketSize", UintegerValue (packetSize));
+ ApplicationContainer apps = ping6.Install (mnn.Get (0));
+ apps.Start (Seconds (2.0));
+ apps.Stop (Seconds (stopTime));
+ }
+
+
+
+ // Pcap
+ phy.EnablePcapAll ("pcap/mip6d-rf");
+ csma.EnablePcapAll ("pcap/mip6d-rf");
+
+
+ Simulator::Stop (Seconds (stopTime + 5.0));
+ Simulator::Run ();
+ Simulator::Destroy ();
+
+ return 0;
+}
diff -r a1527ef7aacd example/dce-mip6d.cc
--- a/example/dce-mip6d.cc Thu Mar 29 13:55:03 2012 +0900
+++ b/example/dce-mip6d.cc Thu Mar 29 13:55:22 2012 +0900
@@ -139,7 +139,7 @@
NetDeviceContainer cn_devices = csma.Install (NodeContainer (ar.Get (0), cn.Get (0)));
DceManagerHelper processManager;
- // processManager.SetLoader ("ns3::DlmLoaderFactory");
+ processManager.SetLoader ("ns3::DlmLoaderFactory");
processManager.SetNetworkStack("ns3::LinuxSocketFdFactory",
"Library", StringValue ("libnet-next-2.6.so"));
processManager.Install (mr);
diff -r a1527ef7aacd exec_sudo.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exec_sudo.sh Thu Mar 29 13:55:22 2012 +0900
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+ulimit -c unlimited
+. utils/setenv.sh
+$1
diff -r a1527ef7aacd helper/mip6d-helper.cc
--- a/helper/mip6d-helper.cc Thu Mar 29 13:55:03 2012 +0900
+++ b/helper/mip6d-helper.cc Thu Mar 29 13:55:22 2012 +0900
@@ -92,6 +92,7 @@
Mip6dHelper::Mip6dHelper ()
+ : m_binary_file ("mip6d")
{
}
@@ -279,6 +280,13 @@
}
void
+Mip6dHelper::SetBinary (std::string binary_file)
+{
+ m_binary_file = binary_file;
+ return;
+}
+
+void
Mip6dHelper::GenerateConfig (Ptr<Node> node)
{
Ptr<Mip6dConfig> mip6d_conf = node->GetObject<Mip6dConfig>();
@@ -434,7 +442,7 @@
GenerateConfig (node);
process.ResetArguments ();
- process.SetBinary ("mip6d");
+ process.SetBinary (m_binary_file);
process.ParseArguments ("-c /etc/mip6d.conf -d 10");
process.SetStackSize (1<<16);
apps.Add (process.Install (node));
diff -r a1527ef7aacd helper/mip6d-helper.h
--- a/helper/mip6d-helper.h Thu Mar 29 13:55:03 2012 +0900
+++ b/helper/mip6d-helper.h Thu Mar 29 13:55:22 2012 +0900
@@ -98,8 +98,10 @@
// Common
void EnableDebug (NodeContainer nodes);
void UseManualConfig (NodeContainer nodes);
+ void SetBinary (std::string binary_file);
private:
+ std::string m_binary_file;
/**
* \internal
*/
diff -r a1527ef7aacd helper/quagga-helper.cc
--- a/helper/quagga-helper.cc Thu Mar 29 13:55:03 2012 +0900
+++ b/helper/quagga-helper.cc Thu Mar 29 13:55:22 2012 +0900
@@ -42,7 +42,9 @@
QuaggaConfig ()
: m_tdpenable (false),
m_zebradebug (false),
- m_usemanualconf (false)
+ m_usemanualconf (false),
+ m_natenable (false),
+ m_tdfixed (false)
{
m_radvd_if = new std::map<std::string, std::string> ();
m_egress_if = new std::vector<std::string> ();
@@ -82,6 +84,8 @@
bool m_tdpenable;
bool m_zebradebug;
bool m_usemanualconf;
+ bool m_natenable;
+ bool m_tdfixed;
std::map<std::string, std::string> *m_radvd_if;
std::vector<std::string> *m_egress_if;
std::vector<std::string> *m_haflag_if;
@@ -379,6 +383,22 @@
}
void
+QuaggaHelper::EnableTdpFixedRouter (NodeContainer nodes)
+{
+ for (uint32_t i = 0; i < nodes.GetN (); i ++)
+ {
+ Ptr<QuaggaConfig> zebra_conf = nodes.Get (i)->GetObject<QuaggaConfig>();
+ if (!zebra_conf)
+ {
+ zebra_conf = new QuaggaConfig ();
+ nodes.Get (i)->AggregateObject (zebra_conf);
+ }
+ zebra_conf->m_tdfixed = true;
+ }
+ return;
+}
+
+void
QuaggaHelper::EnableZebraDebug (NodeContainer nodes)
{
for (uint32_t i = 0; i < nodes.GetN (); i ++)
@@ -456,6 +476,22 @@
return;
}
+void
+QuaggaHelper::EnableNat (NodeContainer nodes)
+{
+ for (uint32_t i = 0; i < nodes.GetN (); i ++)
+ {
+ Ptr<QuaggaConfig> zebra_conf = nodes.Get (i)->GetObject<QuaggaConfig>();
+ if (!zebra_conf)
+ {
+ zebra_conf = new QuaggaConfig ();
+ nodes.Get (i)->AggregateObject (zebra_conf);
+ }
+ zebra_conf->m_natenable = true;
+ }
+ return;
+}
+
// BGP
void
QuaggaHelper::EnableBgp (NodeContainer nodes)
@@ -548,10 +584,11 @@
conf << *zebra_conf;
if (zebra_conf->m_zebradebug)
{
- conf << "debug zebra kernel" << std::endl;
- conf << "debug zebra events" << std::endl;
- // conf << "debug zebra route" << std::endl;
- conf << "debug zebra packet" << std::endl;
+ conf << "debug zebra tree" << std::endl;
+// conf << "debug zebra kernel" << std::endl;
+ // conf << "debug zebra events" << std::endl;
+ // conf << "debug zebra route" << std::endl;
+ // conf << "debug zebra packet" << std::endl;
}
// radvd
@@ -560,7 +597,10 @@
{
conf << "interface " << (*i).first << std::endl;
conf << " ipv6 nd ra-interval 5" << std::endl;
- conf << " ipv6 nd prefix " << (*i).second << " 30 15" <<std::endl;
+ if ((*i).second.length () != 0)
+ {
+ conf << " ipv6 nd prefix-advertisement " << (*i).second << " 30 15" <<std::endl;
+ }
conf << " no ipv6 nd suppress-ra" << std::endl;
conf << "!" << std::endl;
}
@@ -580,6 +620,7 @@
{
conf << "interface " << (*i) << std::endl;
conf << " ipv6 nd td egress" << std::endl;
+ conf << " ipv6 nd td ingress" << std::endl;
conf << "!" << std::endl;
}
@@ -590,6 +631,19 @@
conf << "interface eth" << *i << std::endl;
}
+ if (zebra_conf->m_tdpenable)
+ {
+ conf << "ipv6 nd nina enable" << std::endl;
+ }
+ if (zebra_conf->m_tdfixed)
+ {
+ conf << "ipv6 nd td fixed" << std::endl;
+ }
+ if (zebra_conf->m_natenable)
+ {
+ conf << "ipv6 nat enable" << std::endl;
+ }
+
#if 0
if (zebra_conf->m_tdpenable)
{
@@ -760,10 +814,10 @@
GenerateConfigZebra (node);
process.SetBinary ("zebra");
process.AddArguments ("-f", zebra_conf->GetFilename ());
- process.AddArguments ("-i", "/usr/local/etc/zebra.pid");
+ // process.AddArguments ("-i", "/usr/local/etc/zebra.pid");
process.SetStackSize (1<<16);
apps.Add (process.Install (node));
- apps.Get(0)->SetStartTime (Seconds (1.0 + 0.01 * node->GetId ()));
+ apps.Get(0)->SetStartTime (Seconds (10.0 + 0.01 * node->GetId ()));
node->AddApplication (apps.Get (0));
Ptr<OspfConfig> ospf_conf = node->GetObject<OspfConfig>();
diff -r a1527ef7aacd helper/quagga-helper.h
--- a/helper/quagga-helper.h Thu Mar 29 13:55:03 2012 +0900
+++ b/helper/quagga-helper.h Thu Mar 29 13:55:22 2012 +0900
@@ -82,11 +82,13 @@
void EnableOspf (NodeContainer nodes);
void EnableOspfDebug (NodeContainer nodes);
void EnableTdpNina (NodeContainer nodes);
+ void EnableTdpFixedRouter (NodeContainer nodes);
void EnableZebraDebug (NodeContainer nodes);
void EnableRadvd (Ptr<Node> node, const char *ifname, const char *prefix);
void EnableEgressIF (Ptr<Node> node, const char *ifname);
void EnableHomeAgentFlag (Ptr<Node> node, const char *ifname);
void UseManualConfig (NodeContainer nodes);
+ void EnableNat (NodeContainer nodes);
void EnableBgp (NodeContainer nodes);
uint32_t GetAsn (Ptr<Node> node);
void BgpAddNeighbor (Ptr<Node> node, std::string n, uint32_t asn);
diff -r a1527ef7aacd model/linux-socket-fd-factory.cc
--- a/model/linux-socket-fd-factory.cc Thu Mar 29 13:55:03 2012 +0900
+++ b/model/linux-socket-fd-factory.cc Thu Mar 29 13:55:22 2012 +0900
@@ -524,7 +524,7 @@
this));
Set (".net.ipv4.conf.all.forwarding", "1");
Set (".net.ipv4.conf.all.log_martians", "1");
- Set (".net.ipv6.conf.all.forwarding", "1");
+ // Set (".net.ipv6.conf.all.forwarding", "1");
Set (".net.ipv6.conf.all.proxy_ndp", "1");
while (!m_earlySysfs.empty ())
diff -r a1527ef7aacd test/test-pipe.cc
--- a/test/test-pipe.cc Thu Mar 29 13:55:03 2012 +0900
+++ b/test/test-pipe.cc Thu Mar 29 13:55:22 2012 +0900
@@ -354,7 +354,7 @@
int
-main (int c, char *v)
+main (int c, char **v)
{
test1 ();
test2 ();
diff -r a1527ef7aacd utils/setenv.zsh
--- a/utils/setenv.zsh Thu Mar 29 13:55:03 2012 +0900
+++ b/utils/setenv.zsh Thu Mar 29 13:55:22 2012 +0900
@@ -5,7 +5,7 @@
BASE=$PWD
LD_LIBRARY_PATH="$BASE/ns-3-dce/build/lib:$BASE/build/lib:$BASE/build/bin:$BASE/ns-3-dce/build/bin:."
PKG_CONFIG_PATH="$BASE/build/lib/pkgconfig"
-PATH="$PATH:$BASE/build/bin:$BASE/build/sbin:/home/tazaki/hgworks/ns-3-dce-thehajime/build/bin:/home/tazaki/hgworks/ns-3-dce-thehajime/build/sbin"
+PATH="$BASE/build/bin:$BASE/build/sbin:/home/tazaki/hgworks/ns-3-dce-thehajime/build/bin:/home/tazaki/hgworks/ns-3-dce-thehajime/build/sbin:$PATH"
PYTHONPATH=$BASE/ns-3-dev/build/debug/bindings/python:$BASE/ns-3-dev/src/visualizer:$BASE/pybindgen-0.15.0.795:$BASE/build/lib/python2.6/site-packages/
export LD_LIBRARY_PATH PKG_CONFIG_PATH PATH PYTHONPATH
cd $BASE/ns-3-dce
diff -r a1527ef7aacd wscript
--- a/wscript Thu Mar 29 13:55:03 2012 +0900
+++ b/wscript Thu Mar 29 13:55:22 2012 +0900
@@ -277,6 +277,14 @@
target='bin/dce-dsmip6d',
source=['example/dce-dsmip6d.cc'])
+ module.add_example(needed = ['core', 'internet', 'dce', 'csma', 'mobility', 'wifi', 'visualizer', 'topology-read'],
+ target='bin/dce-fga',
+ source=['example/dce-fga.cc'])
+
+ module.add_example(needed = ['core', 'internet', 'dce', 'csma', 'mobility', 'wifi', 'visualizer', 'topology-read'],
+ target='bin/dce-fga-crawdad',
+ source=['example/dce-fga-crawdad.cc'])
+
def build(bld):
build_netlink(bld)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment