# EmuCD: An Emulator for Content Dissemination Protocols in Vehicular Networks
## 4 EmuCD Integration Facilities  
To evaluate a protocol regarding its performance, its efficiency in the use of the communication infrastructure, and its correct functioning for content dissemination, having a real communications network is ideal. However, when it comes to vehicular networks, this objective is practically impossible, notably in the initial tests due to the preparation and configuration required of hardware and software. The most suitable alternative is to use data traces harvested in production networks, such as the one of Oporto. However, yet again there are difficulties, as saving detailed information about the behaviour of all nodes in the network requires a huge effort in terms of time and resources, as this data collection can easily generate terabytes of data that must circulate through the network to the cloud. With these conditions in mind, it is easy to note that the use of mobility simulators, such as SUMO, are of great importance in the development of new protocols for the dissemination of content in VANETs.  
Considering all options necessary to be able to perform exhaustive tests with the new protocols, we built a tool to integrate the mobility traits generated by SUMO, preparing them for use in our emulator. That was how the Processor of Information to Perform an Emulation (PIPE) was born. It should be reminded that, when using real mobility data, SUMO and PIPE are not required.  
SUMO can be used to generate the mobility of the vehicles according to the region of the city while providing a mean velocity or a range of velocities-among other conditions, as it is a traffic simulator. Finally, since SUMO does not generate information regarding the connectivity between  
Figure 1: Architecture of the EmuCD Emulator.  
vehicles, the PIPE tool determines the set of neighbours of each vehicle at each time instant, through a connectivity model that estimates the signal strength (RSSI) between nodes based on the distance between them without considering the terrain profile, i.e., the absence or presence of obstacles [22; 23]. PIPE also does the compatibility between SUMO and the EmuCD emulator, so that we can use not only real data traces, but also these SUMO-based ones. These components form our emulation platform, shown in Figure 2.  
Once the dataset is ready, the process of integrating a new protocol requires the editing of a few files in the emulator (the protocol's software itself is untouched):  
1. New branch--optional, but the creation of a new branch for the protocol is recommended, maintaining the repository's structure;
2. Docker--a new Docker image must be created: in docker/build.sh the image name must be edited, alongside any required files and changes that must be set up, prior to building the Dockerfile; in docker/Dockerfile any software dependencies should be added, as well as the files that will be present when the container starts; the docker/docker-startup.sh script could also need a small customization as it is an initial script that runs when the container boots, used to start relevant processes;
3. Daemon--the emulation's daemon will likely need changes in the thread_simulation function, as each protocol has different requirements. The status' update function also needs to be adapted for each protocol because of the download progress (some softwares update the progress to stdout, others provide an API, etc.): it is not mandatory, but metrics will not be available unless it is done.  
This section highlighted the simplicity and efficiency when integrating a protocol and datatrace to be used in the EmuCD emulator. The following section will present how EmuCD was used to test and adapt three P2P protocols to the VANET environment, as well as some relevant results.