2 * src/cls-utils.h Classifier Helpers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation version 2 of the License.
8 * Copyright (c) 2008-2009 Thomas Graf <tgraf@suug.ch>
11 #ifndef __CLS_UTILS_H_
12 #define __CLS_UTILS_H_
15 #include <netlink/route/classifier-modules.h>
16 #include <netlink/route/cls/ematch.h>
21 struct rtnl_cls_ops * ops;
22 void (*parse_argv)(struct rtnl_cls *, int, char **);
23 struct nl_list_head list;
26 extern struct cls_module *lookup_cls_mod(struct rtnl_cls_ops *);
27 extern void register_cls_module(struct cls_module *);
28 extern void unregister_cls_module(struct cls_module *);
33 struct rtnl_ematch_ops *ops;
34 void (*parse_argv)(struct rtnl_ematch *, int, char **);
35 struct nl_list_head list;
38 extern struct ematch_module *lookup_ematch_mod(struct rtnl_ematch_ops *);
39 extern void register_ematch_module(struct ematch_module *);
40 extern void unregister_ematch_module(struct ematch_module *);
42 extern struct rtnl_cls *nlt_alloc_cls(void);
43 extern void parse_dev(struct rtnl_cls *, struct nl_cache *, char *);
44 extern void parse_prio(struct rtnl_cls *, char *);
45 extern void parse_parent(struct rtnl_cls *, char *);
46 extern void parse_handle(struct rtnl_cls *, char *);
47 extern void parse_proto(struct rtnl_cls *, char *);
49 extern int parse_ematch_syntax(const char *, struct rtnl_ematch_tree **);