aboutsummaryrefslogtreecommitdiffstats
path: root/cfile.h
diff options
context:
space:
mode:
authorChristopher Kilgour <techie@whiterocker.com>2014-02-23 17:30:57 -0800
committerAnders Broman <a.broman58@gmail.com>2014-03-20 09:54:01 +0000
commit7b13a3b0f6a5617e0e352f87cc5a20afea226aa8 (patch)
tree774432cd1876744b5038ea291f10b012bd7f8288 /cfile.h
parentf65513291333b5912a16b45bfa09eed05eee3a6d (diff)
Allow pcapng interface options to be available to dissectors.
Interface options[1], and more generally pcapng options[2], are useful information that can provide improved dissector output. Prior to this change, only certain pcapng interface options were interpreted and made available to dissectors, e.g. the interface name or description. This change augments the situation by providing epan_get_interface_option( ), which returns an array of byte arrays if the option code exists (otherwise NULL). Each element of the array is a byte buffer containing the raw data of the option. An array-of-buffers is used because pcapng allows for multiple instances of the same option to be present in the file. All interface options found in a pcapng file are thus made available to the dissector. The implementation also provides infrastructure to collect options from other pcapng blocks such as the section header. Currently these options are discarded, but could be retained in the future to support more features. [1] http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html#sectionidb [2] http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html#sectionopt Change-Id: I944b6f0f03dde9b8e7d1348b76acde6f9d312f37 Reviewed-on: https://code.wireshark.org/review/331 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'cfile.h')
-rw-r--r--cfile.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cfile.h b/cfile.h
index f34c34ee14..f164303f18 100644
--- a/cfile.h
+++ b/cfile.h
@@ -133,6 +133,8 @@ extern void cap_file_init(capture_file *cf);
extern const char *cap_file_get_interface_name(void *data, guint32 interface_id);
+extern const GArray *cap_file_get_interface_option(void *data, guint32 interface_id, guint16 option_code);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */