hello, I assume that the my initial suggestion is going to be dismissed, right ?!?
on Thu 1/10/2008 10:47 AM Guy Harris wrote:
> There'd also be an API to ask which parameters a particular adapter
> supports (and possibly which values it supports for those parameters,
> e.g. if one of the parameters is a DLT_ type or an 802.11 channel).
I think that a complete solution can be pretty complicated; such information
could be provided with a buffer filled with TLV items, much like the 'extened
open live capture' call. Supported values for each parameter could be inserted
in the corresponding 'value' part of each item, putting all the supported
values in the same item. A possible API could be:
int pcap_get_capabilities(const char* device_name, char* optbuf, unsigned
size); /* fill optbuf up to size bytes with TLVs and returns error code or the
number of bytes used */
There is an issue: optbuf can be not large enough to handle all supported
parameters/values; we can enforce a reasonable upper bound for the TLVs buffer
or we can use a TLV entry to specify the required buffer len.
To completed the picture, in extended open live capture the timeout parameter
could be provided via the TLV buffer, since is not supported by all platform:
int pcap_open_live_ex(const char *device, int snaplen, int promisc, const char
* optbuf, char *errbuf);
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 [EMAIL PROTECTED]
Thank you
www.telecomitalia.it
--------------------------------------------------------------------
<<winmail.dat>>
- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
