csma-layout code-style changes

This commit is contained in:
John Abraham
2011-05-04 15:11:58 -07:00
parent 0d2dc2c43d
commit d2b0ca8338
3 changed files with 14 additions and 14 deletions

View File

@@ -112,21 +112,21 @@ main (int argc, char *argv[])
//
Ipv4AddressHelper address;
for(uint32_t i = 0; i < star.SpokeCount (); ++i)
{
std::ostringstream subnet;
subnet << "10.1." << i << ".0";
NS_LOG_INFO ("Assign IP Addresses for CSMA subnet " << subnet.str ());
address.SetBase (subnet.str ().c_str (), "255.255.255.0", "0.0.0.3");
{
std::ostringstream subnet;
subnet << "10.1." << i << ".0";
NS_LOG_INFO ("Assign IP Addresses for CSMA subnet " << subnet.str ());
address.SetBase (subnet.str ().c_str (), "255.255.255.0", "0.0.0.3");
for (uint32_t j = 0; j < nFill; ++j)
{
address.Assign (fillDevices.Get (i * nFill + j));
}
}
for (uint32_t j = 0; j < nFill; ++j)
{
address.Assign (fillDevices.Get (i * nFill + j));
}
}
NS_LOG_INFO ("Create applications.");
//
// Create a packet sink on the star "hub" to receive packets.
// Create a packet sink on the star "hub" to receive packets.
//
uint16_t port = 50000;
Address hubLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port));

View File

@@ -27,7 +27,7 @@
NS_LOG_COMPONENT_DEFINE("CsmaStarHelper");
namespace ns3 {
CsmaStarHelper::CsmaStarHelper (uint32_t numSpokes,
CsmaHelper csmaHelper)
{
@@ -82,7 +82,7 @@ CsmaStarHelper::GetSpokeIpv4Address (uint32_t i) const
return m_spokeInterfaces.GetAddress (i);
}
uint32_t
uint32_t
CsmaStarHelper::SpokeCount () const
{
return m_spokes.GetN ();

View File

@@ -27,7 +27,7 @@
#include "ipv4-interface-container.h"
namespace ns3 {
/**
* \brief A helper to make it easier to create a star topology
* with Csma links