/* Nothing. Simply nothing. */
T_VOID = 0,
+ T_NONE = 1, /* Special hack to represent missing arguments */
+
/* User visible types, which fit in int */
T_INT = 0x10,
T_BOOL = 0x11,
T_LCLIST = 0x29, /* Large community list */
T_RD = 0x2a, /* Route distinguisher for VPN addresses */
T_PATH_MASK_ITEM = 0x2b, /* Path mask item for path mask constructors */
+ T_BYTESTRING = 0x2c,
T_SET = 0x80,
T_PREFIX_SET = 0x81,
} PACKED;
+struct f_method {
+ struct symbol *sym;
+ struct f_inst *(*new_inst)(struct f_inst *obj, struct f_inst *args);
+ const struct f_method *next;
+ uint arg_num;
+ enum f_type args_type[];
+};
+
/* Filter value; size of this affects filter memory consumption */
struct f_val {
enum f_type type; /* T_* */
ip_addr ip;
const net_addr *net;
const char *s;
+ const struct bytestring *bs;
const struct f_tree *t;
const struct f_trie *ti;
const struct adata *ad;
#define F_CMP_ERROR 999
const char *f_type_name(enum f_type t);
-
enum f_type f_type_element_type(enum f_type t);
+struct sym_scope *f_type_method_scope(enum f_type t);
int val_same(const struct f_val *v1, const struct f_val *v2);
int val_compare(const struct f_val *v1, const struct f_val *v2);
(v.val.ad == &null_adata);
}
-extern const struct f_val f_const_empty_path, f_const_empty_clist, f_const_empty_eclist, f_const_empty_lclist, f_const_empty_prefix_set;
+extern const struct f_val f_const_empty_prefix_set;
enum filter_return f_eval(const struct f_line *expr, struct linpool *tmp_pool, struct f_val *pres);