X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=tap-ansi_astat.c;h=0d238956742a9b11538e978cc15034804555c946;hb=366ddb323fb99fbdb922a81093efb00843476d8b;hp=53eae264e7c3f7fab772baa1fa1882c8ee198cee;hpb=7b627e9908b35102db534323f22494f1bf96ba9e;p=obnox%2Fwireshark%2Fwip.git diff --git a/tap-ansi_astat.c b/tap-ansi_astat.c index 53eae264e7..0d23895674 100644 --- a/tap-ansi_astat.c +++ b/tap-ansi_astat.c @@ -3,10 +3,10 @@ * Copyright 2003, Michael Lum * In association with Telos Technology Inc. * - * $Id: tap-ansi_astat.c,v 1.4 2004/05/09 10:03:38 guy Exp $ + * $Id$ * - * Ethereal - Network traffic analyzer - * By Gerald Combs + * Wireshark - Network traffic analyzer + * By Gerald Combs * Copyright 1998 Gerald Combs * * This program is free software; you can redistribute it and/or @@ -28,10 +28,6 @@ * This TAP provides statistics for the ANSI A Interface: */ -/* With MSVC and a libethereal.dll this file needs to import some variables - in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */ -#define _NEED_VAR_IMPORT_ - #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -45,9 +41,10 @@ #include #include "epan/packet_info.h" #include "epan/value_string.h" -#include "tap.h" -#include "packet-bssap.h" -#include "packet-ansi_a.h" +#include +#include +#include +#include #include "register.h" @@ -60,15 +57,13 @@ typedef struct _ansi_a_stat_t { static int ansi_a_stat_packet( void *tapdata, - packet_info *pinfo, + packet_info *pinfo _U_, epan_dissect_t *edt _U_, - void *data) + const void *data) { ansi_a_stat_t *stat_p = tapdata; - ansi_a_tap_rec_t *tap_p = data; - + const ansi_a_tap_rec_t *tap_p = data; - pinfo = pinfo; switch (tap_p->pdu_type) { @@ -140,20 +135,17 @@ ansi_a_stat_draw( static void -ansi_a_stat_init(char *optarg) +ansi_a_stat_init(const char *optarg _U_, void* userdata _U_) { ansi_a_stat_t *stat_p; GString *err_p; - - optarg = optarg; - stat_p = g_malloc(sizeof(ansi_a_stat_t)); memset(stat_p, 0, sizeof(ansi_a_stat_t)); err_p = - register_tap_listener("ansi_a", stat_p, NULL, + register_tap_listener("ansi_a", stat_p, NULL, 0, NULL, ansi_a_stat_packet, ansi_a_stat_draw); @@ -171,5 +163,5 @@ ansi_a_stat_init(char *optarg) void register_tap_listener_ansi_astat(void) { - register_ethereal_tap("ansi_a,", ansi_a_stat_init); + register_stat_cmd_arg("ansi_a,", ansi_a_stat_init,NULL); }