equal
deleted
inserted
replaced
68 typedef Callback<void, bool, const Ipv4Route&, Packet, const Ipv4Header&> RouteReplyCallback; |
68 typedef Callback<void, bool, const Ipv4Route&, Packet, const Ipv4Header&> RouteReplyCallback; |
69 |
69 |
70 /** |
70 /** |
71 * \brief Asynchronously requests a route for a given packet and IP header |
71 * \brief Asynchronously requests a route for a given packet and IP header |
72 * |
72 * |
|
73 * \param ifIndex The interface index on which the packet was received. |
73 * \param ipHeader IP header of the packet |
74 * \param ipHeader IP header of the packet |
74 * \param packet packet that is being sent or forwarded |
75 * \param packet packet that is being sent or forwarded |
75 * \param routeReply callback that will receive the route reply |
76 * \param routeReply callback that will receive the route reply |
76 * |
77 * |
77 * \returns true if the routing protocol should be able to get the |
78 * \returns true if the routing protocol should be able to get the |
97 * ipHeader.GetDestination ()). The routing protocol is also |
98 * ipHeader.GetDestination ()). The routing protocol is also |
98 * allowed to add a new header to the packet, which will appear |
99 * allowed to add a new header to the packet, which will appear |
99 * immediately after the IP header, although most routing do not |
100 * immediately after the IP header, although most routing do not |
100 * insert any extra header. |
101 * insert any extra header. |
101 */ |
102 */ |
102 virtual bool RequestRoute (const Ipv4Header &ipHeader, |
103 virtual bool RequestRoute (uint32_t ifIndex, |
|
104 const Ipv4Header &ipHeader, |
103 Packet packet, |
105 Packet packet, |
104 RouteReplyCallback routeReply) = 0; |
106 RouteReplyCallback routeReply) = 0; |
|
107 |
|
108 static const uint32_t IF_INDEX_ANY = 0xffffffff; |
105 }; |
109 }; |
106 |
110 |
107 /** |
111 /** |
108 * \brief Access to the Ipv4 forwarding table and to the ipv4 interfaces |
112 * \brief Access to the Ipv4 forwarding table and to the ipv4 interfaces |
109 * |
113 * |