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" |
Junxiao Shi | 8c8d218 | 2014-01-30 22:33:00 -0700 | [diff] [blame^] | 11 | #include "forwarder.hpp" |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 12 | |
| 13 | namespace nfd { |
Junxiao Shi | 8c8d218 | 2014-01-30 22:33:00 -0700 | [diff] [blame^] | 14 | namespace fw { |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 15 | |
| 16 | /** \class BestRouteStrategy |
| 17 | * \brief a forwarding strategy that forwards Interest |
| 18 | * to the first nexthop |
| 19 | */ |
| 20 | class BestRouteStrategy : public Strategy |
| 21 | { |
| 22 | public: |
| 23 | explicit |
Junxiao Shi | 8c8d218 | 2014-01-30 22:33:00 -0700 | [diff] [blame^] | 24 | BestRouteStrategy(Forwarder& forwarder); |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 25 | |
| 26 | virtual |
| 27 | ~BestRouteStrategy(); |
| 28 | |
| 29 | virtual void |
| 30 | afterReceiveInterest(const Face& inFace, |
| 31 | const Interest& interest, |
| 32 | shared_ptr<fib::Entry> fibEntry, |
Junxiao Shi | 8c8d218 | 2014-01-30 22:33:00 -0700 | [diff] [blame^] | 33 | shared_ptr<pit::Entry> pitEntry); |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 34 | }; |
| 35 | |
Junxiao Shi | 8c8d218 | 2014-01-30 22:33:00 -0700 | [diff] [blame^] | 36 | } // namespace fw |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 37 | } // namespace nfd |
| 38 | |
| 39 | #endif // NFD_FW_BEST_ROUTE_STRATEGY_HPP |