Junxiao Shi | 727ed29 | 2014-02-19 23:26:45 -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_BROADCAST_STRATEGY_HPP |
| 8 | #define NFD_FW_BROADCAST_STRATEGY_HPP |
| 9 | |
| 10 | #include "strategy.hpp" |
| 11 | #include "forwarder.hpp" |
| 12 | |
| 13 | namespace nfd { |
| 14 | namespace fw { |
| 15 | |
| 16 | /** \class BroadcastStrategy |
| 17 | * \brief a forwarding strategy that forwards Interest |
| 18 | * to all nexthops |
| 19 | */ |
| 20 | class BroadcastStrategy : public Strategy |
| 21 | { |
| 22 | public: |
| 23 | explicit |
| 24 | BroadcastStrategy(Forwarder& forwarder); |
| 25 | |
| 26 | virtual |
| 27 | ~BroadcastStrategy(); |
| 28 | |
| 29 | virtual void |
| 30 | afterReceiveInterest(const Face& inFace, |
| 31 | const Interest& interest, |
| 32 | shared_ptr<fib::Entry> fibEntry, |
| 33 | shared_ptr<pit::Entry> pitEntry); |
| 34 | }; |
| 35 | |
| 36 | } // namespace fw |
| 37 | } // namespace nfd |
| 38 | |
| 39 | #endif // NFD_FW_BROADCAST_STRATEGY_HPP |