Broadcasting with IPv4Address::ALLONES_ADDRESS problem

73 views
Skip to first unread message

rport...@gmail.com

unread,
May 14, 2013, 2:34:10 AM5/14/13
to omn...@googlegroups.com
Hi can anyone please help me?

I'm trying to broadcast a beacon packet on a wireless network. And in order to send the created packet I'm using the below:
socket.sendTo(payload, IPv4Address::ALLONES_ADDRESS, destPort);

Everything works well but in the output I see that the beacon is being sent on address 255.255.255.255 but the cars within the range of the the sending car are not handling the packet by entering my processBeacon() method.
But when I send the beacon packet to a particular address within the range of a car, everything works as it should and the packet is processed too. But I need to send the beacon to nearby nodes, not just to one node.

Can anyone please tell me why IPv4Address::ALLONES_ADDRESS is sending the packet but no node is processing it?

Is there another way to send the packet to all nearby nodes without knowing their address,please?

Thanks for your time and thanks in advance.

Alfonso Ariza Quintana

unread,
May 14, 2013, 6:09:18 AM5/14/13
to omn...@googlegroups.com

https://github.com/aarizaq/inetmanet-2.0/blob/integration/src/applications/udpapp/UDPBasicBurst.cc

 

method

UDPBasicBurst::sendBroadcast(const IPvXAddress &dest, cPacket *pkt)

 

It is necessary to include the output interface for broadcast.

--
--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp
 
---
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Rebecca Portelli

unread,
May 14, 2013, 7:33:27 AM5/14/13
to omn...@googlegroups.com
By with that method I will still send the packet to one car because I have to specify which IP address to send it to.
Or am I wrong?


You received this message because you are subscribed to a topic in the Google Groups "omnetpp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/XJQNpi-JI3g/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.

Alfonso Ariza Quintana

unread,
May 14, 2013, 7:46:22 AM5/14/13
to omn...@googlegroups.com

A broadcast is to all address, in other case the IP layer will filter the message, if you want include an address you must include the address in the data message, in this case will be application which will filter  the message

Rebecca Portelli

unread,
May 16, 2013, 7:00:05 AM5/16/13
to omn...@googlegroups.com
This work great! Thanks for the suggestion and all the help!



Reply all
Reply to author
Forward
0 new messages