aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/erf.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2012-09-07 01:23:48 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2012-09-07 01:23:48 +0000
commit621120248d574e84a6949ac7394251b679c218c1 (patch)
treeac7536b31b03f48ad1ad159a3f758b1ccc3e1a99 /wiretap/erf.c
parentb50bf64b3b6f0556247c1565a0566931c65950df (diff)
From Stephen Donnelly via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7266 :
Since we have to 'downconvert' the ERF time stamps to Wireshark's internal representation anyway, we may as well report the resolution which we convert to, rather than the original native resolution. svn path=/trunk/; revision=44800
Diffstat (limited to 'wiretap/erf.c')
-rw-r--r--wiretap/erf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c
index f22f781fa8..9e431f3020 100644
--- a/wiretap/erf.c
+++ b/wiretap/erf.c
@@ -728,7 +728,8 @@ int erf_populate_interfaces(wtap *wth)
memset(&int_data, 0, sizeof(int_data)); /* Zero all fields */
int_data.wtap_encap = WTAP_ENCAP_ERF;
- int_data.time_units_per_second = (1LL<<32); /* ERF format resolution is 2^-32, capture resolution is unknown */
+ /* int_data.time_units_per_second = (1LL<<32); ERF format resolution is 2^-32, capture resolution is unknown */
+ int_data.time_units_per_second = 1000000000; /* XXX Since Wireshark only supports down to nanosecond resolution we have to dilute to this */
int_data.link_type = wtap_wtap_encap_to_pcap_encap(WTAP_ENCAP_ERF);
int_data.snap_len = 65535; /* ERF max length */
int_data.opt_comment = NULL;
@@ -737,7 +738,8 @@ int erf_populate_interfaces(wtap *wth)
/* XXX: if_MACaddr opt 6 Interface Hardware MAC address (48 bits).*/
/* XXX: if_EUIaddr opt 7 Interface Hardware EUI address (64 bits)*/
int_data.if_speed = 0; /* Unknown */
- int_data.if_tsresol = 0xa0; /* ERF format resolution is 2^-32 = 0xa0, capture resolution is unknown */
+ /* int_data.if_tsresol = 0xa0; ERF format resolution is 2^-32 = 0xa0, capture resolution is unknown */
+ int_data.if_tsresol = 0x09; /* XXX Since Wireshark only supports down to nanosecond resolution we have to dilute to this */
/* XXX: if_tzone 10 Time zone for GMT support (TODO: specify better). */
int_data.if_filter_str = NULL;
int_data.bpf_filter_len = 0;
@@ -748,7 +750,7 @@ int erf_populate_interfaces(wtap *wth)
/* Interface statistics */
int_data.num_stat_entries = 0;
int_data.interface_statistics = NULL;
-
+
/* Preemptively create interface entries for 4 interfaces, since this is the max number in ERF */
for (i=0; i<4; i++) {
int_data.if_name = g_strdup_printf("Port %c", 'A'+i);