+gboolean lttv_apply_op_eq_double(const gpointer v1, LttvFieldValue v2) {
+ double* r = (double*) v1;
+ return (*r == v2.v_double);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_eq_string(gpointer,LttvFieldValue)
+ *
+ * Applies the 'equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_eq_string(const gpointer v1, LttvFieldValue v2) {
+ char* r = (char*) v1;
+ return (!g_strcasecmp(r,v2.v_string));
+}
+
+/**
+ * @fn gboolean lttv_apply_op_eq_quark(gpointer,LttvFieldValue)
+ *
+ * Applies the 'equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_eq_quark(const gpointer v1, LttvFieldValue v2) {
+ GQuark* r = (GQuark*) v1;
+// g_print("v1:%i v2:%i\n",*r,v2.v_uint32);
+ return (*r == v2.v_uint32);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_eq_ltttime(gpointer,LttvFieldValue)
+ *
+ * Applies the 'equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_eq_ltttime(const gpointer v1, LttvFieldValue v2) {
+ LttTime* r = (LttTime*) v1;
+ return ltt_time_compare(*r, v2.v_ltttime)==0?1:0;
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ne_uint(gpointer,LttvFieldValue)
+ *
+ * Applies the 'not equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ne_uint(const gpointer v1, LttvFieldValue v2) {
+ guint* r = (guint*) v1;
+ return (*r != v2.v_uint);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ne_uint64(gpointer,LttvFieldValue)
+ *
+ * Applies the 'not equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ne_uint64(const gpointer v1, LttvFieldValue v2) {
+ guint64* r = (guint64*) v1;
+ return (*r != v2.v_uint64);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ne_uint32(gpointer,LttvFieldValue)
+ *
+ * Applies the 'not equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ne_uint32(const gpointer v1, LttvFieldValue v2) {
+ guint32* r = (guint32*) v1;
+ return (*r != v2.v_uint32);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ne_uint16(gpointer,LttvFieldValue)
+ *
+ * Applies the 'not equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ne_uint16(const gpointer v1, LttvFieldValue v2) {
+ guint16* r = (guint16*) v1;
+ return (*r != v2.v_uint16);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ne_double(gpointer,LttvFieldValue)
+ *
+ * Applies the 'not equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ne_double(const gpointer v1, LttvFieldValue v2) {
+ double* r = (double*) v1;
+ return (*r != v2.v_double);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ne_string(gpointer,LttvFieldValue)
+ *
+ * Applies the 'not equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ne_string(const gpointer v1, LttvFieldValue v2) {
+ char* r = (char*) v1;
+ return (g_strcasecmp(r,v2.v_string));
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ne_quark(gpointer,LttvFieldValue)
+ *
+ * Applies the 'not equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ne_quark(const gpointer v1, LttvFieldValue v2) {
+ GQuark* r = (GQuark*) v1;
+ return (*r != v2.v_uint32);
+}
+
+
+/**
+ * @fn gboolean lttv_apply_op_ne_ltttime(gpointer,LttvFieldValue)
+ *
+ * Applies the 'not equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ne_ltttime(const gpointer v1, LttvFieldValue v2) {
+ LttTime* r = (LttTime*) v1;
+ return ltt_time_compare(*r, v2.v_ltttime)!=0?1:0;
+}
+
+/**
+ * @fn gboolean lttv_apply_op_lt_uint(gpointer,LttvFieldValue)
+ *
+ * Applies the 'lower than' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_lt_uint(const gpointer v1, LttvFieldValue v2) {
+ guint* r = (guint*) v1;
+ return (*r < v2.v_uint);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_lt_uint64(gpointer,LttvFieldValue)
+ *
+ * Applies the 'lower than' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_lt_uint64(const gpointer v1, LttvFieldValue v2) {
+ guint64* r = (guint64*) v1;
+ return (*r < v2.v_uint64);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_lt_uint32(gpointer,LttvFieldValue)
+ *
+ * Applies the 'lower than' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_lt_uint32(const gpointer v1, LttvFieldValue v2) {
+ guint32* r = (guint32*) v1;
+ return (*r < v2.v_uint32);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_lt_uint16(gpointer,LttvFieldValue)
+ *
+ * Applies the 'lower than' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_lt_uint16(const gpointer v1, LttvFieldValue v2) {
+ guint16* r = (guint16*) v1;
+ return (*r < v2.v_uint16);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_lt_double(gpointer,LttvFieldValue)
+ *
+ * Applies the 'lower than' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_lt_double(const gpointer v1, LttvFieldValue v2) {
+ double* r = (double*) v1;
+ return (*r < v2.v_double);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_lt_ltttime(gpointer,LttvFieldValue)
+ *
+ * Applies the 'lower than' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_lt_ltttime(const gpointer v1, LttvFieldValue v2) {
+ LttTime* r = (LttTime*) v1;
+// return ((r->tv_sec < v2.v_ltttime.tv_sec) || ((r->tv_sec == v2.v_ltttime.tv_sec) && (r->tv_nsec < v2.v_ltttime.tv_nsec)));
+ return ltt_time_compare(*r, v2.v_ltttime)==-1?1:0;
+}
+
+/**
+ * @fn gboolean lttv_apply_op_le_uint(gpointer,LttvFieldValue)
+ *
+ * Applies the 'lower or equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_le_uint(const gpointer v1, LttvFieldValue v2) {
+ guint* r = (guint*) v1;
+ return (*r <= v2.v_uint);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_le_uint64(gpointer,LttvFieldValue)
+ *
+ * Applies the 'lower or equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_le_uint64(const gpointer v1, LttvFieldValue v2) {
+ guint64* r = (guint64*) v1;
+ return (*r <= v2.v_uint64);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_le_uint32(gpointer,LttvFieldValue)
+ *
+ * Applies the 'lower or equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_le_uint32(const gpointer v1, LttvFieldValue v2) {
+ guint32* r = (guint32*) v1;
+ return (*r <= v2.v_uint32);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_le_uint16(gpointer,LttvFieldValue)
+ *
+ * Applies the 'lower or equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_le_uint16(const gpointer v1, LttvFieldValue v2) {
+ guint16* r = (guint16*) v1;
+ return (*r <= v2.v_uint16);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_le_double(gpointer,LttvFieldValue)
+ *
+ * Applies the 'lower or equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_le_double(const gpointer v1, LttvFieldValue v2) {
+ double* r = (double*) v1;
+ return (*r <= v2.v_double);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_le_ltttime(gpointer,LttvFieldValue)
+ *
+ * Applies the 'lower or equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_le_ltttime(const gpointer v1, LttvFieldValue v2) {
+ LttTime* r = (LttTime*) v1;
+// return ((r->tv_sec < v2.v_ltttime.tv_sec) || ((r->tv_sec == v2.v_ltttime.tv_sec) && (r->tv_nsec <= v2.v_ltttime.tv_nsec)));
+ return ltt_time_compare(*r, v2.v_ltttime)<1?1:0;
+}
+
+
+/**
+ * @fn gboolean lttv_apply_op_gt_uint(gpointer,LttvFieldValue)
+ *
+ * Applies the 'greater than' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_gt_uint(const gpointer v1, LttvFieldValue v2) {
+ guint* r = (guint*) v1;
+ return (*r > v2.v_uint);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_gt_uint64(gpointer,LttvFieldValue)
+ *
+ * Applies the 'greater than' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_gt_uint64(const gpointer v1, LttvFieldValue v2) {
+ guint64* r = (guint64*) v1;
+ return (*r > v2.v_uint64);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_gt_uint32(gpointer,LttvFieldValue)
+ *
+ * Applies the 'greater than' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_gt_uint32(const gpointer v1, LttvFieldValue v2) {
+ guint32* r = (guint32*) v1;
+ return (*r > v2.v_uint32);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_gt_uint16(gpointer,LttvFieldValue)
+ *
+ * Applies the 'greater than' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_gt_uint16(const gpointer v1, LttvFieldValue v2) {
+ guint16* r = (guint16*) v1;
+ return (*r > v2.v_uint16);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_gt_double(gpointer,LttvFieldValue)
+ *
+ * Applies the 'greater than' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_gt_double(const gpointer v1, LttvFieldValue v2) {
+ double* r = (double*) v1;
+ return (*r > v2.v_double);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_gt_ltttime(gpointer,LttvFieldValue)
+ *
+ * Applies the 'greater than' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_gt_ltttime(const gpointer v1, LttvFieldValue v2) {
+ LttTime* r = (LttTime*) v1;
+// return ((r->tv_sec > v2.v_ltttime.tv_sec) || ((r->tv_sec == v2.v_ltttime.tv_sec) && (r->tv_nsec > v2.v_ltttime.tv_nsec)));
+ return ltt_time_compare(*r, v2.v_ltttime)==1?1:0;
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ge_uint(gpointer,LttvFieldValue)
+ *
+ * Applies the 'greater or equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ge_uint(const gpointer v1, LttvFieldValue v2) {
+ guint* r = (guint*) v1;
+ return (*r >= v2.v_uint);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ge_uint64(gpointer,LttvFieldValue)
+ *
+ * Applies the 'greater or equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ge_uint64(const gpointer v1, LttvFieldValue v2) {
+ guint64* r = (guint64*) v1;
+ return (*r >= v2.v_uint64);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ge_uint32(gpointer,LttvFieldValue)
+ *
+ * Applies the 'greater or equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ge_uint32(const gpointer v1, LttvFieldValue v2) {
+ guint32* r = (guint32*) v1;
+ return (*r >= v2.v_uint32);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ge_uint16(gpointer,LttvFieldValue)
+ *
+ * Applies the 'greater or equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ge_uint16(const gpointer v1, LttvFieldValue v2) {
+ guint16* r = (guint16*) v1;
+ return (*r >= v2.v_uint16);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ge_double(gpointer,LttvFieldValue)
+ *
+ * Applies the 'greater or equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ge_double(const gpointer v1, LttvFieldValue v2) {
+ double* r = (double*) v1;
+ return (*r >= v2.v_double);
+}
+
+/**
+ * @fn gboolean lttv_apply_op_ge_ltttime(gpointer,LttvFieldValue)
+ *
+ * Applies the 'greater or equal' operator to the
+ * specified structure and value
+ * @param v1 left member of comparison
+ * @param v2 right member of comparison
+ * @return success/failure of operation
+ */
+gboolean lttv_apply_op_ge_ltttime(const gpointer v1, LttvFieldValue v2) {
+ LttTime* r = (LttTime*) v1;
+// return ((r->tv_sec > v2.v_ltttime.tv_sec) || ((r->tv_sec == v2.v_ltttime.tv_sec) && (r->tv_nsec >= v2.v_ltttime.tv_nsec)));
+ return ltt_time_compare(*r, v2.v_ltttime)>-1?1:0;
+}
+
+
+
+/**
+ * Makes a copy of the current filter tree
+ * @param tree pointer to the current tree
+ * @return new copy of the filter tree
+ */
+LttvFilterTree*
+lttv_filter_tree_clone(const LttvFilterTree* tree) {
+
+ LttvFilterTree* newtree = lttv_filter_tree_new();