blob: c29caaea2e8add8fe3d1ba4739994242452cae27 [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"
Junxiao Shi8c8d2182014-01-30 22:33:00 -070011#include "forwarder.hpp"
Junxiao Shid3c792f2014-01-30 00:46:13 -070012
13namespace nfd {
Junxiao Shi8c8d2182014-01-30 22:33:00 -070014namespace fw {
Junxiao Shid3c792f2014-01-30 00:46:13 -070015
16/** \class BestRouteStrategy
17 * \brief a forwarding strategy that forwards Interest
18 * to the first nexthop
19 */
20class BestRouteStrategy : public Strategy
21{
22public:
23 explicit
Junxiao Shi8c8d2182014-01-30 22:33:00 -070024 BestRouteStrategy(Forwarder& forwarder);
Junxiao Shid3c792f2014-01-30 00:46:13 -070025
26 virtual
27 ~BestRouteStrategy();
28
29 virtual void
30 afterReceiveInterest(const Face& inFace,
31 const Interest& interest,
32 shared_ptr<fib::Entry> fibEntry,
Junxiao Shi8c8d2182014-01-30 22:33:00 -070033 shared_ptr<pit::Entry> pitEntry);
Junxiao Shid3c792f2014-01-30 00:46:13 -070034};
35
Junxiao Shi8c8d2182014-01-30 22:33:00 -070036} // namespace fw
Junxiao Shid3c792f2014-01-30 00:46:13 -070037} // namespace nfd
38
39#endif // NFD_FW_BEST_ROUTE_STRATEGY_HPP