This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem reading broadcast IP


I thank you for your answer. For your information, here are what I tested :

srv_recept.sin_addr.s_addr=inet_addr("255.255.255.255"); --> OK,
Broadcast received
srv_recept.sin_addr.s_addr=inet_addr("192.255.255.255"); --> Doesn't
receive any Broadcast
srv_recept.sin_addr.s_addr=inet_addr("192.168.255.255"); --> Doesn't
receive any Broadcast
srv_recept.sin_addr.s_addr=inet_addr("192.168.1.255"); --> Doesn't
receive any Broadcast

It seems to be strange because when I do that on a PC, it works fine,
and then I expected that it will work on eCos too.

2008/1/18, Andrew Lunn <andrew@lunn.ch>:
> On Fri, Jan 18, 2008 at 10:49:59AM +0100, Emmanuel Coullien wrote:
> > Ok for binding broadcast adress but how do you specify the interface
> > (ex: eth0) ?
>
> Take for example:
>
> eth0      Link encap:Ethernet  HWaddr 00:60:97:b0:86:6e
>           inet addr:192.168.9.3  Bcast:192.168.9.255  Mask:255.255.255.0
>
> The IP broadcast address is 192.168.9.255. Try binding to that.  Only
> one interface will have this address, so it implicitly specifies eth0.
>
> In my limited experience, getting broadcasting to work in a portable
> way is a bit of a black art.
>
>   Andrew
>


-- 
Emmanuel Coullien

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]