Junxiao Shi | 2d9bdc8 | 2014-03-02 20:55:42 -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_CLIENT_CONTROL_STRATEGY_HPP |
| 8 | #define NFD_FW_CLIENT_CONTROL_STRATEGY_HPP |
| 9 | |
| 10 | #include "best-route-strategy.hpp" |
| 11 | |
| 12 | namespace nfd { |
| 13 | namespace fw { |
| 14 | |
| 15 | /** \brief a forwarding strategy that forwards Interests |
| 16 | * according to NextHopFaceId field in LocalControlHeader |
| 17 | */ |
| 18 | class ClientControlStrategy : public BestRouteStrategy |
| 19 | { |
| 20 | public: |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 21 | ClientControlStrategy(Forwarder& forwarder, const Name& name = STRATEGY_NAME); |
Junxiao Shi | 2d9bdc8 | 2014-03-02 20:55:42 -0700 | [diff] [blame] | 22 | |
| 23 | virtual |
| 24 | ~ClientControlStrategy(); |
| 25 | |
| 26 | virtual void |
| 27 | afterReceiveInterest(const Face& inFace, |
| 28 | const Interest& interest, |
| 29 | shared_ptr<fib::Entry> fibEntry, |
| 30 | shared_ptr<pit::Entry> pitEntry); |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 31 | |
| 32 | public: |
| 33 | static const Name STRATEGY_NAME; |
Junxiao Shi | 2d9bdc8 | 2014-03-02 20:55:42 -0700 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | } // namespace fw |
| 37 | } // namespace nfd |
| 38 | |
| 39 | #endif // NFD_FW_CLIENT_CONTROL_STRATEGY_HPP |