IN.SIOCGIFADDR isn't set in /usr/lib/python2.4/plat-linux2/IN.py

Bug #58081 reported by Olivier Cortès
0
Affects Status Importance Assigned to Milestone
Python
Unknown
Unknown
python2.4 (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

considering that I wanted to find my IP address in python, i ran a modified version of : http://mail.python.org/pipermail/python-list/1999-August/009100.html

I encountered the following error : IN.SIOCGIFADDR is not defined in IN.py. In fact, IN.py lacks *many* values from original SIOC*...
IN.py says it was generated from /usr/include/netinet/in.h, but this file has *no* references at all to SIOC*. On other hand, I think that /usr/include/linux/sockios.h is the right file to use to have all SIOC* defines.

Anyway, if I use 0x8915 in my code, in place of IN.SIOCGIFADDR, the code works as expected, but that's weird... There is an inconsistency somewhere.

Or have I missed something ? (I totally could, i'm pretty new at python and digging in /usr/include, my C skills are the bare minimum...)

Revision history for this message
Olivier Cortès (olive) wrote :

i forgot to add i'm on Dapper.

Matthias Klose (doko)
Changed in python2.4:
importance: Untriaged → Medium
status: Unconfirmed → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.