aboutsummaryrefslogtreecommitdiffstats
path: root/tap-smbstat.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2007-04-16 04:34:07 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2007-04-16 04:34:07 +0000
commit1295039ee92089af47f3711ef42c3e9f7d77441b (patch)
treeabbc25f3f887dc99374d38bffeb295dd1713e481 /tap-smbstat.c
parent7279a4243170652e77b3314379da930c6ca603ee (diff)
Wireshark now requires support for 64-bit types so there's no need to #ifdef
around them. Print 64-bit types using the PRI macros; add inttypes.h to tap.h (if necessary) to pick up those macros for all the taps. svn path=/trunk/; revision=21442
Diffstat (limited to 'tap-smbstat.c')
-rw-r--r--tap-smbstat.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/tap-smbstat.c b/tap-smbstat.c
index 2ef3f4d996..94ead0f07b 100644
--- a/tap-smbstat.c
+++ b/tap-smbstat.c
@@ -103,11 +103,7 @@ smbstat_draw(void *pss)
{
smbstat_t *ss=(smbstat_t *)pss;
guint32 i;
-#ifdef G_HAVE_UINT64
guint64 td;
-#else
- guint32 td;
-#endif
printf("\n");
printf("===================================================================\n");
printf("SMB RTT Statistics:\n");
@@ -130,8 +126,7 @@ smbstat_draw(void *pss)
}
/* scale it to units of 10us.*/
- /* for long captures with a large tot time, this can overflow on 32bit */
- td=(int)ss->proc[i].tot.secs;
+ td=ss->proc[i].tot.secs;
td=td*100000+(int)ss->proc[i].tot.nsecs/10000;
if(ss->proc[i].num){
td/=ss->proc[i].num;
@@ -139,7 +134,7 @@ smbstat_draw(void *pss)
td=0;
}
- printf("%-25s %6d %3d.%05d %3d.%05d %3d.%05d\n",
+ printf("%-25s %6d %3d.%05d %3d.%05d %3" PRIu64 ".%05" PRIu64 "\n",
val_to_str(i, smb_cmd_vals, "Unknown (0x%02x)"),
ss->proc[i].num,
(int)ss->proc[i].min.secs,ss->proc[i].min.nsecs/10000,
@@ -157,8 +152,7 @@ smbstat_draw(void *pss)
}
/* scale it to units of 10us.*/
- /* for long captures with a large tot time, this can overflow on 32bit */
- td=(int)ss->trans2[i].tot.secs;
+ td=ss->trans2[i].tot.secs;
td=td*100000+(int)ss->trans2[i].tot.nsecs/10000;
if(ss->trans2[i].num){
td/=ss->trans2[i].num;
@@ -166,7 +160,7 @@ smbstat_draw(void *pss)
td=0;
}
- printf("%-25s %6d %3d.%05d %3d.%05d %3d.%05d\n",
+ printf("%-25s %6d %3d.%05d %3d.%05d %3" PRIu64 ".%05" PRIu64 "\n",
val_to_str(i, trans2_cmd_vals, "Unknown (0x%02x)"),
ss->trans2[i].num,
(int)ss->trans2[i].min.secs,ss->trans2[i].min.nsecs/10000,
@@ -184,8 +178,7 @@ smbstat_draw(void *pss)
}
/* scale it to units of 10us.*/
- /* for long captures with a large tot time, this can overflow on 32bit */
- td=(int)ss->nt_trans[i].tot.secs;
+ td=ss->nt_trans[i].tot.secs;
td=td*100000+(int)ss->nt_trans[i].tot.nsecs/10000;
if(ss->nt_trans[i].num){
td/=ss->nt_trans[i].num;
@@ -193,7 +186,7 @@ smbstat_draw(void *pss)
td=0;
}
- printf("%-25s %6d %3d.%05d %3d.%05d %3d.%05d\n",
+ printf("%-25s %6d %3d.%05d %3d.%05d %3" PRIu64 ".%05" PRIu64 "\n",
val_to_str(i, nt_cmd_vals, "Unknown (0x%02x)"),
ss->nt_trans[i].num,
(int)ss->nt_trans[i].min.secs,ss->nt_trans[i].min.nsecs/10000,