# EmuCD: An Emulator for Content Dissemination Protocols in Vehicular Networks
## 1 Introduction  
Despite recent technological advances with regard to vehicular networks, it is still very difficult to develop routing and content dissemination protocols in real scenarios [1]. Due to the risk and high cost of carrying out experiments on real vehicle networks [2], the alternative solution is the use of simulators and emulators for the early stages of the development, and execute only final tests on small testbeds. However, some aspects inherent to vehicular ad-hoc networks (VANETs), such as mobility models, driver behaviour and wireless channel modelling have a considerable effect on performance results. Due to these challenges, the simulation of realistic mobility models becomes essential for research in order to achieve precisely the desired results that reflect the realistic behaviour of vehiculartraffic [3]. However, the channel modelling depends on many aspects, such as obstacles like trees, buildings, vehicles and even people on the streets, and this can only be measured in a real scenario. Developing a content dissemination protocol for a vehicular network (VANET) is not an easy task: the protocol may be good in theory and in simulations, but with low performance in a real environment. Moreover, even if it is possible to test the protocol in a real network (which is rarely the case), not only is the network different between each test run (preventing an accurate analysis and debugging), but it is also difficult to scale. Particularly in the case of a VANET, since the nodes keep moving and the network's topology is very dynamic, repeating a test under the same conditions is not an option. This is why simulators exist: they provide reliable, deterministic results, and whether a real or a synthetic dataset is being used, it is possible to simulate the behaviour of a VANET. However, some difficulties are presented:  
* debugging--errors can be hard to debug as the simulators are very complex; most errors probably result from issues in the user's custom protocol, but lack of documentation and support makes solving them a challenge;
* custom protocols--testing a custom protocol in a simulator requires a custom implementation specifically for that simulator using its libraries or APIs; it is not a problem if the protocol is a simple one, but it may be very complex if it is an existing closed-source protocol that is not supported by the simulator;
* portability--a protocol developed or ported to work with a specific simulator may not work with a different simulator/emulator and, most importantly, is not ready to run in real hardware;
* reliability--simulators have to use models to represent the reality, encompassing mobility and radio propagation models. However, in a very challenging and mobile environment such as VANETs, these models usually fail to represent the reality as they cannot encompass the real obstacles and their effects in a real scenario. From the issues mentioned above, the most prohibitive one that leads to the creation of a new emulator is the difficulty in testing different protocols. In a real On Board Unit (OBU) in vehicles, there is a CPU, an OS, storage, RAM and one or more wireless interfaces. Software is developed taking these aspects in consideration, and it does not need to consider the OS-related tasks, so using it in a simulation/emulation should be as effortless and transparent as running it in real hardware: making sure the required network interfaces and enough RAM are available to execute the software. Furthermore, when debugging software that is running in the simulator/emulator, the developer should only have to look at its own software, without having to know the details of the underlying simulator, its libraries or having to dive into its code.