-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.md~
167 lines (100 loc) · 6.44 KB
/
README.md~
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
CRL Distribution in VANETs
==========================
This repos contains the detailed packet-level implemetation of different CRL distribution methods in VANETs based on my master thesis:
**M.S. Thesis: Certificate Revocation List Distribution in Vehicular Communication Systems**
Under supervision of professor Panos Papadimitratos
More information here: http://goo.gl/zinfj
Open this project in OMNET++ network simulator. Download OMNET++ from "http://www.omnetpp.org/".
Step 1: Download pre-requisites
-------------------------------
This project uses the following softwares and packages:
1) SUMO: SUMO is an open source, microscopic, continuous-space, discrete-time road traffic simulator, developed at German Aerospace Center. We use SUMO to generate mobility traces of vehicles in large scale simulation. You can download the SUMO from "http://sumo-sim.org/wiki/Main_Page".
2) Veins framework: We used Veins to connect SUMO to OMNET++ using TraCI interface. You can download Veins from "http://veins.car2x.org".
3) Eigen library: Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. We use this library for solving simple linear equations in Rabins algorithm. Eigen is a header only library. Download and extract it near the main project folder.
4) Boost library: Boost is a set of libraries for C++. We use the boost serialization library to serialize CRL messages before handing it over to TCP, and deserialize it in receiver. In Ubuntu, you can install libboost1.46-dev and libboost-serialization1.46-dev packages.
5) OpenSSL library: OpenSSL is an open-source implementation of the SSL and TLS protocols. The core library, written in the C programming language, implements the basic cryptographic functions and provides various utility functions. We use OpenSSL library to sign and verify different messages. In Ubuntu, you can install libssl-dev package.
Step 2: you should change the mixim code
----------------------------------------
1. go to mixim/src/base/modules/BatteryAccess.cc
- comment line 26:
// opp_warning("No battery module defined!");
2. go to mixim/src/base/connectionManager/BaseConnectionManager.cc
- add these lines after line 275
// TODO: MANI: *********************************************
cModule *mod1 = nic->nicPtr->getParentModule();
cModule *mod2 = nic_i->nicPtr->getParentModule();
// now send connect signal for statistics
simsignal_t Signal_In_Range = registerSignal("In_Range");
mod1->emit(Signal_In_Range, mod2->getFullName());
mod2 ->emit(Signal_In_Range, mod1->getFullName());
// ***************************************************
3. go to mixim/src/modules/mac/Mac80211.cc
- add after line 28 in header:
// TODO: MANI
#include "FindModule.h"
- add after line 275:
// TODO: MANI: **************************************
{
// most of the time, the reason is because of the BITERROR and not COLLISION !!
cModule *nodePtr = FindModule<>::findHost(this);
// send signal to application layer
simsignal_t Signal_fromMAC = registerSignal("fromMAC");
nodePtr->emit(Signal_fromMAC, "RxError");
// send signal for statistics
simsignal_t Signal_RxErrors = registerSignal("RxErrors");
nodePtr->emit(Signal_RxErrors, 1);
}
// ***************************************************
- add after line 305:
// TODO: MANI: ***************************************
{
// send signal to application layer
simsignal_t Signal_fromMAC = registerSignal("fromMAC");
cModule *nodePtr = FindModule<>::findHost(this);
nodePtr->emit(Signal_fromMAC, "TxOver");
}
// ***************************************************
4. go to mixim/src/modules/mobility/BonnMotionMobility.cc
- change line 103 from handleIfOutside(RAISEERROR, stepTarget, dummy, dummy, dum);
to handleIfOutside(REFLECT, stepTarget, dummy, dummy, dum);
5. go to mixim/src/modules/mobility/traci/TraCIScenarioManager.cc
- add after line 665
// TODO: MANI: ***************************************
// save the name of the module, for later use.
// We must copy the name and should not use pointer!
char name[10];
strcpy(name, mod->getFullName());
// ***************************************************
- add afte line 680
// TODO: MANI: ***************************************
// send signal for statistics
simsignal_t Signal_Module_Deleted = registerSignal("V_Deleted");
simulation.getSystemModule()->emit(Signal_Module_Deleted, name);
// ***************************************************
Step 3: change mixim to make it compatible with older gcc (running on KTH server)
---------------------------------------------------------------------------------
according to this link: https://github.com/omnetpp/mixim/commit/ec194baa813429b17626b90e2a6e80e3f47f0d07
1. src/base/connectionManager/ChannelAccess.h
typedef AccessModuleWrap<BaseMobility> ChannelMobilityAccessType;
typedef ChannelMobilityAccessType::wrapType* ChannelMobilityPtrType;
2. src/base/phyLayer/MappingUtils.h
- Line 681:
typedef base_class_type::storage_type storage_type;
typedef base_class_type::container_type container_type;
typedef base_class_type::key_type key_type;
typedef base_class_type::key_cref_type key_cref_type;
typedef base_class_type::mapped_type mapped_type;
typedef base_class_type::mapped_cref_type mapped_cref_type;
typedef base_class_type::pair_type pair_type;
typedef base_class_type::iterator iterator;
typedef base_class_type::const_iterator const_iterator;
typedef base_class_type::comparator_type comparator_type;
typedef base_class_type::interpolated interpolated;
- Line 1655:
argument_value_cref_t argVal = pos.getArgValue(myDimension);
interpolator_map_type::iterator posIt = entries.lower_bound(argVal);
3. Change the Eigen library path in the makefile of application folder
4. Change the sumo path in suo-launchd.xml
Step 4: issue the following command to run the simulation in command-line
-------------------------------------------------------------------------
run the script.sh which has screen support.