diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/arp-l3-protocol.cc src/internet-stack/arp-l3-protocol.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/arp-l3-protocol.cc Tue Nov 17 17:00:49 2009 --- src/internet-stack/arp-l3-protocol.cc Tue Nov 17 16:00:34 2009 *************** *** 316,323 **** ArpHeader arp; // need to pick a source address; use routing implementation to select Ptr ipv4 = m_node->GetObject (); ! int32_t interface = ipv4->GetInterfaceForDevice (cache->GetDevice ()); ! NS_ASSERT (interface >= 0); Ipv4Header header; header.SetDestination (to); Socket::SocketErrno errno_; --- 316,323 ---- ArpHeader arp; // need to pick a source address; use routing implementation to select Ptr ipv4 = m_node->GetObject (); ! Ptr interface = cache->GetDevice (); ! NS_ASSERT (interface != 0); Ipv4Header header; header.SetDestination (to); Socket::SocketErrno errno_; diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/icmpv4-l4-protocol.cc src/internet-stack/icmpv4-l4-protocol.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/icmpv4-l4-protocol.cc Tue Nov 17 17:00:49 2009 --- src/internet-stack/icmpv4-l4-protocol.cc Tue Nov 17 16:03:26 2009 *************** *** 89,95 **** header.SetProtocol (PROT_NUMBER); Socket::SocketErrno errno_; Ptr route; ! uint32_t oif = 0; //specify non-zero if bound to a source address route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_); if (route != 0) { --- 89,95 ---- header.SetProtocol (PROT_NUMBER); Socket::SocketErrno errno_; Ptr route; ! Ptr oif(0); //specify non-zero if bound to a source address route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_); if (route != 0) { diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/icmpv6-l4-protocol.cc src/internet-stack/icmpv6-l4-protocol.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/icmpv6-l4-protocol.cc Tue Nov 17 17:00:49 2009 --- src/internet-stack/icmpv6-l4-protocol.cc Tue Nov 17 16:09:46 2009 *************** *** 742,748 **** SocketIpTtlTag tag; Socket::SocketErrno err; Ptr route; ! uint32_t oif = 0; //specify non-zero if bound to a source address header.SetDestinationAddress (dst); route = ipv6->GetRoutingProtocol ()->RouteOutput (packet, header, oif, err); --- 742,748 ---- SocketIpTtlTag tag; Socket::SocketErrno err; Ptr route; ! Ptr oif(0); //specify non-zero if bound to a source address header.SetDestinationAddress (dst); route = ipv6->GetRoutingProtocol ()->RouteOutput (packet, header, oif, err); diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/ipv4-l3-protocol.cc src/internet-stack/ipv4-l3-protocol.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/ipv4-l3-protocol.cc Tue Nov 17 17:00:49 2009 --- src/internet-stack/ipv4-l3-protocol.cc Tue Nov 17 15:58:17 2009 *************** *** 536,542 **** // 5) packet is not broadcast, and route is NULL (e.g., a raw socket call) NS_LOG_LOGIC ("Ipv4L3Protocol::Send case 4: passed in with no route " << destination); Socket::SocketErrno errno_; ! uint32_t oif = 0; // unused for now ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment); Ptr newRoute = m_routingProtocol->RouteOutput (packet, ipHeader, oif, errno_); if (newRoute) --- 536,542 ---- // 5) packet is not broadcast, and route is NULL (e.g., a raw socket call) NS_LOG_LOGIC ("Ipv4L3Protocol::Send case 4: passed in with no route " << destination); Socket::SocketErrno errno_; ! Ptr oif(0); // unused for now ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment); Ptr newRoute = m_routingProtocol->RouteOutput (packet, ipHeader, oif, errno_); if (newRoute) diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/ipv4-raw-socket-impl.cc src/internet-stack/ipv4-raw-socket-impl.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/ipv4-raw-socket-impl.cc Tue Nov 17 17:00:49 2009 --- src/internet-stack/ipv4-raw-socket-impl.cc Tue Nov 17 16:02:56 2009 *************** *** 177,183 **** header.SetProtocol (m_protocol); SocketErrno errno_ = ERROR_NOTERROR;//do not use errno as it is the standard C last error number Ptr route; ! uint32_t oif = 0; //specify non-zero if bound to a source address // TBD-- we could cache the route and just check its validity route = ipv4->GetRoutingProtocol ()->RouteOutput (p, header, oif, errno_); if (route != 0) --- 177,183 ---- header.SetProtocol (m_protocol); SocketErrno errno_ = ERROR_NOTERROR;//do not use errno as it is the standard C last error number Ptr route; ! Ptr oif = m_boundnetdevice; //specify non-zero if bound to a source address // TBD-- we could cache the route and just check its validity route = ipv4->GetRoutingProtocol ()->RouteOutput (p, header, oif, errno_); if (route != 0) diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/ipv6-l3-protocol.cc src/internet-stack/ipv6-l3-protocol.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/ipv6-l3-protocol.cc Tue Nov 17 17:00:49 2009 --- src/internet-stack/ipv6-l3-protocol.cc Tue Nov 17 16:05:42 2009 *************** *** 626,632 **** /* 3) */ NS_LOG_LOGIC ("Ipv6L3Protocol::Send case 3: passed in with no route " << destination); Socket::SocketErrno err; ! uint32_t oif = 0; Ptr newRoute = 0; hdr = BuildHeader (source, destination, protocol, packet->GetSize (), ttl); --- 626,632 ---- /* 3) */ NS_LOG_LOGIC ("Ipv6L3Protocol::Send case 3: passed in with no route " << destination); Socket::SocketErrno err; ! Ptr oif(0); Ptr newRoute = 0; hdr = BuildHeader (source, destination, protocol, packet->GetSize (), ttl); *************** *** 635,641 **** { int32_t index = GetInterfaceForAddress (source); NS_ASSERT (index >= 0); ! oif = index; } newRoute = m_routingProtocol->RouteOutput (packet, hdr, oif, err); --- 635,641 ---- { int32_t index = GetInterfaceForAddress (source); NS_ASSERT (index >= 0); ! oif = GetNetDevice(index); } newRoute = m_routingProtocol->RouteOutput (packet, hdr, oif, err); *************** *** 647,653 **** else { NS_LOG_WARN ("No route to host, drop!"); ! m_dropTrace (hdr, packet, DROP_NO_ROUTE, oif); } } --- 647,653 ---- else { NS_LOG_WARN ("No route to host, drop!"); ! m_dropTrace (hdr, packet, DROP_NO_ROUTE, oif->GetIfIndex()); } } diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/ipv6-raw-socket-impl.cc src/internet-stack/ipv6-raw-socket-impl.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/ipv6-raw-socket-impl.cc Tue Nov 17 17:00:49 2009 --- src/internet-stack/ipv6-raw-socket-impl.cc Tue Nov 17 16:09:16 2009 *************** *** 203,215 **** hdr.SetDestinationAddress (dst); SocketErrno err = ERROR_NOTERROR; Ptr route = 0; ! uint32_t oif = 0; /* specify non-zero if bound to a source address */ if (!m_src.IsAny ()) { int32_t index = ipv6->GetInterfaceForAddress (m_src); NS_ASSERT (index >= 0); ! oif = index; } route = ipv6->GetRoutingProtocol ()->RouteOutput (p, hdr, oif, err); --- 203,215 ---- hdr.SetDestinationAddress (dst); SocketErrno err = ERROR_NOTERROR; Ptr route = 0; ! Ptr oif(0); /* specify non-zero if bound to a source address */ if (!m_src.IsAny ()) { int32_t index = ipv6->GetInterfaceForAddress (m_src); NS_ASSERT (index >= 0); ! oif = ipv6->GetNetDevice (index); } route = ipv6->GetRoutingProtocol ()->RouteOutput (p, hdr, oif, err); diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/tcp-l4-protocol.cc src/internet-stack/tcp-l4-protocol.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/tcp-l4-protocol.cc Tue Nov 17 17:00:50 2009 --- src/internet-stack/tcp-l4-protocol.cc Tue Nov 17 15:59:15 2009 *************** *** 579,585 **** header.SetProtocol (PROT_NUMBER); Socket::SocketErrno errno_; Ptr route; ! uint32_t oif = 0; //specify non-zero if bound to a source address route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_); ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route); } --- 579,585 ---- header.SetProtocol (PROT_NUMBER); Socket::SocketErrno errno_; Ptr route; ! Ptr oif(0); //specify non-zero if bound to a source address route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_); ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route); } *************** *** 619,625 **** header.SetProtocol (PROT_NUMBER); Socket::SocketErrno errno_; Ptr route; ! uint32_t oif = 0; //specify non-zero if bound to a source address route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_); ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route); } --- 619,625 ---- header.SetProtocol (PROT_NUMBER); Socket::SocketErrno errno_; Ptr route; ! Ptr oif(0); //specify non-zero if bound to a source address route = ipv4->GetRoutingProtocol ()->RouteOutput (packet, header, oif, errno_); ipv4->Send (packet, saddr, daddr, PROT_NUMBER, route); } diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/tcp-socket-impl.cc src/internet-stack/tcp-socket-impl.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/tcp-socket-impl.cc Tue Nov 17 17:00:50 2009 --- src/internet-stack/tcp-socket-impl.cc Tue Nov 17 16:02:21 2009 *************** *** 384,390 **** header.SetDestination (m_remoteAddress); Socket::SocketErrno errno_; Ptr route; ! uint32_t oif = 0; //specify non-zero if bound to a source address // XXX here, cache the route in the endpoint? route = ipv4->GetRoutingProtocol ()->RouteOutput (Ptr (), header, oif, errno_); if (route != 0) --- 384,390 ---- header.SetDestination (m_remoteAddress); Socket::SocketErrno errno_; Ptr route; ! Ptr oif = m_boundnetdevice; //specify non-zero if bound to a source address // XXX here, cache the route in the endpoint? route = ipv4->GetRoutingProtocol ()->RouteOutput (Ptr (), header, oif, errno_); if (route != 0) *************** *** 938,944 **** Ipv4Header header; Socket::SocketErrno errno_; Ptr route; ! uint32_t oif = 0; //specify non-zero if bound to a source address header.SetDestination (m_remoteAddress); route = ipv4->GetRoutingProtocol ()->RouteOutput (Ptr (), header, oif, errno_); if (route != 0) --- 938,944 ---- Ipv4Header header; Socket::SocketErrno errno_; Ptr route; ! Ptr oif = m_boundnetdevice; //specify non-zero if bound to a source address header.SetDestination (m_remoteAddress); route = ipv4->GetRoutingProtocol ()->RouteOutput (Ptr (), header, oif, errno_); if (route != 0) diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/udp-socket-impl.cc src/internet-stack/udp-socket-impl.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/internet-stack/udp-socket-impl.cc Tue Nov 17 17:00:50 2009 --- src/internet-stack/udp-socket-impl.cc Tue Nov 17 16:01:12 2009 *************** *** 296,302 **** UdpSocketImpl::DoSendTo (Ptr p, Ipv4Address dest, uint16_t port) { NS_LOG_FUNCTION (this << p << dest << port); ! if (m_endPoint == 0) { if (Bind () == -1) --- 296,305 ---- UdpSocketImpl::DoSendTo (Ptr p, Ipv4Address dest, uint16_t port) { NS_LOG_FUNCTION (this << p << dest << port); ! if (m_boundnetdevice) ! { ! NS_LOG_LOGIC("Bound interface number " << m_boundnetdevice->GetIfIndex()); ! } if (m_endPoint == 0) { if (Bind () == -1) *************** *** 375,380 **** --- 378,389 ---- Ipv4Address addri = iaddr.GetLocal (); if (addri == Ipv4Address ("127.0.0.1")) continue; + // Check if interface-bound socket + if (m_boundnetdevice) + { + if (ipv4->GetNetDevice(i) != m_boundnetdevice) + continue; + } Ipv4Mask maski = iaddr.GetMask (); if (maski == Ipv4Mask::GetOnes ()) { *************** *** 408,414 **** header.SetProtocol (UdpL4Protocol::PROT_NUMBER); Socket::SocketErrno errno_; Ptr route; ! uint32_t oif = 0; //specify non-zero if bound to a source address // TBD-- we could cache the route and just check its validity route = ipv4->GetRoutingProtocol ()->RouteOutput (p, header, oif, errno_); if (route != 0) --- 417,423 ---- header.SetProtocol (UdpL4Protocol::PROT_NUMBER); Socket::SocketErrno errno_; Ptr route; ! Ptr oif = m_boundnetdevice; //specify non-zero if bound to a specific device // TBD-- we could cache the route and just check its validity route = ipv4->GetRoutingProtocol ()->RouteOutput (p, header, oif, errno_); if (route != 0) diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/node/ipv4-routing-protocol.h src/node/ipv4-routing-protocol.h *** ../ns-3-dev-unaltered/ns-3-dev/src/node/ipv4-routing-protocol.h Tue Nov 17 17:00:50 2009 --- src/node/ipv4-routing-protocol.h Tue Nov 17 16:25:48 2009 *************** *** 66,78 **** * \param p packet to be routed. Note that this method may modify the packet. * Callers may also pass in a null pointer. * \param header input parameter (used to form key to search for the route) ! * \param oif Output interface index. May be zero, or may be bound via * socket options to a particular output interface. * \param sockerr Output parameter; socket errno * * \returns a code that indicates what happened in the lookup */ ! virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr) = 0; /** * \brief Route an input packet (to be forwarded or locally delivered) --- 66,78 ---- * \param p packet to be routed. Note that this method may modify the packet. * Callers may also pass in a null pointer. * \param header input parameter (used to form key to search for the route) ! * \param oif Output interface Netdevice. May be zero, or may be bound via * socket options to a particular output interface. * \param sockerr Output parameter; socket errno * * \returns a code that indicates what happened in the lookup */ ! virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) = 0; /** * \brief Route an input packet (to be forwarded or locally delivered) diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/node/ipv6-routing-protocol.h src/node/ipv6-routing-protocol.h *** ../ns-3-dev-unaltered/ns-3-dev/src/node/ipv6-routing-protocol.h Tue Nov 17 17:00:50 2009 --- src/node/ipv6-routing-protocol.h Tue Nov 17 16:10:46 2009 *************** *** 70,82 **** * \param p packet to be routed. Note that this method may modify the packet. * Callers may also pass in a null pointer. * \param header input parameter (used to form key to search for the route) ! * \param oif Output interface index. May be zero, or may be bound via * socket options to a particular output interface. * \param sockerr Output parameter; socket errno * * \returns a code that indicates what happened in the lookup */ ! virtual Ptr RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, Socket::SocketErrno &sockerr) = 0; /** * \brief Route an input packet (to be forwarded or locally delivered) --- 70,82 ---- * \param p packet to be routed. Note that this method may modify the packet. * Callers may also pass in a null pointer. * \param header input parameter (used to form key to search for the route) ! * \param oif Output interface device. May be zero, or may be bound via * socket options to a particular output interface. * \param sockerr Output parameter; socket errno * * \returns a code that indicates what happened in the lookup */ ! virtual Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) = 0; /** * \brief Route an input packet (to be forwarded or locally delivered) diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/node/socket.cc src/node/socket.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/node/socket.cc Tue Nov 17 17:00:50 2009 --- src/node/socket.cc Tue Nov 17 15:28:13 2009 *************** *** 33,38 **** --- 33,39 ---- Socket::Socket (void) { + m_boundnetdevice=0; NS_LOG_FUNCTION_NOARGS (); } *************** *** 297,302 **** --- 298,329 ---- m_receivedData = MakeNullCallback > (); } + void + Socket::BindToNetDevice(Ptr netdevice) + { + if (netdevice != 0) + { + bool found = false; + for (uint32_t i = 0; i < GetNode()->GetNDevices(); i++) + { + if (GetNode()->GetDevice(i) == netdevice) + { + found = true; + break; + } + } + NS_ASSERT_MSG(found, "Socket cannot be bound to a NetDevice not existing on the Node"); + } + m_boundnetdevice=netdevice; + return; + } + + Ptr + Socket::GetBoundNetDevice() + { + return m_boundnetdevice; + } + /*************************************************************** * Socket Tags ***************************************************************/ diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/node/socket.h src/node/socket.h *** ../ns-3-dev-unaltered/ns-3-dev/src/node/socket.h Tue Nov 17 17:00:50 2009 --- src/node/socket.h Tue Nov 17 14:25:51 2009 *************** *** 27,32 **** --- 27,33 ---- #include "ns3/ptr.h" #include "ns3/tag.h" #include "ns3/object.h" + #include "ns3/net-device.h" #include "address.h" #include *************** *** 511,516 **** --- 512,538 ---- * \returns 0 if success, -1 otherwise */ virtual int GetSockName (Address &address) const = 0; + + /** + * \brief Bind a socket to specific device. + * + * This method corresponds to using setsockopt() SO_BINDTODEVICE + * of real network or BSD sockets. + * + * \param Netdevice Pointer to Netdevice of desired interface + * \returns nothing + */ + void BindToNetDevice(Ptr netdevice); + + /** + * \brief Returns socket's bound netdevice, if any. + * + * This method corresponds to using getsockopt() SO_BINDTODEVICE + * of real network or BSD sockets. + * + * \returns Pointer to interface. + */ + Ptr GetBoundNetDevice (); protected: void NotifyConnectionSucceeded (void); *************** *** 523,528 **** --- 545,551 ---- void NotifySend (uint32_t spaceAvailable); void NotifyDataRecv (void); virtual void DoDispose (void); + Ptr m_boundnetdevice; private: Callback > m_connectionSucceeded; Callback > m_connectionFailed; diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/global-routing/ipv4-global-routing.cc src/routing/global-routing/ipv4-global-routing.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/global-routing/ipv4-global-routing.cc Tue Nov 17 17:00:50 2009 --- src/routing/global-routing/ipv4-global-routing.cc Tue Nov 17 16:15:01 2009 *************** *** 115,121 **** Ptr ! Ipv4GlobalRouting::LookupGlobal (Ipv4Address dest) { NS_LOG_FUNCTION_NOARGS (); NS_LOG_LOGIC ("Looking for route for destination " << dest); --- 115,121 ---- Ptr ! Ipv4GlobalRouting::LookupGlobal (Ipv4Address dest, Ptr oif) { NS_LOG_FUNCTION_NOARGS (); NS_LOG_LOGIC ("Looking for route for destination " << dest); *************** *** 131,136 **** --- 131,144 ---- if ((*i)->GetDest ().IsEqual (dest)) { NS_LOG_LOGIC ("Found global host route" << *i); + if (oif != 0) + { + if (oif != m_ipv4->GetNetDevice(route->GetInterface())) + { + NS_LOG_LOGIC ("Not on requested interface, skipping"); + continue; + } + } route = (*i); found = true; break; *************** *** 148,153 **** --- 156,169 ---- if (mask.IsMatch (dest, entry)) { NS_LOG_LOGIC ("Found global network route" << *j); + if (oif != 0) + { + if (oif != m_ipv4->GetNetDevice(route->GetInterface())) + { + NS_LOG_LOGIC ("Not on requested interface, skipping"); + continue; + } + } route = (*j); found = true; break; *************** *** 165,170 **** --- 181,194 ---- if (mask.IsMatch (dest, entry)) { NS_LOG_LOGIC ("Found external route" << *k); + if (oif != 0) + { + if (oif != m_ipv4->GetNetDevice(route->GetInterface())) + { + NS_LOG_LOGIC ("Not on requested interface, skipping"); + continue; + } + } route = (*k); found = true; break; *************** *** 332,338 **** } Ptr ! Ipv4GlobalRouting::RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr) { // --- 356,362 ---- } Ptr ! Ipv4GlobalRouting::RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) { // *************** *** 348,354 **** // See if this is a unicast packet we have a route for. // NS_LOG_LOGIC ("Unicast destination- looking up"); ! Ptr rtentry = LookupGlobal (header.GetDestination()); if (rtentry) { sockerr = Socket::ERROR_NOTERROR; --- 372,378 ---- // See if this is a unicast packet we have a route for. // NS_LOG_LOGIC ("Unicast destination- looking up"); ! Ptr rtentry = LookupGlobal (header.GetDestination(), oif); if (rtentry) { sockerr = Socket::ERROR_NOTERROR; diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/global-routing/ipv4-global-routing.h src/routing/global-routing/ipv4-global-routing.h *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/global-routing/ipv4-global-routing.h Tue Nov 17 17:00:50 2009 --- src/routing/global-routing/ipv4-global-routing.h Tue Nov 17 16:17:45 2009 *************** *** 80,86 **** Ipv4GlobalRouting (); virtual ~Ipv4GlobalRouting (); ! virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, --- 80,86 ---- Ipv4GlobalRouting (); virtual ~Ipv4GlobalRouting (); ! virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, *************** *** 222,228 **** typedef std::list::const_iterator ASExternalRoutesCI; typedef std::list::iterator ASExternalRoutesI; ! Ptr LookupGlobal (Ipv4Address dest); HostRoutes m_hostRoutes; NetworkRoutes m_networkRoutes; --- 222,228 ---- typedef std::list::const_iterator ASExternalRoutesCI; typedef std::list::iterator ASExternalRoutesI; ! Ptr LookupGlobal (Ipv4Address dest, Ptr oif = 0); HostRoutes m_hostRoutes; NetworkRoutes m_networkRoutes; diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/list-routing/ipv4-list-routing.cc src/routing/list-routing/ipv4-list-routing.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/list-routing/ipv4-list-routing.cc Tue Nov 17 17:00:50 2009 --- src/routing/list-routing/ipv4-list-routing.cc Tue Nov 17 16:30:39 2009 *************** *** 82,88 **** Ptr ! Ipv4ListRouting::RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, enum Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION (this << header.GetDestination () << " " << header.GetSource () << " " << oif); Ptr route; --- 82,88 ---- Ptr ! Ipv4ListRouting::RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, enum Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION (this << header.GetDestination () << " " << header.GetSource () << " " << oif); Ptr route; *************** *** 334,340 **** class Ipv4ARouting : public Ipv4RoutingProtocol { public: ! Ptr RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr) { return 0;} bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} --- 334,340 ---- class Ipv4ARouting : public Ipv4RoutingProtocol { public: ! Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0;} bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} *************** *** 347,353 **** class Ipv4BRouting : public Ipv4RoutingProtocol { public: ! Ptr RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr) { return 0;} bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} --- 347,353 ---- class Ipv4BRouting : public Ipv4RoutingProtocol { public: ! Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0;} bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/list-routing/ipv4-list-routing.h src/routing/list-routing/ipv4-list-routing.h *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/list-routing/ipv4-list-routing.h Tue Nov 17 17:00:50 2009 --- src/routing/list-routing/ipv4-list-routing.h Tue Nov 17 15:45:55 2009 *************** *** 75,81 **** virtual Ptr GetRoutingProtocol (uint32_t index, int16_t& priority) const; // Below are from Ipv4RoutingProtocol ! virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, --- 75,81 ---- virtual Ptr GetRoutingProtocol (uint32_t index, int16_t& priority) const; // Below are from Ipv4RoutingProtocol ! virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/list-routing/ipv6-list-routing.cc src/routing/list-routing/ipv6-list-routing.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/list-routing/ipv6-list-routing.cc Tue Nov 17 17:00:50 2009 --- src/routing/list-routing/ipv6-list-routing.cc Tue Nov 17 16:31:08 2009 *************** *** 69,75 **** } Ptr ! Ipv6ListRouting::RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, enum Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION (this << header.GetDestinationAddress () << header.GetSourceAddress () << oif); Ptr route; --- 69,75 ---- } Ptr ! Ipv6ListRouting::RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, enum Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION (this << header.GetDestinationAddress () << header.GetSourceAddress () << oif); Ptr route; *************** *** 342,348 **** class Ipv6ARouting : public Ipv6RoutingProtocol { public: ! Ptr RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, Socket::SocketErrno &sockerr) { return 0;} bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} --- 342,348 ---- class Ipv6ARouting : public Ipv6RoutingProtocol { public: ! Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0;} bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} *************** *** 358,364 **** class Ipv6BRouting : public Ipv6RoutingProtocol { public: ! Ptr RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, Socket::SocketErrno &sockerr) { return 0;} bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} --- 358,364 ---- class Ipv6BRouting : public Ipv6RoutingProtocol { public: ! Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0;} bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/list-routing/ipv6-list-routing.h src/routing/list-routing/ipv6-list-routing.h *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/list-routing/ipv6-list-routing.h Tue Nov 17 17:00:50 2009 --- src/routing/list-routing/ipv6-list-routing.h Tue Nov 17 15:45:55 2009 *************** *** 91,97 **** virtual Ptr GetRoutingProtocol (uint32_t index, int16_t& priority) const; // Below are from Ipv6RoutingProtocol ! virtual Ptr RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, --- 91,97 ---- virtual Ptr GetRoutingProtocol (uint32_t index, int16_t& priority) const; // Below are from Ipv6RoutingProtocol ! virtual Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/manet/aodv/aodv-routing-protocol.cc src/routing/manet/aodv/aodv-routing-protocol.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/manet/aodv/aodv-routing-protocol.cc Tue Nov 17 17:00:50 2009 --- src/routing/manet/aodv/aodv-routing-protocol.cc Tue Nov 17 16:31:55 2009 *************** *** 215,221 **** Ptr RoutingProtocol::RouteOutput (Ptr p, const Ipv4Header &header, ! uint32_t oif, Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION (this << header.GetDestination ()); if (m_socketAddresses.empty ()) --- 215,221 ---- Ptr RoutingProtocol::RouteOutput (Ptr p, const Ipv4Header &header, ! Ptr oif, Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION (this << header.GetDestination ()); if (m_socketAddresses.empty ()) diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/manet/aodv/aodv-routing-protocol.h src/routing/manet/aodv/aodv-routing-protocol.h *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/manet/aodv/aodv-routing-protocol.h Tue Nov 17 17:00:50 2009 --- src/routing/manet/aodv/aodv-routing-protocol.h Tue Nov 17 16:31:55 2009 *************** *** 62,68 **** ///\name From Ipv4RoutingProtocol //\{ ! Ptr RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr); bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb); --- 62,68 ---- ///\name From Ipv4RoutingProtocol //\{ ! Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb); diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/nix-vector-routing/ipv4-nix-vector-routing.cc src/routing/nix-vector-routing/ipv4-nix-vector-routing.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/nix-vector-routing/ipv4-nix-vector-routing.cc Tue Nov 17 17:00:50 2009 --- src/routing/nix-vector-routing/ipv4-nix-vector-routing.cc Tue Nov 17 16:10:38 2009 *************** *** 478,484 **** } Ptr ! Ipv4NixVectorRouting::RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION_NOARGS (); Ptr rtentry; --- 478,484 ---- } Ptr ! Ipv4NixVectorRouting::RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION_NOARGS (); Ptr rtentry; diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/nix-vector-routing/ipv4-nix-vector-routing.h src/routing/nix-vector-routing/ipv4-nix-vector-routing.h *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/nix-vector-routing/ipv4-nix-vector-routing.h Tue Nov 17 17:00:50 2009 --- src/routing/nix-vector-routing/ipv4-nix-vector-routing.h Tue Nov 17 16:10:46 2009 *************** *** 129,135 **** void DoDispose (void); /* From Ipv4RoutingProtocol */ ! virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb); --- 129,135 ---- void DoDispose (void); /* From Ipv4RoutingProtocol */ ! virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb); diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/olsr/olsr-routing-protocol.cc src/routing/olsr/olsr-routing-protocol.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/olsr/olsr-routing-protocol.cc Tue Nov 17 17:00:50 2009 --- src/routing/olsr/olsr-routing-protocol.cc Tue Nov 17 16:11:33 2009 *************** *** 2600,2606 **** } Ptr ! RoutingProtocol::RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION (this << " " << m_ipv4->GetObject ()->GetId() << " " << header.GetDestination () << " " << oif); // TBD: oif is unused; can be used to restrict the outgoing interface --- 2600,2606 ---- } Ptr ! RoutingProtocol::RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION (this << " " << m_ipv4->GetObject ()->GetId() << " " << header.GetDestination () << " " << oif); // TBD: oif is unused; can be used to restrict the outgoing interface diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/olsr/olsr-routing-protocol.h src/routing/olsr/olsr-routing-protocol.h *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/olsr/olsr-routing-protocol.h Tue Nov 17 17:00:50 2009 --- src/routing/olsr/olsr-routing-protocol.h Tue Nov 17 16:11:17 2009 *************** *** 132,138 **** RoutingTableEntry &outEntry) const; // From Ipv4RoutingProtocol ! virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb); --- 132,138 ---- RoutingTableEntry &outEntry) const; // From Ipv4RoutingProtocol ! virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb); diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/static-routing/ipv4-static-routing.cc src/routing/static-routing/ipv4-static-routing.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/static-routing/ipv4-static-routing.cc Tue Nov 17 17:00:50 2009 --- src/routing/static-routing/ipv4-static-routing.cc Tue Nov 17 16:45:15 2009 *************** *** 210,216 **** } Ptr ! Ipv4StaticRouting::LookupStatic (Ipv4Address dest) { NS_LOG_FUNCTION_NOARGS (); Ptr rtentry = 0; --- 210,216 ---- } Ptr ! Ipv4StaticRouting::LookupStatic (Ipv4Address dest, Ptr oif) { NS_LOG_FUNCTION_NOARGS (); Ptr rtentry = 0; *************** *** 229,234 **** --- 229,242 ---- if (mask.IsMatch (dest, entry)) { NS_LOG_LOGIC ("Found global network route " << j << ", mask length " << masklen << ", metric " << metric); + if (oif != 0) + { + if (oif != m_ipv4->GetNetDevice(j->GetInterface())) + { + NS_LOG_LOGIC ("Not on requested interface, skipping"); + continue; + } + } if (masklen < longest_mask) // Not interested if got shorter mask { NS_LOG_LOGIC ("Previous match longer, skipping"); *************** *** 415,421 **** } Ptr ! Ipv4StaticRouting::RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION (this << header << oif); Ipv4Address destination = header.GetDestination (); --- 423,429 ---- } Ptr ! Ipv4StaticRouting::RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION (this << header << oif); Ipv4Address destination = header.GetDestination (); *************** *** 432,438 **** // So, we just log it and fall through to LookupStatic () NS_LOG_LOGIC ("RouteOutput()::Multicast destination"); } ! rtentry = LookupStatic (destination); if (rtentry) { sockerr = Socket::ERROR_NOTERROR; --- 440,446 ---- // So, we just log it and fall through to LookupStatic () NS_LOG_LOGIC ("RouteOutput()::Multicast destination"); } ! rtentry = LookupStatic (destination, oif); if (rtentry) { sockerr = Socket::ERROR_NOTERROR; diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/static-routing/ipv4-static-routing.h src/routing/static-routing/ipv4-static-routing.h *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/static-routing/ipv4-static-routing.h Tue Nov 17 17:00:50 2009 --- src/routing/static-routing/ipv4-static-routing.h Tue Nov 17 16:17:50 2009 *************** *** 74,80 **** Ipv4StaticRouting (); virtual ~Ipv4StaticRouting (); ! virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, --- 74,80 ---- Ipv4StaticRouting (); virtual ~Ipv4StaticRouting (); ! virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, *************** *** 382,388 **** typedef std::list::const_iterator MulticastRoutesCI; typedef std::list::iterator MulticastRoutesI; ! Ptr LookupStatic (Ipv4Address dest); Ptr LookupStatic (Ipv4Address origin, Ipv4Address group, uint32_t interface); --- 382,388 ---- typedef std::list::const_iterator MulticastRoutesCI; typedef std::list::iterator MulticastRoutesI; ! Ptr LookupStatic (Ipv4Address dest, Ptr oif = 0); Ptr LookupStatic (Ipv4Address origin, Ipv4Address group, uint32_t interface); diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/static-routing/ipv6-static-routing.cc src/routing/static-routing/ipv6-static-routing.cc *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/static-routing/ipv6-static-routing.cc Tue Nov 17 17:00:50 2009 --- src/routing/static-routing/ipv6-static-routing.cc Tue Nov 17 16:24:18 2009 *************** *** 214,220 **** return false; } ! Ptr Ipv6StaticRouting::LookupStatic (Ipv6Address dst, uint32_t interface) { NS_LOG_FUNCTION (this << dst << interface); Ptr rtentry = 0; --- 214,220 ---- return false; } ! Ptr Ipv6StaticRouting::LookupStatic (Ipv6Address dst, Ptr interface) { NS_LOG_FUNCTION (this << dst << interface); Ptr rtentry = 0; *************** *** 225,236 **** if (dst == Ipv6Address::GetAllNodesMulticast () || dst.IsSolicitedMulticast () || dst == Ipv6Address::GetAllRoutersMulticast () || dst == Ipv6Address::GetAllHostsMulticast ()) { ! NS_ASSERT_MSG (interface > 0, "Try to send on link-local multicast address, and no interface index is given!"); rtentry = Create (); ! rtentry->SetSource (SourceAddressSelection (interface, dst)); rtentry->SetDestination (dst); rtentry->SetGateway (Ipv6Address::GetZero ()); ! rtentry->SetOutputDevice (m_ipv6->GetNetDevice (interface)); return rtentry; } --- 225,236 ---- if (dst == Ipv6Address::GetAllNodesMulticast () || dst.IsSolicitedMulticast () || dst == Ipv6Address::GetAllRoutersMulticast () || dst == Ipv6Address::GetAllHostsMulticast ()) { ! NS_ASSERT_MSG (interface, "Try to send on link-local multicast address, and no interface index is given!"); rtentry = Create (); ! rtentry->SetSource (SourceAddressSelection (interface->GetIfIndex(), dst)); rtentry->SetDestination (dst); rtentry->SetGateway (Ipv6Address::GetZero ()); ! rtentry->SetOutputDevice (interface); return rtentry; } *************** *** 249,255 **** NS_LOG_LOGIC ("Found global network route " << j << ", mask length " << maskLen << ", metric " << metric); /* if interface is given, check the route will output on this interface */ ! if (!interface || interface == j->GetInterface ()) { if (maskLen < longestMask) { --- 249,255 ---- NS_LOG_LOGIC ("Found global network route " << j << ", mask length " << maskLen << ", metric " << metric); /* if interface is given, check the route will output on this interface */ ! if (!interface || interface == m_ipv6->GetNetDevice(j->GetInterface())) { if (maskLen < longestMask) { *************** *** 485,491 **** } } ! Ptr Ipv6StaticRouting::RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION (this << header << oif); Ipv6Address destination = header.GetDestinationAddress (); --- 485,491 ---- } } ! Ptr Ipv6StaticRouting::RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) { NS_LOG_FUNCTION (this << header << oif); Ipv6Address destination = header.GetDestinationAddress (); diff -crB ../ns-3-dev-unaltered/ns-3-dev/src/routing/static-routing/ipv6-static-routing.h src/routing/static-routing/ipv6-static-routing.h *** ../ns-3-dev-unaltered/ns-3-dev/src/routing/static-routing/ipv6-static-routing.h Tue Nov 17 17:00:50 2009 --- src/routing/static-routing/ipv6-static-routing.h Tue Nov 17 16:19:39 2009 *************** *** 223,229 **** */ bool HasNetworkDest (Ipv6Address dest, uint32_t interfaceIndex); ! virtual Ptr RouteOutput (Ptr p, const Ipv6Header &header, uint32_t oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, --- 223,229 ---- */ bool HasNetworkDest (Ipv6Address dest, uint32_t interfaceIndex); ! virtual Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, *************** *** 258,264 **** * \param interface output interface if any (put 0 otherwise) * \return Ipv6Route to route the packet to reach dest address */ ! Ptr LookupStatic (Ipv6Address dest, uint32_t interface = 0); /** * \brief Lookup in the multicast forwarding table for destination. --- 258,264 ---- * \param interface output interface if any (put 0 otherwise) * \return Ipv6Route to route the packet to reach dest address */ ! Ptr LookupStatic (Ipv6Address dest, Ptr = 0); /** * \brief Lookup in the multicast forwarding table for destination.