diff --git a/examples/udp-echo.cc b/examples/udp-echo.cc index fb91c3247..8f5569ba0 100644 --- a/examples/udp-echo.cc +++ b/examples/udp-echo.cc @@ -39,7 +39,7 @@ #include "ns3/csma-net-device.h" #include "ns3/csma-topology.h" #include "ns3/csma-ipv4-topology.h" -#include "ns3/eui48-address.h" +#include "ns3/mac48-address.h" #include "ns3/ipv4-address.h" #include "ns3/inet-socket-address.h" #include "ns3/ipv4.h" @@ -126,16 +126,16 @@ main (int argc, char *argv[]) // zero. // uint32_t nd0 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n0, lan, - Eui48Address("08:00:2e:00:00:00")); + Mac48Address("08:00:2e:00:00:00")); uint32_t nd1 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n1, lan, - Eui48Address("08:00:2e:00:00:01")); + Mac48Address("08:00:2e:00:00:01")); uint32_t nd2 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n2, lan, - Eui48Address("08:00:2e:00:00:02")); + Mac48Address("08:00:2e:00:00:02")); uint32_t nd3 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n3, lan, - Eui48Address("08:00:2e:00:00:03")); + Mac48Address("08:00:2e:00:00:03")); // // We've got the "hardware" in place. Now we need to add IP addresses. // diff --git a/tutorial/hello-simulator.cc b/tutorial/hello-simulator.cc new file mode 100644 index 000000000..c9c18cac6 --- /dev/null +++ b/tutorial/hello-simulator.cc @@ -0,0 +1,29 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "ns3/debug.h" + +using namespace ns3; + +NS_DEBUG_COMPONENT_DEFINE ("HelloSimulator"); + +int +main (int argc, char *argv[]) +{ + DebugComponentEnable("HelloSimulator"); + + NS_DEBUG("Hello Simulator"); +} diff --git a/tutorial/waf b/tutorial/waf new file mode 100755 index 000000000..191b7dbb2 --- /dev/null +++ b/tutorial/waf @@ -0,0 +1 @@ +exec "`dirname "$0"`"/../waf "$@" diff --git a/tutorial/wscript b/tutorial/wscript new file mode 100644 index 000000000..abd2df7b9 --- /dev/null +++ b/tutorial/wscript @@ -0,0 +1,6 @@ +## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- + +def build(bld): + obj = bld.create_ns3_program('hello-simulator', + ['core']) + obj.source = 'hello-simulator.cc' diff --git a/wscript b/wscript index 5904c5ad2..9e54f7050 100644 --- a/wscript +++ b/wscript @@ -173,7 +173,7 @@ def build(bld): # process subfolders from here bld.add_subdirs('src') - bld.add_subdirs('samples utils examples') + bld.add_subdirs('samples utils examples tutorial') ## Create a single ns3 library containing all modules lib = bld.create_obj('cpp', 'shlib')