aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-02-21 13:35:04 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-02-21 13:35:04 +0000
commit5df11d41bb51aa76c28065f039ff03ec7c472628 (patch)
treebdd3c9e5e45234a43e0262f6e0fd2f2fdd334391 /dumpcap.c
parenta36c67130fd16568c9059848515707c3f0a8f8d7 (diff)
Extend libpcap_write_interface_description_block() wiyh more options
all exept os curently unused. svn path=/trunk/; revision=41108
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 6d2bcd3d9e..f431254fb1 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -2584,13 +2584,18 @@ capture_loop_init_output(capture_options *capture_opts, loop_data *ld, char *err
} else {
pcap_opts->snaplen = pcap_snapshot(pcap_opts->pcap_h);
}
- successful = libpcap_write_interface_description_block(ld->pdh,
- interface_opts.name,
- interface_opts.cfilter?interface_opts.cfilter:"",
- pcap_opts->linktype,
- pcap_opts->snaplen,
- &ld->bytes_written,
- &err);
+ successful = libpcap_write_interface_description_block(global_ld.pdh,
+ NULL, /* OPT_COMMENT 1 */
+ interface_opts.name, /* IDB_NAME 2 */
+ NULL, /* IDB_DESCRIPTION 3 */
+ interface_opts.cfilter?interface_opts.cfilter:"", /* IDB_FILTER 11 */
+ os_info_str->str, /* IDB_OS 12 */
+ pcap_opts->linktype,
+ pcap_opts->snaplen,
+ &(global_ld.bytes_written),
+ 0, /* IDB_IF_SPEED 8 */
+ 0, /* IDB_TSRESOL 9 */
+ &global_ld.err);
}
} else {
pcap_opts = g_array_index(ld->pcaps, pcap_options *, 0);
@@ -3029,11 +3034,16 @@ do_file_switch_or_stop(capture_options *capture_opts,
interface_opts = g_array_index(capture_opts->ifaces, interface_options, i);
pcap_opts = g_array_index(global_ld.pcaps, pcap_options *, i);
successful = libpcap_write_interface_description_block(global_ld.pdh,
- interface_opts.name,
- interface_opts.cfilter?interface_opts.cfilter:"",
+ NULL, /* OPT_COMMENT 1 */
+ interface_opts.name, /* IDB_NAME 2 */
+ NULL, /* IDB_DESCRIPTION 3 */
+ interface_opts.cfilter?interface_opts.cfilter:"", /* IDB_FILTER 11 */
+ os_info_str->str, /* IDB_OS 12 */
pcap_opts->linktype,
pcap_opts->snaplen,
&(global_ld.bytes_written),
+ 0, /* IDB_IF_SPEED 8 */
+ 0, /* IDB_TSRESOL 9 */
&global_ld.err);
}
} else {