Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2014 Named Data Networking Project |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #ifndef NFD_FW_BEST_ROUTE_STRATEGY_HPP |
| 8 | #define NFD_FW_BEST_ROUTE_STRATEGY_HPP |
| 9 | |
| 10 | #include "strategy.hpp" |
| 11 | |
| 12 | namespace nfd { |
| 13 | |
| 14 | /** \class BestRouteStrategy |
| 15 | * \brief a forwarding strategy that forwards Interest |
| 16 | * to the first nexthop |
| 17 | */ |
| 18 | class BestRouteStrategy : public Strategy |
| 19 | { |
| 20 | public: |
| 21 | explicit |
| 22 | BestRouteStrategy(Forwarder& fw); |
| 23 | |
| 24 | virtual |
| 25 | ~BestRouteStrategy(); |
| 26 | |
| 27 | virtual void |
| 28 | afterReceiveInterest(const Face& inFace, |
| 29 | const Interest& interest, |
| 30 | shared_ptr<fib::Entry> fibEntry, |
| 31 | shared_ptr<pit::Entry> pitEntry, |
| 32 | pit::InRecordCollection::iterator pitInRecord |
| 33 | ); |
| 34 | }; |
| 35 | |
| 36 | } // namespace nfd |
| 37 | |
| 38 | #endif // NFD_FW_BEST_ROUTE_STRATEGY_HPP |