Merge with code.nsnam.org
This commit is contained in:
@@ -18,8 +18,6 @@ import ns3
|
||||
ns3.LogComponentEnable("UdpEchoClientApplication", ns3.LOG_LEVEL_INFO)
|
||||
ns3.LogComponentEnable("UdpEchoServerApplication", ns3.LOG_LEVEL_INFO)
|
||||
|
||||
ns3.RandomVariable.UseGlobalSeed(1, 1, 2, 3, 5, 8)
|
||||
|
||||
nodes = ns3.NodeContainer()
|
||||
nodes.Create(2)
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ void PcapWriter::WriteWifiMonitorPacket(Ptr<const Packet> packet, uint16_t chann
|
||||
Write16(PRISM_ITEM_LENGTH);
|
||||
// convert from frequency to channel number. This conversion is
|
||||
// correct only for IEEE 802.11b/g channels 1-13.
|
||||
Write32((channelFreqMhz - 2407) / 5);
|
||||
Write32((2437 - 2407) / 5);
|
||||
|
||||
Write32(PRISM_DID_RSSI);
|
||||
Write16(PRISM_STATUS_PRESENT);
|
||||
@@ -388,7 +388,7 @@ void PcapWriter::WriteWifiMonitorPacket(Ptr<const Packet> packet, uint16_t chann
|
||||
|
||||
Write8(rate);
|
||||
|
||||
Write16((uint16_t) channelFreqMhz);
|
||||
Write16((uint16_t) 2437);
|
||||
|
||||
// we might want to make this setting depend on the WifiMode and
|
||||
// on the ChannelFrequency at some time in the future. But for now
|
||||
|
||||
@@ -171,6 +171,7 @@ namespace ns3 {
|
||||
|
||||
std::vector<InternetStackHelper::Trace> InternetStackHelper::m_traces;
|
||||
std::string InternetStackHelper::m_pcapBaseFilename;
|
||||
bool InternetStackHelper::m_isInitialized = false;
|
||||
|
||||
InternetStackHelper::InternetStackHelper ()
|
||||
{
|
||||
@@ -178,8 +179,13 @@ InternetStackHelper::InternetStackHelper ()
|
||||
static Ipv4StaticRoutingHelper staticRouting;
|
||||
static Ipv4GlobalRoutingHelper globalRouting;
|
||||
static Ipv4ListRoutingHelper listRouting;
|
||||
listRouting.Add (staticRouting, 0);
|
||||
listRouting.Add (globalRouting, -10);
|
||||
if (m_isInitialized == false)
|
||||
{
|
||||
// Only add these once
|
||||
listRouting.Add (staticRouting, 0);
|
||||
listRouting.Add (globalRouting, -10);
|
||||
m_isInitialized = true;
|
||||
}
|
||||
SetRoutingHelper (listRouting);
|
||||
}
|
||||
|
||||
|
||||
@@ -173,6 +173,7 @@ private:
|
||||
static std::string m_pcapBaseFilename;
|
||||
static uint32_t GetNodeIndex (std::string context);
|
||||
static std::vector<Trace> m_traces;
|
||||
static bool m_isInitialized;
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
Reference in New Issue
Block a user