2 * netlink/route/classifier-modules.h Classifier Module API
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation version 2.1
9 * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch>
12 #ifndef NETLINK_CLASS_MODULES_H_
13 #define NETLINK_CLASS_MODULES_H_
15 #include <netlink/netlink.h>
22 * Classifier operations
28 * Name of classifier module
34 * Size of private classifier data
41 void (*co_dump[NL_DUMP_MAX+1])(struct rtnl_cls *,
42 struct nl_dump_params *);
44 * Must return the contents supposed to be in TCA_OPTIONS
46 int (*co_get_opts)(struct rtnl_cls *, struct nl_msg *);
49 * TCA_OPTIONS message parser
51 int (*co_msg_parser)(struct rtnl_cls *);
54 * Called before a class object gets destroyed
56 void (*co_free_data)(struct rtnl_cls *);
59 * Called whenever a classifier object needs to be cloned
61 int (*co_clone)(struct rtnl_cls *, struct rtnl_cls *);
64 * INTERNAL (Do not use)
66 struct rtnl_cls_ops *co_next;
69 extern int rtnl_cls_register(struct rtnl_cls_ops *);
70 extern int rtnl_cls_unregister(struct rtnl_cls_ops *);
71 extern struct rtnl_cls_ops * rtnl_cls_lookup_ops(struct rtnl_cls *);
72 extern struct rtnl_cls_ops * __rtnl_cls_lookup_ops(const char *kind);