From Ronnie Sahlberg: pass a pointer to the epan_dissect_t for a packet

to taps.

svn path=/trunk/; revision=6487
This commit is contained in:
Guy Harris 2002-10-23 23:12:38 +00:00
parent d5f34ad8b2
commit 6d8d731412
8 changed files with 18 additions and 18 deletions

View File

@ -1,7 +1,7 @@
/* rpc_progs.c
* rpc_progs 2002 Ronnie Sahlberg
*
* $Id: rpc_progs.c,v 1.1 2002/09/07 10:02:31 sahlberg Exp $
* $Id: rpc_progs.c,v 1.2 2002/10/23 23:12:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -125,7 +125,7 @@ add_new_program(rpc_program_t *rp)
static int
rpcprogs_packet(void *dummy _U_, packet_info *pinfo, rpc_call_info_value *ri)
rpcprogs_packet(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt _U_, rpc_call_info_value *ri)
{
nstime_t delta;
rpc_program_t *rp;

View File

@ -1,7 +1,7 @@
/* rpc_stat.c
* rpc_stat 2002 Ronnie Sahlberg
*
* $Id: rpc_stat.c,v 1.2 2002/09/27 11:07:10 sahlberg Exp $
* $Id: rpc_stat.c,v 1.3 2002/10/23 23:12:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -88,7 +88,7 @@ rpcstat_reset(rpcstat_t *rs)
static int
rpcstat_packet(rpcstat_t *rs, packet_info *pinfo, rpc_call_info_value *ri)
rpcstat_packet(rpcstat_t *rs, packet_info *pinfo, epan_dissect_t *edt _U_, rpc_call_info_value *ri)
{
nstime_t delta;
rpc_procedure_t *rp;

View File

@ -1,7 +1,7 @@
/* rpc_progs.c
* rpc_progs 2002 Ronnie Sahlberg
*
* $Id: rpc_progs.c,v 1.1 2002/09/07 09:28:05 sahlberg Exp $
* $Id: rpc_progs.c,v 1.2 2002/10/23 23:12:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -125,7 +125,7 @@ add_new_program(rpc_program_t *rp)
static int
rpcprogs_packet(void *dummy _U_, packet_info *pinfo, rpc_call_info_value *ri)
rpcprogs_packet(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt _U_, rpc_call_info_value *ri)
{
nstime_t delta;
rpc_program_t *rp;

View File

@ -1,7 +1,7 @@
/* rpc_stat.c
* rpc_stat 2002 Ronnie Sahlberg
*
* $Id: rpc_stat.c,v 1.2 2002/09/27 11:07:16 sahlberg Exp $
* $Id: rpc_stat.c,v 1.3 2002/10/23 23:12:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -88,7 +88,7 @@ rpcstat_reset(rpcstat_t *rs)
static int
rpcstat_packet(rpcstat_t *rs, packet_info *pinfo, rpc_call_info_value *ri)
rpcstat_packet(rpcstat_t *rs, packet_info *pinfo, epan_dissect_t *edt _U_, rpc_call_info_value *ri)
{
nstime_t delta;
rpc_procedure_t *rp;

View File

@ -1,7 +1,7 @@
/* tap-rpcprogs.c
* rpcstat 2002 Ronnie Sahlberg
*
* $Id: tap-rpcprogs.c,v 1.1 2002/09/05 09:27:50 sahlberg Exp $
* $Id: tap-rpcprogs.c,v 1.2 2002/10/23 23:12:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -58,7 +58,7 @@ static rpc_program_t *prog_list=NULL;
static int already_enabled=0;
static int
rpcprogs_packet(void *dummy1 _U_, packet_info *pinfo, rpc_call_info_value *ri)
rpcprogs_packet(void *dummy1 _U_, packet_info *pinfo, epan_dissect_t *edt _U_, rpc_call_info_value *ri)
{
nstime_t delta;
rpc_program_t *rp=NULL;

View File

@ -1,7 +1,7 @@
/* tap-rpcstat.c
* rpcstat 2002 Ronnie Sahlberg
*
* $Id: tap-rpcstat.c,v 1.3 2002/09/27 11:06:59 sahlberg Exp $
* $Id: tap-rpcstat.c,v 1.4 2002/10/23 23:12:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -124,7 +124,7 @@ rpcstat_reset(rpcstat_t *rs)
* !0: state has changed, call (*draw) sometime later
*/
static int
rpcstat_packet(rpcstat_t *rs, packet_info *pinfo, rpc_call_info_value *ri)
rpcstat_packet(rpcstat_t *rs, packet_info *pinfo, epan_dissect_t *edt _U_, rpc_call_info_value *ri)
{
nstime_t delta;
rpc_procedure_t *rp;

8
tap.c
View File

@ -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.6 2002/10/23 23:12:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -75,7 +75,7 @@ typedef struct _tap_listener_t {
dfilter_t *code;
void *tapdata;
void (*reset)(void *tapdata);
int (*packet)(void *tapdata, packet_info *pinfo, void *data);
int (*packet)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, void *data);
void (*draw)(void *tapdata);
} tap_listener_t;
static volatile tap_listener_t *tap_listener_queue=NULL;
@ -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, void (*reset)(void *tapdata), int (*packet)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, void *data), void (*draw)(void *tapdata))
{
tap_listener_t *tl;
int tap_id;

4
tap.h
View File

@ -1,7 +1,7 @@
/* tap.h
* packet tap interface 2002 Ronnie Sahlberg
*
* $Id: tap.h,v 1.3 2002/10/17 02:11:20 guy Exp $
* $Id: tap.h,v 1.4 2002/10/23 23:12:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -35,7 +35,7 @@ void tap_push_tapped_queue(epan_dissect_t *edt);
extern int tapping_is_active;
void reset_tap_listeners(void);
void draw_tap_listeners(gboolean draw_all);
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));
int register_tap_listener(char *tapname, void *tapdata, char *fstring, void (*reset)(void *tapdata), int (*packet)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, void *data), void (*draw)(void *tapdata));
void remove_tap_listener(void *tapdata);