summaryrefslogtreecommitdiff
path: root/tap-wspstat.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2010-11-03 18:28:35 +0000
committerBill Meier <wmeier@newsguy.com>2010-11-03 18:28:35 +0000
commit0ca948bacf0c180349c3a40b14e77b1d9ef738d7 (patch)
tree9b0cb0771383a2c43c39aea3d114cfbbb46b5820 /tap-wspstat.c
parentdffb55434c04d43a14b1c410da6c4442f194e118 (diff)
downloadwireshark-0ca948bacf0c180349c3a40b14e77b1d9ef738d7.tar.gz
Use value_string_ext fcns to access certain value_string arrays;
Some whitespace cleanup. svn path=/trunk/; revision=34763
Diffstat (limited to 'tap-wspstat.c')
-rw-r--r--tap-wspstat.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/tap-wspstat.c b/tap-wspstat.c
index ce1b87eaba..a318a81638 100644
--- a/tap-wspstat.c
+++ b/tap-wspstat.c
@@ -215,11 +215,12 @@ wspstat_draw(void *psp)
static void
wspstat_init(const char *optarg, void* userdata _U_)
{
- wspstat_t *sp;
- const char *filter=NULL;
- guint32 i;
- GString *error_string;
- wsp_status_code_t *sc;
+ wspstat_t *sp;
+ const char *filter=NULL;
+ guint32 i;
+ GString *error_string;
+ wsp_status_code_t *sc;
+ const value_string *wsp_vals_status_p;
if (!strncmp (optarg, "wsp,stat," , 9)){
filter=optarg+9;
@@ -230,14 +231,15 @@ wspstat_init(const char *optarg, void* userdata _U_)
sp = g_malloc( sizeof(wspstat_t) );
sp->hash = g_hash_table_new( g_int_hash, g_int_equal);
- for (i=0 ; wsp_vals_status[i].strptr ; i++ )
+ wsp_vals_status_p = VALUE_STRING_EXT_VS_P(&wsp_vals_status_ext);
+ for (i=0 ; wsp_vals_status_p[i].strptr ; i++ )
{
gint *key;
sc=g_malloc( sizeof(wsp_status_code_t) );
key=g_malloc( sizeof(gint) );
sc->packets=0;
- sc->name=wsp_vals_status[i].strptr;
- *key=wsp_vals_status[i].value;
+ sc->name=wsp_vals_status_p[i].strptr;
+ *key=wsp_vals_status_p[i].value;
g_hash_table_insert(
sp->hash,
key,
@@ -253,7 +255,7 @@ wspstat_init(const char *optarg, void* userdata _U_)
for (i=0;i<sp->num_pdus; i++)
{
sp->pdu_stats[i].packets=0;
- sp->pdu_stats[i].type = match_strval( index2pdut( i ), wsp_vals_pdu_type) ;
+ sp->pdu_stats[i].type = match_strval_ext( index2pdut( i ), &wsp_vals_pdu_type_ext) ;
}
error_string = register_tap_listener(