I have wirless nodes network, all have a AODV router , there are source nodes have a custom Udp Application and and other sink nodes have a custom sink Udp Application . After a source node select a randomly sink node, a custom Udp Application doesn't send the packet directly to the end node, it sends to the next node in the path and the application process the packet,

I know we use a socket object (send to ) but if I do this:

IRoutingTable* m_RoutingTable = check_and_cast( getParentModule()->getSubmodule("routingTable")); IRoute* nextHop = m_RoutingTable->findBestMatchingRoute(getNextHopAsGeneric()); const L3Address& nextHop = m_RoutingTable ->getNextHopAsGeneric(); enter code here socket.sendTo(payload, nextHop;, destPort);

But what about a destination address, how Udp protocol knows the IP address of a destination. If i do not use this socket object

socket.sendTo(payload, destAddr, destPort);

In more detail: First, Creating the path from source node to a randomly sink node and then, every node in this path will participate in manipulating the received packet (manipulating means we do the same processes in the sink Node App). We know, ADOV creates a path from source node to a destination, how I can make hops nodes participants in manipulation?

More Mohammed Asiri's questions See All
Similar questions and discussions