From Mark C. Brown:
[obnox/wireshark/wip.git] / tap-afpstat.c
index bedee12f1ad39d0995c206b2b739b5cf6082c41a..003243b844606f5d9d5ef65d2436c250baccc3ab 100644 (file)
@@ -4,8 +4,8 @@
  *
  * $Id$
  *
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
  * This program is free software; you can redistribute it and/or
@@ -64,9 +64,8 @@ afpstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const voi
        sp=&(ss->proc[request_val->command]);
 
        /* calculate time delta between request and reply */
-       t.secs=pinfo->fd->abs_secs;
-       t.nsecs=pinfo->fd->abs_usecs*1000;
-       get_timedelta(&deltat, &t, &request_val->req_time);
+       t=pinfo->fd->abs_ts;
+       nstime_delta(&deltat, &t, &request_val->req_time);
 
        if(sp){
                time_stat_update(sp,&deltat, pinfo);
@@ -119,7 +118,7 @@ afpstat_draw(void *pss)
 
 
 static void
-afpstat_init(const char *optarg)
+afpstat_init(const char *optarg, void* userdata _U_)
 {
        afpstat_t *ss;
        guint32 i;
@@ -158,7 +157,7 @@ afpstat_init(const char *optarg)
                g_free(ss->filter);
                g_free(ss);
 
-               fprintf(stderr, "tethereal: Couldn't register afp,rtt tap: %s\n",
+               fprintf(stderr, "tshark: Couldn't register afp,rtt tap: %s\n",
                    error_string->str);
                g_string_free(error_string, TRUE);
                exit(1);
@@ -168,5 +167,5 @@ afpstat_init(const char *optarg)
 void
 register_tap_listener_afpstat(void)
 {
-       register_stat_cmd_arg("afp,rtt", afpstat_init);
+       register_stat_cmd_arg("afp,rtt", afpstat_init,NULL);
 }