A Discrete-Event Network Simulator
API
rocketfuel-topology-reader.cc File Reference

ns3::RocketfuelTopologyReader implementation. More...

#include <fstream>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <regex.h>
#include "ns3/log.h"
#include "ns3/node-container.h"
#include "rocketfuel-topology-reader.h"
+ Include dependency graph for rocketfuel-topology-reader.cc:

Go to the source code of this file.

Namespaces

 ns3
 Every class exported by the ns3 library is enclosed in the ns3 namespace.
 

Macros

#define END   "$"
 End of a line. More...
 
#define MAYSPACE   "[ \t]*"
 Zero or more spaces. More...
 
#define REGMATCH_MAX   16
 Maximum nuber of matches in a regex query. More...
 
#define ROCKETFUEL_MAPS_LINE
 Regex expression matching a MAP line. More...
 
#define ROCKETFUEL_WEIGHTS_LINE    START "([^ \t]+)" SPACE "([^ \t]+)" SPACE "([0-9.]+)" MAYSPACE END
 Regex expression matching a WEIGHT line. More...
 
#define SPACE   "[ \t]+"
 One or more spaces. More...
 
#define START   "^"
 Start of a line. More...
 

Functions

static void ns3::PrintNodeInfo (std::string &uid, std::string &loc, bool dns, bool bb, std::vector< std::string >::size_type neighListSize, std::string &name, int radius)
 Print node info. More...
 

Detailed Description

Macro Definition Documentation

◆ END

#define END   "$"

End of a line.

Definition at line 73 of file rocketfuel-topology-reader.cc.

◆ MAYSPACE

#define MAYSPACE   "[ \t]*"

Zero or more spaces.

Definition at line 77 of file rocketfuel-topology-reader.cc.

◆ REGMATCH_MAX

#define REGMATCH_MAX   16

Maximum nuber of matches in a regex query.

Definition at line 68 of file rocketfuel-topology-reader.cc.

◆ ROCKETFUEL_MAPS_LINE

#define ROCKETFUEL_MAPS_LINE
Value:
START "(-*[0-9]+)" SPACE "(@[?A-Za-z0-9,+]+)" SPACE \
"(\\+)*" MAYSPACE "(bb)*" MAYSPACE \
"\\(([0-9]+)\\)" SPACE "(&[0-9]+)*" MAYSPACE \
"->" MAYSPACE "(<[0-9 \t<>]+>)*" MAYSPACE \
"(\\{-[0-9\\{\\} \t-]+\\})*" SPACE \
"=([A-Za-z0-9.!-]+)" SPACE "r([0-9])" \
MAYSPACE END
#define END
End of a line.
#define START
Start of a line.
#define MAYSPACE
Zero or more spaces.
#define SPACE
One or more spaces.

Regex expression matching a MAP line.

Definition at line 80 of file rocketfuel-topology-reader.cc.

◆ ROCKETFUEL_WEIGHTS_LINE

#define ROCKETFUEL_WEIGHTS_LINE    START "([^ \t]+)" SPACE "([^ \t]+)" SPACE "([0-9.]+)" MAYSPACE END

Regex expression matching a WEIGHT line.

Definition at line 90 of file rocketfuel-topology-reader.cc.

◆ SPACE

#define SPACE   "[ \t]+"

One or more spaces.

Definition at line 75 of file rocketfuel-topology-reader.cc.

◆ START

#define START   "^"

Start of a line.

Definition at line 71 of file rocketfuel-topology-reader.cc.