On Wed, Dec 11, 2002 at 03:11:14PM -0800, Guy Harris wrote:
> BTW, other APIs that might be useful might be one that takes a string
> specifying a DLT_ type, as supplied to "-D" (or "-I") as an argument,
> and returns either the corresponding DLT_ type, if it exists, or -1, if
> not, and one that takes a DLT_ type and returns the corresponding
> string, or NULL if that value isn't a known DLT_ type.
I've added those as well:
int pcap_datalink_name_to_val(const char *name)
const char *pcap_datalink_val_to_name(int dlt)
the first of which takes a DLT_ name (which is the part of the name
after DLT_, e.g. "EN10MB" and returns the DLT_ value (the lookup is
case-insensitive), or -1 if the lookup fails, and the second of which
takes a DLT_ value and returns the name, or NULL if the lookup fails.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe