From 881e0a6655d86773109c2ab0570dc290d83c824c Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Tue, 26 Oct 2010 18:02:17 +0100 Subject: [PATCH] Module layout rework for static-routing, list-routing, global-routing --- examples/csma/csma-multicast.cc | 2 ++ examples/emulation/emu-ping.cc | 2 ++ examples/ipv6/fragmentation-ipv6.cc | 1 + examples/ipv6/icmpv6-redirect.cc | 1 + examples/ipv6/radvd-two-prefix.cc | 1 + examples/routing/global-injection-slash32.cc | 2 ++ examples/routing/nix-simple.cc | 2 ++ examples/routing/nms-p2p-nix.cc | 2 ++ examples/routing/simple-routing-ping6.cc | 1 + examples/routing/static-routing-slash32.cc | 1 + .../socket/socket-bound-static-routing.cc | 2 ++ .../socket/socket-bound-tcp-static-routing.cc | 2 ++ .../topology-read/topology-example-sim.cc | 2 ++ examples/wimax/wimax-multicast.cc | 2 ++ examples/wireless/multirate.cc | 2 ++ examples/wireless/wifi-simple-adhoc-grid.cc | 2 ++ src/helper/internet-stack-helper.cc | 10 +++++----- src/helper/ipv6-interface-container.cc | 2 +- src/helper/wscript | 12 +---------- .../helper/ipv4-global-routing-helper.cc | 0 .../helper/ipv4-global-routing-helper.h | 4 ++-- .../{ => model}/candidate-queue.cc | 0 .../{ => model}/candidate-queue.h | 0 .../{ => model}/global-route-manager-impl.cc | 0 .../{ => model}/global-route-manager-impl.h | 0 .../{ => model}/global-route-manager.cc | 0 .../{ => model}/global-route-manager.h | 0 .../{ => model}/global-router-interface.cc | 0 .../{ => model}/global-router-interface.h | 0 .../{ => model}/global-routing.h | 0 .../{ => model}/ipv4-global-routing.cc | 0 .../{ => model}/ipv4-global-routing.h | 0 src/routing/global-routing/wscript | 18 +++++++++-------- .../helper/ipv4-list-routing-helper.cc | 0 .../helper/ipv4-list-routing-helper.h | 2 +- .../helper/ipv6-list-routing-helper.cc | 0 .../helper/ipv6-list-routing-helper.h | 2 +- .../{ => model}/ipv4-list-routing.cc | 0 .../{ => model}/ipv4-list-routing.h | 0 .../{ => model}/ipv6-list-routing.cc | 0 .../{ => model}/ipv6-list-routing.h | 0 src/routing/list-routing/wscript | 12 +++++++---- src/routing/olsr/examples/olsr-hna.cc | 2 ++ .../examples/simple-point-to-point-olsr.cc | 2 ++ .../helper/ipv4-static-routing-helper.cc | 0 .../helper/ipv4-static-routing-helper.h | 6 +++--- .../helper/ipv6-static-routing-helper.cc | 0 .../helper/ipv6-static-routing-helper.h | 6 +++--- .../{ => model}/ipv4-routing-table-entry.cc | 0 .../{ => model}/ipv4-routing-table-entry.h | 0 .../{ => model}/ipv4-static-routing.cc | 0 .../{ => model}/ipv4-static-routing.h | 0 .../{ => model}/ipv6-routing-table-entry.cc | 0 .../{ => model}/ipv6-routing-table-entry.h | 0 .../{ => model}/ipv6-static-routing.cc | 0 .../{ => model}/ipv6-static-routing.h | 0 src/routing/static-routing/wscript | 20 +++++++++++-------- 57 files changed, 78 insertions(+), 47 deletions(-) rename src/{ => routing/global-routing}/helper/ipv4-global-routing-helper.cc (100%) rename src/{ => routing/global-routing}/helper/ipv4-global-routing-helper.h (97%) rename src/routing/global-routing/{ => model}/candidate-queue.cc (100%) rename src/routing/global-routing/{ => model}/candidate-queue.h (100%) rename src/routing/global-routing/{ => model}/global-route-manager-impl.cc (100%) rename src/routing/global-routing/{ => model}/global-route-manager-impl.h (100%) rename src/routing/global-routing/{ => model}/global-route-manager.cc (100%) rename src/routing/global-routing/{ => model}/global-route-manager.h (100%) rename src/routing/global-routing/{ => model}/global-router-interface.cc (100%) rename src/routing/global-routing/{ => model}/global-router-interface.h (100%) rename src/routing/global-routing/{ => model}/global-routing.h (100%) rename src/routing/global-routing/{ => model}/ipv4-global-routing.cc (100%) rename src/routing/global-routing/{ => model}/ipv4-global-routing.h (100%) rename src/{ => routing/list-routing}/helper/ipv4-list-routing-helper.cc (100%) rename src/{ => routing/list-routing}/helper/ipv4-list-routing-helper.h (98%) rename src/{ => routing/list-routing}/helper/ipv6-list-routing-helper.cc (100%) rename src/{ => routing/list-routing}/helper/ipv6-list-routing-helper.h (98%) rename src/routing/list-routing/{ => model}/ipv4-list-routing.cc (100%) rename src/routing/list-routing/{ => model}/ipv4-list-routing.h (100%) rename src/routing/list-routing/{ => model}/ipv6-list-routing.cc (100%) rename src/routing/list-routing/{ => model}/ipv6-list-routing.h (100%) rename src/{ => routing/static-routing}/helper/ipv4-static-routing-helper.cc (100%) rename src/{ => routing/static-routing}/helper/ipv4-static-routing-helper.h (98%) rename src/{ => routing/static-routing}/helper/ipv6-static-routing-helper.cc (100%) rename src/{ => routing/static-routing}/helper/ipv6-static-routing-helper.h (97%) rename src/routing/static-routing/{ => model}/ipv4-routing-table-entry.cc (100%) rename src/routing/static-routing/{ => model}/ipv4-routing-table-entry.h (100%) rename src/routing/static-routing/{ => model}/ipv4-static-routing.cc (100%) rename src/routing/static-routing/{ => model}/ipv4-static-routing.h (100%) rename src/routing/static-routing/{ => model}/ipv6-routing-table-entry.cc (100%) rename src/routing/static-routing/{ => model}/ipv6-routing-table-entry.h (100%) rename src/routing/static-routing/{ => model}/ipv6-static-routing.cc (100%) rename src/routing/static-routing/{ => model}/ipv6-static-routing.h (100%) diff --git a/examples/csma/csma-multicast.cc b/examples/csma/csma-multicast.cc index f8e3a2a5a..4fe8f7b4c 100644 --- a/examples/csma/csma-multicast.cc +++ b/examples/csma/csma-multicast.cc @@ -36,6 +36,8 @@ #include "ns3/simulator-module.h" #include "ns3/node-module.h" #include "ns3/helper-module.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" using namespace ns3; diff --git a/examples/emulation/emu-ping.cc b/examples/emulation/emu-ping.cc index 359e16f92..c5c3143e0 100644 --- a/examples/emulation/emu-ping.cc +++ b/examples/emulation/emu-ping.cc @@ -58,6 +58,8 @@ #include "ns3/emu-module.h" #include "ns3/v4ping-module.h" #include "ns3/helper-module.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" using namespace ns3; diff --git a/examples/ipv6/fragmentation-ipv6.cc b/examples/ipv6/fragmentation-ipv6.cc index fcf1ee713..be1281111 100644 --- a/examples/ipv6/fragmentation-ipv6.cc +++ b/examples/ipv6/fragmentation-ipv6.cc @@ -32,6 +32,7 @@ #include "ns3/core-module.h" #include "ns3/simulator-module.h" #include "ns3/helper-module.h" +#include "ns3/ipv6-static-routing-helper.h" #include "ns3/ipv6-routing-table-entry.h" diff --git a/examples/ipv6/icmpv6-redirect.cc b/examples/ipv6/icmpv6-redirect.cc index 4409a10d0..87c57aa8b 100644 --- a/examples/ipv6/icmpv6-redirect.cc +++ b/examples/ipv6/icmpv6-redirect.cc @@ -44,6 +44,7 @@ #include "ns3/core-module.h" #include "ns3/simulator-module.h" #include "ns3/helper-module.h" +#include "ns3/ipv6-static-routing-helper.h" #include "ns3/ipv6-routing-table-entry.h" diff --git a/examples/ipv6/radvd-two-prefix.cc b/examples/ipv6/radvd-two-prefix.cc index d7b703f83..ee8638e9b 100644 --- a/examples/ipv6/radvd-two-prefix.cc +++ b/examples/ipv6/radvd-two-prefix.cc @@ -41,6 +41,7 @@ #include "ns3/radvd.h" #include "ns3/radvd-interface.h" #include "ns3/radvd-prefix.h" +#include "ns3/ipv6-static-routing-helper.h" using namespace ns3; diff --git a/examples/routing/global-injection-slash32.cc b/examples/routing/global-injection-slash32.cc index cb5e298fd..13743a363 100644 --- a/examples/routing/global-injection-slash32.cc +++ b/examples/routing/global-injection-slash32.cc @@ -34,6 +34,8 @@ #include "ns3/ipv4-list-routing.h" #include "ns3/ipv4-routing-table-entry.h" #include "ns3/global-router-interface.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" using namespace ns3; using std::cout; diff --git a/examples/routing/nix-simple.cc b/examples/routing/nix-simple.cc index e22aca983..eff44da33 100644 --- a/examples/routing/nix-simple.cc +++ b/examples/routing/nix-simple.cc @@ -18,6 +18,8 @@ #include "ns3/simulator-module.h" #include "ns3/node-module.h" #include "ns3/helper-module.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" /* * Simple point to point links: diff --git a/examples/routing/nms-p2p-nix.cc b/examples/routing/nms-p2p-nix.cc index b23bd50b7..dc5cf5386 100644 --- a/examples/routing/nms-p2p-nix.cc +++ b/examples/routing/nms-p2p-nix.cc @@ -23,6 +23,8 @@ #include "ns3/packet-sink.h" #include "ns3/point-to-point-net-device.h" #include "ns3/simulator.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" using namespace std; using namespace ns3; diff --git a/examples/routing/simple-routing-ping6.cc b/examples/routing/simple-routing-ping6.cc index 80161ad55..510cfbb49 100644 --- a/examples/routing/simple-routing-ping6.cc +++ b/examples/routing/simple-routing-ping6.cc @@ -32,6 +32,7 @@ #include "ns3/core-module.h" #include "ns3/simulator-module.h" #include "ns3/helper-module.h" +#include "ns3/ipv6-static-routing-helper.h" #include "ns3/ipv6-routing-table-entry.h" diff --git a/examples/routing/static-routing-slash32.cc b/examples/routing/static-routing-slash32.cc index eb328b5af..4b598b00f 100644 --- a/examples/routing/static-routing-slash32.cc +++ b/examples/routing/static-routing-slash32.cc @@ -29,6 +29,7 @@ #include "ns3/simulator-module.h" #include "ns3/node-module.h" #include "ns3/helper-module.h" +#include "ns3/ipv4-static-routing-helper.h" using namespace ns3; diff --git a/examples/socket/socket-bound-static-routing.cc b/examples/socket/socket-bound-static-routing.cc index 70d0cff45..4603fac17 100644 --- a/examples/socket/socket-bound-static-routing.cc +++ b/examples/socket/socket-bound-static-routing.cc @@ -39,6 +39,8 @@ #include "ns3/simulator-module.h" #include "ns3/node-module.h" #include "ns3/helper-module.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" using namespace ns3; diff --git a/examples/socket/socket-bound-tcp-static-routing.cc b/examples/socket/socket-bound-tcp-static-routing.cc index f0f390694..5748d9d69 100644 --- a/examples/socket/socket-bound-tcp-static-routing.cc +++ b/examples/socket/socket-bound-tcp-static-routing.cc @@ -39,6 +39,8 @@ #include "ns3/simulator-module.h" #include "ns3/node-module.h" #include "ns3/helper-module.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" using namespace ns3; diff --git a/examples/topology-read/topology-example-sim.cc b/examples/topology-read/topology-example-sim.cc index f70e072ad..48ffcf3b6 100644 --- a/examples/topology-read/topology-example-sim.cc +++ b/examples/topology-read/topology-example-sim.cc @@ -31,6 +31,8 @@ #include "ns3/node-module.h" #include "ns3/helper-module.h" #include "ns3/simulator-module.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" #include "ns3/topology-read-module.h" #include diff --git a/examples/wimax/wimax-multicast.cc b/examples/wimax/wimax-multicast.cc index 471c79f39..def3b3cfb 100644 --- a/examples/wimax/wimax-multicast.cc +++ b/examples/wimax/wimax-multicast.cc @@ -61,6 +61,8 @@ #include "ns3/global-route-manager.h" #include "ns3/constant-position-mobility-model.h" #include "ns3/random-waypoint-mobility-model.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" #include "ns3/vector.h" diff --git a/examples/wireless/multirate.cc b/examples/wireless/multirate.cc index eaaaef692..187bf5f0b 100644 --- a/examples/wireless/multirate.cc +++ b/examples/wireless/multirate.cc @@ -58,6 +58,8 @@ #include "ns3/wifi-module.h" #include "ns3/flow-monitor-helper.h" #include "ns3/olsr-helper.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" #include #include diff --git a/examples/wireless/wifi-simple-adhoc-grid.cc b/examples/wireless/wifi-simple-adhoc-grid.cc index 413950075..2129a97d3 100644 --- a/examples/wireless/wifi-simple-adhoc-grid.cc +++ b/examples/wireless/wifi-simple-adhoc-grid.cc @@ -77,6 +77,8 @@ #include "ns3/contrib-module.h" #include "ns3/wifi-module.h" #include "ns3/olsr-helper.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" #include #include diff --git a/src/helper/internet-stack-helper.cc b/src/helper/internet-stack-helper.cc index 42f1f3ddc..401725956 100644 --- a/src/helper/internet-stack-helper.cc +++ b/src/helper/internet-stack-helper.cc @@ -164,11 +164,11 @@ #include "ns3/core-config.h" #include "ns3/arp-l3-protocol.h" #include "internet-stack-helper.h" -#include "ipv4-list-routing-helper.h" -#include "ipv4-static-routing-helper.h" -#include "ipv4-global-routing-helper.h" -#include "ipv6-list-routing-helper.h" -#include "ipv6-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-global-routing-helper.h" +#include "ns3/ipv6-list-routing-helper.h" +#include "ns3/ipv6-static-routing-helper.h" #include "trace-helper.h" #include #include diff --git a/src/helper/ipv6-interface-container.cc b/src/helper/ipv6-interface-container.cc index 69ee2d1e3..2d3a6d0ad 100644 --- a/src/helper/ipv6-interface-container.cc +++ b/src/helper/ipv6-interface-container.cc @@ -22,7 +22,7 @@ #include "ns3/names.h" #include "ipv6-interface-container.h" -#include "ipv6-static-routing-helper.h" +#include "ns3/ipv6-static-routing-helper.h" namespace ns3 { diff --git a/src/helper/wscript b/src/helper/wscript index 7d1034609..b26e05f12 100644 --- a/src/helper/wscript +++ b/src/helper/wscript @@ -1,7 +1,7 @@ ## -*- 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', 'global-routing', 'onoff', 'packet-sink', 'udp-echo', 'spectrum']) + helper = bld.create_ns3_module('helper', ['internet-stack', 'wifi', 'point-to-point', 'csma', 'onoff', 'packet-sink', 'udp-echo', 'spectrum']) helper.source = [ 'node-container.cc', 'net-device-container.cc', @@ -11,7 +11,6 @@ def build(bld): 'mobility-helper.cc', 'ns2-mobility-helper.cc', 'ipv4-address-helper.cc', - 'ipv4-static-routing-helper.cc', 'internet-stack-helper.cc', 'application-container.cc', 'on-off-helper.cc', @@ -26,8 +25,6 @@ def build(bld): 'nqos-wifi-mac-helper.cc', 'qos-wifi-mac-helper.cc', 'ipv4-nix-vector-helper.cc', - 'ipv4-global-routing-helper.cc', - 'ipv4-list-routing-helper.cc', 'ipv4-routing-helper.cc', 'aodv-helper.cc', 'mesh-helper.cc', @@ -36,8 +33,6 @@ def build(bld): 'athstats-helper.cc', 'ipv6-address-helper.cc', 'ipv6-interface-container.cc', - 'ipv6-static-routing-helper.cc', - 'ipv6-list-routing-helper.cc', 'ipv6-routing-helper.cc', 'ping6-helper.cc', 'animation-interface.cc', @@ -65,7 +60,6 @@ def build(bld): 'mobility-helper.h', 'ns2-mobility-helper.h', 'ipv4-address-helper.h', - 'ipv4-static-routing-helper.h', 'internet-stack-helper.h', 'application-container.h', 'on-off-helper.h', @@ -80,8 +74,6 @@ def build(bld): 'nqos-wifi-mac-helper.h', 'qos-wifi-mac-helper.h', 'ipv4-nix-vector-helper.h', - 'ipv4-global-routing-helper.h', - 'ipv4-list-routing-helper.h', 'ipv4-routing-helper.h', 'aodv-helper.h', 'mesh-helper.h', @@ -91,8 +83,6 @@ def build(bld): 'athstats-helper.h', 'ipv6-address-helper.h', 'ipv6-interface-container.h', - 'ipv6-static-routing-helper.h', - 'ipv6-list-routing-helper.h', 'ipv6-routing-helper.h', 'ping6-helper.h', 'animation-interface.h', diff --git a/src/helper/ipv4-global-routing-helper.cc b/src/routing/global-routing/helper/ipv4-global-routing-helper.cc similarity index 100% rename from src/helper/ipv4-global-routing-helper.cc rename to src/routing/global-routing/helper/ipv4-global-routing-helper.cc diff --git a/src/helper/ipv4-global-routing-helper.h b/src/routing/global-routing/helper/ipv4-global-routing-helper.h similarity index 97% rename from src/helper/ipv4-global-routing-helper.h rename to src/routing/global-routing/helper/ipv4-global-routing-helper.h index 1ffb20ae3..4d50b8ef0 100644 --- a/src/helper/ipv4-global-routing-helper.h +++ b/src/routing/global-routing/helper/ipv4-global-routing-helper.h @@ -20,8 +20,8 @@ #ifndef IPV4_GLOBAL_ROUTING_HELPER_H #define IPV4_GLOBAL_ROUTING_HELPER_H -#include "node-container.h" -#include "ipv4-routing-helper.h" +#include "ns3/node-container.h" +#include "ns3/ipv4-routing-helper.h" namespace ns3 { diff --git a/src/routing/global-routing/candidate-queue.cc b/src/routing/global-routing/model/candidate-queue.cc similarity index 100% rename from src/routing/global-routing/candidate-queue.cc rename to src/routing/global-routing/model/candidate-queue.cc diff --git a/src/routing/global-routing/candidate-queue.h b/src/routing/global-routing/model/candidate-queue.h similarity index 100% rename from src/routing/global-routing/candidate-queue.h rename to src/routing/global-routing/model/candidate-queue.h diff --git a/src/routing/global-routing/global-route-manager-impl.cc b/src/routing/global-routing/model/global-route-manager-impl.cc similarity index 100% rename from src/routing/global-routing/global-route-manager-impl.cc rename to src/routing/global-routing/model/global-route-manager-impl.cc diff --git a/src/routing/global-routing/global-route-manager-impl.h b/src/routing/global-routing/model/global-route-manager-impl.h similarity index 100% rename from src/routing/global-routing/global-route-manager-impl.h rename to src/routing/global-routing/model/global-route-manager-impl.h diff --git a/src/routing/global-routing/global-route-manager.cc b/src/routing/global-routing/model/global-route-manager.cc similarity index 100% rename from src/routing/global-routing/global-route-manager.cc rename to src/routing/global-routing/model/global-route-manager.cc diff --git a/src/routing/global-routing/global-route-manager.h b/src/routing/global-routing/model/global-route-manager.h similarity index 100% rename from src/routing/global-routing/global-route-manager.h rename to src/routing/global-routing/model/global-route-manager.h diff --git a/src/routing/global-routing/global-router-interface.cc b/src/routing/global-routing/model/global-router-interface.cc similarity index 100% rename from src/routing/global-routing/global-router-interface.cc rename to src/routing/global-routing/model/global-router-interface.cc diff --git a/src/routing/global-routing/global-router-interface.h b/src/routing/global-routing/model/global-router-interface.h similarity index 100% rename from src/routing/global-routing/global-router-interface.h rename to src/routing/global-routing/model/global-router-interface.h diff --git a/src/routing/global-routing/global-routing.h b/src/routing/global-routing/model/global-routing.h similarity index 100% rename from src/routing/global-routing/global-routing.h rename to src/routing/global-routing/model/global-routing.h diff --git a/src/routing/global-routing/ipv4-global-routing.cc b/src/routing/global-routing/model/ipv4-global-routing.cc similarity index 100% rename from src/routing/global-routing/ipv4-global-routing.cc rename to src/routing/global-routing/model/ipv4-global-routing.cc diff --git a/src/routing/global-routing/ipv4-global-routing.h b/src/routing/global-routing/model/ipv4-global-routing.h similarity index 100% rename from src/routing/global-routing/ipv4-global-routing.h rename to src/routing/global-routing/model/ipv4-global-routing.h diff --git a/src/routing/global-routing/wscript b/src/routing/global-routing/wscript index be014eb41..8e3105321 100644 --- a/src/routing/global-routing/wscript +++ b/src/routing/global-routing/wscript @@ -3,17 +3,19 @@ def build(bld): module = bld.create_ns3_module('global-routing', ['node']) module.source = [ - 'global-router-interface.cc', - 'global-route-manager.cc', - 'global-route-manager-impl.cc', - 'candidate-queue.cc', - 'ipv4-global-routing.cc', + 'model/global-router-interface.cc', + 'model/global-route-manager.cc', + 'model/global-route-manager-impl.cc', + 'model/candidate-queue.cc', + 'model/ipv4-global-routing.cc', + 'helper/ipv4-global-routing-helper.cc', ] headers = bld.new_task_gen('ns3header') headers.module = 'global-routing' headers.source = [ - 'global-router-interface.h', - 'global-route-manager.h', - 'ipv4-global-routing.h', + 'model/global-router-interface.h', + 'model/global-route-manager.h', + 'model/ipv4-global-routing.h', + 'helper/ipv4-global-routing-helper.h', ] diff --git a/src/helper/ipv4-list-routing-helper.cc b/src/routing/list-routing/helper/ipv4-list-routing-helper.cc similarity index 100% rename from src/helper/ipv4-list-routing-helper.cc rename to src/routing/list-routing/helper/ipv4-list-routing-helper.cc diff --git a/src/helper/ipv4-list-routing-helper.h b/src/routing/list-routing/helper/ipv4-list-routing-helper.h similarity index 98% rename from src/helper/ipv4-list-routing-helper.h rename to src/routing/list-routing/helper/ipv4-list-routing-helper.h index feb405c40..1470a1aee 100644 --- a/src/helper/ipv4-list-routing-helper.h +++ b/src/routing/list-routing/helper/ipv4-list-routing-helper.h @@ -20,7 +20,7 @@ #ifndef IPV4_LIST_ROUTING_HELPER_H #define IPV4_LIST_ROUTING_HELPER_H -#include "ipv4-routing-helper.h" +#include "ns3/ipv4-routing-helper.h" #include #include diff --git a/src/helper/ipv6-list-routing-helper.cc b/src/routing/list-routing/helper/ipv6-list-routing-helper.cc similarity index 100% rename from src/helper/ipv6-list-routing-helper.cc rename to src/routing/list-routing/helper/ipv6-list-routing-helper.cc diff --git a/src/helper/ipv6-list-routing-helper.h b/src/routing/list-routing/helper/ipv6-list-routing-helper.h similarity index 98% rename from src/helper/ipv6-list-routing-helper.h rename to src/routing/list-routing/helper/ipv6-list-routing-helper.h index 5bf6a28b7..ed64b5769 100644 --- a/src/helper/ipv6-list-routing-helper.h +++ b/src/routing/list-routing/helper/ipv6-list-routing-helper.h @@ -24,7 +24,7 @@ #include -#include "ipv6-routing-helper.h" +#include "ns3/ipv6-routing-helper.h" namespace ns3 { diff --git a/src/routing/list-routing/ipv4-list-routing.cc b/src/routing/list-routing/model/ipv4-list-routing.cc similarity index 100% rename from src/routing/list-routing/ipv4-list-routing.cc rename to src/routing/list-routing/model/ipv4-list-routing.cc diff --git a/src/routing/list-routing/ipv4-list-routing.h b/src/routing/list-routing/model/ipv4-list-routing.h similarity index 100% rename from src/routing/list-routing/ipv4-list-routing.h rename to src/routing/list-routing/model/ipv4-list-routing.h diff --git a/src/routing/list-routing/ipv6-list-routing.cc b/src/routing/list-routing/model/ipv6-list-routing.cc similarity index 100% rename from src/routing/list-routing/ipv6-list-routing.cc rename to src/routing/list-routing/model/ipv6-list-routing.cc diff --git a/src/routing/list-routing/ipv6-list-routing.h b/src/routing/list-routing/model/ipv6-list-routing.h similarity index 100% rename from src/routing/list-routing/ipv6-list-routing.h rename to src/routing/list-routing/model/ipv6-list-routing.h diff --git a/src/routing/list-routing/wscript b/src/routing/list-routing/wscript index 9829768de..ff56ad370 100644 --- a/src/routing/list-routing/wscript +++ b/src/routing/list-routing/wscript @@ -3,13 +3,17 @@ def build(bld): module = bld.create_ns3_module('list-routing', ['node']) module.source = [ - 'ipv4-list-routing.cc', - 'ipv6-list-routing.cc', + 'model/ipv4-list-routing.cc', + 'model/ipv6-list-routing.cc', + 'helper/ipv4-list-routing-helper.cc', + 'helper/ipv6-list-routing-helper.cc', ] headers = bld.new_task_gen('ns3header') headers.module = 'list-routing' headers.source = [ - 'ipv4-list-routing.h', - 'ipv6-list-routing.h', + 'model/ipv4-list-routing.h', + 'model/ipv6-list-routing.h', + 'helper/ipv4-list-routing-helper.h', + 'helper/ipv6-list-routing-helper.h', ] diff --git a/src/routing/olsr/examples/olsr-hna.cc b/src/routing/olsr/examples/olsr-hna.cc index ea8d29f16..1ed153499 100644 --- a/src/routing/olsr/examples/olsr-hna.cc +++ b/src/routing/olsr/examples/olsr-hna.cc @@ -60,6 +60,8 @@ #include "ns3/ipv4-list-routing.h" #include "ns3/olsr-routing-protocol.h" #include "ns3/olsr-helper.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" #include #include diff --git a/src/routing/olsr/examples/simple-point-to-point-olsr.cc b/src/routing/olsr/examples/simple-point-to-point-olsr.cc index 07f0fc332..acf8a659c 100644 --- a/src/routing/olsr/examples/simple-point-to-point-olsr.cc +++ b/src/routing/olsr/examples/simple-point-to-point-olsr.cc @@ -45,6 +45,8 @@ #include "ns3/node-module.h" #include "ns3/helper-module.h" #include "ns3/olsr-helper.h" +#include "ns3/ipv4-static-routing-helper.h" +#include "ns3/ipv4-list-routing-helper.h" using namespace ns3; diff --git a/src/helper/ipv4-static-routing-helper.cc b/src/routing/static-routing/helper/ipv4-static-routing-helper.cc similarity index 100% rename from src/helper/ipv4-static-routing-helper.cc rename to src/routing/static-routing/helper/ipv4-static-routing-helper.cc diff --git a/src/helper/ipv4-static-routing-helper.h b/src/routing/static-routing/helper/ipv4-static-routing-helper.h similarity index 98% rename from src/helper/ipv4-static-routing-helper.h rename to src/routing/static-routing/helper/ipv4-static-routing-helper.h index 6ce21f512..63502d942 100644 --- a/src/helper/ipv4-static-routing-helper.h +++ b/src/routing/static-routing/helper/ipv4-static-routing-helper.h @@ -25,9 +25,9 @@ #include "ns3/ipv4-address.h" #include "ns3/node.h" #include "ns3/net-device.h" -#include "ipv4-routing-helper.h" -#include "node-container.h" -#include "net-device-container.h" +#include "ns3/ipv4-routing-helper.h" +#include "ns3/node-container.h" +#include "ns3/net-device-container.h" namespace ns3 { diff --git a/src/helper/ipv6-static-routing-helper.cc b/src/routing/static-routing/helper/ipv6-static-routing-helper.cc similarity index 100% rename from src/helper/ipv6-static-routing-helper.cc rename to src/routing/static-routing/helper/ipv6-static-routing-helper.cc diff --git a/src/helper/ipv6-static-routing-helper.h b/src/routing/static-routing/helper/ipv6-static-routing-helper.h similarity index 97% rename from src/helper/ipv6-static-routing-helper.h rename to src/routing/static-routing/helper/ipv6-static-routing-helper.h index 7b224504d..d1d470bdf 100644 --- a/src/helper/ipv6-static-routing-helper.h +++ b/src/routing/static-routing/helper/ipv6-static-routing-helper.h @@ -26,9 +26,9 @@ #include "ns3/node.h" #include "ns3/net-device.h" -#include "node-container.h" -#include "net-device-container.h" -#include "ipv6-routing-helper.h" +#include "ns3/node-container.h" +#include "ns3/net-device-container.h" +#include "ns3/ipv6-routing-helper.h" namespace ns3 { diff --git a/src/routing/static-routing/ipv4-routing-table-entry.cc b/src/routing/static-routing/model/ipv4-routing-table-entry.cc similarity index 100% rename from src/routing/static-routing/ipv4-routing-table-entry.cc rename to src/routing/static-routing/model/ipv4-routing-table-entry.cc diff --git a/src/routing/static-routing/ipv4-routing-table-entry.h b/src/routing/static-routing/model/ipv4-routing-table-entry.h similarity index 100% rename from src/routing/static-routing/ipv4-routing-table-entry.h rename to src/routing/static-routing/model/ipv4-routing-table-entry.h diff --git a/src/routing/static-routing/ipv4-static-routing.cc b/src/routing/static-routing/model/ipv4-static-routing.cc similarity index 100% rename from src/routing/static-routing/ipv4-static-routing.cc rename to src/routing/static-routing/model/ipv4-static-routing.cc diff --git a/src/routing/static-routing/ipv4-static-routing.h b/src/routing/static-routing/model/ipv4-static-routing.h similarity index 100% rename from src/routing/static-routing/ipv4-static-routing.h rename to src/routing/static-routing/model/ipv4-static-routing.h diff --git a/src/routing/static-routing/ipv6-routing-table-entry.cc b/src/routing/static-routing/model/ipv6-routing-table-entry.cc similarity index 100% rename from src/routing/static-routing/ipv6-routing-table-entry.cc rename to src/routing/static-routing/model/ipv6-routing-table-entry.cc diff --git a/src/routing/static-routing/ipv6-routing-table-entry.h b/src/routing/static-routing/model/ipv6-routing-table-entry.h similarity index 100% rename from src/routing/static-routing/ipv6-routing-table-entry.h rename to src/routing/static-routing/model/ipv6-routing-table-entry.h diff --git a/src/routing/static-routing/ipv6-static-routing.cc b/src/routing/static-routing/model/ipv6-static-routing.cc similarity index 100% rename from src/routing/static-routing/ipv6-static-routing.cc rename to src/routing/static-routing/model/ipv6-static-routing.cc diff --git a/src/routing/static-routing/ipv6-static-routing.h b/src/routing/static-routing/model/ipv6-static-routing.h similarity index 100% rename from src/routing/static-routing/ipv6-static-routing.h rename to src/routing/static-routing/model/ipv6-static-routing.h diff --git a/src/routing/static-routing/wscript b/src/routing/static-routing/wscript index 1fdd54f85..8e0423db2 100644 --- a/src/routing/static-routing/wscript +++ b/src/routing/static-routing/wscript @@ -3,17 +3,21 @@ def build(bld): module = bld.create_ns3_module('static-routing', ['node']) module.source = [ - 'ipv4-static-routing.cc', - 'ipv4-routing-table-entry.cc', - 'ipv6-static-routing.cc', - 'ipv6-routing-table-entry.cc', + 'model/ipv4-static-routing.cc', + 'model/ipv4-routing-table-entry.cc', + 'model/ipv6-static-routing.cc', + 'model/ipv6-routing-table-entry.cc', + 'helper/ipv4-static-routing-helper.cc', + 'helper/ipv6-static-routing-helper.cc', ] headers = bld.new_task_gen('ns3header') headers.module = 'static-routing' headers.source = [ - 'ipv4-static-routing.h', - 'ipv4-routing-table-entry.h', - 'ipv6-static-routing.h', - 'ipv6-routing-table-entry.h', + 'model/ipv4-static-routing.h', + 'model/ipv4-routing-table-entry.h', + 'model/ipv6-static-routing.h', + 'model/ipv6-routing-table-entry.h', + 'helper/ipv4-static-routing-helper.h', + 'helper/ipv6-static-routing-helper.h', ]