Backed out changeset 767 for the release (not ready)
authorTom Henderson <tomh@tomh.org>
Fri, 15 Jun 2007 13:30:40 -0700
changeset 774d8b27eb4efc5
parent 773 18ad0b94e2ae
parent 772 1e4fde8c1249
child 775 7d6a3f079355
Backed out changeset 767 for the release (not ready)
     1.1 --- a/SConstruct	Fri Jun 15 13:19:57 2007 -0700
     1.2 +++ b/SConstruct	Fri Jun 15 13:30:40 2007 -0700
     1.3 @@ -411,6 +411,12 @@
     1.4  sample_trace.set_executable()
     1.5  sample_trace.add_source('main-trace.cc')
     1.6  
     1.7 +sample_query_interface = build.Ns3Module('sample-query-interface', 'samples')
     1.8 +ns3.add(sample_query_interface)
     1.9 +sample_query_interface.add_dep('common')
    1.10 +sample_query_interface.set_executable()
    1.11 +sample_query_interface.add_source('main-query-interface.cc')
    1.12 +
    1.13  sample_simu = build.Ns3Module('sample-simulator', 'samples')
    1.14  ns3.add(sample_simu)
    1.15  sample_simu.set_executable()
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/samples/main-query-interface.cc	Fri Jun 15 13:30:40 2007 -0700
     2.3 @@ -0,0 +1,280 @@
     2.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
     2.5 +/*
     2.6 + * Copyright (c) 2007 University of Washington
     2.7 + * Authors:  Tom Henderson, Craig Dowell
     2.8 + *
     2.9 + * This program is free software; you can redistribute it and/or modify
    2.10 + * it under the terms of the GNU General Public License version 2 as
    2.11 + * published by the Free Software Foundation;
    2.12 + *
    2.13 + * This program is distributed in the hope that it will be useful,
    2.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2.16 + * GNU General Public License for more details.
    2.17 + *
    2.18 + * You should have received a copy of the GNU General Public License
    2.19 + * along with this program; if not, write to the Free Software
    2.20 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2.21 + */
    2.22 +
    2.23 +#include "ns3/debug.h"
    2.24 +#include "ns3/object.h"
    2.25 +#include "ns3/component-manager.h"
    2.26 +
    2.27 +using namespace ns3;
    2.28 +
    2.29 +//
    2.30 +// This sample file shows examples of how to use QueryInterface.
    2.31 +//
    2.32 +// QueryInterface is a templated method of class Object, defined in 
    2.33 +// src/core/object.h.  ns-3 objects that derive from class Object
    2.34 +// can have QueryInterface invoked on them.
    2.35 +//
    2.36 +// QueryInterface is a type-safe way to ask an object, at run-time, 
    2.37 +// "Do you support the interface identified by the given InterfaceId?"  
    2.38 +// It avoids deprecated techniques of having to downcast pointers to 
    2.39 +// an object to ask questions about its type.  One or more interfaces
    2.40 +// may be associated with a given object.
    2.41 +// 
    2.42 +// QueryInterface is of most use when working with base class
    2.43 +// pointers of objects that may be subclassed.  For instance,
    2.44 +// one may have a pointer to a Node, but not know whether it has
    2.45 +// an IPv4 stack.  Another example might be to determine whether
    2.46 +// a Node has an EnergyModel, to which calls to decrement energy
    2.47 +// from the node's battery might be made.
    2.48 +//
    2.49 +
    2.50 +
    2.51 +//
    2.52 +// Object is the base class for ns-3 node-related objects used at 
    2.53 +// the public API.  Object provides reference counting implementations
    2.54 +// and the QueryInterface.
    2.55 +// 
    2.56 +// A common design paradigm for an ns-3 node object, such as a Queue,
    2.57 +// is that we provide an abstract base class that inherits from
    2.58 +// Object.  This class is assigned an interface ID (iid) and 
    2.59 +// contains the basic API for objects in this class and subclasses.
    2.60 +// This base class is specialized to provide implementations of
    2.61 +// the object in question (such as a DropTailQueue).
    2.62 +// 
    2.63 +// The design pattern commonly used is known as the "non-virtual
    2.64 +// public interface" pattern, whereby the public API for this
    2.65 +// object is a set of public non-virtual functions that forward
    2.66 +// to private virtual functions.  The forwarding functions can
    2.67 +// impose pre- and post-conditions on the forwarding call at
    2.68 +// the base class level.
    2.69 +// 
    2.70 +// We'll call this base class "AnInterface" in the example below.
    2.71 +//
    2.72 +// 
    2.73 +class AnInterface : public Object
    2.74 +{
    2.75 +public:
    2.76 +  static const InterfaceId iid;
    2.77 +  void methodA (void);
    2.78 +private:
    2.79 +  virtual void domethodA (void) = 0;
    2.80 +};
    2.81 +
    2.82 +void
    2.83 +AnInterface::methodA (void)
    2.84 +{
    2.85 +  // pre-dispatch asserts
    2.86 +   NS_DEBUG_UNCOND("AnInterface pre-condition::methodA");
    2.87 +  domethodA ();
    2.88 +   NS_DEBUG_UNCOND("AnInterface post-condition::methodA\n");
    2.89 +  // post-dispatch asserts
    2.90 +}
    2.91 +
    2.92 +//
    2.93 +// The below assignment assigns the InterfaceId of the class AnInterface,
    2.94 +// and declares that the parent iid is that of class Object.
    2.95 +//
    2.96 +const InterfaceId AnInterface::iid = MakeInterfaceId ("AnInterface", Object::iid);
    2.97 +
    2.98 +//
    2.99 +// AnImplementation is an implementation of the abstract base class
   2.100 +// defined above. It provides implementation for the virtual functions 
   2.101 +// in the base class.  It defines one ClassId for each constructor, 
   2.102 +// and can also provide an interface itself (in this example, 
   2.103 +// a methodImpl is available)
   2.104 +// 
   2.105 +class AnImplementation : public AnInterface
   2.106 +{
   2.107 +public:
   2.108 +  static const InterfaceId iid;
   2.109 +  static const ClassId cid;
   2.110 +
   2.111 +  AnImplementation ();
   2.112 +  void methodImpl (void);
   2.113 +private:
   2.114 +  virtual void domethodA (void);
   2.115 +};
   2.116 +
   2.117 +void
   2.118 +AnImplementation::methodImpl (void)
   2.119 +{
   2.120 +   NS_DEBUG_UNCOND("AnImplementation::methodImpl\n");
   2.121 +}
   2.122 +
   2.123 +
   2.124 +AnImplementation::AnImplementation (void)
   2.125 +{
   2.126 +  // enable our interface
   2.127 +  SetInterfaceId (AnImplementation::iid);
   2.128 +}
   2.129 +
   2.130 +void
   2.131 +AnImplementation::domethodA () 
   2.132 +{
   2.133 +   NS_DEBUG_UNCOND("AnImplementation::domethodA");
   2.134 +}
   2.135 +
   2.136 +//
   2.137 +// The below assignment assigns the InterfaceId of the class AnImplementation,
   2.138 +// and declares that the parent iid is that of class Object.
   2.139 +//
   2.140 +const InterfaceId AnImplementation::iid = 
   2.141 +  MakeInterfaceId ("AnImplementation", AnInterface::iid);
   2.142 +
   2.143 +//
   2.144 +// The next few lines are used by the component manager.  They
   2.145 +// state that the component manager can create a new object 
   2.146 +// AnImplementation and return an interface corresponding to 
   2.147 +// the AnImplementation iid.
   2.148 +//
   2.149 +const ClassId AnImplementation::cid = 
   2.150 +  MakeClassId<AnImplementation> 
   2.151 +  ("AnImplementation", AnImplementation::iid);
   2.152 +
   2.153 +
   2.154 +//
   2.155 +// Extending interfaces
   2.156 +// ==================
   2.157 +// What if AnInterface doesn't provide enough API for your
   2.158 +// object type?
   2.159 +// - if you aren't concerned about backward compatibility and
   2.160 +//   don't mind recompiling, you just add new methods to AnInterface
   2.161 +//   and recompile.
   2.162 +// - if you want to address backward compatibiliy, or allow part
   2.163 +//   of the system to use the old interface, you have to do more.
   2.164 +//   You have to declare a new interface with the new functionality.
   2.165 +//
   2.166 +
   2.167 +class AnExtendedInterface : public AnInterface
   2.168 +{
   2.169 +public:
   2.170 +  static const InterfaceId iid;
   2.171 +  void methodB (void);
   2.172 +private:
   2.173 +  virtual void domethodB (void) = 0;
   2.174 +};
   2.175 +
   2.176 +const InterfaceId AnExtendedInterface::iid = 
   2.177 +  MakeInterfaceId ("AnExtendedInterface", AnInterface::iid);
   2.178 +
   2.179 +//
   2.180 +// Then you need provide an implementation for the virtual 
   2.181 +// methods.  If you are providing a new implementation for 
   2.182 +// everything, the answer is straightforward
   2.183 +//
   2.184 +
   2.185 +class ANewImplementation : public AnExtendedInterface
   2.186 +{
   2.187 +public:
   2.188 +  static const InterfaceId iid;
   2.189 +  static const ClassId cid;
   2.190 +
   2.191 +  ANewImplementation ();
   2.192 +  void methodImpl (void);
   2.193 +private:
   2.194 +  virtual void domethodA (void) { /* new-implementation-behavior ();  */}
   2.195 +  virtual void domethodB (void) { /* new-implementation-behavior (); */}
   2.196 +};
   2.197 +
   2.198 +ANewImplementation::ANewImplementation (void)
   2.199 +{
   2.200 +  // enable our interface
   2.201 +  SetInterfaceId (ANewImplementation::iid);
   2.202 +}
   2.203 +
   2.204 +void
   2.205 +ANewImplementation::methodImpl (void)
   2.206 +{
   2.207 +   NS_DEBUG_UNCOND("ANewImplementation::methodImpl\n");
   2.208 +}
   2.209 +
   2.210 +const InterfaceId ANewImplementation::iid = 
   2.211 +  MakeInterfaceId ("ANewImplementation", AnExtendedInterface::iid);
   2.212 +
   2.213 +//
   2.214 +// If you want to extend an existing implementation, you can use 
   2.215 +// the existing class to instantiate an implementation of its 
   2.216 +// methods (hasa) and do the following if you can use stuff from 
   2.217 +// the existing class.
   2.218 +//
   2.219 +
   2.220 +class AnExtendedImplementation : public AnExtendedInterface
   2.221 +{
   2.222 +public:
   2.223 +  static const InterfaceId iid;
   2.224 +  static const ClassId cid;
   2.225 +
   2.226 +  AnExtendedImplementation ();
   2.227 +  void methodImpl (void) { /* pImpl->methodImpl (); */ }
   2.228 +  void methodExtendedImpl (void);
   2.229 +private:
   2.230 +  virtual void domethodA (void) { /* new-implementation-behavior (); */}
   2.231 +  virtual void domethodB (void) { /* new-implementation-behavior (); */}
   2.232 +  Ptr<AnImplementation> pImpl;
   2.233 +};
   2.234 +
   2.235 +AnExtendedImplementation::AnExtendedImplementation (void)
   2.236 +{
   2.237 +  pImpl = Create<AnImplementation> (); 
   2.238 +  SetInterfaceId (AnExtendedImplementation::iid);
   2.239 +}
   2.240 +
   2.241 +void
   2.242 +AnExtendedImplementation::methodExtendedImpl (void)
   2.243 +{
   2.244 +   NS_DEBUG_UNCOND("AnExtendedImplementation::methodExtendedImpl\n");
   2.245 +}
   2.246 +
   2.247 +const InterfaceId AnExtendedImplementation::iid = 
   2.248 +  MakeInterfaceId ("AnExtendedImplementation", AnExtendedInterface::iid);
   2.249 +
   2.250 +//
   2.251 +// Inheriting from an existing implementation (isa) and an extended
   2.252 +// interface is tricky, because of the diamond multiple inheritance
   2.253 +// problem.  If the pImpl method above is not desirable, it may
   2.254 +// be that the implementation extension could be aggregated.
   2.255 +// 
   2.256 +// The extension will not have access to the base implementation,
   2.257 +// so this design pattern may be more appropriate if the extension
   2.258 +// is very modular (e.g., add an EnergyModel to a wireless interface)
   2.259 +//
   2.260 +// EXAMPLE NOT YET PROVIDED
   2.261 +
   2.262 +int main (int argc, char *argv[])
   2.263 +{
   2.264 +
   2.265 +  Ptr<AnInterface> aBase = ComponentManager::Create<AnImplementation> 
   2.266 +    (AnImplementation::cid, AnInterface::iid);
   2.267 +  NS_ASSERT (aBase != 0);
   2.268 +
   2.269 +  aBase->methodA ();
   2.270 +  //aBase->methodImpl (); // XXX won't compile, aBase not right ptr type
   2.271 +  
   2.272 +  Ptr<AnImplementation> aBaseImplPtr = 
   2.273 +    aBase-> QueryInterface<AnImplementation> (AnImplementation::iid);
   2.274 +  aBaseImplPtr->methodImpl ();
   2.275 +  aBaseImplPtr->methodA();
   2.276 +
   2.277 +  // Test symmetric property of QueryInterface 
   2.278 +  Ptr<AnInterface> aBase2 = 
   2.279 +    aBaseImplPtr-> QueryInterface<AnInterface> (AnInterface::iid);
   2.280 +  aBase2->methodA ();
   2.281 +
   2.282 +  return 0;
   2.283 +}
     3.1 --- a/src/applications/wscript	Fri Jun 15 13:19:57 2007 -0700
     3.2 +++ b/src/applications/wscript	Fri Jun 15 13:30:40 2007 -0700
     3.3 @@ -1,6 +1,10 @@
     3.4  ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
     3.5  
     3.6  
     3.7 +def configure(conf):
     3.8 +    conf.env.append_value('NS3_MODULES', 'ns3-applications')
     3.9 +
    3.10 +
    3.11  def build(bld):
    3.12      obj = bld.create_obj('cpp', 'shlib')
    3.13      obj.name = 'ns3-applications'
     4.1 --- a/src/common/packet.cc	Fri Jun 15 13:19:57 2007 -0700
     4.2 +++ b/src/common/packet.cc	Fri Jun 15 13:30:40 2007 -0700
     4.3 @@ -119,3 +119,58 @@
     4.4  {}
     4.5  
     4.6  }; // namespace ns3
     4.7 +
     4.8 +
     4.9 +
    4.10 +#ifdef RUN_SELF_TESTS
    4.11 +
    4.12 +#include "ns3/test.h"
    4.13 +#include <string>
    4.14 +
    4.15 +namespace ns3 {
    4.16 +
    4.17 +class PacketTest: public Test {
    4.18 +public:
    4.19 +  virtual bool RunTests (void);
    4.20 +  PacketTest ();
    4.21 +};
    4.22 +
    4.23 +
    4.24 +PacketTest::PacketTest ()
    4.25 +  : Test ("Packet") {}
    4.26 +
    4.27 +
    4.28 +bool
    4.29 +PacketTest::RunTests (void)
    4.30 +{
    4.31 +  bool ok = true;
    4.32 +
    4.33 +  Packet pkt1 (reinterpret_cast<const uint8_t*> ("hello"), 5);
    4.34 +  Packet pkt2 (reinterpret_cast<const uint8_t*> (" world"), 6);
    4.35 +  Packet packet;
    4.36 +  packet.AddAtEnd (pkt1);
    4.37 +  packet.AddAtEnd (pkt2);
    4.38 +  
    4.39 +  if (packet.GetSize () != 11)
    4.40 +    {
    4.41 +      Failure () << "expected size 11, got " << packet.GetSize () << std::endl;
    4.42 +      ok = false;
    4.43 +    }
    4.44 +
    4.45 +  std::string msg = std::string (reinterpret_cast<const char *>(packet.PeekData ()),
    4.46 +                                 packet.GetSize ());
    4.47 +  if (msg != "hello world")
    4.48 +    {
    4.49 +      Failure () << "expected size 'hello world', got " << msg << std::endl;
    4.50 +      ok = false;
    4.51 +    }
    4.52 +
    4.53 +  return ok;
    4.54 +}
    4.55 +
    4.56 +
    4.57 +static PacketTest gPacketTest;
    4.58 +
    4.59 +}; // namespace ns3
    4.60 +
    4.61 +#endif /* RUN_SELF_TESTS */
     5.1 --- a/src/common/wscript	Fri Jun 15 13:19:57 2007 -0700
     5.2 +++ b/src/common/wscript	Fri Jun 15 13:30:40 2007 -0700
     5.3 @@ -1,5 +1,7 @@
     5.4  ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
     5.5  
     5.6 +def configure(conf):
     5.7 +    conf.env.append_value('NS3_MODULES', 'ns3-common')
     5.8  
     5.9  def build(bld):
    5.10      common = bld.create_obj('cpp', 'shlib')
     6.1 --- a/src/core/wscript	Fri Jun 15 13:19:57 2007 -0700
     6.2 +++ b/src/core/wscript	Fri Jun 15 13:30:40 2007 -0700
     6.3 @@ -3,6 +3,8 @@
     6.4  
     6.5  
     6.6  def configure(conf):
     6.7 +    conf.env.append_value('NS3_MODULES', 'ns3-core')
     6.8 +
     6.9      e = conf.create_header_configurator()
    6.10      e.mandatory = False
    6.11      e.name = 'stdlib.h'
     7.1 --- a/src/devices/p2p/wscript	Fri Jun 15 13:19:57 2007 -0700
     7.2 +++ b/src/devices/p2p/wscript	Fri Jun 15 13:30:40 2007 -0700
     7.3 @@ -1,6 +1,10 @@
     7.4  ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
     7.5  
     7.6  
     7.7 +def configure(conf):
     7.8 +    conf.env.append_value('NS3_MODULES', 'ns3-p2p')
     7.9 +
    7.10 +
    7.11  def build(bld):
    7.12      p2p = bld.create_obj('cpp', 'shlib')
    7.13      p2p.name = 'ns3-p2p'
     8.1 --- a/src/internet-node/wscript	Fri Jun 15 13:19:57 2007 -0700
     8.2 +++ b/src/internet-node/wscript	Fri Jun 15 13:30:40 2007 -0700
     8.3 @@ -1,6 +1,10 @@
     8.4  ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
     8.5  
     8.6  
     8.7 +def configure(conf):
     8.8 +    conf.env.append_value('NS3_MODULES', 'ns3-internet-node')
     8.9 +
    8.10 +
    8.11  def build(bld):
    8.12      obj = bld.create_obj('cpp', 'shlib')
    8.13      obj.name = 'ns3-internet-node'
     9.1 --- a/src/node/wscript	Fri Jun 15 13:19:57 2007 -0700
     9.2 +++ b/src/node/wscript	Fri Jun 15 13:30:40 2007 -0700
     9.3 @@ -1,5 +1,8 @@
     9.4  ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
     9.5  
     9.6 +def configure(conf):
     9.7 +    conf.env.append_value('NS3_MODULES', 'ns3-node')
     9.8 +
     9.9  
    9.10  def build(bld):
    9.11      node = bld.create_obj('cpp', 'shlib')
    10.1 --- a/src/simulator/cairo-wideint.c	Fri Jun 15 13:19:57 2007 -0700
    10.2 +++ b/src/simulator/cairo-wideint.c	Fri Jun 15 13:30:40 2007 -0700
    10.3 @@ -658,7 +658,7 @@
    10.4   * Compute a 32 bit quotient and 64 bit remainder of a 96 bit unsigned
    10.5   * dividend and 64 bit divisor.  If the quotient doesn't fit into 32
    10.6   * bits then the returned remainder is equal to the divisor, and the
    10.7 - * qoutient is the largest representable 64 bit integer.  It is an
    10.8 + * quotient is the largest representable 64 bit integer.  It is an
    10.9   * error to call this function with the high 32 bits of @num being
   10.10   * non-zero. */
   10.11  cairo_uquorem64_t
   10.12 @@ -776,7 +776,7 @@
   10.13  {
   10.14      int			num_neg = _cairo_int128_negative (num);
   10.15      int			den_neg = _cairo_int64_negative (den);
   10.16 -    cairo_int64_t	nonneg_den = den;
   10.17 +    cairo_uint64_t	nonneg_den;
   10.18      cairo_uquorem64_t	uqr;
   10.19      cairo_quorem64_t	qr;
   10.20  
   10.21 @@ -784,9 +784,11 @@
   10.22  	num = _cairo_int128_negate (num);
   10.23      if (den_neg)
   10.24  	nonneg_den = _cairo_int64_negate (den);
   10.25 +    else
   10.26 +	nonneg_den = den;
   10.27  
   10.28      uqr = _cairo_uint_96by64_32x64_divrem (num, nonneg_den);
   10.29 -    if (_cairo_uint64_eq (uqr.rem, nonneg_den)) {
   10.30 +    if (_cairo_uint64_eq (uqr.rem, _cairo_int64_to_uint64 (nonneg_den))) {
   10.31  	/* bail on overflow. */
   10.32  	qr.quo = _cairo_uint32s_to_uint64 (0x7FFFFFFF, -1U);;
   10.33  	qr.rem = den;
    11.1 --- a/src/simulator/wscript	Fri Jun 15 13:19:57 2007 -0700
    11.2 +++ b/src/simulator/wscript	Fri Jun 15 13:30:40 2007 -0700
    11.3 @@ -13,6 +13,8 @@
    11.4  
    11.5  
    11.6  def configure(conf):
    11.7 +    conf.env.append_value('NS3_MODULES', 'ns3-simulator')
    11.8 +
    11.9      if Params.g_options.high_precision_as_double:
   11.10          conf.add_define('USE_HIGH_PRECISION_DOUBLE', 1)
   11.11          conf.env['USE_HIGH_PRECISION_DOUBLE'] = 1
    12.1 --- a/src/wscript	Fri Jun 15 13:19:57 2007 -0700
    12.2 +++ b/src/wscript	Fri Jun 15 13:30:40 2007 -0700
    12.3 @@ -29,6 +29,7 @@
    12.4  
    12.5      blddir = os.path.abspath(os.path.join(conf.m_blddir, conf.env.variant()))
    12.6      for module in all_modules:
    12.7 +        conf.sub_config(module)
    12.8          conf.env.append_value('NS3_MODULE_PATH', os.path.join(blddir, 'src', module))
    12.9  
   12.10  
    13.1 --- a/utils/wscript	Fri Jun 15 13:19:57 2007 -0700
    13.2 +++ b/utils/wscript	Fri Jun 15 13:30:40 2007 -0700
    13.3 @@ -1,23 +1,23 @@
    13.4  ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
    13.5 -import sys
    13.6 -import Params
    13.7  
    13.8  
    13.9  def build(bld):
   13.10 +    env = bld.env_of_name('default')
   13.11  
   13.12      def create_ns_prog(name, source):
   13.13          obj = bld.create_obj('cpp', 'program')
   13.14          obj.target = name
   13.15 -        obj.uselib_local = "ns3-core ns3-common ns3-simulator"
   13.16          obj.source = source
   13.17          return obj
   13.18  
   13.19      unit_tests = create_ns_prog('run-tests', 'run-tests.cc')
   13.20      unit_tests.install_var  = 0 # do not install
   13.21      unit_tests.unit_test    = 1 # runs on 'waf check'
   13.22 +    ## link unit test program with all ns3 modules
   13.23 +    unit_tests.uselib_local = env['NS3_MODULES']
   13.24      
   13.25 -    #if sys.platform != 'win32':
   13.26      obj = create_ns_prog('bench-simulator', 'bench-simulator.cc')
   13.27 +    obj.uselib_local = "ns3-core ns3-common ns3-simulator"
   13.28 +
   13.29      obj = create_ns_prog('replay-simulation', 'replay-simulation.cc')
   13.30 -    ## bench-packets requires missing header files
   13.31 -    #obj = create_ns_prog('bench-packets', 'bench-packets.cc')
   13.32 +    obj.uselib_local = "ns3-core ns3-common ns3-simulator"
    14.1 --- a/wscript	Fri Jun 15 13:19:57 2007 -0700
    14.2 +++ b/wscript	Fri Jun 15 13:30:40 2007 -0700
    14.3 @@ -79,6 +79,7 @@
    14.4      conf.setenv(variant_name)
    14.5  
    14.6      variant_env.append_value('CXXDEFINES', 'RUN_SELF_TESTS')
    14.7 +    variant_env.append_value('CXXFLAGS', ['-Wall', '-Werror'])
    14.8      if 'debug' in Params.g_options.debug_level.lower():
    14.9          variant_env.append_value('CXXDEFINES', 'NS3_DEBUG_ENABLE')
   14.10          variant_env.append_value('CXXDEFINES', 'NS3_ASSERT_ENABLE')