aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.h
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2020-10-19 23:25:11 -0700
committerGuy Harris <gharris@sonic.net>2020-10-20 00:39:37 -0700
commita11b9fb7a02ae6c959831e6852ddfa5c2283c81c (patch)
treefc830e5494d30a6ef94a459adcd9278d94131760 /wiretap/wtap.h
parent89e96c1e77a39a259cafb488c6057e6c123d692b (diff)
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.)
Diffstat (limited to 'wiretap/wtap.h')
-rw-r--r--wiretap/wtap.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index d4aa73ad27..b075ac9f43 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -2220,6 +2220,13 @@ WS_DLL_PUBLIC
GArray *wtap_get_savable_file_types_subtypes(int file_type,
const GArray *file_encaps, guint32 required_comment_types);
+/**
+ * Return TRUE if files of this file type/subtype use interface IDs
+ * to associate records with an interface.
+ */
+WS_DLL_PUBLIC
+gboolean wtap_uses_interface_ids(int file_type);
+
/*** various string converter functions ***/
WS_DLL_PUBLIC
const char *wtap_file_type_subtype_string(int file_type_subtype);