dugsong / pypcap

Automatically exported from code.google.com/p/pypcap
Other
117 stars 45 forks source link

support findalldevs() #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
this patch adds support for findalldevs() function.

tested on Linux, WindowsXP, MacOSX

There is one problem under windows.
there is no classic interefaces names under windows and this patch returns
what it gets from the OS (long names blabla). it's not a big deal but
lookupdev() returns ethX names. these ethX names are fake and don't know if
i should to do the same for findalldevs().

Original issue reported on code.google.com by getxs...@gmail.com on 7 Jul 2009 at 1:06

Attachments:

GoogleCodeExporter commented 9 years ago
fixed in r90

Original comment by getxs...@gmail.com on 13 Jul 2010 at 10:36

jordam commented 8 years ago

And that can be called, how exactly? Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

import pcap pcap.findalldevs(): File "", line 1 pcap.findalldevs(): ^ SyntaxError: invalid syntax pcap.findalldevs() Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'findalldevs' pcap <module 'pcap' from 'pcap.pyd'> pcap.keys() Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'keys' pcap.pcap <type 'pcap.pcap'> pcap.pcap.findalldevs() Traceback (most recent call last): File "", line 1, in AttributeError: type object 'pcap.pcap' has no attribute 'findalldevs' pcap.pcap.findalldevs Traceback (most recent call last): File "", line 1, in AttributeError: type object 'pcap.pcap' has no attribute 'findalldevs' pcap.pcap().findalldevs Traceback (most recent call last): File "", line 1, in AttributeError: 'pcap.pcap' object has no attribute 'findalldevs' pcap.pcap().findalldevs() Traceback (most recent call last): File "", line 1, in AttributeError: 'pcap.pcap' object has no attribute 'findalldevs'