SetAllowBroadcast(true) addition made to wifi-simple-infra.cc and wifi-simple-interference.cc

This commit is contained in:
Gilaras Drakeson
2010-07-19 23:15:42 +05:30
parent e6b2ad62e3
commit 0a28c73bd1
2 changed files with 3 additions and 0 deletions

View File

@@ -190,6 +190,7 @@ int main (int argc, char *argv[])
Ptr<Socket> source = Socket::CreateSocket (c.Get (1), tid);
InetSocketAddress remote = InetSocketAddress (Ipv4Address ("255.255.255.255"), 80);
source->SetAllowBroadcast (true);
source->Connect (remote);
// Tracing

View File

@@ -231,12 +231,14 @@ int main (int argc, char *argv[])
Ptr<Socket> source = Socket::CreateSocket (c.Get (1), tid);
InetSocketAddress remote = InetSocketAddress (Ipv4Address ("255.255.255.255"), 80);
source->SetAllowBroadcast (true);
source->Connect (remote);
// Interferer will send to a different port; we will not see a
// "Received packet" message
Ptr<Socket> interferer = Socket::CreateSocket (c.Get (2), tid);
InetSocketAddress interferingAddr = InetSocketAddress (Ipv4Address ("255.255.255.255"), 49000);
interferer->SetAllowBroadcast (true);
interferer->Connect (interferingAddr);
// Tracing