public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Emmanuel Coullien" <coullien.emmanuel@gmail.com>
To: "Andrew Lunn" <andrew@lunn.ch>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Problem reading broadcast IP
Date: Fri, 18 Jan 2008 12:36:00 -0000	[thread overview]
Message-ID: <3fae21000801180436t248f005bp71b350152f99b8ab@mail.gmail.com> (raw)
In-Reply-To: <20080118114820.GC11004@lunn.ch>

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

  reply	other threads:[~2008-01-18 12:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18  9:01 Emmanuel Coullien
2008-01-18  9:32 ` Andrew Lunn
2008-01-18  9:50   ` Emmanuel Coullien
2008-01-18 11:48     ` Andrew Lunn
2008-01-18 12:36       ` Emmanuel Coullien [this message]
2008-01-18 13:03         ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3fae21000801180436t248f005bp71b350152f99b8ab@mail.gmail.com \
    --to=coullien.emmanuel@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).