/* 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>
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;
/* 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)
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);
}
}
}
* !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;