/* tap-httpstat.c
* tap-httpstat 2003 Jean-Michel FAYARD
*
- * $Id: tap-httpstat.c,v 1.3 2003/09/29 19:18:43 jmayer Exp $
+ * $Id$
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "epan/packet_info.h"
#include "epan/value_string.h"
-#include "tap.h"
+#include <epan/tap.h>
#include "register.h"
-#include "packet-http.h"
+#include <epan/dissectors/packet-http.h>
/* used to keep track of the statictics for an entire program interface */
typedef struct _http_response_code_t {
guint32 packets; /* 3 */
guint response_code; /* 404 */
- gchar *name; /* Not Found */
+ const gchar *name; /* Not Found */
httpstat_t *sp;
} http_response_code_t;
}
static int
-httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *pri)
+httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri)
{
- http_info_value_t *value=pri;
+ const http_info_value_t *value=pri;
httpstat_t *sp=(httpstat_t *) psp;
/* We are only interested in reply packets with a status code */
/* When called, this function will create a new instance of gtk_httpstat.
*/
static void
-gtk_httpstat_init(char *optarg)
+gtk_httpstat_init(const char *optarg)
{
httpstat_t *sp;
- char *filter=NULL;
+ const char *filter=NULL;
GString *error_string;
if (!strncmp (optarg, "http,stat,", 10)){
/* error, we failed to attach to the tap. clean up */
g_free(sp->filter);
g_free(sp);
- fprintf (stderr, "tethereal: Coulnd't register http,stat tap: %s\n",
+ fprintf (stderr, "tethereal: Couldn't register http,stat tap: %s\n",
error_string->str);
g_string_free(error_string, TRUE);
exit(1);
void
register_tap_listener_gtkhttpstat(void)
{
- register_ethereal_tap("http,stat,", gtk_httpstat_init);
+ register_tap_listener_cmd_arg("http,stat,", gtk_httpstat_init);
}