Click to See Complete Forum and Search --> : Broadcasting in Networks
jimmy.peyton.v
November 26th, 2007, 07:13 PM
Hi ,
I am doing a project in networking.I have some nodes like 20 nodes and i start sending a packet from a node and broadcast that packet to its neighbours.I could implement till sending of packet to first neighbour but i m having a problem with broadcasting..could anyone help me out with this...like could you suggest me how to go about it or if there is any code which i can use...
thanks,
aravind
AlanGRutter
November 26th, 2007, 08:56 PM
What you are doing is multicasting which requires a UDP connection and special IP address ranges. I suggest you start with a Google search for UDP multicast and see what turns up.
Regards
Alan
jimmy.peyton.v
November 27th, 2007, 12:55 AM
Hi Alan,
I am actually working on AODV routing protocol....so i tried to implement it in c++ but jus got struck at broadcasting....
Thanks,
aravind
Marc G
November 28th, 2007, 03:04 AM
[ moved thread ]
jimmy.peyton.v
November 28th, 2007, 10:16 PM
thank you for moving into network programming...could anyone give me a code for broadcasting a packet in network....
henky@nok.co.id
November 28th, 2007, 10:40 PM
It's simple. You just send packet to broadcast address.
i.e.
Your network: 192.168.1.0/24, then
broadcast address will be 192.168.1.255
MikeAThon
November 29th, 2007, 11:06 AM
And set the SO_BROADCAST socket option.
jimmy.peyton.v
December 1st, 2007, 10:51 PM
Actually i am doing my program in c++
thanks
MikeAThon
December 2nd, 2007, 01:17 AM
Actually i am doing my program in c++
thanks
Yes, the information we gave you is for C/C++ programming.
Mike
codeguru.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.