Menu

#7 findalldevs returns error

open-fixed
None
5
2007-02-28
2005-03-13
No

When running the example as root on either Debian
unstable or OSX, findalldevs.py in the examples
directory I get the error:

Traceback (most recent call last):
File "./findalldevs.py", line 23, in ?
test_findalldevs()
File "./findalldevs.py", line 6, in test_findalldevs
print pcap.findalldevs()
pcapc.EXCEPTION: [Errno -1] unknown address family

I compiled against 0.7.2 on Debian.

Running as non-root I get:
[]

I have eth0 and lo on the machine.

Discussion

  • Mike Auty

    Mike Auty - 2005-05-16

    Logged In: YES
    user_id=230582

    I'm finding exactly the same thing, running under gentoo.
    Perhaps it's the kernel version, I'm on 2.6.12-rc4, but I've
    seen the same thing happen on 2.6.9. The only other thing I
    can think of is that my glibc is built with nptl, pic and
    pie. If anyone else has any ideas, it'd be great to hear
    them. It just seems as though this package might be
    unmaintained these days. Thanks...

    Mike 5:)

     
  • Wim Lewis

    Wim Lewis - 2005-07-04
    • assigned_to: nobody --> wiml
     
  • Wim Lewis

    Wim Lewis - 2005-07-04

    Logged In: YES
    user_id=110010

    This might be fixed in -0.5, if the address family in question was
    IPv6.

     
  • Noah Spurrier

    Noah Spurrier - 2007-02-13

    Logged In: YES
    user_id=59261
    Originator: NO

    Running this on Ubuntu 6.10 as NON-root with Python 2.4.4c1 I get this:
    $ python findalldevs.py
    []
    Running as ROOT I get this:
    # python findalldevs.py
    at line 516
    at line 516
    Traceback (most recent call last):
    File "./findalldevs.py", line 23, in ?
    test_findalldevs()
    File "./findalldevs.py", line 6, in test_findalldevs
    print pcap.findalldevs()
    Exception: unsupported address family

     
  • Wim Lewis

    Wim Lewis - 2007-02-28

    Logged In: YES
    user_id=110010
    Originator: NO

    I've committed a change which will make it simply return a string of the form <AF 16> for unrecognized address family 16. (On OSX, that's AppleTalk.)

     
  • Wim Lewis

    Wim Lewis - 2007-02-28
    • status: open --> open-fixed
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.