aboutsummaryrefslogtreecommitdiffstats
path: root/ui/cli
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-12-31 19:36:12 -0800
committerGuy Harris <guy@alum.mit.edu>2019-01-01 05:03:42 +0000
commit2d41b15495e245d9292ba42dd3954bdebc9f3290 (patch)
tree40282b7aab9f1347489126dd98974a681dca888f /ui/cli
parentba589a4e445a8ad8054073eff846087fc61c9ef8 (diff)
Add a "failed" return for tap packet routines.
This allows taps that can fail to report an error and fail; a failed tap's packet routine won't be called again, so they don't have to keep track of whether they've failed themselves. We make the return value from the packet routine an enum. Don't have a separate type for the per-packet routine for "follow" taps; they're expected to act like tap packet routines, so just use the type for tap packet routines. One tap packet routine returned -1; that's not a valid return value, and wasn't one before this change (the return value was a boolean), so presume the intent was "don't redraw". Another tap routine's early return, without doing any work, returned TRUE; this is presumably an error (no work done, no need to redraw), so presumably it should be "don't redraw". Clean up some white space while we're at it. Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8 Reviewed-on: https://code.wireshark.org/review/31283 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/cli')
-rw-r--r--ui/cli/tap-camelsrt.c10
-rw-r--r--ui/cli/tap-diameter-avp.c6
-rw-r--r--ui/cli/tap-expert.c10
-rw-r--r--ui/cli/tap-gsm_astat.c8
-rw-r--r--ui/cli/tap-httpstat.c10
-rw-r--r--ui/cli/tap-icmpstat.c14
-rw-r--r--ui/cli/tap-icmpv6stat.c14
-rw-r--r--ui/cli/tap-iostat.c4
-rw-r--r--ui/cli/tap-macltestat.c26
-rw-r--r--ui/cli/tap-protocolinfo.c8
-rw-r--r--ui/cli/tap-protohierstat.c10
-rw-r--r--ui/cli/tap-rlcltestat.c12
-rw-r--r--ui/cli/tap-rpcprogs.c6
-rw-r--r--ui/cli/tap-rtspstat.c10
-rw-r--r--ui/cli/tap-sctpchunkstat.c8
-rw-r--r--ui/cli/tap-sipstat.c10
-rw-r--r--ui/cli/tap-smbsids.c4
-rw-r--r--ui/cli/tap-sv.c4
-rw-r--r--ui/cli/tap-wspstat.c8
19 files changed, 92 insertions, 90 deletions
diff --git a/ui/cli/tap-camelsrt.c b/ui/cli/tap-camelsrt.c
index f3d81269e6..13b213e63d 100644
--- a/ui/cli/tap-camelsrt.c
+++ b/ui/cli/tap-camelsrt.c
@@ -50,10 +50,10 @@ static void camelsrt_reset(void *phs)
}
-static int camelsrt_packet(void *phs,
- packet_info *pinfo _U_,
- epan_dissect_t *edt _U_,
- const void *phi)
+static tap_packet_status camelsrt_packet(void *phs,
+ packet_info *pinfo _U_,
+ epan_dissect_t *edt _U_,
+ const void *phi)
{
struct camelsrt_t *hs = (struct camelsrt_t *)phs;
const struct camelsrt_info_t * pi = (const struct camelsrt_info_t *)phi;
@@ -75,7 +75,7 @@ static int camelsrt_packet(void *phs,
}
}
}
- return 1;
+ return TAP_PACKET_REDRAW;
}
diff --git a/ui/cli/tap-diameter-avp.c b/ui/cli/tap-diameter-avp.c
index f607ae2369..6815430dbc 100644
--- a/ui/cli/tap-diameter-avp.c
+++ b/ui/cli/tap-diameter-avp.c
@@ -112,10 +112,10 @@ diam_tree_to_csv(proto_node *node, gpointer data)
return FALSE;
}
-static int
+static tap_packet_status
diameteravp_packet(void *pds, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pdi)
{
- int ret = 0;
+ tap_packet_status ret = TAP_PACKET_DONT_REDRAW;
double resp_time = 0.;
gboolean is_request = TRUE;
guint32 cmd_code = 0;
@@ -140,7 +140,7 @@ diameteravp_packet(void *pds, packet_info *pinfo, epan_dissect_t *edt _U_, const
ds->frame = pinfo->num;
ds->diammsg_toprocess = 0;
} else {
- ds->diammsg_toprocess += 1;
+ ds->diammsg_toprocess += 1;
}
/* Extract data from request/answer pair provided by diameter dissector.*/
diff --git a/ui/cli/tap-expert.c b/ui/cli/tap-expert.c
index 3dc33aae2c..0d6bb99cbb 100644
--- a/ui/cli/tap-expert.c
+++ b/ui/cli/tap-expert.c
@@ -70,7 +70,7 @@ expert_stat_reset(void *tapdata)
}
/* Process stat struct for an expert frame */
-static gboolean
+static tap_packet_status
expert_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
const void *pointer)
{
@@ -99,12 +99,12 @@ expert_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U
break;
default:
g_assert_not_reached();
- return FALSE;
+ return TAP_PACKET_DONT_REDRAW;
}
/* Don't store details at a lesser severity than we are interested in */
if (severity_level < lowest_report_level) {
- return TRUE;
+ return TAP_PACKET_REDRAW; /* XXX - TAP_PACKET_DONT_REDRAW? */
}
/* If a duplicate just bump up frequency.
@@ -114,7 +114,7 @@ expert_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U
if ((strcmp(ei->protocol, entry->protocol) == 0) &&
(strcmp(ei->summary, entry->summary) == 0)) {
entry->frequency++;
- return TRUE;
+ return TAP_PACKET_REDRAW;
}
}
@@ -128,7 +128,7 @@ expert_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U
/* Store a copy of the expert entry */
g_array_append_val(data->ei_array[severity_level], tmp_entry);
- return TRUE;
+ return TAP_PACKET_REDRAW;
}
/* Output for all of the items of one severity */
diff --git a/ui/cli/tap-gsm_astat.c b/ui/cli/tap-gsm_astat.c
index ddd805c584..e56139b3bd 100644
--- a/ui/cli/tap-gsm_astat.c
+++ b/ui/cli/tap-gsm_astat.c
@@ -45,7 +45,7 @@ typedef struct _gsm_a_stat_t {
} gsm_a_stat_t;
-static int
+static tap_packet_status
gsm_a_stat_packet(
void *tapdata,
packet_info *pinfo _U_,
@@ -92,7 +92,7 @@ gsm_a_stat_packet(
/*
* unsupported PD
*/
- return(0);
+ return(TAP_PACKET_DONT_REDRAW);
}
break;
@@ -112,10 +112,10 @@ gsm_a_stat_packet(
/*
* unknown PDU type !!!
*/
- return(0);
+ return(TAP_PACKET_DONT_REDRAW);
}
- return(1);
+ return(TAP_PACKET_REDRAW);
}
diff --git a/ui/cli/tap-httpstat.c b/ui/cli/tap-httpstat.c
index 184c0d98f2..dba569cf5b 100644
--- a/ui/cli/tap-httpstat.c
+++ b/ui/cli/tap-httpstat.c
@@ -197,7 +197,7 @@ httpstat_reset(void *psp )
}
-static int
+static tap_packet_status
httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri)
{
const http_info_value_t *value = (const http_info_value_t *)pri;
@@ -218,7 +218,7 @@ httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
*/
int i = value->response_code;
if ((i < 100) || (i >= 600)) {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
else if (i < 200) {
key = 199; /* Hopefully, this status code will never be used */
@@ -239,7 +239,7 @@ httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
sp->hash_responses,
GUINT_TO_POINTER(key));
if (sc == NULL)
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
sc->packets++;
}
@@ -259,9 +259,9 @@ httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
sc->packets++;
}
} else {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
- return 1;
+ return TAP_PACKET_REDRAW;
}
diff --git a/ui/cli/tap-icmpstat.c b/ui/cli/tap-icmpstat.c
index d1dfebb77f..628e567350 100644
--- a/ui/cli/tap-icmpstat.c
+++ b/ui/cli/tap-icmpstat.c
@@ -102,10 +102,10 @@ static gint compare_doubles(gconstpointer a, gconstpointer b)
* "icmp" tap, the third parameter type is icmp_transaction_t.
*
* function returns :
- * FALSE: no updates, no need to call (*draw) later
- * TRUE: state has changed, call (*draw) sometime later
+ * TAP_PACKET_DONT_REDRAW: no updates, no need to call (*draw) later
+ * TAP_PACKET_REDRAW: state has changed, call (*draw) sometime later
*/
-static gboolean
+static tap_packet_status
icmpstat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data)
{
icmpstat_t *icmpstat = (icmpstat_t *)tapdata;
@@ -113,13 +113,13 @@ icmpstat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
double resp_time, *rt;
if (trans == NULL)
- return FALSE;
+ return TAP_PACKET_DONT_REDRAW;
if (trans->resp_frame) {
resp_time = nstime_to_msec(&trans->resp_time);
rt = g_new(double, 1);
if (rt == NULL)
- return FALSE;
+ return TAP_PACKET_DONT_REDRAW;
*rt = resp_time;
icmpstat->rt_list = g_slist_prepend(icmpstat->rt_list, rt);
icmpstat->num_resps++;
@@ -135,9 +135,9 @@ icmpstat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
} else if (trans->rqst_frame)
icmpstat->num_rqsts++;
else
- return FALSE;
+ return TAP_PACKET_DONT_REDRAW;
- return TRUE;
+ return TAP_PACKET_REDRAW;
}
diff --git a/ui/cli/tap-icmpv6stat.c b/ui/cli/tap-icmpv6stat.c
index 04bcf973a8..517b704148 100644
--- a/ui/cli/tap-icmpv6stat.c
+++ b/ui/cli/tap-icmpv6stat.c
@@ -103,10 +103,10 @@ static gint compare_doubles(gconstpointer a, gconstpointer b)
* "icmpv6" tap, the third parameter type is icmp_transaction_t.
*
* function returns :
- * FALSE: no updates, no need to call (*draw) later
- * TRUE: state has changed, call (*draw) sometime later
+ * TAP_PACKET_DONT_REDRAW: no updates, no need to call (*draw) later
+ * TAP_PACKET_REDRAW: state has changed, call (*draw) sometime later
*/
-static gboolean
+static tap_packet_status
icmpv6stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data)
{
icmpv6stat_t *icmpv6stat = (icmpv6stat_t *)tapdata;
@@ -114,13 +114,13 @@ icmpv6stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
double resp_time, *rt;
if (trans == NULL)
- return FALSE;
+ return TAP_PACKET_DONT_REDRAW;
if (trans->resp_frame) {
resp_time = nstime_to_msec(&trans->resp_time);
rt = g_new(double, 1);
if (rt == NULL)
- return FALSE;
+ return TAP_PACKET_DONT_REDRAW;
*rt = resp_time;
icmpv6stat->rt_list = g_slist_prepend(icmpv6stat->rt_list, rt);
icmpv6stat->num_resps++;
@@ -136,9 +136,9 @@ icmpv6stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
} else if (trans->rqst_frame)
icmpv6stat->num_rqsts++;
else
- return FALSE;
+ return TAP_PACKET_DONT_REDRAW;
- return TRUE;
+ return TAP_PACKET_REDRAW;
}
diff --git a/ui/cli/tap-iostat.c b/ui/cli/tap-iostat.c
index 1928f97e68..4c328a8c35 100644
--- a/ui/cli/tap-iostat.c
+++ b/ui/cli/tap-iostat.c
@@ -78,7 +78,7 @@ typedef struct _io_stat_item_t {
static guint64 last_relative_time;
-static int
+static tap_packet_status
iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *dummy _U_)
{
io_stat_t *parent;
@@ -506,7 +506,7 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
break;
}
}
- return TRUE;
+ return TAP_PACKET_REDRAW;
}
static int
diff --git a/ui/cli/tap-macltestat.c b/ui/cli/tap-macltestat.c
index cb35ce89e0..6513dc65b7 100644
--- a/ui/cli/tap-macltestat.c
+++ b/ui/cli/tap-macltestat.c
@@ -207,7 +207,7 @@ static void update_ueid_rnti_counts(guint16 rnti, guint16 ueid, mac_lte_stat_t *
/* Process stat struct for a MAC LTE frame */
-static int
+static tap_packet_status
mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
const void *phi)
{
@@ -220,7 +220,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
const struct mac_lte_tap_info *si = (const struct mac_lte_tap_info *)phi;
if (!hs) {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
hs->common_stats.all_frames++;
@@ -231,18 +231,18 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
hs->common_stats.pch_frames++;
hs->common_stats.pch_bytes += si->single_number_of_bytes;
hs->common_stats.pch_paging_ids += si->number_of_paging_ids;
- return 1;
+ return TAP_PACKET_REDRAW;
case SI_RNTI:
hs->common_stats.sib_frames++;
hs->common_stats.sib_bytes += si->single_number_of_bytes;
- return 1;
+ return TAP_PACKET_REDRAW;
case NO_RNTI:
hs->common_stats.mib_frames++;
- return 1;
+ return TAP_PACKET_REDRAW;
case RA_RNTI:
hs->common_stats.rar_frames++;
hs->common_stats.rar_entries += si->number_of_rars;
- return 1;
+ return TAP_PACKET_REDRAW;
case C_RNTI:
case SPS_RNTI:
/* Drop through for per-UE update */
@@ -250,7 +250,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
default:
/* Error */
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
/* Check max UEs/tti counter */
@@ -304,7 +304,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
/* Really should have a row pointer by now */
if (!te) {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
/* Update entry with details from si */
@@ -315,12 +315,12 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
if (si->direction == DIRECTION_UPLINK) {
if (si->isPHYRetx) {
te->stats.UL_retx_frames++;
- return 1;
+ return TAP_PACKET_REDRAW;
}
if (si->crcStatusValid && (si->crcStatus != crc_success)) {
te->stats.UL_CRC_errors++;
- return 1;
+ return TAP_PACKET_REDRAW;
}
/* Update time range */
@@ -348,7 +348,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
else {
if (si->isPHYRetx) {
te->stats.DL_retx_frames++;
- return 1;
+ return TAP_PACKET_REDRAW;
}
if (si->crcStatusValid && (si->crcStatus != crc_success)) {
@@ -370,7 +370,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
/* Something went wrong! */
break;
}
- return 1;
+ return TAP_PACKET_REDRAW;
}
/* Update time range */
@@ -395,7 +395,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
}
- return 1;
+ return TAP_PACKET_REDRAW;
}
diff --git a/ui/cli/tap-protocolinfo.c b/ui/cli/tap-protocolinfo.c
index e0c777b670..b5bd9d5958 100644
--- a/ui/cli/tap-protocolinfo.c
+++ b/ui/cli/tap-protocolinfo.c
@@ -31,7 +31,7 @@ typedef struct _pci_t {
} pci_t;
-static int
+static tap_packet_status
protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const void *dummy _U_)
{
pci_t *rs = (pci_t *)prs;
@@ -48,6 +48,8 @@ protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const vo
*
* To prevent a crash, we check whether INFO column is writable
* and, if not, we report that error and exit.
+ *
+ * XXX - report the error and just return TAP_PACKET_FAILED?
*/
if (!col_get_writable(pinfo->cinfo, COL_INFO)) {
cmdarg_err("the proto,colinfo tap doesn't work if the INFO column isn't being printed.");
@@ -55,7 +57,7 @@ protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const vo
}
gp = proto_get_finfo_ptr_array(edt->tree, rs->hf_index);
if (!gp) {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
for (i=0; i<gp->len; i++) {
@@ -65,7 +67,7 @@ protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const vo
wmem_free(NULL, str);
}
}
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
diff --git a/ui/cli/tap-protohierstat.c b/ui/cli/tap-protohierstat.c
index 8009874725..dd1bed9229 100644
--- a/ui/cli/tap-protohierstat.c
+++ b/ui/cli/tap-protohierstat.c
@@ -53,7 +53,7 @@ new_phs_t(phs_t *parent)
}
-static int
+static tap_packet_status
protohierstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const void *dummy _U_)
{
phs_t *rs = (phs_t *)prs;
@@ -62,13 +62,13 @@ protohierstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const v
field_info *fi;
if (!edt) {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
if (!edt->tree) {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
if (!edt->tree->first_child) {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
for (node=edt->tree->first_child; node; node=node->next) {
@@ -112,7 +112,7 @@ protohierstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const v
}
rs = rs->child;
}
- return 1;
+ return TAP_PACKET_REDRAW;
}
static void
diff --git a/ui/cli/tap-rlcltestat.c b/ui/cli/tap-rlcltestat.c
index b46345d5a9..b376e8f89c 100644
--- a/ui/cli/tap-rlcltestat.c
+++ b/ui/cli/tap-rlcltestat.c
@@ -151,7 +151,7 @@ static rlc_lte_ep_t *alloc_rlc_lte_ep(const struct rlc_lte_tap_info *si, packet_
/* Process stat struct for a RLC LTE frame */
-static int
+static tap_packet_status
rlc_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
const void *phi)
{
@@ -164,7 +164,7 @@ rlc_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
/* Need this */
if (!hs) {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
/* Inc top-level frame count */
@@ -176,12 +176,12 @@ rlc_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
case CHANNEL_TYPE_BCCH_DL_SCH:
hs->common_stats.bcch_frames++;
hs->common_stats.bcch_bytes += si->pduLength;
- return 1;
+ return TAP_PACKET_REDRAW;
case CHANNEL_TYPE_PCCH:
hs->common_stats.pcch_frames++;
hs->common_stats.pcch_bytes += si->pduLength;
- return 1;
+ return TAP_PACKET_REDRAW;
default:
break;
@@ -218,7 +218,7 @@ rlc_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
/* Really should have a row pointer by now */
if (!te) {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
/* Update entry with details from si */
@@ -262,7 +262,7 @@ rlc_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
te->stats.DL_total_missing += si->missingSNs;
}
- return 1;
+ return TAP_PACKET_REDRAW;
}
diff --git a/ui/cli/tap-rpcprogs.c b/ui/cli/tap-rpcprogs.c
index 8581850b2e..02dcf4a200 100644
--- a/ui/cli/tap-rpcprogs.c
+++ b/ui/cli/tap-rpcprogs.c
@@ -46,7 +46,7 @@ typedef struct _rpc_program_t {
static rpc_program_t *prog_list = NULL;
static int already_enabled = 0;
-static int
+static tap_packet_status
rpcprogs_packet(void *dummy1 _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pri)
{
const rpc_call_info_value *ri = (const rpc_call_info_value *)pri;
@@ -120,7 +120,7 @@ rpcprogs_packet(void *dummy1 _U_, packet_info *pinfo, epan_dissect_t *edt _U_, c
/* we are only interested in reply packets */
if (ri->request || !rp) {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
/* calculate time delta between request and reply */
@@ -160,7 +160,7 @@ rpcprogs_packet(void *dummy1 _U_, packet_info *pinfo, epan_dissect_t *edt _U_, c
}
rp->num++;
- return 1;
+ return TAP_PACKET_REDRAW;
}
diff --git a/ui/cli/tap-rtspstat.c b/ui/cli/tap-rtspstat.c
index 3db29ceaf6..5a2519c14b 100644
--- a/ui/cli/tap-rtspstat.c
+++ b/ui/cli/tap-rtspstat.c
@@ -126,7 +126,7 @@ rtspstat_reset(void *psp )
}
-static int
+static tap_packet_status
rtspstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri)
{
const rtsp_info_value_t *value = (const rtsp_info_value_t *)pri;
@@ -147,7 +147,7 @@ rtspstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
*/
int i = value->response_code;
if ((i < 100) || (i >= 600)) {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
else if (i < 200) {
key = 199; /* Hopefully, this status code will never be used */
@@ -168,7 +168,7 @@ rtspstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
sp->hash_responses,
GINT_TO_POINTER(key));
if (sc == NULL)
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
sc->packets++;
}
@@ -188,9 +188,9 @@ rtspstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
sc->packets++;
}
} else {
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
- return 1;
+ return TAP_PACKET_REDRAW;
}
diff --git a/ui/cli/tap-sctpchunkstat.c b/ui/cli/tap-sctpchunkstat.c
index cfb3d5376a..45dd4b9511 100644
--- a/ui/cli/tap-sctpchunkstat.c
+++ b/ui/cli/tap-sctpchunkstat.c
@@ -92,7 +92,7 @@ alloc_sctp_ep(const struct _sctp_info *si)
-static int
+static tap_packet_status
sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *phi)
{
@@ -103,7 +103,7 @@ sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, cons
guint8 chunk_type;
if (!hs)
- return (0);
+ return (TAP_PACKET_DONT_REDRAW);
hs->number_of_packets++;
@@ -131,7 +131,7 @@ sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, cons
}
if (!te)
- return (0);
+ return (TAP_PACKET_DONT_REDRAW);
if (si->number_of_tvbs > 0) {
@@ -144,7 +144,7 @@ sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, cons
te->chunk_count[CHUNK_TYPE(si->tvb[tvb_number])]++;
}
}
- return (1);
+ return (TAP_PACKET_REDRAW);
}
diff --git a/ui/cli/tap-sipstat.c b/ui/cli/tap-sipstat.c
index 988da5a89a..8bc521c7d1 100644
--- a/ui/cli/tap-sipstat.c
+++ b/ui/cli/tap-sipstat.c
@@ -248,7 +248,7 @@ sipstat_reset(void *psp )
/* Main entry point to SIP tap */
-static int
+static tap_packet_status
sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri)
{
const sip_info_value_t *value = (const sip_info_value_t *)pri;
@@ -306,7 +306,7 @@ sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const
if ((i < 100) || (i >= 700))
{
/* Forget about crazy values */
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
else if (i < 200)
{
@@ -337,7 +337,7 @@ sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const
sc = (sip_response_code_t *)g_hash_table_lookup(sp->hash_responses, &key);
if (sc == NULL)
{
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
}
sc->packets++;
@@ -369,10 +369,10 @@ sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const
else
{
/* No request method set. Just ignore */
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
- return 1;
+ return TAP_PACKET_REDRAW;
}
static void
diff --git a/ui/cli/tap-smbsids.c b/ui/cli/tap-smbsids.c
index 039a5acc49..2f4c306be5 100644
--- a/ui/cli/tap-smbsids.c
+++ b/ui/cli/tap-smbsids.c
@@ -27,10 +27,10 @@
void register_tap_listener_smbsids(void);
-static int
+static tap_packet_status
smbsids_packet(void *pss _U_, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *psi _U_)
{
- return 1;
+ return TAP_PACKET_REDRAW;
}
static void
diff --git a/ui/cli/tap-sv.c b/ui/cli/tap-sv.c
index 5899777711..0b75edb598 100644
--- a/ui/cli/tap-sv.c
+++ b/ui/cli/tap-sv.c
@@ -26,7 +26,7 @@
void register_tap_listener_sv(void);
-static int
+static tap_packet_status
sv_packet(void *prs _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pri)
{
int i;
@@ -40,7 +40,7 @@ sv_packet(void *prs _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void
printf("\n");
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
static void
diff --git a/ui/cli/tap-wspstat.c b/ui/cli/tap-wspstat.c
index 3f8c21c8b3..34300e1613 100644
--- a/ui/cli/tap-wspstat.c
+++ b/ui/cli/tap-wspstat.c
@@ -116,13 +116,13 @@ index2pdut(gint pdut)
return pdut + 81;
return 0;
}
-static int
+static tap_packet_status
wspstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri)
{
wspstat_t *sp = (wspstat_t *)psp;
const wsp_info_value_t *value = (const wsp_info_value_t *)pri;
gint idx = pdut2index(value->pdut);
- int retour = 0;
+ tap_packet_status retour = TAP_PACKET_DONT_REDRAW;
if (value->status_code != 0) {
wsp_status_code_t *sc;
@@ -140,14 +140,14 @@ wspstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const
} else {
sc->packets++;
}
- retour = 1;
+ retour = TAP_PACKET_REDRAW;
}
if (idx != 0) {
sp->pdu_stats[idx].packets++;
- retour = 1;
+ retour = TAP_PACKET_REDRAW;
}
return retour;
}