Skip to content

ManiAm/CRLdistributionVANET

Repository files navigation

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!");
    
  1. 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());
    
      // ***************************************************
    
  1. 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");
      }
      // ***************************************************
    
  1. 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);
  1. 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);
    
  1. Change the Eigen library path in the makefile of application folder

  2. 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.