|
|
| 31 |
#include "udp-socket-impl.h" |
31 |
#include "udp-socket-impl.h" |
| 32 |
#include "udp-l4-protocol.h" |
32 |
#include "udp-l4-protocol.h" |
| 33 |
#include "ipv4-end-point.h" |
33 |
#include "ipv4-end-point.h" |
|
|
34 |
#include "udp-header.h" |
| 34 |
#include <limits> |
35 |
#include <limits> |
| 35 |
|
36 |
|
| 36 |
NS_LOG_COMPONENT_DEFINE ("UdpSocketImpl"); |
37 |
NS_LOG_COMPONENT_DEFINE ("UdpSocketImpl"); |
|
|
| 440 |
Ptr<Ipv4Route> route; |
441 |
Ptr<Ipv4Route> route; |
| 441 |
Ptr<NetDevice> oif = m_boundnetdevice; //specify non-zero if bound to a specific device |
442 |
Ptr<NetDevice> oif = m_boundnetdevice; //specify non-zero if bound to a specific device |
| 442 |
// TBD-- we could cache the route and just check its validity |
443 |
// TBD-- we could cache the route and just check its validity |
|
|
444 |
|
| 445 |
// Patch - BUG 1111 - UDP header does not attached before RouteOutput |
| 446 |
UdpHeader headerUdp; |
| 447 |
headerUdp.SetSourcePort(m_endPoint->GetLocalPort ()); |
| 448 |
headerUdp.SetDestinationPort(port); |
| 449 |
p->AddHeader(headerUdp); |
| 450 |
|
| 443 |
route = ipv4->GetRoutingProtocol ()->RouteOutput (p, header, oif, errno_); |
451 |
route = ipv4->GetRoutingProtocol ()->RouteOutput (p, header, oif, errno_); |
| 444 |
if (route != 0) |
452 |
if (route != 0) |
| 445 |
{ |
453 |
{ |