#include "epan/epan.h"
+#ifdef INTTYPES_H_DEFINES_FORMATS
+#include <inttypes.h>
+#endif
+
/* With MSVC and a libwireshark.dll, we need a
* special declaration of num_tap_filters.
*/
{
afpstat_t *ss=(afpstat_t *)pss;
guint32 i;
-#ifdef G_HAVE_UINT64
guint64 td;
-#else
- guint32 td;
-#endif
printf("\n");
printf("===================================================================\n");
printf("AFP RTT Statistics:\n");
}
/* 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;
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, CommandCode_vals, "Unknown (%u)"),
ss->proc[i].num,
(int)ss->proc[i].min.secs,ss->proc[i].min.nsecs/10000,
{
rpcstat_t *rs=prs;
guint32 i;
-#ifdef G_HAVE_UINT64
guint64 td;
-#else
- guint32 td;
-#endif
printf("\n");
printf("===================================================================\n");
printf("%s Major Version %u RTT Statistics:\n", rs->prog, rs->ver);
printf("Procedure Calls Min RTT Max RTT Avg RTT\n");
for(i=0;i<rs->num_procedures;i++){
/* scale it to units of 10us.*/
- /* for long captures with a large tot time, this can overflow on 32bit */
- td=(int)rs->procedures[i].tot.secs;
+ td=rs->procedures[i].tot.secs;
td=td*100000+(int)rs->procedures[i].tot.nsecs/10000;
if(rs->procedures[i].num){
td/=rs->procedures[i].num;
td=0;
}
- printf("%-25s %6d %3d.%05d %3d.%05d %3d.%05d\n",
+ printf("%-25s %6d %3d.%05d %3d.%05d %3" PRIu64 ".%05" PRIu64 "\n",
rs->procedures[i].proc,
rs->procedures[i].num,
(int)rs->procedures[i].min.secs,rs->procedures[i].min.nsecs/10000,
static void
rpcprogs_draw(void *dummy _U_)
{
-#ifdef G_HAVE_UINT64
guint64 td;
-#else
- guint32 td;
-#endif
rpc_program_t *rp;
char str[64];
printf("Program Version Calls Min SRT Max SRT Avg SRT\n");
for(rp=prog_list;rp;rp=rp->next){
/* scale it to units of 10us.*/
- /* for long captures with a large tot time, this can overflow on 32bit */
- td=(int)rp->tot.secs;
+ td=rp->tot.secs;
td=td*100000+(int)rp->tot.nsecs/10000;
if(rp->num){
td/=rp->num;
}
g_snprintf(str, sizeof(str), "%s(%d)",rpc_prog_name(rp->program),rp->program);
- printf("%-15s %2d %6d %3d.%05d %3d.%05d %3d.%05d\n",
+ printf("%-15s %2d %6d %3d.%05d %3d.%05d %3" PRIu64 ".%05" PRIu64 "\n",
str,
rp->version,
rp->num,
{
rpcstat_t *rs=prs;
guint32 i;
-#ifdef G_HAVE_UINT64
guint64 td;
-#else
- guint32 td;
-#endif
printf("\n");
printf("===================================================================\n");
printf("%s Version %d RTT Statistics:\n", rs->prog, rs->version);
printf("Procedure Calls Min RTT Max RTT Avg RTT\n");
for(i=0;i<rs->num_procedures;i++){
/* scale it to units of 10us.*/
- /* for long captures with a large tot time, this can overflow on 32bit */
- td=(int)rs->procedures[i].tot.secs;
+ td=rs->procedures[i].tot.secs;
td=td*100000+(int)rs->procedures[i].tot.nsecs/10000;
if(rs->procedures[i].num){
td/=rs->procedures[i].num;
td=0;
}
- printf("%-15s %6d %3d.%05d %3d.%05d %3d.%05d\n",
+ printf("%-15s %6d %3d.%05d %3d.%05d %3" PRIu64 ".%05" PRIu64 "\n",
rs->procedures[i].proc,
rs->procedures[i].num,
(int)rs->procedures[i].min.secs,rs->procedures[i].min.nsecs/10000,
{
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");
}
/* 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;
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,
}
/* 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;
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,
}
/* 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;
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,