'How to establish unicast or multicast communication in veins_inet?

In veins_inet example I need to send accident packets only for some vehicles (nodes), but by default it's taking broadcast in veinsInetApplication.cc so how can I change it to multicast?

SendPacket method was derived from veinsInetApplicationBase.cc. If I change anything there then I'm getting errors. Default port is 9001 so I can't change there also. so can I get any solutions for this?

Send Packet Method

VeinsInetApplication.cc

[Default Port][2]



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source