Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3607

Re: Problem receiving UDP broadcast packets.

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!news.wiretrip.org!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <drsalists@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.030
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'python': 0.07; 'figuring': 0.09; 'linux.': 0.09; 'machines.': 0.09; 'normally,': 0.09; 'subject:Problem': 0.09; 'pm,': 0.11; 'wrote:': 0.14; 'sees': 0.16; 'code.': 0.18; 'tue,': 0.20; 'appropriate': 0.21; 'header :In-Reply-To:1': 0.22; 'mask': 0.23; 'skip:- 70': 0.24; 'received:209.85.220': 0.26; "i'm": 0.26; 'pass': 0.27; 'work.': 0.27; 'message-id:@mail.gmail.com': 0.28; 'least': 0.30; 'however,': 0.31; 'match': 0.31; 'called': 0.32; 'to:addr:python- list': 0.32; 'configured': 0.33; 'but,': 0.35; 'addresses': 0.36; 'problems': 0.37; 'two': 0.37; 'some': 0.37; 'should': 0.37; 'received:209.85': 0.37; 'apr': 0.38; 'received:google.com': 0.38; 'code:': 0.38; 'unless': 0.38; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'how': 0.39; 'header:Received:5': 0.40; 'address': 0.61; 'results': 0.61; '2011': 0.62; 'believe': 0.66; 'receive': 0.68; 'broadcast': 0.68; 'cisco': 0.68; 'machines,': 0.84; 'edwards': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=NQsLMNRohHSssDk8Gpj/2tNfxudlHUwEBBWxaHxXVQQ=; b=jfr89ZXVPqTvXxjshsjPylpAb7gUMx84AJiJkP5Xgrq89idzWnqALlYr4Lgh8iuDMW gqJPJnbpgxl93qghWP90zsMf07t+126mlL+/D4ury3pq37FyBCFCbWCcD/nnH/Ko/+bl 4pR1tCAQ+Y9tqATnHmR46Bdp3ijHXECNbQ8xo=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=VAll3i5lySJ6GzgPznifFZiki0mNgvQ55myLinU2NQkymH7pBdoVFp4S1nbiJRg1ZP p9MNqgwsemRQzqTsRdpgHH9Qjsh+xEJXl0DYVBkP8Fz/bwVYM7CnmG/Vr2gIOMgFKEt/ 4PstS5QRND54BlmwrtiUHjCYkPmzetdBrrWus=
MIME-Version 1.0
In-Reply-To <iol1tv$8dn$1@reader1.panix.com>
References <iol1tv$8dn$1@reader1.panix.com>
Date Tue, 19 Apr 2011 16:40:03 -0700
Subject Re: Problem receiving UDP broadcast packets.
From Dan Stromberg <drsalists@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.590.1303256405.9059.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 82.94.164.166
X-Trace 1303256405 news.xs4all.nl 81481 [::ffff:82.94.164.166]:55324
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:3607

Show key headers only | View raw


On Tue, Apr 19, 2011 at 3:21 PM, Grant Edwards <invalid@invalid.invalid> wrote:
> I'm have problems figuring out how to receive UDP broadcast packets on
> Linux.
>
> Here's the receiving code:
>
> ------------------------------receive.py-------------------------------

> But, the receiving Python program never sees any packets unless the
> _source_ IP address in the packets is on the same subnet as the
> receiving machine.

This is just how broadcasts work.

Normally, you take your subnet mask and "bitwise and" it with the IP
addresses of the sending and receiving machines.  If the results match
for two such pairs on two different machines, then the broadcast
should be visible, given appropriate code.

However, some routers have the ability to pass packets from one subnet
to another.  I believe this is called a "helper", at least in the
Cisco world, and must be configured specially.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-19 22:21 +0000
  Re: Problem receiving UDP broadcast packets. Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2011-04-20 01:13 +0200
    Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-19 23:21 +0000
      Re: Problem receiving UDP broadcast packets. Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2011-04-20 01:40 +0200
        Re: Problem receiving UDP broadcast packets. Dan Stromberg <drsalists@gmail.com> - 2011-04-19 16:52 -0700
          Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 00:09 +0000
            Re: Problem receiving UDP broadcast packets. Chris Angelico <rosuav@gmail.com> - 2011-04-20 10:53 +1000
              Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 01:15 +0000
                Re: Problem receiving UDP broadcast packets. Chris Angelico <rosuav@gmail.com> - 2011-04-20 11:24 +1000
                Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 03:05 +0000
                Re: Problem receiving UDP broadcast packets. Dan Stromberg <drsalists@gmail.com> - 2011-04-19 20:12 -0700
                Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 14:31 +0000
                Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 15:42 +0000
                Re: Problem receiving UDP broadcast packets. Dan Stromberg <drsalists@gmail.com> - 2011-04-19 20:16 -0700
                Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 14:21 +0000
                Re: Problem receiving UDP broadcast packets. Dan Stromberg <drsalists@gmail.com> - 2011-04-20 18:35 -0700
                Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-21 14:22 +0000
                Re: Problem receiving UDP broadcast packets. Heiko Wundram <modelnine@modelnine.org> - 2011-04-21 08:22 +0200
            Re: Problem receiving UDP broadcast packets. Roy Smith <roy@panix.com> - 2011-04-19 23:35 -0400
              Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 14:23 +0000
            Re: Problem receiving UDP broadcast packets. Sherm Pendley <sherm.pendley@gmail.com> - 2011-04-20 06:07 -0400
              Re: Problem receiving UDP broadcast packets. Adam Tauno Williams <awilliam@whitemice.org> - 2011-04-20 06:20 -0400
                Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 15:37 +0000
        Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-19 23:54 +0000
          Re: Problem receiving UDP broadcast packets. Heiko Wundram <modelnine@modelnine.org> - 2011-04-20 08:45 +0200
            Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 14:30 +0000
              Re: Problem receiving UDP broadcast packets. Heiko Wundram <modelnine@modelnine.org> - 2011-04-20 16:53 +0200
                Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 15:24 +0000
                Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 15:32 +0000
              Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 15:50 +0000
  Re: Problem receiving UDP broadcast packets. Dan Stromberg <drsalists@gmail.com> - 2011-04-19 16:40 -0700
    Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 00:00 +0000
      Re: Problem receiving UDP broadcast packets. Chris Angelico <rosuav@gmail.com> - 2011-04-20 10:32 +1000
  Re: Problem receiving UDP broadcast packets. Thomas Heller <theller@ctypes.org> - 2011-04-20 12:18 +0200
    Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 14:35 +0000
  Re: Problem receiving UDP broadcast packets. Grant Edwards <invalid@invalid.invalid> - 2011-04-20 22:25 +0000

csiph-web