summaryrefslogtreecommitdiff
path: root/ui/cli/tap-iostat.c
diff options
context:
space:
mode:
authorJC Wren <jcwren@jcwren.com>2014-12-17 15:19:20 -0500
committerAnders Broman <a.broman58@gmail.com>2015-02-21 16:57:52 +0000
commite2bcee6ac442e6eb66dd3b09186070de4acb0010 (patch)
treee38e70de1a7160c6833601584774f12936559568 /ui/cli/tap-iostat.c
parent13531d36fb91f3abbd6e62add83faf863e62d974 (diff)
downloadwireshark-e2bcee6ac442e6eb66dd3b09186070de4acb0010.tar.gz
Make FT_{U}INT64 behave more like FT_{U}INT32, add support for FT_{U}INT{40,48,56}
Change-Id: I57354c309ecf3a0c8f0c7cff485638027f30bb19 Reviewed-on: https://code.wireshark.org/review/5813 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/cli/tap-iostat.c')
-rw-r--r--ui/cli/tap-iostat.c43
1 files changed, 35 insertions, 8 deletions
diff --git a/ui/cli/tap-iostat.c b/ui/cli/tap-iostat.c
index e175a9be6a..2191973991 100644
--- a/ui/cli/tap-iostat.c
+++ b/ui/cli/tap-iostat.c
@@ -172,8 +172,11 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
case FT_UINT32:
it->counter += fvalue_get_uinteger(&((field_info *)gp->pdata[i])->value);
break;
+ case FT_UINT40:
+ case FT_UINT48:
+ case FT_UINT56:
case FT_UINT64:
- it->counter += fvalue_get_integer64(&((field_info *)gp->pdata[i])->value);
+ it->counter += fvalue_get_uinteger64(&((field_info *)gp->pdata[i])->value);
break;
case FT_INT8:
case FT_INT16:
@@ -181,8 +184,11 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
case FT_INT32:
it->counter += fvalue_get_sinteger(&((field_info *)gp->pdata[i])->value);
break;
+ case FT_INT40:
+ case FT_INT48:
+ case FT_INT56:
case FT_INT64:
- it->counter += (gint64)fvalue_get_integer64(&((field_info *)gp->pdata[i])->value);
+ it->counter += (gint64)fvalue_get_sinteger64(&((field_info *)gp->pdata[i])->value);
break;
case FT_FLOAT:
it->float_counter +=
@@ -226,8 +232,11 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
it->counter = val;
}
break;
+ case FT_UINT40:
+ case FT_UINT48:
+ case FT_UINT56:
case FT_UINT64:
- val = fvalue_get_integer64(&((field_info *)gp->pdata[i])->value);
+ val = fvalue_get_uinteger64(&((field_info *)gp->pdata[i])->value);
if ((it->frames == 1 && i == 0) || (val < it->counter)) {
it->counter = val;
}
@@ -241,8 +250,11 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
it->counter = val;
}
break;
+ case FT_INT40:
+ case FT_INT48:
+ case FT_INT56:
case FT_INT64:
- val = fvalue_get_integer64(&((field_info *)gp->pdata[i])->value);
+ val = fvalue_get_sinteger64(&((field_info *)gp->pdata[i])->value);
if ((it->frames == 1 && i == 0) || ((gint64)val < (gint64)it->counter)) {
it->counter = val;
}
@@ -295,8 +307,11 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
if (val > it->counter)
it->counter = val;
break;
+ case FT_UINT40:
+ case FT_UINT48:
+ case FT_UINT56:
case FT_UINT64:
- val = fvalue_get_integer64(&((field_info *)gp->pdata[i])->value);
+ val = fvalue_get_uinteger64(&((field_info *)gp->pdata[i])->value);
if (val > it->counter)
it->counter = val;
break;
@@ -308,8 +323,11 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
if ((gint32)val > (gint32)it->counter)
it->counter = val;
break;
+ case FT_INT40:
+ case FT_INT48:
+ case FT_INT56:
case FT_INT64:
- val = fvalue_get_integer64(&((field_info *)gp->pdata[i])->value);
+ val = fvalue_get_sinteger64(&((field_info *)gp->pdata[i])->value);
if ((gint64)val > (gint64)it->counter)
it->counter = val;
break;
@@ -356,9 +374,11 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
val = fvalue_get_uinteger(&((field_info *)gp->pdata[i])->value);
it->counter += val;
break;
+ case FT_UINT40:
+ case FT_UINT48:
+ case FT_UINT56:
case FT_UINT64:
- case FT_INT64:
- val = fvalue_get_integer64(&((field_info *)gp->pdata[i])->value);
+ val = fvalue_get_uinteger64(&((field_info *)gp->pdata[i])->value);
it->counter += val;
break;
case FT_INT8:
@@ -368,6 +388,13 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
val = fvalue_get_sinteger(&((field_info *)gp->pdata[i])->value);
it->counter += val;
break;
+ case FT_INT40:
+ case FT_INT48:
+ case FT_INT56:
+ case FT_INT64:
+ val = fvalue_get_sinteger64(&((field_info *)gp->pdata[i])->value);
+ it->counter += val;
+ break;
case FT_FLOAT:
it->float_counter += (gfloat)fvalue_get_floating(&((field_info *)gp->pdata[i])->value);
break;