diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-05-28 00:31:27 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-05-28 00:31:27 +0000 |
commit | 53375198ec6e69374c4a1c21f2b5deff3f4ff810 (patch) | |
tree | 1106e567a265d264fee8b21bda57866a89462f96 /summary.c | |
parent | fb68fa844cfbb002b648cad4231883e6ef12a914 (diff) | |
download | wireshark-53375198ec6e69374c4a1c21f2b5deff3f4ff810.tar.gz wireshark-53375198ec6e69374c4a1c21f2b5deff3f4ff810.tar.bz2 wireshark-53375198ec6e69374c4a1c21f2b5deff3f4ff810.zip |
Don't use pcap LINKTYPE_ values in the iface_options structure, use
Wiretap encapsulation values; rename the field in question encap_type to
emphasize that. (Code that looks at that field already assumes it's a
Wiretap encapsulation value.)
For live captures, map the LINKTYPE_ value to a Wiretap encapsulation
value.
wtap_encap_string() never returns NULL, so don't check for a null return
value.
svn path=/trunk/; revision=42871
Diffstat (limited to 'summary.c')
-rw-r--r-- | summary.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -26,6 +26,8 @@ # include "config.h" #endif +#include <wiretap/pcap-encap.h> + #include <epan/packet.h> #include "cfile.h" #include "summary.h" @@ -171,7 +173,6 @@ summary_fill_in(capture_file *cf, summary_tally *st) } -#ifdef HAVE_LIBPCAP void summary_fill_in_capture(capture_file *cf,capture_options *capture_opts, summary_tally *st) { @@ -202,7 +203,7 @@ summary_fill_in_capture(capture_file *cf,capture_options *capture_opts, summary_ iface.drops = cf->drops; iface.has_snap = device.has_snaplen; iface.snap = device.snaplen; - iface.linktype = device.active_dlt; + iface.encap_type = wtap_pcap_encap_to_wtap_encap(device.active_dlt); g_array_append_val(st->ifaces, iface); } } else { @@ -216,7 +217,7 @@ summary_fill_in_capture(capture_file *cf,capture_options *capture_opts, summary_ iface.drops = 0; iface.snap = wtapng_if_descr.snap_len; iface.has_snap = (iface.snap != 65535); - iface.linktype = wtapng_if_descr.link_type; + iface.encap_type = wtapng_if_descr.wtap_encap; if(wtapng_if_descr.num_stat_entries == 1){ /* dumpcap only writes one ISB, only handle that for now */ if_stats = &g_array_index(wtapng_if_descr.interface_statistics, wtapng_if_stats_t, 0); @@ -229,4 +230,3 @@ summary_fill_in_capture(capture_file *cf,capture_options *capture_opts, summary_ g_free(idb_info); } } -#endif |