diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-05-09 05:18:49 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-05-09 05:21:01 +0000 |
commit | a1b1c8bed54b1576e4f0e9e7f583844a12d142bf (patch) | |
tree | fcadd72c61f9d936451163e83cc1be843073f3b4 /ui | |
parent | a651f3e5edb2f148a0e5f495b5cba0e7fa43e002 (diff) |
Revert "Refactor Wiretap"
This reverts commit 1abeb277f5e6bd27fbaebfecc8184e37ba9d008a.
This isn't building, and looks as if it requires significant work to fix.
Change-Id: I622b1bb243e353e874883a302ab419532b7601f2
Reviewed-on: https://code.wireshark.org/review/1568
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/capture_file_dlg.c | 12 | ||||
-rw-r--r-- | ui/gtk/file_import_dlg.c | 2 | ||||
-rw-r--r-- | ui/gtk/iax2_analysis.c | 2 | ||||
-rw-r--r-- | ui/gtk/main.c | 4 | ||||
-rw-r--r-- | ui/gtk/packet_win.c | 2 | ||||
-rw-r--r-- | ui/gtk/rlc_lte_graph.c | 2 | ||||
-rw-r--r-- | ui/gtk/rtp_analysis.c | 2 | ||||
-rw-r--r-- | ui/gtk/sctp_assoc_analyse.c | 2 | ||||
-rw-r--r-- | ui/qt/capture_file_dialog.cpp | 4 | ||||
-rw-r--r-- | ui/qt/import_text_dialog.cpp | 2 | ||||
-rw-r--r-- | ui/qt/packet_list.cpp | 2 | ||||
-rw-r--r-- | ui/tap-tcp-stream.c | 2 | ||||
-rw-r--r-- | ui/tap_export_pdu.c | 2 | ||||
-rw-r--r-- | ui/tap_export_pdu.h | 2 | ||||
-rw-r--r-- | ui/text_import.c | 2 | ||||
-rw-r--r-- | ui/text_import.h | 2 | ||||
-rw-r--r-- | ui/win32/file_dlg_win32.c | 6 |
17 files changed, 26 insertions, 26 deletions
diff --git a/ui/gtk/capture_file_dlg.c b/ui/gtk/capture_file_dlg.c index a2b2b7819b..baef2baed9 100644 --- a/ui/gtk/capture_file_dlg.c +++ b/ui/gtk/capture_file_dlg.c @@ -105,11 +105,11 @@ static gboolean color_selected; /* set a new filename for the preview widget */ -static wftap * +static wtap * preview_set_filename(GtkWidget *prev, const gchar *cf_name) { GtkWidget *label; - wftap *wth; + wtap *wth; int err = 0; gchar *err_info; gchar string_buff[PREVIEW_STR_MAX]; @@ -150,7 +150,7 @@ preview_set_filename(GtkWidget *prev, const gchar *cf_name) } /* Find the size of the file. */ - filesize = wftap_file_size(wth, &err); + filesize = wtap_file_size(wth, &err); if (filesize == -1) { gtk_label_set_text(GTK_LABEL(label), "error getting file size"); wtap_close(wth); @@ -161,7 +161,7 @@ preview_set_filename(GtkWidget *prev, const gchar *cf_name) gtk_label_set_text(GTK_LABEL(label), string_buff); /* type */ - g_strlcpy(string_buff, wtap_file_type_subtype_string(wftap_file_type_subtype(wth)), PREVIEW_STR_MAX); + g_strlcpy(string_buff, wtap_file_type_subtype_string(wtap_file_type_subtype(wth)), PREVIEW_STR_MAX); label = (GtkWidget *)g_object_get_data(G_OBJECT(prev), PREVIEW_FORMAT_KEY); gtk_label_set_text(GTK_LABEL(label), string_buff); @@ -171,7 +171,7 @@ preview_set_filename(GtkWidget *prev, const gchar *cf_name) /* do a preview run on the currently selected capture file */ static void -preview_do(GtkWidget *prev, wftap *wth) +preview_do(GtkWidget *prev, wtap *wth) { GtkWidget *label; unsigned int elapsed_time; @@ -299,7 +299,7 @@ file_open_entry_changed(GtkWidget *w _U_, gpointer file_sel) GtkWidget *prev = (GtkWidget *)g_object_get_data(G_OBJECT(file_sel), PREVIEW_TABLE_KEY); gchar *cf_name; gboolean have_preview; - wftap *wth; + wtap *wth; /* get the filename */ cf_name = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_sel)); diff --git a/ui/gtk/file_import_dlg.c b/ui/gtk/file_import_dlg.c index b3e5342b1d..cd12985257 100644 --- a/ui/gtk/file_import_dlg.c +++ b/ui/gtk/file_import_dlg.c @@ -535,7 +535,7 @@ file_import_open(text_import_info_t *info) read_failure_alert_box(info->import_text_filename, errno); } - if (!wftap_dump_close(info->wdh, &err)) { + if (!wtap_dump_close(info->wdh, &err)) { write_failure_alert_box(capfile_name, err); } diff --git a/ui/gtk/iax2_analysis.c b/ui/gtk/iax2_analysis.c index da4996f5c5..6f7fe77c73 100644 --- a/ui/gtk/iax2_analysis.c +++ b/ui/gtk/iax2_analysis.c @@ -3715,7 +3715,7 @@ void iax2_analysis_cb(GtkAction *action _U_, gpointer user_data _U_) return; /* error reading the frame */ epan_dissect_init(&edt, cf->epan, TRUE, FALSE); epan_dissect_prime_dfilter(&edt, sfcode); - epan_dissect_run(&edt, &cf->hdr.wtap_hdr, frame_tvbuff_new_buffer(fdata, &cf->buf), + epan_dissect_run(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL); /* if it is not an iax2 frame, show an error dialog */ diff --git a/ui/gtk/main.c b/ui/gtk/main.c index a5b345edd5..e49e0531a0 100644 --- a/ui/gtk/main.c +++ b/ui/gtk/main.c @@ -549,7 +549,7 @@ get_ip_address_list_from_packet_list_row(gpointer data) epan_dissect_init(&edt, cfile.epan, FALSE, FALSE); col_custom_prime_edt(&edt, &cfile.cinfo); - epan_dissect_run(&edt, &cfile.hdr.wtap_hdr, frame_tvbuff_new_buffer(fdata, &cfile.buf), + epan_dissect_run(&edt, &cfile.phdr, frame_tvbuff_new_buffer(fdata, &cfile.buf), fdata, &cfile.cinfo); epan_dissect_fill_in_columns(&edt, TRUE, TRUE); @@ -590,7 +590,7 @@ get_filter_from_packet_list_row_and_column(gpointer data) epan_dissect_init(&edt, cfile.epan, have_custom_cols(&cfile.cinfo), FALSE); col_custom_prime_edt(&edt, &cfile.cinfo); - epan_dissect_run(&edt, &cfile.hdr.wtap_hdr, frame_tvbuff_new_buffer(fdata, &cfile.buf), + epan_dissect_run(&edt, &cfile.phdr, frame_tvbuff_new_buffer(fdata, &cfile.buf), fdata, &cfile.cinfo); epan_dissect_fill_in_columns(&edt, TRUE, TRUE); diff --git a/ui/gtk/packet_win.c b/ui/gtk/packet_win.c index 47c637bfcd..c25d62b48a 100644 --- a/ui/gtk/packet_win.c +++ b/ui/gtk/packet_win.c @@ -972,7 +972,7 @@ void new_packet_window(GtkWidget *w _U_, gboolean reference, gboolean editable _ /* XXX, protect cfile.epan from closing (ref counting?) */ DataPtr->epan = cfile.epan; DataPtr->frame = fd; - DataPtr->phdr = cfile.hdr.wtap_hdr; + DataPtr->phdr = cfile.phdr; DataPtr->pd = (guint8 *)g_malloc(DataPtr->frame->cap_len); memcpy(DataPtr->pd, buffer_start_ptr(&cfile.buf), DataPtr->frame->cap_len); diff --git a/ui/gtk/rlc_lte_graph.c b/ui/gtk/rlc_lte_graph.c index ab238b8344..aeb5b9996b 100644 --- a/ui/gtk/rlc_lte_graph.c +++ b/ui/gtk/rlc_lte_graph.c @@ -917,7 +917,7 @@ static rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf, struct segment epan_dissect_init(&edt, cf->epan, TRUE, FALSE); epan_dissect_prime_dfilter(&edt, sfcode); - epan_dissect_run_with_taps(&edt, &cf->hdr.wtap_hdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL); + epan_dissect_run_with_taps(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL); rel_ts = edt.pi.rel_ts; epan_dissect_cleanup(&edt); remove_tap_listener(&th); diff --git a/ui/gtk/rtp_analysis.c b/ui/gtk/rtp_analysis.c index 578273d6bf..0305b0a26a 100644 --- a/ui/gtk/rtp_analysis.c +++ b/ui/gtk/rtp_analysis.c @@ -3950,7 +3950,7 @@ rtp_analysis_cb(GtkAction *action _U_, gpointer user_data _U_) return; /* error reading the frame */ epan_dissect_init(&edt, cf->epan, TRUE, FALSE); epan_dissect_prime_dfilter(&edt, sfcode); - epan_dissect_run(&edt, &cf->hdr.wtap_hdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL); + epan_dissect_run(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL); /* if it is not an rtp frame, show the rtpstream dialog */ frame_matched = dfilter_apply_edt(sfcode, &edt); diff --git a/ui/gtk/sctp_assoc_analyse.c b/ui/gtk/sctp_assoc_analyse.c index 84d37c3010..2b751f7135 100644 --- a/ui/gtk/sctp_assoc_analyse.c +++ b/ui/gtk/sctp_assoc_analyse.c @@ -980,7 +980,7 @@ sctp_analyse_cb(struct sctp_analyse *u_data, gboolean ext) epan_dissect_init(&edt, cf->epan, TRUE, FALSE); epan_dissect_prime_dfilter(&edt, sfcode); - epan_dissect_run(&edt, &cf->hdr.wtap_hdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL); + epan_dissect_run(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL); frame_matched = dfilter_apply_edt(sfcode, &edt); /* if it is not an sctp frame, show the dialog */ diff --git a/ui/qt/capture_file_dialog.cpp b/ui/qt/capture_file_dialog.cpp index 1fa58515d6..03d4892411 100644 --- a/ui/qt/capture_file_dialog.cpp +++ b/ui/qt/capture_file_dialog.cpp @@ -786,10 +786,10 @@ void CaptureFileDialog::preview(const QString & path) } // Format - preview_format_.setText(QString::fromUtf8(wtap_file_type_subtype_string(wftap_file_type_subtype(wth)))); + preview_format_.setText(QString::fromUtf8(wtap_file_type_subtype_string(wtap_file_type_subtype(wth)))); // Size - preview_size_.setText(QString(tr("%1 bytes")).arg(wftap_file_size(wth, &err))); + preview_size_.setText(QString(tr("%1 bytes")).arg(wtap_file_size(wth, &err))); time(&time_preview); while ( (wtap_read(wth, &err, &err_info, &data_offset)) ) { diff --git a/ui/qt/import_text_dialog.cpp b/ui/qt/import_text_dialog.cpp index 344c3e6faf..39cf304bcd 100644 --- a/ui/qt/import_text_dialog.cpp +++ b/ui/qt/import_text_dialog.cpp @@ -142,7 +142,7 @@ void ImportTextDialog::convertTextFile() { read_failure_alert_box(import_info_.import_text_filename, errno); } - if (!wftap_dump_close(import_info_.wdh, &err)) + if (!wtap_dump_close(import_info_.wdh, &err)) { write_failure_alert_box(capfile_name_.toUtf8().constData(), err); } diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index 1a2c07e6b7..7e9ff94132 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -661,7 +661,7 @@ QString &PacketList::getFilterFromRowAndColumn() epan_dissect_init(&edt, cap_file_->epan, have_custom_cols(&cap_file_->cinfo), FALSE); col_custom_prime_edt(&edt, &cap_file_->cinfo); - epan_dissect_run(&edt, &cap_file_->hdr.wtap_hdr, frame_tvbuff_new_buffer(fdata, &cap_file_->buf), fdata, &cap_file_->cinfo); + epan_dissect_run(&edt, &cap_file_->phdr, frame_tvbuff_new_buffer(fdata, &cap_file_->buf), fdata, &cap_file_->cinfo); epan_dissect_fill_in_columns(&edt, TRUE, TRUE); if ((cap_file_->cinfo.col_custom_occurrence[ctx_column_]) || diff --git a/ui/tap-tcp-stream.c b/ui/tap-tcp-stream.c index e91604bcbc..9dd1e46381 100644 --- a/ui/tap-tcp-stream.c +++ b/ui/tap-tcp-stream.c @@ -319,7 +319,7 @@ select_tcpip_session(capture_file *cf, struct segment *hdrs) epan_dissect_init(&edt, cf->epan, TRUE, FALSE); epan_dissect_prime_dfilter(&edt, sfcode); - epan_dissect_run_with_taps(&edt, &cf->hdr.wtap_hdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL); + epan_dissect_run_with_taps(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL); rel_ts = edt.pi.rel_ts; epan_dissect_cleanup(&edt); remove_tap_listener(&th); diff --git a/ui/tap_export_pdu.c b/ui/tap_export_pdu.c index c3a23fcc89..ec8c78130f 100644 --- a/ui/tap_export_pdu.c +++ b/ui/tap_export_pdu.c @@ -154,7 +154,7 @@ exp_pdu_file_open(exp_pdu_t *exp_pdu_tap_data) cf_retap_packets(&cfile); - if (!wftap_dump_close(exp_pdu_tap_data->wdh, &err)) { + if (!wtap_dump_close(exp_pdu_tap_data->wdh, &err)) { write_failure_alert_box(capfile_name, err); } diff --git a/ui/tap_export_pdu.h b/ui/tap_export_pdu.h index 998959b9b7..25c39d733a 100644 --- a/ui/tap_export_pdu.h +++ b/ui/tap_export_pdu.h @@ -29,7 +29,7 @@ extern "C" { typedef struct _exp_pdu_t { int pkt_encap; - wftap_dumper* wdh; + wtap_dumper* wdh; } exp_pdu_t; void exp_pdu_file_open(exp_pdu_t *exp_pdu_tap_data); diff --git a/ui/text_import.c b/ui/text_import.c index 8a05da023c..05fcc25b8f 100644 --- a/ui/text_import.c +++ b/ui/text_import.c @@ -191,7 +191,7 @@ static guint32 ts_usec = 0; static char *ts_fmt = NULL; static struct tm timecode_default; -static wftap_dumper* wdh; +static wtap_dumper* wdh; /* HDR_ETH Offset base to parse */ static guint32 offset_base = 16; diff --git a/ui/text_import.h b/ui/text_import.h index 64410d61c5..9a92576f8e 100644 --- a/ui/text_import.h +++ b/ui/text_import.h @@ -71,7 +71,7 @@ typedef struct /* Import info */ guint encapsulation; - wftap_dumper* wdh; + wtap_dumper* wdh; /* Dummy header info (if encapsulation == 1) */ enum dummy_header_type dummy_header_type; diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c index 21b1ed9dac..a65aaf4d0f 100644 --- a/ui/win32/file_dlg_win32.c +++ b/ui/win32/file_dlg_win32.c @@ -1114,7 +1114,7 @@ preview_set_file_info(HWND of_hwnd, gchar *preview_file) { HWND cur_ctrl; int i; gboolean enable = FALSE; - wftap *wth; + wtap *wth; const struct wtap_pkthdr *phdr; int err = 0; gchar *err_info; @@ -1177,10 +1177,10 @@ preview_set_file_info(HWND of_hwnd, gchar *preview_file) { /* Format */ cur_ctrl = GetDlgItem(of_hwnd, EWFD_PTX_FORMAT); - SetWindowText(cur_ctrl, utf_8to16(wtap_file_type_subtype_string(wftap_file_type_subtype(wth)))); + SetWindowText(cur_ctrl, utf_8to16(wtap_file_type_subtype_string(wtap_file_type_subtype(wth)))); /* Size */ - filesize = wftap_file_size(wth, &err); + filesize = wtap_file_size(wth, &err); utf_8to16_snprintf(string_buff, PREVIEW_STR_MAX, "%" G_GINT64_FORMAT " bytes", filesize); cur_ctrl = GetDlgItem(of_hwnd, EWFD_PTX_SIZE); SetWindowText(cur_ctrl, string_buff); |