[Ns-developers] Bug 215 Name Container

craigdo@ee.washington.edu craigdo at ee.washington.edu
Sun Nov 30 19:07:57 PST 2008


Hi All,

regarding bug 215 (http://www.nsnam.org/bugzilla/show_bug.cgi?id=215) I have
added a patch that implements a simple bidirectional map of ns3::Object vs.
std::string to begin to address the name container issue.

It's really just a simple beginning and is not completely integrated with
the rest of the system yet, but it does give us a basic naming
functionality.

Here are some snippets from csma-one-subet.cc which I taught about names ...

---------- Begin Included Code ----------

  NameList::Add (devices.Get (0), "Node 0/eth0");
  NameList::Add (devices.Get (1), "Node 1/eth0");
  NameList::Add (devices.Get (3), "Node 3/eth0");

[ ... ]

  ApplicationContainer app = onoff.Install (NameList::GetObjectOfName<Node>
("Node 0"));

[ ... ]

  CsmaHelper::EnablePcap ("csma-one-subnet", "Node 0/eth0");
  CsmaHelper::EnablePcap ("csma-one-subnet", "Node 1/eth0");
  CsmaHelper::EnablePcap ("csma-one-subnet", "Node 3/eth0");

---------- End Included Code ----------

To be honest, I'm not sure that this is well-enough thought through to go in
this release.  One example of an inconsistency is the trace file names.
They will still come out like "csma-one-subnet-0-0.pcap" when I think they
really should come out "csma-one-subnet-Node 0-eth0.pcap" or something
similar.

Also, there isn't good integration with attributes/tracing at a low level.
For example, it would be nice to be able to refer to an attribute using the
name list translation

  "Node 0/eth0/EncapsulationMode"

But this isn't implemented nor really thought through.

What are your thoughts about pushing this into ns-3.3?

-- Craig




More information about the Ns-developers mailing list