diff --git a/examples/routing/wscript b/examples/routing/wscript index bff334d06..dcaf22d8a 100644 --- a/examples/routing/wscript +++ b/examples/routing/wscript @@ -29,14 +29,6 @@ def build(bld): ['point-to-point', 'internet-stack', 'global-routing' , 'csma-cd']) obj.source = 'mixed-global-routing.cc' - obj = bld.create_ns3_program('simple-point-to-point-olsr', - ['point-to-point', 'internet-stack', 'olsr']) - obj.source = 'simple-point-to-point-olsr.cc' - - obj = bld.create_ns3_program('olsr-hna', - ['core', 'simulator', 'mobility', 'wifi']) - obj.source = 'olsr-hna.cc' - obj = bld.create_ns3_program('nix-simple', ['point-to-point', 'internet-stack', 'nix-vector-routing']) obj.source = 'nix-simple.cc' diff --git a/src/helper/wscript b/src/helper/wscript index 9ff7e5b7e..1369ef4ad 100644 --- a/src/helper/wscript +++ b/src/helper/wscript @@ -1,12 +1,11 @@ ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- def build(bld): - helper = bld.create_ns3_module('helper', ['internet-stack', 'wifi', 'point-to-point', 'csma', 'olsr', 'global-routing', 'onoff', 'packet-sink', 'udp-echo', 'spectrum']) + helper = bld.create_ns3_module('helper', ['internet-stack', 'wifi', 'point-to-point', 'csma', 'global-routing', 'onoff', 'packet-sink', 'udp-echo', 'spectrum']) helper.source = [ 'node-container.cc', 'net-device-container.cc', 'wifi-helper.cc', - 'olsr-helper.cc', 'point-to-point-helper.cc', 'csma-helper.cc', 'mobility-helper.cc', @@ -62,7 +61,6 @@ def build(bld): 'node-container.h', 'net-device-container.h', 'wifi-helper.h', - 'olsr-helper.h', 'point-to-point-helper.h', 'csma-helper.h', 'mobility-helper.h', diff --git a/src/routing/olsr/olsr.h b/src/routing/olsr/doc/olsr.h similarity index 100% rename from src/routing/olsr/olsr.h rename to src/routing/olsr/doc/olsr.h diff --git a/examples/routing/olsr-hna.cc b/src/routing/olsr/examples/olsr-hna.cc similarity index 100% rename from examples/routing/olsr-hna.cc rename to src/routing/olsr/examples/olsr-hna.cc diff --git a/examples/routing/simple-point-to-point-olsr.cc b/src/routing/olsr/examples/simple-point-to-point-olsr.cc similarity index 100% rename from examples/routing/simple-point-to-point-olsr.cc rename to src/routing/olsr/examples/simple-point-to-point-olsr.cc diff --git a/src/routing/olsr/examples/wscript b/src/routing/olsr/examples/wscript new file mode 100644 index 000000000..0485a13b3 --- /dev/null +++ b/src/routing/olsr/examples/wscript @@ -0,0 +1,10 @@ +## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- + +def build(bld): + obj = bld.create_ns3_program('simple-point-to-point-olsr', + ['point-to-point', 'internet-stack', 'olsr']) + obj.source = 'simple-point-to-point-olsr.cc' + + obj = bld.create_ns3_program('olsr-hna', + ['core', 'simulator', 'mobility', 'wifi']) + obj.source = 'olsr-hna.cc' diff --git a/src/helper/olsr-helper.cc b/src/routing/olsr/helper/olsr-helper.cc similarity index 100% rename from src/helper/olsr-helper.cc rename to src/routing/olsr/helper/olsr-helper.cc diff --git a/src/helper/olsr-helper.h b/src/routing/olsr/helper/olsr-helper.h similarity index 97% rename from src/helper/olsr-helper.h rename to src/routing/olsr/helper/olsr-helper.h index afcebec53..18b8687ee 100644 --- a/src/helper/olsr-helper.h +++ b/src/routing/olsr/helper/olsr-helper.h @@ -22,8 +22,8 @@ #include "ns3/object-factory.h" #include "ns3/node.h" -#include "node-container.h" -#include "ipv4-routing-helper.h" +#include "ns3/node-container.h" +#include "ns3/ipv4-routing-helper.h" #include #include diff --git a/src/routing/olsr/olsr-header.cc b/src/routing/olsr/model/olsr-header.cc similarity index 100% rename from src/routing/olsr/olsr-header.cc rename to src/routing/olsr/model/olsr-header.cc diff --git a/src/routing/olsr/olsr-header.h b/src/routing/olsr/model/olsr-header.h similarity index 100% rename from src/routing/olsr/olsr-header.h rename to src/routing/olsr/model/olsr-header.h diff --git a/src/routing/olsr/olsr-repositories.h b/src/routing/olsr/model/olsr-repositories.h similarity index 100% rename from src/routing/olsr/olsr-repositories.h rename to src/routing/olsr/model/olsr-repositories.h diff --git a/src/routing/olsr/olsr-routing-protocol.cc b/src/routing/olsr/model/olsr-routing-protocol.cc similarity index 100% rename from src/routing/olsr/olsr-routing-protocol.cc rename to src/routing/olsr/model/olsr-routing-protocol.cc diff --git a/src/routing/olsr/olsr-routing-protocol.h b/src/routing/olsr/model/olsr-routing-protocol.h similarity index 100% rename from src/routing/olsr/olsr-routing-protocol.h rename to src/routing/olsr/model/olsr-routing-protocol.h diff --git a/src/routing/olsr/olsr-state.cc b/src/routing/olsr/model/olsr-state.cc similarity index 100% rename from src/routing/olsr/olsr-state.cc rename to src/routing/olsr/model/olsr-state.cc diff --git a/src/routing/olsr/olsr-state.h b/src/routing/olsr/model/olsr-state.h similarity index 100% rename from src/routing/olsr/olsr-state.h rename to src/routing/olsr/model/olsr-state.h diff --git a/src/routing/olsr/wscript b/src/routing/olsr/wscript index 2893a7393..1c6f0dedf 100644 --- a/src/routing/olsr/wscript +++ b/src/routing/olsr/wscript @@ -4,9 +4,10 @@ def build(bld): module = bld.create_ns3_module('olsr', ['internet-stack', 'contrib']) module.includes = '.' module.source = [ - 'olsr-header.cc', - 'olsr-state.cc', - 'olsr-routing-protocol.cc', + 'model/olsr-header.cc', + 'model/olsr-state.cc', + 'model/olsr-routing-protocol.cc', + 'helper/olsr-helper.cc', 'test/regression-test-suite.cc', 'test/hello-regression-test.cc', 'test/tc-regression-test.cc', @@ -16,9 +17,13 @@ def build(bld): headers = bld.new_task_gen('ns3header') headers.module = 'olsr' headers.source = [ - 'olsr-routing-protocol.h', - 'olsr-header.h', - 'olsr-state.h', - 'olsr-repositories.h', + 'model/olsr-routing-protocol.h', + 'model/olsr-header.h', + 'model/olsr-state.h', + 'model/olsr-repositories.h', + 'helper/olsr-helper.h', ] + + if bld.env['ENABLE_EXAMPLES']: + bld.add_subdirs('examples')