tcpdump mailing list archives
Re: supporting extend 'open live capture' parametes
From: "Abeni Paolo" <paolo.abeni () telecomitalia it>
Date: Mon, 14 Jan 2008 10:02:48 +0100
hi all, on 2008-01-13 23:33:55 Michael Richardson wrote:
we should instead have a new pcap_open() call, and then we should have a serious of calls that set various options or ask for various things based upon that handle
From a mere implementation POV, this looks like the easier solution. There could be some concerns about:
- the (possibly high) number of new API that need to be added in order to support all required/wanted options for the open call - if we use the pcap struct to store all the supplied options (witch seams a reasonable choice, at least to me) it need to be changed/updated every time a new option need to be added. Can this scenario possibly leads to ABI compatibility issue ?!? The first concern can be coped with a generic method to set the required option: int pcap_set_property(pcap_t *pcap, int type, void* data); This function should interpret data for known type and copy it's value into the appropriate pcap field. Guy> 2) allow a application to inquire which particular options are Guy> available for a particular device, so it could, for example, Guy> not present UI for turning on 802.11 monitor mode if it's not
so maybe you have to have pcap_get_prop() on the pt too.
Something like: int pcap_get_property(pcap_t *pcap, int type, void* data, int len); could be implemented with very little platform specific code, if upon complete initialization allowed option/values are stored into the pcap handle. Moreover, since the caller knows the parameter is requesting, it could be inferred it know also the parameter's size: any others APIs to request this information should not be required. I would like to try to implement the new API this way and post some code, even in very experimental form, in the hope to make the discussion/analysis easier (at least to me...). What do you think? cheers, Paolo -------------------------------------------------------------------- CONFIDENTIALITY NOTICE This message and its attachments are addressed solely to the persons above and may contain confidential information. If you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it immediately to the sender and delete the message. Should you have any questions, please contact us by replying to webmaster () telecomitalia it. Thank you www.telecomitalia.it -------------------------------------------------------------------- - 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)