├── .gitignore
├── Data Collections
├── Combined Data.xlsx
├── Data Collection Sim 0.xlsx
├── Data Collection Sim 1.xlsx
├── Data Collection Sim 2.xlsx
└── Simulations Raw Log
│ ├── README.txt
│ ├── Results from Simulation0.rar
│ ├── Results from Simulation1.rar
│ └── Results from Simulation2.rar
├── Documentation
├── Attack_Simulation.pdf
├── Motivation_Document.pdf
└── Thesis_By_Umeer_Mohammad - Draft.pdf
├── Graphs
├── Gephi Graphs
│ ├── 10.gephi
│ ├── 100.gephi
│ ├── 1000.gephi
│ ├── 10000.gephi
│ ├── 20.gephi
│ ├── 50.gephi
│ ├── 500.gephi
│ ├── 5000.gephi
│ ├── 500_2Components.gephi
│ └── node_conversion.xlsx
├── MATLAB Graphs
│ ├── Graphs.xlsx
│ ├── WattsStrogatz.m
│ ├── network_graph_image.JPG
│ └── runNetworkGenerator.m
└── Tribler Network
│ ├── Net5.ned comparitible data.txt
│ ├── Tribler network.gephi
│ └── TrustChain Network Structure.zip
├── LICENSE
├── README.md
├── Simulation0
├── .cmdenv-log
├── .cproject
├── .metadata
│ ├── .lock
│ ├── .log
│ ├── .plugins
│ │ ├── org.eclipse.cdt.core
│ │ │ └── .log
│ │ ├── org.eclipse.cdt.make.core
│ │ │ ├── specs.c
│ │ │ └── specs.cpp
│ │ ├── org.eclipse.core.resources
│ │ │ ├── .root
│ │ │ │ ├── .indexes
│ │ │ │ │ ├── history.version
│ │ │ │ │ └── properties.version
│ │ │ │ └── 1.tree
│ │ │ └── .safetable
│ │ │ │ └── org.eclipse.core.resources
│ │ ├── org.eclipse.core.runtime
│ │ │ └── .settings
│ │ │ │ ├── org.eclipse.cdt.ui.prefs
│ │ │ │ ├── org.eclipse.core.resources.prefs
│ │ │ │ ├── org.eclipse.jsch.core.prefs
│ │ │ │ ├── org.eclipse.ui.ide.prefs
│ │ │ │ ├── org.eclipse.ui.prefs
│ │ │ │ └── org.eclipse.ui.workbench.prefs
│ │ ├── org.eclipse.e4.workbench
│ │ │ └── workbench.xmi
│ │ ├── org.eclipse.ui.workbench
│ │ │ ├── dialog_settings.xml
│ │ │ └── workingsets.xml
│ │ └── org.omnetpp.main
│ │ │ └── dialog_settings.xml
│ └── version.ini
├── .oppbuildspec
├── .project
├── .qtenvrc
├── .settings
│ └── language.settings.xml
├── ChangeLog
├── Makefile
├── Net5.anf
├── NoREADME.txt
├── frames
│ ├── NetBuilder#0_0000.png
│ ├── NetBuilder#0_0001.png
│ ├── NetBuilder#0_0002.png
│ ├── NetBuilder#0_0003.png
│ ├── NetBuilder#0_0004.png
│ ├── NetBuilder#0_0005.png
│ ├── NetBuilder#0_0006.png
│ ├── NetBuilder#0_0007.png
│ ├── NetBuilder#0_0008.png
│ ├── NetBuilder#0_0009.png
│ ├── NetBuilder#0_0010.png
│ ├── NetBuilder#0_0011.png
│ ├── NetBuilder#0_0012.png
│ ├── NetBuilder#0_0013.png
│ ├── NetBuilder#0_0014.png
│ ├── NetBuilder#0_0015.png
│ ├── NetBuilder#0_0016.png
│ ├── NetBuilder#0_0017.png
│ └── NetBuilder#0_0018.png
├── makefrag
├── networks
│ └── Net5.ned
├── node
│ ├── App.cc
│ ├── App.h
│ ├── App.ned
│ ├── IApp.ned
│ ├── L2Queue.cc
│ ├── L2Queue.ned
│ ├── Node.ned
│ ├── Packet.msg
│ ├── PacketType.h
│ ├── Packet_m.cc
│ ├── Packet_m.h
│ ├── Routing.cc
│ ├── Routing.h
│ └── Routing.ned
├── omnetpp.ini
├── out
│ ├── clang-release
│ │ ├── .last-copts
│ │ └── node
│ │ │ ├── App.o.d
│ │ │ ├── L2Queue.o.d
│ │ │ ├── Packet_m.h.d
│ │ │ ├── Packet_m.o.d
│ │ │ └── Routing.o.d
│ ├── gcc-debug
│ │ ├── .last-copts
│ │ ├── builder
│ │ │ └── netbuilder.d
│ │ ├── node
│ │ │ ├── App.d
│ │ │ ├── BurstyApp.d
│ │ │ ├── L2Queue.d
│ │ │ ├── Packet_m.d
│ │ │ └── Routing.d
│ │ └── routing_dbg
│ └── gcc-release
│ │ ├── .last-copts
│ │ ├── builder
│ │ └── netbuilder.d
│ │ ├── node
│ │ ├── App.d
│ │ ├── BurstyApp.d
│ │ ├── L2Queue.d
│ │ ├── Packet_m.d
│ │ └── Routing.d
│ │ ├── routing
│ │ └── routing_umeer
├── package.ned
├── parsim
│ ├── README.txt
│ ├── omnetpp.ini
│ ├── runparsim
│ ├── runparsim-cmd.bat
│ ├── runparsim-mpi
│ └── runparsim.bat
└── templates
│ └── randomtopo
│ ├── Nearest3.java
│ ├── gatename.xswt
│ ├── nearest3.jar
│ ├── nedtypes.xswt
│ ├── network.ned.ftl
│ ├── omnetpp.ini.ftl
│ ├── package.ned.ftl
│ ├── params.xswt
│ └── template.properties
├── Simulation1
├── .cmdenv-log
├── .cproject
├── .metadata
│ ├── .lock
│ ├── .log
│ ├── .plugins
│ │ ├── org.eclipse.cdt.core
│ │ │ └── .log
│ │ ├── org.eclipse.cdt.make.core
│ │ │ ├── specs.c
│ │ │ └── specs.cpp
│ │ ├── org.eclipse.core.resources
│ │ │ ├── .root
│ │ │ │ ├── .indexes
│ │ │ │ │ ├── history.version
│ │ │ │ │ └── properties.version
│ │ │ │ └── 1.tree
│ │ │ └── .safetable
│ │ │ │ └── org.eclipse.core.resources
│ │ ├── org.eclipse.core.runtime
│ │ │ └── .settings
│ │ │ │ ├── org.eclipse.cdt.ui.prefs
│ │ │ │ ├── org.eclipse.core.resources.prefs
│ │ │ │ ├── org.eclipse.jsch.core.prefs
│ │ │ │ ├── org.eclipse.ui.ide.prefs
│ │ │ │ ├── org.eclipse.ui.prefs
│ │ │ │ └── org.eclipse.ui.workbench.prefs
│ │ ├── org.eclipse.e4.workbench
│ │ │ └── workbench.xmi
│ │ ├── org.eclipse.ui.workbench
│ │ │ ├── dialog_settings.xml
│ │ │ └── workingsets.xml
│ │ └── org.omnetpp.main
│ │ │ └── dialog_settings.xml
│ └── version.ini
├── .oppbuildspec
├── .project
├── .qtenvrc
├── .settings
│ └── language.settings.xml
├── ChangeLog
├── Makefile
├── Net5.anf
├── NoREADME.txt
├── frames
│ ├── NetBuilder#0_0000.png
│ ├── NetBuilder#0_0001.png
│ ├── NetBuilder#0_0002.png
│ ├── NetBuilder#0_0003.png
│ ├── NetBuilder#0_0004.png
│ ├── NetBuilder#0_0005.png
│ ├── NetBuilder#0_0006.png
│ ├── NetBuilder#0_0007.png
│ ├── NetBuilder#0_0008.png
│ ├── NetBuilder#0_0009.png
│ ├── NetBuilder#0_0010.png
│ ├── NetBuilder#0_0011.png
│ ├── NetBuilder#0_0012.png
│ ├── NetBuilder#0_0013.png
│ ├── NetBuilder#0_0014.png
│ ├── NetBuilder#0_0015.png
│ ├── NetBuilder#0_0016.png
│ ├── NetBuilder#0_0017.png
│ └── NetBuilder#0_0018.png
├── makefrag
├── networks
│ └── Net5.ned
├── node
│ ├── App.cc
│ ├── App.h
│ ├── App.ned
│ ├── IApp.ned
│ ├── L2Queue.cc
│ ├── L2Queue.ned
│ ├── Node.ned
│ ├── Packet.msg
│ ├── PacketType.h
│ ├── Packet_m.cc
│ ├── Packet_m.h
│ ├── Routing.cc
│ ├── Routing.h
│ └── Routing.ned
├── omnetpp.ini
├── out
│ ├── clang-debug
│ │ ├── .last-copts
│ │ └── node
│ │ │ ├── App.o.d
│ │ │ ├── L2Queue.o.d
│ │ │ ├── Packet_m.o.d
│ │ │ └── Routing.o.d
│ ├── clang-release
│ │ ├── .last-copts
│ │ └── node
│ │ │ ├── App.o.d
│ │ │ ├── L2Queue.o.d
│ │ │ ├── Packet_m.h.d
│ │ │ ├── Packet_m.o.d
│ │ │ └── Routing.o.d
│ ├── gcc-debug
│ │ ├── .last-copts
│ │ ├── builder
│ │ │ ├── netbuilder.d
│ │ │ └── netbuilder.o
│ │ ├── node
│ │ │ ├── App.d
│ │ │ ├── App.o
│ │ │ ├── BurstyApp.d
│ │ │ ├── BurstyApp.o
│ │ │ ├── L2Queue.d
│ │ │ ├── L2Queue.o
│ │ │ ├── Packet_m.d
│ │ │ ├── Packet_m.o
│ │ │ ├── Routing.d
│ │ │ └── Routing.o
│ │ └── routing_dbg
│ └── gcc-release
│ │ ├── .last-copts
│ │ ├── builder
│ │ ├── netbuilder.d
│ │ └── netbuilder.o
│ │ ├── node
│ │ ├── App.d
│ │ ├── App.o
│ │ ├── BurstyApp.d
│ │ ├── BurstyApp.o
│ │ ├── L2Queue.d
│ │ ├── L2Queue.o
│ │ ├── Packet_m.d
│ │ ├── Packet_m.o
│ │ ├── Routing.d
│ │ └── Routing.o
│ │ ├── routing
│ │ └── routing_umeer
├── package.ned
├── parsim
│ ├── README.txt
│ ├── omnetpp.ini
│ ├── runparsim
│ ├── runparsim-cmd.bat
│ ├── runparsim-mpi
│ └── runparsim.bat
└── templates
│ └── randomtopo
│ ├── Nearest3.java
│ ├── gatename.xswt
│ ├── nearest3.jar
│ ├── nedtypes.xswt
│ ├── network.ned.ftl
│ ├── omnetpp.ini.ftl
│ ├── package.ned.ftl
│ ├── params.xswt
│ └── template.properties
├── Simulation2
├── .cmdenv-log
├── .cproject
├── .metadata
│ ├── .lock
│ ├── .log
│ ├── .plugins
│ │ ├── org.eclipse.cdt.core
│ │ │ └── .log
│ │ ├── org.eclipse.cdt.make.core
│ │ │ ├── specs.c
│ │ │ └── specs.cpp
│ │ ├── org.eclipse.core.resources
│ │ │ ├── .root
│ │ │ │ ├── .indexes
│ │ │ │ │ ├── history.version
│ │ │ │ │ └── properties.version
│ │ │ │ └── 1.tree
│ │ │ └── .safetable
│ │ │ │ └── org.eclipse.core.resources
│ │ ├── org.eclipse.core.runtime
│ │ │ └── .settings
│ │ │ │ ├── org.eclipse.cdt.ui.prefs
│ │ │ │ ├── org.eclipse.core.resources.prefs
│ │ │ │ ├── org.eclipse.jsch.core.prefs
│ │ │ │ ├── org.eclipse.ui.ide.prefs
│ │ │ │ ├── org.eclipse.ui.prefs
│ │ │ │ └── org.eclipse.ui.workbench.prefs
│ │ ├── org.eclipse.e4.workbench
│ │ │ └── workbench.xmi
│ │ ├── org.eclipse.ui.workbench
│ │ │ ├── dialog_settings.xml
│ │ │ └── workingsets.xml
│ │ └── org.omnetpp.main
│ │ │ └── dialog_settings.xml
│ └── version.ini
├── .oppbuildspec
├── .project
├── .qtenvrc
├── .settings
│ └── language.settings.xml
├── ChangeLog
├── Makefile
├── Net5.anf
├── NoREADME.txt
├── frames
│ ├── NetBuilder#0_0000.png
│ ├── NetBuilder#0_0001.png
│ ├── NetBuilder#0_0002.png
│ ├── NetBuilder#0_0003.png
│ ├── NetBuilder#0_0004.png
│ ├── NetBuilder#0_0005.png
│ ├── NetBuilder#0_0006.png
│ ├── NetBuilder#0_0007.png
│ ├── NetBuilder#0_0008.png
│ ├── NetBuilder#0_0009.png
│ ├── NetBuilder#0_0010.png
│ ├── NetBuilder#0_0011.png
│ ├── NetBuilder#0_0012.png
│ ├── NetBuilder#0_0013.png
│ ├── NetBuilder#0_0014.png
│ ├── NetBuilder#0_0015.png
│ ├── NetBuilder#0_0016.png
│ ├── NetBuilder#0_0017.png
│ └── NetBuilder#0_0018.png
├── makefrag
├── networks
│ └── Net5.ned
├── node
│ ├── App.cc
│ ├── App.h
│ ├── App.ned
│ ├── IApp.ned
│ ├── L2Queue.cc
│ ├── L2Queue.ned
│ ├── Node.ned
│ ├── Packet.msg
│ ├── PacketType.h
│ ├── Packet_m.cc
│ ├── Packet_m.h
│ ├── Routing.cc
│ ├── Routing.h
│ └── Routing.ned
├── omnetpp.ini
├── out
│ ├── clang-debug
│ │ ├── .last-copts
│ │ └── node
│ │ │ ├── App.o.d
│ │ │ ├── L2Queue.o.d
│ │ │ ├── Packet_m.h.d
│ │ │ ├── Packet_m.o.d
│ │ │ └── Routing.o.d
│ ├── clang-release
│ │ ├── .last-copts
│ │ └── node
│ │ │ ├── App.o.d
│ │ │ ├── L2Queue.o.d
│ │ │ ├── Packet_m.h.d
│ │ │ ├── Packet_m.o.d
│ │ │ └── Routing.o.d
│ ├── gcc-debug
│ │ ├── .last-copts
│ │ ├── builder
│ │ │ └── netbuilder.d
│ │ ├── node
│ │ │ ├── App.d
│ │ │ ├── BurstyApp.d
│ │ │ ├── L2Queue.d
│ │ │ ├── Packet_m.d
│ │ │ └── Routing.d
│ │ └── routing_dbg
│ └── gcc-release
│ │ ├── .last-copts
│ │ ├── builder
│ │ └── netbuilder.d
│ │ ├── node
│ │ ├── App.d
│ │ ├── BurstyApp.d
│ │ ├── L2Queue.d
│ │ ├── Packet_m.d
│ │ └── Routing.d
│ │ ├── routing
│ │ └── routing_umeer
├── package.ned
├── parsim
│ ├── README.txt
│ ├── omnetpp.ini
│ ├── runparsim
│ ├── runparsim-cmd.bat
│ ├── runparsim-mpi
│ └── runparsim.bat
├── templates
│ └── randomtopo
│ │ ├── Nearest3.java
│ │ ├── gatename.xswt
│ │ ├── nearest3.jar
│ │ ├── nedtypes.xswt
│ │ ├── network.ned.ftl
│ │ ├── omnetpp.ini.ftl
│ │ ├── package.ned.ftl
│ │ ├── params.xswt
│ │ └── template.properties
└── test
│ ├── BasicMessage.test
│ ├── RandomDistinctPicker.test
│ └── TokenizerEvilNodesList.test
└── Tools
├── .gitignore
├── Automation Scripts
├── clusterJob.job
├── script.sh
├── scriptOut.sh
└── statCalculator.r
├── NetworkGeneratorConverter
├── .classpath
├── .project
├── build.xml
├── build
│ ├── built-jar.properties
│ └── classes
│ │ └── .gitignore
├── dist
│ ├── NetworkGeneratorConverter.jar
│ ├── README.TXT
│ ├── input.txt
│ └── output.txt
├── input.txt
├── manifest.mf
├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
├── output.txt
└── src
│ ├── networkgeneratorconverter
│ ├── Edge.java
│ ├── FileParser.java
│ ├── FileWriter.java
│ └── NetworkGeneratorConverter.java
│ └── testing
│ ├── FileParserTest.java
│ └── FileWriterTest.java
├── SimulationsResultExtractor
├── .classpath
├── .project
├── General-#0.elog
├── build.xml
├── build
│ ├── built-jar.properties
│ └── classes
│ │ └── .gitignore
├── dist
│ ├── README.TXT
│ ├── SimulationsResultExtractor.jar
│ ├── input.txt
│ └── output.txt
├── input.txt
├── manifest.mf
├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
├── output.txt
└── src
│ └── SimulationsResultExtractor.java
├── SimulationsResultExtractor2
├── .classpath
├── .gitignore
├── .project
├── input.txt
└── src
│ ├── ResultExtractor2.java
│ ├── SimulationsResultExtractor2.java
│ └── Tester.java
└── SimulationsResultTypeCounter
├── .classpath
├── .gitignore
├── .project
├── input.txt
└── src
├── SimulationsResultTypeCounter.java
└── testing.java
/Data Collections/Combined Data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Data Collections/Combined Data.xlsx
--------------------------------------------------------------------------------
/Data Collections/Data Collection Sim 0.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Data Collections/Data Collection Sim 0.xlsx
--------------------------------------------------------------------------------
/Data Collections/Data Collection Sim 1.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Data Collections/Data Collection Sim 1.xlsx
--------------------------------------------------------------------------------
/Data Collections/Data Collection Sim 2.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Data Collections/Data Collection Sim 2.xlsx
--------------------------------------------------------------------------------
/Data Collections/Simulations Raw Log/README.txt:
--------------------------------------------------------------------------------
1 | t*.*-> Results from Simulation0
2 | q*.*-> Results from Simulation1
3 | r*.*-> Results from Simulation2
4 |
--------------------------------------------------------------------------------
/Data Collections/Simulations Raw Log/Results from Simulation0.rar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Data Collections/Simulations Raw Log/Results from Simulation0.rar
--------------------------------------------------------------------------------
/Data Collections/Simulations Raw Log/Results from Simulation1.rar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Data Collections/Simulations Raw Log/Results from Simulation1.rar
--------------------------------------------------------------------------------
/Data Collections/Simulations Raw Log/Results from Simulation2.rar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Data Collections/Simulations Raw Log/Results from Simulation2.rar
--------------------------------------------------------------------------------
/Documentation/Attack_Simulation.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Documentation/Attack_Simulation.pdf
--------------------------------------------------------------------------------
/Documentation/Motivation_Document.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Documentation/Motivation_Document.pdf
--------------------------------------------------------------------------------
/Documentation/Thesis_By_Umeer_Mohammad - Draft.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Documentation/Thesis_By_Umeer_Mohammad - Draft.pdf
--------------------------------------------------------------------------------
/Graphs/Gephi Graphs/10.gephi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/Gephi Graphs/10.gephi
--------------------------------------------------------------------------------
/Graphs/Gephi Graphs/100.gephi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/Gephi Graphs/100.gephi
--------------------------------------------------------------------------------
/Graphs/Gephi Graphs/1000.gephi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/Gephi Graphs/1000.gephi
--------------------------------------------------------------------------------
/Graphs/Gephi Graphs/10000.gephi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/Gephi Graphs/10000.gephi
--------------------------------------------------------------------------------
/Graphs/Gephi Graphs/20.gephi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/Gephi Graphs/20.gephi
--------------------------------------------------------------------------------
/Graphs/Gephi Graphs/50.gephi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/Gephi Graphs/50.gephi
--------------------------------------------------------------------------------
/Graphs/Gephi Graphs/500.gephi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/Gephi Graphs/500.gephi
--------------------------------------------------------------------------------
/Graphs/Gephi Graphs/5000.gephi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/Gephi Graphs/5000.gephi
--------------------------------------------------------------------------------
/Graphs/Gephi Graphs/500_2Components.gephi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/Gephi Graphs/500_2Components.gephi
--------------------------------------------------------------------------------
/Graphs/Gephi Graphs/node_conversion.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/Gephi Graphs/node_conversion.xlsx
--------------------------------------------------------------------------------
/Graphs/MATLAB Graphs/Graphs.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/MATLAB Graphs/Graphs.xlsx
--------------------------------------------------------------------------------
/Graphs/MATLAB Graphs/WattsStrogatz.m:
--------------------------------------------------------------------------------
1 | % Copyright 2015 The MathWorks, Inc.
2 |
3 | function h = WattsStrogatz(N,K,beta)
4 | % H = WattsStrogatz(N,K,beta) returns a Watts-Strogatz model graph with N
5 | % nodes, N*K edges, mean node degree 2*K, and rewiring probability beta.
6 | %
7 | % beta = 0 is a ring lattice, and beta = 1 is a random graph.
8 |
9 | % Connect each node to its K next and previous neighbors. This constructs
10 | % indices for a ring lattice.
11 | s = repelem((1:N)',1,K);
12 | t = s + repmat(1:K,N,1);
13 | t = mod(t-1,N)+1;
14 |
15 | % Rewire the target node of each edge with probability beta
16 | for source=1:N
17 | switchEdge = rand(K, 1) < beta;
18 |
19 | newTargets = rand(N, 1);
20 | newTargets(source) = 0;
21 | newTargets(s(t==source)) = 0;
22 | newTargets(t(source, ~switchEdge)) = 0;
23 |
24 | [~, ind] = sort(newTargets, 'descend');
25 | t(source, switchEdge) = ind(1:nnz(switchEdge));
26 | end
27 |
28 | h = graph(s,t);
29 | end
--------------------------------------------------------------------------------
/Graphs/MATLAB Graphs/network_graph_image.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/MATLAB Graphs/network_graph_image.JPG
--------------------------------------------------------------------------------
/Graphs/MATLAB Graphs/runNetworkGenerator.m:
--------------------------------------------------------------------------------
1 | clear h2
2 | clear graph
3 |
4 |
5 | graph = WattsStrogatz(500,5,0.01);
6 |
7 | disp("AvgPathLength:");
8 | disp(mean(mean(distances(graph))));
9 | disp("VariancePathLength: ");
10 | disp(mean(var(distances(graph))));
11 |
12 | figure('name','Graph');
13 |
14 | colormap hsv
15 | deg = degree(graph);
16 | nSizes = 2*sqrt(deg-min(deg)+0.2);
17 | nColors = deg;
18 | plot(graph,'MarkerSize',nSizes,'NodeCData',nColors,'EdgeAlpha',0.1)
19 | colorbar
20 |
21 | clear ans
22 | clear deg
23 | clear nSizes
24 | clear nColors
--------------------------------------------------------------------------------
/Graphs/Tribler Network/Tribler network.gephi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/Tribler Network/Tribler network.gephi
--------------------------------------------------------------------------------
/Graphs/Tribler Network/TrustChain Network Structure.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Graphs/Tribler Network/TrustChain Network Structure.zip
--------------------------------------------------------------------------------
/Simulation0/.cmdenv-log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/.cmdenv-log
--------------------------------------------------------------------------------
/Simulation0/.metadata/.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/.metadata/.lock
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.cdt.core/.log:
--------------------------------------------------------------------------------
1 | *** SESSION Jul 31, 2019 12:12:29.07 -------------------------------------------
2 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree:
--------------------------------------------------------------------------------
1 | org.eclipse.cdt.core
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | spelling_locale=en_GB
3 | spelling_locale_initialized=true
4 | useAnnotationsPrefPage=true
5 | useQuickDiffPrefPage=true
6 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | version=1
3 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jsch.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jsch.core.hasChangedDefaultWin32SshHome=true
3 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs:
--------------------------------------------------------------------------------
1 | PROBLEMS_FILTERS_MIGRATE=true
2 | eclipse.preferences.version=1
3 | platformState=1564567518953
4 | quickStart=false
5 | tipsAndTricks=true
6 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | showIntro=false
3 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs:
--------------------------------------------------------------------------------
1 | //org.eclipse.ui.commands/state/org.eclipse.ui.navigator.resources.nested.changeProjectPresentation/org.eclipse.ui.commands.radioState=false
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/.plugins/org.omnetpp.main/dialog_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/Simulation0/.metadata/version.ini:
--------------------------------------------------------------------------------
1 | #Wed Jul 31 12:12:26 CEST 2019
2 | org.eclipse.core.runtime=2
3 | org.eclipse.platform=4.11.0.v20190307-0500
4 |
--------------------------------------------------------------------------------
/Simulation0/.oppbuildspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Simulation0/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | Simulation0
4 |
5 |
6 |
7 |
8 |
9 | org.omnetpp.cdt.MakefileBuilder
10 |
11 |
12 |
13 |
14 | org.omnetpp.scave.builder.vectorfileindexer
15 |
16 |
17 |
18 |
19 | org.eclipse.cdt.managedbuilder.core.genmakebuilder
20 | clean,full,incremental,
21 |
22 |
23 |
24 |
25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
26 | full,incremental,
27 |
28 |
29 |
30 |
31 |
32 | org.eclipse.cdt.core.cnature
33 | org.eclipse.cdt.core.ccnature
34 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
35 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
36 | org.omnetpp.main.omnetppnature
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Simulation0/.qtenvrc:
--------------------------------------------------------------------------------
1 | [General]
2 | last-configname=General
3 | last-runnumber=0
4 |
5 | [RunModeProfiles]
6 | fast-max-animation-speed=nan
7 | fast-max-playback-speed=1e+6
8 | fast-min-animation-speed=nan
9 | fast-min-playback-speed=1
10 | fast-playback-speed=91.20108393559097
11 | run-max-animation-speed=nan
12 | run-max-playback-speed=100
13 | run-min-animation-speed=nan
14 | run-min-playback-speed=0.01
15 | run-playback-speed=100
16 |
--------------------------------------------------------------------------------
/Simulation0/.settings/language.settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Simulation0/Net5.anf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Simulation0/NoREADME.txt:
--------------------------------------------------------------------------------
1 | Routing
2 | =======
3 |
4 | Demonstrates static shortest-path routing. Routing tables are set up at the
5 | beginning of the simulation using the cTopology class. The model is
6 | intentionally kept simple to facilitate understanding.
7 |
8 | The network topology is the one widely known as the "NTT backbone", and it was
9 | contributed by Mudassar Farooq.
10 |
11 | Every node queries the topology of the network independently, using a cTopology
12 | object. Then it computes shortest paths to every other node, and stores the
13 | first nodes of the paths in a next-hop table. (Actually the table contains
14 | the port number to the next-hop node not the node address itself -- the table
15 | thus provides dest-address -> next-hop-address mapping). All the above takes
16 | place once, at the beginning of this simulation. The topology is static during
17 | the simulation, and so there's no need for the nodes to do anything to keep
18 | the tables up-to-date. There's no routing protocol in the model.
19 |
20 | Once the routing tables are set up, nodes start sending packets at random
21 | intervals. Every node gets a list of destination addresses in a parameter,
22 | and for every packet it randomly chooses a destination from the list.
23 |
24 | There are two apps provided: App generates packets with exponential inter-arrival
25 | times, while BurstyApp alternates between active and idle periods. BurstyApp's
26 | implementation demonstrates the use of the FSMs (Finite State Machine).
27 |
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0000.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0000.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0001.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0002.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0003.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0004.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0005.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0006.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0007.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0008.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0009.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0009.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0010.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0011.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0011.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0012.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0012.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0013.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0013.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0014.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0014.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0015.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0015.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0016.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0016.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0017.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0017.png
--------------------------------------------------------------------------------
/Simulation0/frames/NetBuilder#0_0018.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tribler/trustchain-simulator/5f1f019c85fb0ebe0f93b2e9ac6127ddd1935759/Simulation0/frames/NetBuilder#0_0018.png
--------------------------------------------------------------------------------
/Simulation0/makefrag:
--------------------------------------------------------------------------------
1 | MSGC:=$(MSGC) --msg6
--------------------------------------------------------------------------------
/Simulation0/node/App.ned:
--------------------------------------------------------------------------------
1 | package node;
2 |
3 | //
4 | // Application model to generate traffic for the network.
5 | //
6 | simple App like IApp
7 | {
8 | parameters:
9 | int address; // local node address
10 | int totalNodes;
11 | int initialMoney;
12 | int evilNumberOfSleepingTransaction;
13 | int evilNumberOfTransaction;
14 | string evilNodeIds;
15 | int randomSeed = intuniform(0, 1000000);
16 | volatile double sendIaTime @unit(s) = default(exponential(1s)); // time between generating packets
17 | volatile double sendIaTimeEvil @unit(s);
18 | volatile int packetLength @unit(byte); // length of one message (fixed! no "volatile" modifier)
19 | @display("i=block/browser");
20 | @signal[endToEndDelay](type="simtime_t");
21 | @signal[hopCount](type="long");
22 | @signal[sourceAddress](type="long");
23 | @statistic[endToEndDelay](title="end-to-end delay of arrived packets"; unit=s; record=vector,mean,max; interpolationmode=none);
24 | @statistic[hopCount](title="hop count of arrived packets"; interpolationmode=none; record=vector?,mean,max);
25 | @statistic[sourceAddress](title="source address of arrived packets"; interpolationmode=none; record=vector?);
26 | gates:
27 | input in;
28 | output out;
29 | output direct;
30 | }
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Simulation0/node/IApp.ned:
--------------------------------------------------------------------------------
1 | package node;
2 |
3 | //
4 | // Interface for network traffic generator modules that
5 | // can be used in Node.
6 | //
7 | moduleinterface IApp
8 | {
9 | parameters:
10 | int address; // local node address
11 | gates:
12 | input in;
13 | output out;
14 | }
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Simulation0/node/L2Queue.ned:
--------------------------------------------------------------------------------
1 | package node;
2 |
3 | //
4 | // Represents the network interface for a point-to-point connection.
5 | //
6 | // Packets arriving from the upper layer ("in" gate) are sent out on
7 | // the "line" gate, which is expected to be connected to a link with
8 | // nonzero data rate. Packets that arrive while a previous packet is
9 | // being transmitted are queued up. The maximum queue size in packets
10 | // can be specified in a parameter. Excess frames are simply discarded
11 | // and recorded as statistics.
12 | //
13 | // The model can be easily extended in several ways: to make it possible to
14 | // query the queue length from another module via a direct method call
15 | // interface, to implement priority queueing, or to collect link statistics
16 | // (utilization, etc.)
17 | //
18 | simple L2Queue
19 | {
20 | parameters:
21 | int frameCapacity = default(0); // max number of packets; 0 means no limit
22 | bool useCutThroughSwitching = default(false); // use cut-through switching instead of store-and-forward
23 | @display("i=block/queue;q=queue");
24 | @signal[qlen](type="long");
25 | @signal[busy](type="bool");
26 | @signal[queueingTime](type="simtime_t");
27 | @signal[drop](type="long");
28 | @signal[txBytes](type="long");
29 | @signal[rxBytes](type="long");
30 | @statistic[qlen](title="queue length";record=vector?,timeavg,max;interpolationmode=sample-hold);
31 | @statistic[busy](title="server busy state";record=vector?,timeavg;interpolationmode=sample-hold);
32 | @statistic[queueingTime](title="queueing time at dequeue";unit=s;interpolationmode=none);
33 | @statistic[drop](title="dropped packet byte length";unit=bytes;record=vector?,count,sum;interpolationmode=none);
34 | @statistic[txBytes](title="transmitting packet byte length";unit=bytes;record=vector?,count,sum,histogram;interpolationmode=none);
35 | @statistic[rxBytes](title="received packet byte length";unit=bytes;record=vector?,count,sum,histogram;interpolationmode=none);
36 | gates:
37 | input in;
38 | output out;
39 | inout line;
40 | input direct @directIn;
41 | }
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Simulation0/node/Node.ned:
--------------------------------------------------------------------------------
1 | package node;
2 |
3 | //
4 | // A "Node" consists of a Routing plus an App module which represents the
5 | // aggregate traffic of the subnets connected to that router.
6 | //
7 | module Node
8 | {
9 | parameters:
10 | int address;
11 | string appType;
12 | @display("i=misc/node_vs,gold");
13 | gates:
14 | inout port[];
15 | submodules:
16 | app: like IApp {
17 | parameters:
18 | address = address;
19 | @display("p=140,60");
20 | }
21 | routing: Routing {
22 | parameters:
23 | @display("p=140,130");
24 | gates:
25 | in[sizeof(port)];
26 | out[sizeof(port)];
27 | }
28 | queue[sizeof(port)]: L2Queue {
29 | parameters:
30 | @display("p=80,200,row");
31 | }
32 | connections allowunconnected:
33 | routing.localOut --> app.in;
34 | routing.localIn <-- app.out;
35 | for i=0..sizeof(port)-1 {
36 | routing.out[i] --> queue[i].in;
37 | routing.in[i] <-- queue[i].out;
38 | queue[i].line <--> port[i];
39 | }
40 | }
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Simulation0/node/Packet.msg:
--------------------------------------------------------------------------------
1 | //
2 | // Represents a packet in the network.
3 | //
4 | cplusplus {{
5 | #include "PacketType.h"
6 | }}
7 |
8 | enum PacketType;
9 |
10 | packet Packet
11 | {
12 | int srcAddr @packetData;
13 | int destAddr @packetData;
14 | int hopCount @packetData;
15 |
16 | // This is an enum and it has the following meaning
17 | // 0 - Transaction
18 | // 1 - Chain Request
19 | // 2 - Send Chain
20 | // 3 - Ack of Transaction
21 | // 4 - Information Dissemination
22 | // 5 - Busy Message
23 | int packetType @packetData;
24 | //int packetType @enum(PacketType);
25 |
26 | //Send Transaction
27 | int transactionValue @packetData;
28 | int myChainSeqNum @packetData;
29 |
30 | //Sending Chain Information
31 | //int databaseSize @packetData;
32 | //int userA[] @packetData;
33 | int userBID[] @packetData;
34 | int userBSeqNum[] @packetData;
35 | int transaction[] @packetData;
36 |
37 | //Dissemination data
38 | int userXID @packetData;
39 | int userXSeqNum @packetData;
40 | int userYID @packetData;
41 | int userYSeqNum @packetData;
42 | }
43 |
--------------------------------------------------------------------------------
/Simulation0/node/PacketType.h:
--------------------------------------------------------------------------------
1 | enum PacketType
2 | {
3 | NONE = 0,
4 | UDP = 1,
5 | TCP = 2,
6 | SCTP = 3
7 | };
8 |
--------------------------------------------------------------------------------
/Simulation0/node/Routing.h:
--------------------------------------------------------------------------------
1 | #include