blob: 72fa68787b1ddcd3397e6805d0dce950f75ae98d [file] [log] [blame]
Junxiao Shic1e12362014-01-24 20:03:26 -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_TABLE_FIB_NEXTHOP_HPP
8#define NFD_TABLE_FIB_NEXTHOP_HPP
9
10#include "common.hpp"
11#include "face/face.hpp"
12
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080013namespace nfd {
Junxiao Shic1e12362014-01-24 20:03:26 -070014namespace fib {
15
16/** \class NextHop
17 * \brief represents a nexthop record in FIB entry
18 */
Junxiao Shie349ea12014-03-12 01:32:42 -070019class NextHop
Junxiao Shic1e12362014-01-24 20:03:26 -070020{
21public:
Junxiao Shi408a7002014-02-12 17:53:47 -070022 explicit
Junxiao Shic1e12362014-01-24 20:03:26 -070023 NextHop(shared_ptr<Face> face);
Junxiao Shie349ea12014-03-12 01:32:42 -070024
Junxiao Shic1e12362014-01-24 20:03:26 -070025 NextHop(const NextHop& other);
Junxiao Shie349ea12014-03-12 01:32:42 -070026
Junxiao Shic1e12362014-01-24 20:03:26 -070027 shared_ptr<Face>
28 getFace() const;
Junxiao Shie349ea12014-03-12 01:32:42 -070029
Junxiao Shic1e12362014-01-24 20:03:26 -070030 void
Junxiao Shid9ee45c2014-02-27 15:38:11 -070031 setCost(uint32_t cost);
Junxiao Shie349ea12014-03-12 01:32:42 -070032
Junxiao Shid9ee45c2014-02-27 15:38:11 -070033 uint32_t
Junxiao Shic1e12362014-01-24 20:03:26 -070034 getCost() const;
35
36private:
37 shared_ptr<Face> m_face;
Junxiao Shid9ee45c2014-02-27 15:38:11 -070038 uint32_t m_cost;
Junxiao Shic1e12362014-01-24 20:03:26 -070039};
40
41} // namespace fib
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080042} // namespace nfd
Junxiao Shic1e12362014-01-24 20:03:26 -070043
44#endif // NFD_TABLE_FIB_NEXTHOP_HPP