From 30c86f8b34233b1cf262c14660d32388bc7362d9 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 3 Jun 2017 12:58:36 -0700 Subject: Don't keep the pcap/pcapng link-layer header type as interface data. Either 1) it can be determined from the libwiretap encapsulation type, in which case it's redundant information or 2) there *is* no pcap/pcapng link-layer header type for that encapsulation type, in which case you need to check for the attempt to determine it failing and handle that failure appropriately. Change-Id: Ie9557b513365c1fc8c6df74b9c8239e29aad46bc Reviewed-on: https://code.wireshark.org/review/21924 Reviewed-by: Guy Harris --- ui/gtk/file_import_dlg.c | 1 - ui/tap_export_pdu.c | 1 - 2 files changed, 2 deletions(-) (limited to 'ui') diff --git a/ui/gtk/file_import_dlg.c b/ui/gtk/file_import_dlg.c index 0e71ca9b34..0076fe9bde 100644 --- a/ui/gtk/file_import_dlg.c +++ b/ui/gtk/file_import_dlg.c @@ -501,7 +501,6 @@ file_import_open(text_import_info_t *info) int_data_mand = (wtapng_if_descr_mandatory_t*)wtap_block_get_mandatory_data(int_data); int_data_mand->wtap_encap = info->encapsulation; int_data_mand->time_units_per_second = 1000000; /* default microsecond resolution */ - int_data_mand->link_type = wtap_wtap_encap_to_pcap_encap(info->encapsulation); int_data_mand->snap_len = WTAP_MAX_PACKET_SIZE; wtap_block_add_string_option(int_data, OPT_IDB_NAME, "Fake IF File->Import", strlen("Fake IF File->Import")); diff --git a/ui/tap_export_pdu.c b/ui/tap_export_pdu.c index fec86cff1d..76e4326ab3 100644 --- a/ui/tap_export_pdu.c +++ b/ui/tap_export_pdu.c @@ -146,7 +146,6 @@ exp_pdu_open(exp_pdu_t *exp_pdu_tap_data, int fd, char *comment) int_data_mand = (wtapng_if_descr_mandatory_t*)wtap_block_get_mandatory_data(int_data); int_data_mand->wtap_encap = WTAP_ENCAP_WIRESHARK_UPPER_PDU; int_data_mand->time_units_per_second = 1000000000; /* default nanosecond resolution */ - int_data_mand->link_type = wtap_wtap_encap_to_pcap_encap(WTAP_ENCAP_WIRESHARK_UPPER_PDU); int_data_mand->snap_len = WTAP_MAX_PACKET_SIZE; wtap_block_add_string_option(int_data, OPT_IDB_NAME, "Fake IF, PDU->Export", strlen("Fake IF, PDU->Export")); -- cgit v1.2.1