View | Details | Raw Unified | Return to bug 1162
Collapse All | Expand All

(-)a/examples/energy/energy-model-example.cc (-2 / +1 lines)
 Lines 49-56    Link Here 
49
    {
49
    {
50
      if (packet->GetSize () > 0)
50
      if (packet->GetSize () > 0)
51
        {
51
        {
52
          InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (from);
52
          NS_LOG_UNCOND ("--\nReceived one packet! Socket: "<< InetSocketAddress::ConvertFrom (from).GetIpv4 ()
53
          NS_LOG_UNCOND ("--\nReceived one packet! Socket: "<< iaddr.GetIpv4 ()
54
                                                            << " port: " << iaddr.GetPort () << " at time = " <<
53
                                                            << " port: " << iaddr.GetPort () << " at time = " <<
55
                         Simulator::Now ().GetSeconds () << "\n--");
54
                         Simulator::Now ().GetSeconds () << "\n--");
56
        }
55
        }
(-)a/examples/socket/socket-bound-static-routing.cc (-4 / +1 lines)
 Lines 131-138    Link Here 
131
  staticRoutingDstRtr->AddHostRouteTo (Ipv4Address ("10.1.1.1"), Ipv4Address ("10.10.2.1"), 2);
131
  staticRoutingDstRtr->AddHostRouteTo (Ipv4Address ("10.1.1.1"), Ipv4Address ("10.10.2.1"), 2);
132
  staticRoutingRtr2->AddHostRouteTo (Ipv4Address ("10.1.1.1"), Ipv4Address ("10.1.2.1"), 1);
132
  staticRoutingRtr2->AddHostRouteTo (Ipv4Address ("10.1.1.1"), Ipv4Address ("10.1.2.1"), 1);
133
133
134
  Ipv4InterfaceAddress ifInAddrSrc=ipv4Src->GetAddress (1,0);
135
136
  // There are no apps that can utilize the Socket Option so doing the work directly..
134
  // There are no apps that can utilize the Socket Option so doing the work directly..
137
  // Taken from tcp-large-transfer example
135
  // Taken from tcp-large-transfer example
138
136
 Lines 195-202    Link Here 
195
  Ptr<Packet> packet = socket->RecvFrom (from);
193
  Ptr<Packet> packet = socket->RecvFrom (from);
196
  packet->RemoveAllPacketTags ();
194
  packet->RemoveAllPacketTags ();
197
  packet->RemoveAllByteTags ();
195
  packet->RemoveAllByteTags ();
198
  InetSocketAddress address = InetSocketAddress::ConvertFrom (from);
196
  NS_LOG_INFO ("Source Received " << packet->GetSize () << " bytes from " << InetSocketAddress::ConvertFrom (from).GetIpv4());
199
  NS_LOG_INFO ("Source Received " << packet->GetSize () << " bytes from " << address.GetIpv4());
200
  if (socket->GetBoundNetDevice ())
197
  if (socket->GetBoundNetDevice ())
201
    {
198
    {
202
      NS_LOG_INFO ("Socket was bound");
199
      NS_LOG_INFO ("Socket was bound");
(-)a/examples/socket/socket-bound-tcp-static-routing.cc (-2 lines)
 Lines 145-152    Link Here 
145
  staticRoutingDstRtr->AddHostRouteTo (Ipv4Address ("10.1.2.1"), Ipv4Address ("10.10.2.1"), 2);
145
  staticRoutingDstRtr->AddHostRouteTo (Ipv4Address ("10.1.2.1"), Ipv4Address ("10.10.2.1"), 2);
146
  staticRoutingRtr2->AddHostRouteTo (Ipv4Address ("10.1.2.1"), Ipv4Address ("10.1.2.1"), 1);
146
  staticRoutingRtr2->AddHostRouteTo (Ipv4Address ("10.1.2.1"), Ipv4Address ("10.1.2.1"), 1);
147
147
148
  Ipv4InterfaceAddress ifInAddrSrc=ipv4Src->GetAddress (1,0);
149
150
  // There are no apps that can utilize the Socket Option so doing the work directly..
148
  // There are no apps that can utilize the Socket Option so doing the work directly..
151
  // Taken from tcp-large-transfer example
149
  // Taken from tcp-large-transfer example
152
150
(-)a/examples/stats/wifi-example-apps.cc (-2 / +1 lines)
 Lines 242-250    Link Here 
242
  Address from;
242
  Address from;
243
  while (packet = socket->RecvFrom(from)) {
243
  while (packet = socket->RecvFrom(from)) {
244
      if (InetSocketAddress::IsMatchingType (from)) {
244
      if (InetSocketAddress::IsMatchingType (from)) {
245
          InetSocketAddress address = InetSocketAddress::ConvertFrom (from);
246
          NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " <<
245
          NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " <<
247
                       address.GetIpv4());
246
                       InetSocketAddress::ConvertFrom (from).GetIpv4());
248
        }
247
        }
249
248
250
      TimestampTag timestamp;
249
      TimestampTag timestamp;
(-)a/examples/wireless/multirate.cc (-1 / +5 lines)
 Lines 333-339    Link Here 
333
                                       << " with ip " << ipv4AddrClient
333
                                       << " with ip " << ipv4AddrClient
334
                                       << " position (" << clientPos.x << "," << clientPos.y << "," << clientPos.z << ")"
334
                                       << " position (" << clientPos.x << "," << clientPos.y << "," << clientPos.z << ")"
335
                                       << "\n");
335
                                       << "\n");
336
336
  // cast variables to void, to suppress variable set but not used compiler warnings 
337
  // in optimized builds
338
  (void) serverPos;
339
  (void) clientPos;
340
  (void) ipv4AddrClient;
337
341
338
  // Equipping the source  node with OnOff Application used for sending 
342
  // Equipping the source  node with OnOff Application used for sending 
339
  OnOffHelper onoff ("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address("10.0.0.1"), port)));
343
  OnOffHelper onoff ("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address("10.0.0.1"), port)));
(-)a/examples/wireless/wifi-simple-interference.cc (-2 / +1 lines)
 Lines 100-107    Link Here 
100
{
100
{
101
  Address addr;
101
  Address addr;
102
  socket->GetSockName (addr);
102
  socket->GetSockName (addr);
103
  InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (addr);
103
  NS_LOG_UNCOND ("Received one packet!  Socket: " << InetSocketAddress::ConvertFrom (addr).GetIpv4 () << " port: " << iaddr.GetPort ());
104
  NS_LOG_UNCOND ("Received one packet!  Socket: " << iaddr.GetIpv4 () << " port: " << iaddr.GetPort ());
105
}
104
}
106
105
107
static void GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize, 
106
static void GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize, 

Return to bug 1162