blob: 69c6ce6065e269bd5b53468de5ea053813788043 [file] [log] [blame]
Junxiao Shi727ed292014-02-19 23:26:45 -07001/* -*- 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 Shi727ed292014-02-19 23:26:45 -070011
12namespace nfd {
13namespace fw {
14
15/** \class BroadcastStrategy
16 * \brief a forwarding strategy that forwards Interest
17 * to all nexthops
18 */
19class BroadcastStrategy : public Strategy
20{
21public:
Junxiao Shif3c07812014-03-11 21:48:49 -070022 BroadcastStrategy(Forwarder& forwarder, const Name& name = STRATEGY_NAME);
Junxiao Shi727ed292014-02-19 23:26:45 -070023
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 Shif3c07812014-03-11 21:48:49 -070032
33public:
34 static const Name STRATEGY_NAME;
Junxiao Shi727ed292014-02-19 23:26:45 -070035};
36
37} // namespace fw
38} // namespace nfd
39
40#endif // NFD_FW_BROADCAST_STRATEGY_HPP