src/network/utils/packet-socket.cc
changeset 8660 4263961772e9
parent 8390 fb2bef5bb0e2
parent 7717 cfa1741013dd
child 8702 d3e7f0d5e378
equal deleted inserted replaced
8659:01b04e9fbee5 8660:4263961772e9
   111   address.SetAllDevices ();
   111   address.SetAllDevices ();
   112   return DoBind (address);
   112   return DoBind (address);
   113 }
   113 }
   114 
   114 
   115 int
   115 int
       
   116 PacketSocket::Bind6 (void)
       
   117 {
       
   118   return(Bind());
       
   119 }
       
   120 
       
   121 int
   116 PacketSocket::Bind (const Address &address)
   122 PacketSocket::Bind (const Address &address)
   117 { 
   123 { 
   118   NS_LOG_FUNCTION (this << address);
   124   NS_LOG_FUNCTION (this << address);
   119   if (!PacketSocketAddress::IsMatchingType (address))
   125   if (!PacketSocketAddress::IsMatchingType (address))
   120     {
   126     {
   439     {
   445     {
   440       SocketAddressTag tag;
   446       SocketAddressTag tag;
   441       bool found;
   447       bool found;
   442       found = packet->PeekPacketTag (tag);
   448       found = packet->PeekPacketTag (tag);
   443       NS_ASSERT (found);
   449       NS_ASSERT (found);
   444       //cast found to void, to suppress 'found' set but not used compiler warning
       
   445       //in optimized builds
       
   446       (void) found;
       
   447       fromAddress = tag.GetAddress ();
   450       fromAddress = tag.GetAddress ();
   448     }
   451     }
   449   return packet;
   452   return packet;
   450 }
   453 }
   451 
   454