diff options
author | Guy Harris <guy@alum.mit.edu> | 2008-12-21 23:22:12 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2008-12-21 23:22:12 +0000 |
commit | 44f8cae6ab2dbcd4a0f79476dbdec084788be9f4 (patch) | |
tree | f00a2c2ae7e82a836604c63a2fd177bc53510fa1 /rawshark.c | |
parent | 4692f6cae7f3b7c41ad1374a60a5a5d403ff4632 (diff) |
If we don't have any of the pcap_datalink_XXX_to_YYY routines,
substitute our own (I wrote them all, so I can steal them from the
BSD-licensed libpcap if I want :-)). This means that
linktype_name_to_val() and linktype_val_to_name() are always available,
and we don't need to #ifdef use of them.
Use pcap_datalink_val_to_description() to get the description for a
particular DLT_ value, rather than mapping the DLT_ value to a
WTAP_ENCAP_ value and getting the description for the latter.
svn path=/trunk/; revision=27074
Diffstat (limited to 'rawshark.c')
-rw-r--r-- | rawshark.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/rawshark.c b/rawshark.c index 7c388ba370..5cc7746258 100644 --- a/rawshark.c +++ b/rawshark.c @@ -378,13 +378,11 @@ set_link_type(const char *lt_arg) { spec_ptr++; if (strncmp(lt_arg, "encap:", strlen("encap:")) == 0) { -#ifdef HAVE_PCAP_DATALINK_NAME_TO_VAL dlt_val = linktype_name_to_val(spec_ptr); if (dlt_val >= 0) { encap = dlt_val; return TRUE; } -#endif dlt_val = strtol(spec_ptr, NULL, 10); if (errno != EINVAL && dlt_val >= 0) { encap = wtap_pcap_encap_to_wtap_encap(dlt_val); |