00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef NETLINK_CLASS_MODULES_H_
00013 #define NETLINK_CLASS_MODULES_H_
00014
00015 #include <netlink/netlink.h>
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021
00022
00023
00024
00025 struct rtnl_cls_ops
00026 {
00027
00028
00029
00030 char co_kind[32];
00031
00032
00033
00034
00035 int (*co_dump[NL_DUMP_MAX+1])(struct rtnl_cls *,
00036 struct nl_dump_params *, int);
00037
00038
00039
00040 struct nl_msg *(*co_get_opts)(struct rtnl_cls *);
00041
00042
00043
00044
00045 int (*co_msg_parser)(struct rtnl_cls *);
00046
00047
00048
00049
00050 void (*co_free_data)(struct rtnl_cls *);
00051
00052
00053
00054
00055 int (*co_clone)(struct rtnl_cls *, struct rtnl_cls *);
00056
00057
00058
00059
00060 struct rtnl_cls_ops *co_next;
00061 };
00062
00063 extern int rtnl_cls_register(struct rtnl_cls_ops *);
00064 extern int rtnl_cls_unregister(struct rtnl_cls_ops *);
00065 extern struct rtnl_cls_ops * rtnl_cls_lookup_ops(struct rtnl_cls *);
00066 extern struct rtnl_cls_ops * __rtnl_cls_lookup_ops(const char *kind);
00067
00068 #ifdef __cplusplus
00069 }
00070 #endif
00071
00072 #endif