diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-09-28 17:10:24 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-09-29 00:10:52 +0000 |
commit | 96835181e45135668b5c91736a388289a4e3d743 (patch) | |
tree | 12966bba502403e28836235332798676d4f41e00 /dumpcap.c | |
parent | 34fc1145d44c896390b389e2bd2b40510eda6079 (diff) |
Pass the global capture options to open_capture_device().
If we support setting the time stamp precision, we need it to determine
whether we're writing a pcap-ng file so we know whether to request
nanosecond precision or not.
Change-Id: I7df19c1afbe1ba90c40c49aef79f6f88ce5df29b
Reviewed-on: https://code.wireshark.org/review/4359
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -641,7 +641,12 @@ relinquish_all_capabilities(void) #endif static pcap_t * -open_capture_device(interface_options *interface_opts, +open_capture_device(capture_options *capture_opts +#ifndef HAVE_PCAP_SET_TSTAMP_PRECISION + _U_ +#endif + , + interface_options *interface_opts, char (*open_err_str)[PCAP_ERRBUF_SIZE]) { pcap_t *pcap_h; @@ -930,7 +935,7 @@ show_filter_code(capture_options *capture_opts) for (j = 0; j < capture_opts->ifaces->len; j++) { interface_opts = g_array_index(capture_opts->ifaces, interface_options, j); - pcap_h = open_capture_device(&interface_opts, &open_err_str); + pcap_h = open_capture_device(capture_opts, &interface_opts, &open_err_str); if (pcap_h == NULL) { /* Open failed; get messages */ get_capture_device_open_failure_messages(open_err_str, @@ -2659,7 +2664,7 @@ capture_loop_open_input(capture_options *capture_opts, loop_data *ld, g_array_append_val(ld->pcaps, pcap_opts); g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG, "capture_loop_open_input : %s", interface_opts.name); - pcap_opts->pcap_h = open_capture_device(&interface_opts, &open_err_str); + pcap_opts->pcap_h = open_capture_device(capture_opts, &interface_opts, &open_err_str); if (pcap_opts->pcap_h != NULL) { /* we've opened "iface" as a network device */ |