Junxiao Shi | c1e1236 | 2014-01-24 20:03:26 -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_TABLE_FIB_NEXTHOP_HPP |
| 8 | #define NFD_TABLE_FIB_NEXTHOP_HPP |
| 9 | |
| 10 | #include "common.hpp" |
| 11 | #include "face/face.hpp" |
Junxiao Shi | 408a700 | 2014-02-12 17:53:47 -0700 | [diff] [blame^] | 12 | #include "strategy-info-host.hpp" |
Junxiao Shi | c1e1236 | 2014-01-24 20:03:26 -0700 | [diff] [blame] | 13 | |
Alexander Afanasyev | 18bbf81 | 2014-01-29 01:40:23 -0800 | [diff] [blame] | 14 | namespace nfd { |
Junxiao Shi | c1e1236 | 2014-01-24 20:03:26 -0700 | [diff] [blame] | 15 | namespace fib { |
| 16 | |
| 17 | /** \class NextHop |
| 18 | * \brief represents a nexthop record in FIB entry |
| 19 | */ |
Junxiao Shi | 408a700 | 2014-02-12 17:53:47 -0700 | [diff] [blame^] | 20 | class NextHop : public StrategyInfoHost |
Junxiao Shi | c1e1236 | 2014-01-24 20:03:26 -0700 | [diff] [blame] | 21 | { |
| 22 | public: |
Junxiao Shi | 408a700 | 2014-02-12 17:53:47 -0700 | [diff] [blame^] | 23 | explicit |
Junxiao Shi | c1e1236 | 2014-01-24 20:03:26 -0700 | [diff] [blame] | 24 | NextHop(shared_ptr<Face> face); |
| 25 | |
| 26 | NextHop(const NextHop& other); |
| 27 | |
| 28 | shared_ptr<Face> |
| 29 | getFace() const; |
| 30 | |
| 31 | void |
| 32 | setCost(int32_t cost); |
| 33 | |
| 34 | int32_t |
| 35 | getCost() const; |
| 36 | |
| 37 | private: |
| 38 | shared_ptr<Face> m_face; |
| 39 | int32_t m_cost; |
| 40 | }; |
| 41 | |
| 42 | } // namespace fib |
Alexander Afanasyev | 18bbf81 | 2014-01-29 01:40:23 -0800 | [diff] [blame] | 43 | } // namespace nfd |
Junxiao Shi | c1e1236 | 2014-01-24 20:03:26 -0700 | [diff] [blame] | 44 | |
| 45 | #endif // NFD_TABLE_FIB_NEXTHOP_HPP |