#include "epan/packet_info.h"
#include "epan/value_string.h"
#include <epan/tap.h>
+#include <epan/stat_cmd_args.h>
#include "register.h"
#include <epan/dissectors/packet-http.h>
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;
/* 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_stat_cmd_arg("http,stat,", gtk_httpstat_init);
}