tcpdump mailing list archives
Re: supporting extend 'open live capture' parametes
From: "Paolo Abeni" <paolo.abeni () gmail com>
Date: Mon, 11 Feb 2008 09:36:42 +0100
Guy Harris wrote:
Paolo Abeni wrote:I thought that such things (pcap API to ask for supported parameters) could be implemented adding dedicated fields into the pcap struct (on in a pcap_t sub structure), which must be set by the platform specific pcap_activate().That would mean you couldn't ask for supported parameters until pcap_activate() is called; however, an application such as Wireshark would want to query whether monitor mode is available *before* activating.
Perhaps I'm missing the point, but I think a similar situation currently happens in the pcap_findalldevs() function, which ultimately calls pcap_open_live()/pcap_close() for each discovered device. We can implement the pcap_is_monitor_mode_available(char* device_name) API [perhaps with a shorter name :-) ] in a similar fashion; something like: handle = pcap_create() pcap_set_device(handle, device_name); pcap_activate(handle); ret = pcap_get_monitor_mode_availability(handle); pcap_close(handle) return ret; This is quite time inefficient, but I think that this way the implementation of the various pcap_get_property() api is very easy. Moreover, I hope/think that they don't have any time constraint. What do you think ? cheers, Paolo - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Re: supporting extend 'open live capture' parametes Abeni Paolo (Jan 14)
- Re: supporting extend 'open live capture' parametes Michael Richardson (Jan 14)
- <Possible follow-ups>
- supporting extend 'open live capture' parametes Abeni Paolo (Jan 21)
- Re: supporting extend 'open live capture' parametes Guy Harris (Feb 05)
- Re: supporting extend 'open live capture' parametes Guy Harris (Feb 05)
- Re: supporting extend 'open live capture' parametes Abeni Paolo (Feb 07)
- Re: supporting extend 'open live capture' parametes Guy Harris (Feb 07)
- Re: supporting extend 'open live capture' parametes Guy Harris (Feb 05)
- Re: supporting extend 'open live capture' parametes Paolo Abeni (Feb 11)
- Re: supporting extend 'open live capture' parametes Guy Harris (Feb 11)
- Re: supporting extend 'open live capture' Paolo Abeni (Feb 11)
- Re: supporting extend 'open live capture' Guy Harris (Feb 11)
- Re: supporting extend 'open live capture' parametes Guy Harris (Feb 11)