aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tap.h
diff options
context:
space:
mode:
Diffstat (limited to 'epan/tap.h')
-rw-r--r--epan/tap.h38
1 files changed, 28 insertions, 10 deletions
diff --git a/epan/tap.h b/epan/tap.h
index 23f15f50dc..45168692a4 100644
--- a/epan/tap.h
+++ b/epan/tap.h
@@ -1,4 +1,4 @@
-/* tap.h
+/** @file
* packet tap interface 2002 Ronnie Sahlberg
*
* Wireshark - Network traffic analyzer
@@ -28,21 +28,28 @@ typedef enum {
TAP_PACKET_FAILED /**< Packet processing failed, stop calling this tap */
} tap_packet_status;
+typedef guint tap_flags_t;
+
typedef void (*tap_reset_cb)(void *tapdata);
-typedef tap_packet_status (*tap_packet_cb)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data);
+typedef tap_packet_status (*tap_packet_cb)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data, tap_flags_t flags);
typedef void (*tap_draw_cb)(void *tapdata);
typedef void (*tap_finish_cb)(void *tapdata);
/**
* Flags to indicate what a tap listener's packet routine requires.
*/
-#define TL_REQUIRES_NOTHING 0x00000000 /**< nothing */
-#define TL_REQUIRES_PROTO_TREE 0x00000001 /**< full protocol tree */
-#define TL_REQUIRES_COLUMNS 0x00000002 /**< columns */
-#define TL_REQUIRES_ERROR_PACKETS 0x00000004 /**< include packet even if pinfo->flags.in_error_pkt is set */
+#define TL_REQUIRES_NOTHING 0x00000000 /**< nothing */
+#define TL_REQUIRES_PROTO_TREE 0x00000001 /**< full protocol tree */
+#define TL_REQUIRES_COLUMNS 0x00000002 /**< columns */
+#define TL_REQUIRES_ERROR_PACKETS 0x00000004 /**< include packet even if pinfo->flags.in_error_pkt is set */
+
/** Flags to indicate what the tap listener does */
-#define TL_IS_DISSECTOR_HELPER 0x00000008 /**< tap helps a dissector do work
- ** but does not, itself, require dissection */
+#define TL_IS_DISSECTOR_HELPER 0x00000008 /**< tap helps a dissector do work
+ ** but does not, itself, require dissection */
+
+/** Flags to indicate what the packet cb should do */
+#define TL_IGNORE_DISPLAY_FILTER 0x00000010 /**< use packet, even if it woul dbe filtered out */
+#define TL_DISPLAY_FILTER_IGNORED 0x00100000 /**< flag for the conversation handler */
typedef struct {
void (*register_tap_listener)(void); /* routine to call to register tap listener */
@@ -67,7 +74,7 @@ typedef struct _tap_reg {
* XXX - should probably be handled by epan_init(), as the tap mechanism
* is part of libwireshark.
*/
-WS_DLL_PUBLIC void register_all_tap_listeners(tap_reg_t *tap_reg_listeners);
+WS_DLL_PUBLIC void register_all_tap_listeners(tap_reg_t const *tap_reg_listeners);
extern void tap_init(void);
@@ -93,7 +100,7 @@ WS_DLL_PUBLIC GList* get_tap_names(void);
*/
WS_DLL_PUBLIC int find_tap_id(const char *name);
-/** Everytime the dissector has finished dissecting a packet (and all
+/** Every time the dissector has finished dissecting a packet (and all
* subdissectors have returned) and if the dissector has been made "tappable"
* it will push some data to everyone tapping this layer by a call
* to tap_queue_packet().
@@ -241,12 +248,23 @@ WS_DLL_PUBLIC void remove_tap_listener(void *tapdata);
*/
WS_DLL_PUBLIC gboolean tap_listeners_require_dissection(void);
+/**
+ * Return TRUE if we have one or more tap listeners that require the columns,
+ * FALSE otherwise.
+ */
+WS_DLL_PUBLIC gboolean tap_listeners_require_columns(void);
+
/** Returns TRUE there is an active tap listener for the specified tap id. */
WS_DLL_PUBLIC gboolean have_tap_listener(int tap_id);
/** Return TRUE if we have any tap listeners with filters, FALSE otherwise. */
WS_DLL_PUBLIC gboolean have_filtering_tap_listeners(void);
+/** If any tap listeners have a filter with references to the currently
+ * selected frame in the GUI (edt->tree), update them.
+ */
+WS_DLL_PUBLIC void tap_listeners_load_field_references(epan_dissect_t *edt);
+
/**
* Get the union of all the flags for all the tap listeners; that gives
* an indication of whether the protocol tree, or the columns, are