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: |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame^] | 22 | BroadcastStrategy(Forwarder& forwarder, const Name& name = STRATEGY_NAME); |
Junxiao Shi | 727ed29 | 2014-02-19 23:26:45 -0700 | [diff] [blame] | 23 | |
| 24 | virtual |
| 25 | ~BroadcastStrategy(); |
| 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); |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame^] | 32 | |
| 33 | public: |
| 34 | static const Name STRATEGY_NAME; |
Junxiao Shi | 727ed29 | 2014-02-19 23:26:45 -0700 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | } // namespace fw |
| 38 | } // namespace nfd |
| 39 | |
| 40 | #endif // NFD_FW_BROADCAST_STRATEGY_HPP |