If I remember right, its actually the same as it would if you were going to
write it for the Linux networking stack; with the exception that you have
the right rtnet modules loaded.  If you want to send an ethernet broadcast
set the destination MAC to FF:FF:FF:FF:FF:FF and tell the socket to use the
right rtdevX device.  If you want an IP broadcast open a socket and set the
destination IP to your subnets broadcast address.  For example if I was on
the 192.168.1.XXX network the corresponding broadcast address is
192.168.1.255.

Sorry I don't have any exmaple source code for you, but I like said the
rtnet API provides similar, if not the same as the networking stack provided
on Linux, so you can just do a quick search on google for Linux networking
broadcast tutorials.

On a side note the rtnet stack comes with a TDMA scheduler, so if you just
need to synchronize network traffic that project might be worth looking at
too.

-Rob

On Thu, Mar 20, 2008 at 5:43 AM, Li, Chanjuan <[EMAIL PROTECTED]> wrote:

> hi,all:
>    I am going to write a time synchronizaion program on the top of
> rtnet. but I don't know how to send broadcast in the network.If it is
> possible, an simple example is wanted. Thanks very much!
>
> lily
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> RTnet-users mailing list
> RTnet-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rtnet-users
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to