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