tcpdump mailing list archives
Re: any device doesn't work anymore
From: "Tyson Key" <tyson.key () gmail com>
Date: Mon, 17 Nov 2008 23:28:31 +0000
Hi Giovanni, I don't know for certain what's happened either, although I can confirm that after installing libpcap version 0.9-PRE-CVS (from Git), the any device is no longer available. Hopefully a fix will come from someone soon. Slightly off-topic: The Bluetooth capturing devices don't; seem to work properly either (they don't appear in the device list until I start a PPP session for some reason, and even then, no packets are collected despite being counted). Tyson. On Mon, Nov 17, 2008 at 11:15 PM, Giovanni Venturi <giovanni () ksniffer org>wrote:
As reported in man:
pcap_create() is used to create a packet capture handle to look at packets
on
the network. source is a string that specifies the network device to open;
on
Linux systems with 2.2 or later kernels, a source argument of "any" or NULL
can be used to capture packets from all interfaces.
block1:
if ((m_pcapfp = pcap_create("any", errbuf)) == NULL)
cout << "NULLLLLLLLLLLLLLLLLLLLLLLLLL";
pcap_set_snaplen(m_pcapfp, PKTMAX);
pcap_set_promisc(m_pcapfp, 0);
pcap_activate(m_pcapfp);
block2:
if (pcap_open_live("any", PKTMAX, 0, -1, errbuf) == NULL)
{cout << errbuf; return;}
just block told me that:
SIOCGIFHWADDR: No such device
All what worked before doesn't work now anymore. :(
If I use NULL no block tell me that there is a problem. I got crash on
(FD_SET):
#ifdef HAVE_PCAP_GET_SELECTABLE_FD
m_pcap_fd = pcap_get_selectable_fd(m_pcapfp);
#else
m_pcap_fd = pcap_fileno(m_pcapfp);
#endif
FD_ZERO(&m_fdset);
FD_SET(m_pcap_fd, &m_fdset);
What's happening?
Giovanni
--
A KDE Italian translator and KSniffer core developer
Slackware GNU/Linux current version - kernel 2.6.27.4
KSniffer Project - http://www.ksniffer.org/
-- Fight Internet Censorship! http://www.eff.org ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Open-Source Community, and Technology Testbed: http://www.house404.co.uk/ - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- any device doesn't work anymore Giovanni Venturi (Nov 17)
- Re: any device doesn't work anymore Tyson Key (Nov 17)
- Re: any device doesn't work anymore Guy Harris (Nov 19)
- Re: any device doesn't work anymore Giovanni Venturi (Nov 19)
- Re: any device doesn't work anymore Guy Harris (Nov 19)
- Re: any device doesn't work anymore Giovanni Venturi (Nov 19)
- Re: any device doesn't work anymore Guy Harris (Nov 20)
- Re: any device doesn't work anymore Giovanni Venturi (Nov 19)
