Since the last few years, the Internet of Vehicles (IoV) has gained more interest from the community because of the rapid development of autonomous vehicles, the growing amount of data generated by vehicles' sensors, and the motivation to use this data for different purposes. Given the very dynamic nature of fast moving vehicles, building a network that guarantees the Quality of Service (QoS) is still a challenge. This is why we have developed an original architecture and a programmable objective function to improve QoS on the ever‐changing networks present in the IoV. Simulation results will show that the proposed solution adapts better to mobility by providing better packet delivery ratio up to five times, achieving three times less packet losses and greatly reducing the energy consumption by a factor 10 compared with state of the art solutions, without compromising delay nor throughput usage.