Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!198.186.194.250.MISMATCH!news-xxxfer.readnews.com!news-out.readnews.com!transit3.readnews.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Problem receiving UDP broadcast packets. Date: Wed, 20 Apr 2011 14:31:41 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 39 Message-ID: References: <4dae172e$0$65870$e4fe514c@news.xs4all.nl> <4dae1d82$0$81483$e4fe514c@news.xs4all.nl> NNTP-Posting-Host: dsl.comtrol.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reader1.panix.com 1303309901 14434 64.122.56.22 (20 Apr 2011 14:31:41 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Wed, 20 Apr 2011 14:31:41 +0000 (UTC) User-Agent: slrn/pre0.9.9-102 (Linux) Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3712 On 2011-04-20, Dan Stromberg wrote: > On Tue, Apr 19, 2011 at 6:15 PM, Grant Edwards wrote: > >>> Or can you simply use a stupid netmask like /1 that picks up all the >>> IP ranges? That way, the source-IP check wouldn't fail. >> >> That would require that the device somehow knows that it's not >> configured correctly and should change the netmask to /1. ?The device >> doesn't have any way to know that, and it must respond to the >> discovery commands both before and after it's properly configured. > > - Actually, you Might be able to configure your device to have a > netmask of 0.0.0.0, IP address of 255.255.255.255 and broadcast of > 255.255.255.255. > - I've seen something a bit similar used for detecting IP address > conflicts automatically. > - A network guru I used to work with told me that you could configure > a machine with a broadcast of 255.255.255.255 more simply than messing > around with the netmask, while still achieving the same result for > general purpose networking. I'll look into that. >> I've reread the protocol documentation and noticed that the device has >> to respond not only to broadcasts to 255.255.255.255 but also to >> subnet broadcasts send to subnets it's not on. ?That pretty much >> clinches the requirement to use a raw socket. :/ > > With a netmask of 0.0.0.0, I suspect you will receive all broadcasts > on the wire, given appropriate listening code. That might be an option as well, as long as it doesn't disrupt normal operation of the interface. -- Grant Edwards grant.b.edwards Yow! Remember, in 2039, at MOUSSE & PASTA will gmail.com be available ONLY by prescription!!