|
584 |
Socket::SocketErrno errno_; |
584 |
Socket::SocketErrno errno_; |
585 |
Ptr<Ipv4Route> route; |
585 |
Ptr<Ipv4Route> route; |
586 |
Ptr<NetDevice> oif (0); //specify non-zero if bound to a source address |
586 |
Ptr<NetDevice> oif (0); //specify non-zero if bound to a source address |
587 |
route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_); |
587 |
if (ipv4->GetRoutingProtocol () != 0) |
|
|
588 |
{ |
589 |
route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_); |
590 |
} |
591 |
else |
592 |
{ |
593 |
NS_LOG_ERROR ("No IPV4 Routing Protocol"); |
594 |
route = 0; |
595 |
} |
588 |
ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route); |
596 |
ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route); |
589 |
} |
597 |
} |
590 |
} |
598 |
} |
|
623 |
header.SetProtocol (PROT_NUMBER); |
631 |
header.SetProtocol (PROT_NUMBER); |
624 |
Socket::SocketErrno errno_; |
632 |
Socket::SocketErrno errno_; |
625 |
Ptr<Ipv4Route> route; |
633 |
Ptr<Ipv4Route> route; |
626 |
route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_); |
634 |
if (ipv4->GetRoutingProtocol () != 0) |
|
|
635 |
{ |
636 |
route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_); |
637 |
} |
638 |
else |
639 |
{ |
640 |
NS_LOG_ERROR ("No IPV4 Routing Protocol"); |
641 |
route = 0; |
642 |
} |
627 |
ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route); |
643 |
ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route); |
628 |
} |
644 |
} |
629 |
else |
645 |
else |