From 846bb5394812c39359dfdbbf7e8755a7e3cf5326 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 30 Nov 2014 16:30:19 -0800 Subject: Add a Buffer to wtap_pkthdr to hold file-type-specific packet metadata. For example, this can be used for pcap-ng options not mapped to file-type-independent metadata values. Change-Id: I398b324c62c1cc1cc61eb5e9631de00481b4aadc Reviewed-on: https://code.wireshark.org/review/5549 Reviewed-by: Guy Harris --- wiretap/pcapng_module.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'wiretap/pcapng_module.h') diff --git a/wiretap/pcapng_module.h b/wiretap/pcapng_module.h index 226a8dd7b1..ef5701678b 100644 --- a/wiretap/pcapng_module.h +++ b/wiretap/pcapng_module.h @@ -36,5 +36,18 @@ WS_DLL_PUBLIC void register_pcapng_block_type_handler(guint block_type, block_reader read, block_writer write); +/* + * Handler routine for pcap-ng option type. + */ +typedef gboolean (*option_handler)(gboolean, guint, guint8 *, int *, gchar **); + +/* + * Register a handler for a pcap-ng option code for a particular block + * type. + */ +WS_DLL_PUBLIC +void register_pcapng_option_handler(guint block_type, guint option_code, + option_handler handle); + #endif /* __PCAP_MODULE_H__ */ -- cgit v1.2.1