aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ncp-int.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-09-18 15:39:37 -0400
committerAnders Broman <a.broman58@gmail.com>2015-09-19 08:15:10 +0000
commit38b6f306a70905be8b29ffaeb75288d315ff9b04 (patch)
tree465636f2854a1421bb13a75433d274ad9d3be7f0 /epan/dissectors/packet-ncp-int.h
parent2758114e0af437b51727f12a497e30347bb2cf9a (diff)
Refactor NCP Python data so that INFO column can be generated on the fly.
The "old" method of populating the INFO column was to dissect all fields of a function/subfunction, then do a search in the tree to find the hf_ values of interest to then format into something for the INFO column. This is very expensive and requires "low level" APIs (for tree manipulation) which really shouldn't be used in a dissector. The "new" method populates the INFO column at the same time a field is parsed, so nothing has to be revisited. There are still expert infos (and possibly column APIs) under if (tree)s, but with the FAKE_TREE_IS_VISIBLE "hacks" removed, there should be less fear in removing the tree checks. Change-Id: I847827395fc28704f468df8bc8b47b297dde8479 Reviewed-on: https://code.wireshark.org/review/10572 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ncp-int.h')
-rw-r--r--epan/dissectors/packet-ncp-int.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/epan/dissectors/packet-ncp-int.h b/epan/dissectors/packet-ncp-int.h
index 816f467cac..9f6778afa0 100644
--- a/epan/dissectors/packet-ncp-int.h
+++ b/epan/dissectors/packet-ncp-int.h
@@ -34,10 +34,17 @@
typedef struct _ptvc_record ptvc_record;
typedef struct _sub_ptvc_record sub_ptvc_record;
+typedef struct {
+ int *hf_ptr;
+ const char *first_string;
+ const char *repeat_string;
+} info_string_t;
+
struct _ptvc_record {
int *hf_ptr;
gint length;
const sub_ptvc_record *sub_ptvc_rec;
+ const info_string_t *req_info_str;
unsigned int endianness;
unsigned int var_index : 2;
unsigned int repeat_index : 2;
@@ -80,13 +87,6 @@ typedef struct {
struct epan_dfilter *dfilter;
} conditional_record;
-typedef struct {
- int *hf_ptr;
- const char *first_string;
- const char *repeat_string;
-} info_string_t;
-
-
struct novell_tap {
int stat;
int hdr;
@@ -113,7 +113,6 @@ typedef struct _ncp_record {
const error_equivalency *errors;
const int *req_cond_indexes;
unsigned int req_cond_size_type;
- const info_string_t *req_info_str;
ncp_expert_handler *expert_handler_func;
} ncp_record;