blob: 5bbbc15ae242cf1a954a896631e3b7ab7d6d051b [file] [log] [blame]
Alexander Afanasyev7fd74f92011-08-25 19:40:17 -07001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
2/*
3 * Copyright (c) 2011 University of California, Los Angeles
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19 */
20
21#include "ccnx-fib.h"
22
23#include "ccnx.h"
24#include "ccnx-face.h"
25#include "ccnx-interest-header.h"
26
Alexander Afanasyev78057c32012-07-06 15:18:46 -070027#include "ccnx-name-components.h"
28#include "ccnx-fib-impl.h"
Alexander Afanasyev78cf0c92011-09-01 19:57:14 -070029
Alexander Afanasyev78057c32012-07-06 15:18:46 -070030#include "ns3/node.h"
31#include "ns3/names.h"
Alexander Afanasyev7fd74f92011-08-25 19:40:17 -070032
Alexander Afanasyev8e2f1122012-04-17 15:01:11 -070033#include <boost/ref.hpp>
Alexander Afanasyeva46844b2011-11-21 19:13:26 -080034#include <boost/lambda/lambda.hpp>
Alexander Afanasyev19426ef2011-11-23 20:55:28 -080035#include <boost/lambda/bind.hpp>
36namespace ll = boost::lambda;
Alexander Afanasyeva46844b2011-11-21 19:13:26 -080037
Alexander Afanasyev7fd74f92011-08-25 19:40:17 -070038namespace ns3 {
39
Alexander Afanasyev78cf0c92011-09-01 19:57:14 -070040using namespace __ccnx_private;
Alexander Afanasyev7fd74f92011-08-25 19:40:17 -070041
Alexander Afanasyev7fd74f92011-08-25 19:40:17 -070042std::ostream& operator<< (std::ostream& os, const CcnxFib &fib)
43{
Alexander Afanasyev78057c32012-07-06 15:18:46 -070044 os << "Node " << Names::FindName (fib.GetObject<Node>()) << "\n";
Alexander Afanasyev7fd74f92011-08-25 19:40:17 -070045 os << " Dest prefix Interfaces(Costs) \n";
46 os << "+-------------+--------------------------------------+\n";
Alexander Afanasyev78057c32012-07-06 15:18:46 -070047
48 fib.Print (os);
Alexander Afanasyev7fd74f92011-08-25 19:40:17 -070049 return os;
50}
51
Alexander Afanasyev7fd74f92011-08-25 19:40:17 -070052} // namespace ns3