blob: 0f087f8cd835f8d05274da171d248cd74a3b9743 [file] [log] [blame]
Junxiao Shid3c792f2014-01-30 00:46:13 -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_BEST_ROUTE_STRATEGY_HPP
8#define NFD_FW_BEST_ROUTE_STRATEGY_HPP
9
10#include "strategy.hpp"
11
12namespace nfd {
Junxiao Shi8c8d2182014-01-30 22:33:00 -070013namespace fw {
Junxiao Shid3c792f2014-01-30 00:46:13 -070014
15/** \class BestRouteStrategy
16 * \brief a forwarding strategy that forwards Interest
17 * to the first nexthop
18 */
19class BestRouteStrategy : public Strategy
20{
21public:
Junxiao Shif3c07812014-03-11 21:48:49 -070022 BestRouteStrategy(Forwarder& forwarder, const Name& name = STRATEGY_NAME);
Junxiao Shid3c792f2014-01-30 00:46:13 -070023
24 virtual
25 ~BestRouteStrategy();
26
27 virtual void
28 afterReceiveInterest(const Face& inFace,
29 const Interest& interest,
30 shared_ptr<fib::Entry> fibEntry,
Junxiao Shi8c8d2182014-01-30 22:33:00 -070031 shared_ptr<pit::Entry> pitEntry);
Junxiao Shif3c07812014-03-11 21:48:49 -070032
33public:
34 static const Name STRATEGY_NAME;
Junxiao Shid3c792f2014-01-30 00:46:13 -070035};
36
Junxiao Shi8c8d2182014-01-30 22:33:00 -070037} // namespace fw
Junxiao Shid3c792f2014-01-30 00:46:13 -070038} // namespace nfd
39
40#endif // NFD_FW_BEST_ROUTE_STRATEGY_HPP