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