A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rocketfuel-topology-reader.h
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2010 Hajime Tazaki
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: Hajime Tazaki (tazaki@sfc.wide.ad.jp)
19  */
20 
21 #ifndef ROCKETFUEL_TOPOLOGY_READER_H
22 #define ROCKETFUEL_TOPOLOGY_READER_H
23 
24 #include "ns3/nstime.h"
25 #include "topology-reader.h"
26 
27 namespace ns3 {
28 
29 
30 // ------------------------------------------------------------
31 // --------------------------------------------
44 {
45 public:
46  static TypeId GetTypeId (void);
47 
49  virtual ~RocketfuelTopologyReader ();
50 
61  virtual NodeContainer Read (void);
62 
63 private:
66  // Parser for the *.cch file available at:
67  // http://www.cs.washington.edu/research/networking/rocketfuel/maps/rocketfuel_maps_cch.tar.gz
68  NodeContainer GenerateFromMapsFile (int argc, char *argv[]);
69  // Parser for the weights.* file available at:
70  // http://www.cs.washington.edu/research/networking/rocketfuel/maps/weights-dist.tar.gz
71  NodeContainer GenerateFromWeightsFile (int argc, char *argv[]);
72 
73  enum RF_FileType
74  {
75  RF_MAPS,
76  RF_WEIGHTS,
77  RF_UNKNOWN
78  };
79  enum RF_FileType GetFileType (const char *);
80 
81  // end class RocketfuelTopologyReader
82 };
83 
84 // end namespace ns3
85 };
86 
87 
88 #endif /* ROCKETFUEL_TOPOLOGY_READER_H */
89 
90 
Interface for input file readers management.
keep track of a set of node pointers.
virtual NodeContainer Read(void)
Main topology reading function.
Topology file reader (Rocketfuel-format type).
a unique identifier for an interface.
Definition: type-id.h:44