blob: de29c0ff0bb4548f6ce4db7f0979bfe246c3f847 [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
Steve DiBenedetto7564d972014-03-24 14:28:46 -060031 setCost(uint64_t cost);
Junxiao Shie349ea12014-03-12 01:32:42 -070032
Steve DiBenedetto7564d972014-03-24 14:28:46 -060033 uint64_t
Junxiao Shic1e12362014-01-24 20:03:26 -070034 getCost() const;
35
36private:
37 shared_ptr<Face> m_face;
Steve DiBenedetto7564d972014-03-24 14:28:46 -060038 uint64_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