From a11b9fb7a02ae6c959831e6852ddfa5c2283c81c Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 19 Oct 2020 23:25:11 -0700 Subject: Add an API to determine whether a file type uses interface IDs. Currently, the only file types that use them are pcapng and IBM's iptrace; we don't support writing the latter, so this is mainly of interest for pcapng. This makes it a bit more obvious what some "is this pcapng?" tests are really trying to determine, and allows them to automatically support any new file types that use them. (With regard to interface descriptions, tere are three types of file: 1) files that contain no interface information; 2) files that contain "just FYI" interface information but that don't tie packets or other records to particular interfaces; 3) files that contain interface information and tie all packets (and possibly other records) to an interface. This tests for files of type 3.) --- wiretap/merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wiretap/merge.c') diff --git a/wiretap/merge.c b/wiretap/merge.c index 6aae6a6548..4281b042d2 100644 --- a/wiretap/merge.c +++ b/wiretap/merge.c @@ -908,7 +908,7 @@ merge_process_packets(wtap_dumper *pdh, const int file_type, break; } - if (file_type == WTAP_FILE_TYPE_SUBTYPE_PCAPNG) { + if (wtap_uses_interface_ids(file_type)) { /* * XXX - We should do this only for record types * that pertain to a particular interface; for -- cgit v1.2.3