summaryrefslogtreecommitdiff
path: root/epan/epan.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 /epan/epan.h
parentf65513291333b5912a16b45bfa09eed05eee3a6d (diff)
downloadwireshark-7b13a3b0f6a5617e0e352f87cc5a20afea226aa8.tar.gz
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 'epan/epan.h')
-rw-r--r--epan/epan.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/epan.h b/epan/epan.h
index faf8e3a448..da00026bb7 100644
--- a/epan/epan.h
+++ b/epan/epan.h
@@ -18,7 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
#ifndef __EPAN_H__
#define __EPAN_H__
@@ -124,7 +123,7 @@ void epan_circuit_cleanup(void);
/** A client will create one epan_t for an entire dissection session.
* A single epan_t will be used to analyze the entire sequence of packets,
* sequentially, in a single session. A session corresponds to a single
- * packet trace file. The reaons epan_t exists is that some packets in
+ * packet trace file. The reason epan_t exists is that some packets in
* some protocols cannot be decoded without knowledge of previous packets.
* This inter-packet "state" is stored in the epan_t.
*/
@@ -136,6 +135,8 @@ const char *epan_get_user_comment(const epan_t *session, const frame_data *fd);
const char *epan_get_interface_name(const epan_t *session, guint32 interface_id);
+const GArray *epan_get_interface_option(const epan_t *session, guint32 interface_id, guint16 option_code);
+
const nstime_t *epan_get_frame_ts(const epan_t *session, guint32 frame_num);
WS_DLL_PUBLIC void epan_free(epan_t *session);