aboutsummaryrefslogtreecommitdiffstats
path: root/epan/uat-int.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-04-22 02:10:49 +0000
committerMichael Mann <mmann78@netscape.net>2013-04-22 02:10:49 +0000
commit4a1bd75b60171d781dc9f2d3ffd6d498acc74b1a (patch)
tree496db09db3b0ebcf10e9e43d19d804cd14b94a58 /epan/uat-int.h
parent6ea50c8d2e0a70acd6d7c759a54276c852081172 (diff)
Add a "hidden" array of UAT entry data to allow separation between UAT file syntax errors and "syntactically correct, but invalid field". Now UAT files load all entries into the "hidden" array (raw_data), but only adds valid ones to the user_data, which is used by the dissectors.
This is a start to fixing bug 7471 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7471) and is being committed to get the new ABI/API in before the 1.10 release. What remains is the "GUI portion" (GTK+qt) to indicate to users which UAT entries are invalid. svn path=/trunk/; revision=48960
Diffstat (limited to 'epan/uat-int.h')
-rw-r--r--epan/uat-int.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/uat-int.h b/epan/uat-int.h
index e079de256a..6097e47d6b 100644
--- a/epan/uat-int.h
+++ b/epan/uat-int.h
@@ -63,6 +63,8 @@ struct _uat_t {
uat_field_t* fields;
guint ncols;
GArray* user_data;
+ GArray* raw_data;
+ GArray* valid_data;
gboolean changed;
uat_rep_t* rep;
uat_rep_free_cb_t free_rep;
@@ -77,7 +79,7 @@ void uat_init(void);
void uat_reset(void);
WS_DLL_PUBLIC
-void* uat_add_record(uat_t*, const void* orig_rec_ptr);
+void* uat_add_record(uat_t*, const void* orig_rec_ptr, gboolean valid_rec);
WS_DLL_PUBLIC
void uat_swap(uat_t*, guint idx_a, guint idx_b);
@@ -96,7 +98,8 @@ gboolean uat_save(uat_t* , const char** );
void uat_load_all(void);
#define UAT_UPDATE(uat) do { *((uat)->user_ptr) = (void*)((uat)->user_data->data); *((uat)->nrows_p) = (uat)->user_data->len; } while(0)
-#define UAT_INDEX_PTR(uat,idx) (uat->user_data->data + (uat->record_size * (idx)))
+#define UAT_INDEX_PTR(uat,idx) (uat->raw_data->data + (uat->record_size * (idx)))
+#define UAT_USER_INDEX_PTR(uat,idx) (uat->user_data->data + (uat->record_size * (idx)))
#endif
/*