blob: 41c121b1ea41b3617b12efeba85c35680840e3ea [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"
Junxiao Shi408a7002014-02-12 17:53:47 -070012#include "strategy-info-host.hpp"
Junxiao Shic1e12362014-01-24 20:03:26 -070013
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080014namespace nfd {
Junxiao Shic1e12362014-01-24 20:03:26 -070015namespace fib {
16
17/** \class NextHop
18 * \brief represents a nexthop record in FIB entry
19 */
Junxiao Shi408a7002014-02-12 17:53:47 -070020class NextHop : public StrategyInfoHost
Junxiao Shic1e12362014-01-24 20:03:26 -070021{
22public:
Junxiao Shi408a7002014-02-12 17:53:47 -070023 explicit
Junxiao Shic1e12362014-01-24 20:03:26 -070024 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
37private:
38 shared_ptr<Face> m_face;
39 int32_t m_cost;
40};
41
42} // namespace fib
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080043} // namespace nfd
Junxiao Shic1e12362014-01-24 20:03:26 -070044
45#endif // NFD_TABLE_FIB_NEXTHOP_HPP