equal
deleted
inserted
replaced
306 { |
306 { |
307 m_errno = ERROR_MSGSIZE; |
307 m_errno = ERROR_MSGSIZE; |
308 return -1; |
308 return -1; |
309 } |
309 } |
310 |
310 |
311 uint32_t localIfIndex; |
311 uint32_t localInterface; |
312 Ptr<Ipv4> ipv4 = m_node->GetObject<Ipv4> (); |
312 Ptr<Ipv4> ipv4 = m_node->GetObject<Ipv4> (); |
313 |
313 |
314 // Locally override the IP TTL for this socket |
314 // Locally override the IP TTL for this socket |
315 // We cannot directly modify the TTL at this stage, so we set a Packet tag |
315 // We cannot directly modify the TTL at this stage, so we set a Packet tag |
316 // The destination can be either multicast, unicast/anycast, or |
316 // The destination can be either multicast, unicast/anycast, or |
387 } |
387 } |
388 } |
388 } |
389 NS_LOG_LOGIC ("Limited broadcast end."); |
389 NS_LOG_LOGIC ("Limited broadcast end."); |
390 return p->GetSize(); |
390 return p->GetSize(); |
391 } |
391 } |
392 else if (ipv4->GetIfIndexForDestination(dest, localIfIndex)) |
392 else if (ipv4->GetInterfaceForDestination(dest, localInterface)) |
393 { |
393 { |
394 NS_LOG_LOGIC ("Route exists"); |
394 NS_LOG_LOGIC ("Route exists"); |
395 m_udp->Send (p->Copy (), ipv4->GetAddress (localIfIndex), dest, |
395 m_udp->Send (p->Copy (), ipv4->GetAddress (localInterface), dest, |
396 m_endPoint->GetLocalPort (), port); |
396 m_endPoint->GetLocalPort (), port); |
397 NotifyDataSent (p->GetSize ()); |
397 NotifyDataSent (p->GetSize ()); |
398 NotifySend (GetTxAvailable ()); |
398 NotifySend (GetTxAvailable ()); |
399 return p->GetSize();; |
399 return p->GetSize();; |
400 } |
400 } |