aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter/dfilter-int.h
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dfilter/dfilter-int.h')
-rw-r--r--epan/dfilter/dfilter-int.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/epan/dfilter/dfilter-int.h b/epan/dfilter/dfilter-int.h
index ad38e368d6..7ad88f2280 100644
--- a/epan/dfilter/dfilter-int.h
+++ b/epan/dfilter/dfilter-int.h
@@ -43,8 +43,8 @@ struct epan_dfilter {
typedef struct {
/* Syntax Tree stuff */
stnode_t *st_root;
- gboolean syntax_error;
- gchar *error_message;
+ gboolean parse_failure;
+ df_error_t error;
GPtrArray *insns;
GHashTable *loaded_fields;
GHashTable *loaded_raw_fields;
@@ -55,7 +55,6 @@ typedef struct {
GHashTable *references; /* hfinfo -> pointer to array of references */
GHashTable *raw_references; /* hfinfo -> pointer to array of references */
char *expanded_text;
- stloc_t err_loc;
} dfwork_t;
/*
@@ -80,17 +79,17 @@ void Dfilter(void*, int, stnode_t*, dfwork_t*);
#define SCAN_FAILED -1 /* not 0, as that means end-of-input */
void
-dfilter_vfail(dfwork_t *dfw, stloc_t *err_loc,
+dfilter_vfail(dfwork_t *dfw, int code, stloc_t *err_loc,
const char *format, va_list args);
void
-dfilter_fail(dfwork_t *dfw, stloc_t *err_loc,
- const char *format, ...) G_GNUC_PRINTF(3, 4);
+dfilter_fail(dfwork_t *dfw, int code, stloc_t *err_loc,
+ const char *format, ...) G_GNUC_PRINTF(4, 5);
WS_NORETURN
void
-dfilter_fail_throw(dfwork_t *dfw, stloc_t *err_loc,
- const char *format, ...) G_GNUC_PRINTF(3, 4);
+dfilter_fail_throw(dfwork_t *dfw, int code, stloc_t *err_loc,
+ const char *format, ...) G_GNUC_PRINTF(4, 5);
void
dfw_set_error_location(dfwork_t *dfw, stloc_t *err_loc);
@@ -126,4 +125,13 @@ reference_new(const field_info *finfo, gboolean raw);
void
reference_free(df_reference_t *ref);
+void dfw_error_init(df_error_t *err);
+
+void dfw_error_clear(df_error_t *err);
+
+void dfw_error_set_msg(df_error_t **errp, const char *fmt, ...)
+G_GNUC_PRINTF(2, 3);
+
+void dfw_error_take(df_error_t **errp, df_error_t *src);
+
#endif