blob: 84f3dd16264eb7a3fb7f107a0e58fbeb3969a163 [file] [log] [blame]
akmhoque3d06e792014-05-27 16:23:20 -05001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Nick Gordonc6a85222017-01-03 16:54:34 -06003 * Copyright (c) 2014-2017, The University of Memphis,
Nick Gordonf8b5bcd2016-08-11 15:06:50 -05004 * Regents of the University of California
akmhoque3d06e792014-05-27 16:23:20 -05005 *
6 * This file is part of NLSR (Named-data Link State Routing).
7 * See AUTHORS.md for complete list of NLSR authors and contributors.
8 *
9 * NLSR is free software: you can redistribute it and/or modify it under the terms
10 * of the GNU General Public License as published by the Free Software Foundation,
11 * either version 3 of the License, or (at your option) any later version.
12 *
13 * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
14 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
19 *
akmhoque3d06e792014-05-27 16:23:20 -050020 **/
Nick Gordond0a7df32017-05-30 16:44:34 -050021
akmhoquefdbddb12014-05-02 18:35:19 -050022#ifndef NLSR_MAP_ENTRY_HPP
23#define NLSR_MAP_ENTRY_HPP
24
25#include <boost/cstdint.hpp>
akmhoque31d1d4b2014-05-05 22:08:14 -050026#include <ndn-cxx/name.hpp>
akmhoquefdbddb12014-05-02 18:35:19 -050027
akmhoque31d1d4b2014-05-05 22:08:14 -050028namespace nlsr {
akmhoquefdbddb12014-05-02 18:35:19 -050029
30class MapEntry
31{
32public:
33 MapEntry()
34 : m_router()
35 , m_mappingNumber(-1)
36 {
37 }
38
39 ~MapEntry()
40 {
41 }
42
akmhoque31d1d4b2014-05-05 22:08:14 -050043 MapEntry(const ndn::Name& rtr, int32_t mn)
akmhoquefdbddb12014-05-02 18:35:19 -050044 {
45 m_router = rtr;
46 m_mappingNumber = mn;
47 }
48
akmhoque31d1d4b2014-05-05 22:08:14 -050049 const ndn::Name&
akmhoquefdbddb12014-05-02 18:35:19 -050050 getRouter() const
51 {
52 return m_router;
53 }
54
55 int32_t
56 getMappingNumber() const
57 {
58 return m_mappingNumber;
59 }
60
61private:
akmhoque31d1d4b2014-05-05 22:08:14 -050062 ndn::Name m_router;
akmhoquefdbddb12014-05-02 18:35:19 -050063 int32_t m_mappingNumber;
64};
65
akmhoquefdbddb12014-05-02 18:35:19 -050066} // namespace nlsr
67
68#endif // NLSR_MAP_ENTRY_HPP