Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'wed,': 0.04; 'python': 0.07; ':-)': 0.07; 'url:pypi': 0.09; 'also:': 0.09; 'postfix,': 0.09; 'subject:Problem': 0.09; 'looked': 0.10; 'linux': 0.11; 'wrote:': 0.14; 'adam': 0.16; "apple's": 0.16; 'cyrus': 0.16; 'from:addr:awilliam': 0.16; 'from:addr:whitemice.org': 0.16; 'from:name:adam tauno williams': 0.16; 'message-id:@linux- yu4c.site': 0.16; 'packet': 0.16; 'received:72.14.190': 0.16; 'received:72.14.190.87': 0.16; 'received:mail.wmmi.net': 0.16; 'received:wmmi.net': 0.16; 'reply-to:addr:awilliam': 0.16; 'reply- to:addr:whitemice.org': 0.16; 'thier': 0.16; 'protocol': 0.16; 'command': 0.19; 'device': 0.20; 'writes:': 0.20; 'maybe': 0.21; 'code': 0.22; 'header:In-Reply-To:1': 0.22; 'trying': 0.23; 'discovery': 0.23; 'url:wiki': 0.24; "didn't": 0.25; "i'm": 0.26; 'regardless': 0.26; 'received:72.14': 0.27; 'least': 0.30; 'implement': 0.30; 'port.': 0.31; 'url:projects': 0.31; 'does': 0.31; 'called': 0.32; 'to:addr:python-list': 0.32; 'source': 0.32; 'uses': 0.34; 'case': 0.37; 'url:python': 0.37; 'happens': 0.38; 'url:org': 0.38; 'current': 0.38; 'to:addr:python.org': 0.39; 'header:Mime-Version:1': 0.39; 'how': 0.39; 'works': 0.40; 'might': 0.40; 'discover': 0.60; 'url:net': 0.62; 'devices': 0.64; 'williams': 0.64; 'broadcast': 0.68; 'reply-to:no real name:2**0': 0.72; 'header:Reply-To:1': 0.72; '06:07': 0.84; 'novell': 0.84; 'wheel': 0.84; 'edwards': 0.91; 'lift': 0.95 Subject: Re: Problem receiving UDP broadcast packets. From: Adam Tauno Williams To: python-list@python.org In-Reply-To: References: <4dae172e$0$65870$e4fe514c@news.xs4all.nl> <4dae1d82$0$81483$e4fe514c@news.xs4all.nl> Content-Type: text/plain; charset="UTF-8" Date: Wed, 20 Apr 2011 06:20:39 -0400 Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: awilliam@whitemice.org List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1303294882 news.xs4all.nl 81476 [::ffff:82.94.164.166]:47478 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3680 On Wed, 2011-04-20 at 06:07 -0400, Sherm Pendley wrote: > Grant Edwards writes: > > I'm trying to implement a device discovery/configuration protocol that > > uses UDP broadcast packets to discover specific types of devices on > > the local Ethernet segment. The management program broadcasts a > > discovery command to a particular UDP port. All devices who get that > > packet are expected to answer regardless of thier current IP address. > Have you looked at the source for Apple's Bonjour? On LINUX this is called "avahi", which has Python bindings. Avahi auto-configuration / discovery works very well. See also: at least you may be able to lift code from them (License is non-viral MIT) > Might be interesting to see how it does announcement/discovery. Or maybe > just use it directly, if this happens to be a case of "gee, I didn't > know that wheel had already been invented." :-) -- Adam Tauno Williams LPIC-1, Novell CLA OpenGroupware, Cyrus IMAPd, Postfix, OpenLDAP, Samba