|
319 |
NS_LOG_FUNCTION (this); |
319 |
NS_LOG_FUNCTION (this); |
320 |
|
320 |
|
321 |
Ptr<Packet> packet; |
321 |
Ptr<Packet> packet; |
322 |
while ((packet = socket->Recv ())) |
322 |
Address senderAddr; |
|
|
323 |
while ((packet = socket->RecvFrom (senderAddr))) |
323 |
{ |
324 |
{ |
324 |
Ptr<Node> rxNode = socket->GetNode (); |
325 |
Ptr<Node> rxNode = socket->GetNode (); |
325 |
|
326 |
|
326 |
SocketAddressTag tag; |
327 |
if (InetSocketAddress::IsMatchingType (senderAddr)) |
327 |
bool found; |
|
|
328 |
found = packet->PeekPacketTag (tag); |
329 |
|
330 |
if (found) |
331 |
{ |
328 |
{ |
332 |
InetSocketAddress addr = InetSocketAddress::ConvertFrom (tag.GetAddress ()); |
329 |
InetSocketAddress addr = InetSocketAddress::ConvertFrom (senderAddr); |
333 |
int nodes = m_adhocTxInterfaces->GetN (); |
330 |
int nodes = m_adhocTxInterfaces->GetN (); |
334 |
for (int i = 0; i < nodes; i++) |
331 |
for (int i = 0; i < nodes; i++) |
335 |
{ |
332 |
{ |