[tahoe-dev] [tahoe-lafs-trac-stream] [tahoe-lafs] #1988: don't stop the process if you can't execute "ifconfig" or "route.exe"
Daira Hopwood (formerly David-Sarah)
davidsarah at leastauthority.com
Tue Jun 18 01:29:32 UTC 2013
On 18/06/13 02:22, Daira Hopwood (formerly David-Sarah) wrote:
> On 17/06/13 15:33, Randall Mason wrote:
>> I would like to see this changed to something more cross platform. There is a python
>> module (that requires compilation) that is available that does this exact thing:
>> https://pypi.python.org/pypi/netifaces/
>
> We've rejected adding that dependency; see the comments on
> <https://github.com/tahoe-lafs/tahoe-lafs/pull/14>.
Actually those comments don't include the full rationale, so I'll paste it here:
<marcusw> warner: DS thought it was bad to have a bunch of C, mostly to support features
we don't use at the moment
CodesInChaos: Doesn't tahoe need c for crypto and erasure encoding anyways?
CodesInChaos: writing those in python sounds expensive
davidsarah`: huh, I can't find what I posted about netifaces
davidsarah`: it was based on reading the source and seeing how much of it wasn't relevant
davidsarah`: ah, it was in this channel
(20:28:00) ***davidsarah looks at
http://alastairs-place.net/hg/netifaces/file/aa1a71e0adf7/netifaces.c
(20:28:18) dreid: So uhh yeah, switch to endpoints please. :)
(20:28:40) warner: ok, I think endpoints weren't sufficiently documented/implemented at
that time (two years ago) for me to research them
(20:28:43) nejucomo: Then all we'd need is to bake in the serverFromString format into the
URLv2 standard for the network location. ;-)
(20:28:43) davidsarah: ugh, 1471 lines of C code most of which is for interfaces we don't
use. isn't there something pure-Python for this?
(20:29:04) davidsarah: (pure Python or failing that, Python using ctypes)
(20:31:31) marcusw: davidsarah: only if we want to put platform-specific code into
foolscap...which I really don't want to do because I can't test it
(20:32:47) zooko`: Sigh. Re: netifaces: I don't even really value autodiscovery of your
own IP address very much.
(20:32:55) zooko`: It is almost never routeable, for end-users behind NAT+firewall.
(20:33:10) zooko`: And for sysadmins who have routeable IP addresses, they don't like
autodiscovery.
(20:33:11) marcusw: zooko`: but ipv6
(20:33:49) marcusw: but yeah, I would certainly be OK with not having to deal with
setLocationAutomatically anymore :D
(20:33:50) zooko: Okay, and if for ipv6 or some other reason we're determined to go ahead
and keep doing IP addr autodiscovery, then the best way to do it is by invoking "ifconfig"
or "route.exe" in a subprocess.
(20:34:05) zooko: It's been working well enough for about a dozen years now, on at least a
dozen platforms.
davidsarah`: (the actual conversation had a lot more detail about twisted APIs and strport
syntaxes mixed in. hope I haven't misrepresented anyone by selective quoting)
--
Daira Hopwood ⚥
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20130618/502ec095/attachment.pgp>
More information about the tahoe-dev
mailing list