I would like to implement a routing protocol for VANET where Vehicles and RSUs can exchange messages only if they are in each other's region of transmission!
Where can I implement this? In the omnetpp.ini configuration file or in the application layer (UDPBasicApp)?
The Veins framework is what you are looking for. It provides vehicular network simulation based on OMNeT++ and SUMO and also includes RSUs. You can find a download link here, a tutorial here and answeres to some common questions here.