sockets: bind to external interface

Hans Georg Schaathun hg at schaathun.net
Mon Apr 25 16:14:51 EDT 2011


On Tue, 26 Apr 2011 05:49:07 +1000, Chris Angelico
  <rosuav at gmail.com> wrote:
:  You can run 'ifconfig' without being root, so there must be a way. At
:  very worst, parse ifconfig's output.

Of course, but I am not sure that's simpler than the manual solution.
Especially since there is more than one version of ifconfig ...

:  The way you talk of "the" external interface, I'm assuming this
:  computer has only one. Is there a reason for not simply binding to
:  INADDR_ANY aka 0.0.0.0?

Ah.  That's what I really wanted.  Thanks a lot.  I wonder why that
was not mentioned in the tutorial I used ...

-- 
:-- Hans Georg



More information about the Python-list mailing list