From Ronald Henderson: make "format_text()", on Windows, escape all
[obnox/wireshark/wip.git] / tap.c
diff --git a/tap.c b/tap.c
index a4882c238249270a636449e0302efad49d53a946..0a0b24b99884d2c96e78cb366697d2c936f40fa2 100644 (file)
--- a/tap.c
+++ b/tap.c
@@ -1,7 +1,7 @@
 /* tap.c
  * packet tap interface   2002 Ronnie Sahlberg
  *
- * $Id: tap.c,v 1.5 2002/10/17 02:11:20 guy Exp $
+ * $Id: tap.c,v 1.8 2002/11/28 20:28:28 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -74,9 +74,9 @@ typedef struct _tap_listener_t {
        int needs_redraw;
        dfilter_t *code;
        void *tapdata;
-       void (*reset)(void *tapdata);
-       int  (*packet)(void *tapdata, packet_info *pinfo, void *data);
-       void (*draw)(void *tapdata);
+       tap_reset_cb reset;
+       tap_packet_cb packet;
+       tap_draw_cb draw;
 } tap_listener_t;
 static volatile tap_listener_t *tap_listener_queue=NULL;
 
@@ -149,7 +149,7 @@ register_tap(char *name)
 /* Everytime 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_packet().
+   to tap_queue_packet().
    The first parameter is the tap_id returned by the register_tap()
    call for this dissector (so the tap system can keep track of who it came
    from and who is listening to it)
@@ -260,7 +260,7 @@ tap_push_tapped_queue(epan_dissect_t *edt)
                                        passed=dfilter_apply_edt(tl->code, edt);
                                }
                                if(passed && tl->packet){
-                                       tl->needs_redraw|=tl->packet(tl->tapdata, tp->pinfo, tp->tap_specific_data);
+                                       tl->needs_redraw|=tl->packet(tl->tapdata, tp->pinfo, edt, tp->tap_specific_data);
                                }
                        }
                }
@@ -339,7 +339,7 @@ find_tap_id(char *name)
  * !0: error
 */
 int
-register_tap_listener(char *tapname, void *tapdata, char *fstring, void (*reset)(void *tapdata), int (*packet)(void *tapdata, packet_info *pinfo, void *data), void (*draw)(void *tapdata))
+register_tap_listener(char *tapname, void *tapdata, char *fstring, tap_reset_cb reset, tap_packet_cb packet, tap_draw_cb draw)
 {
        tap_listener_t *tl;
        int tap_id;