00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef NETLINK_LINK_INFO_API_H_
00013 #define NETLINK_LINK_INFO_API_H_
00014
00015 #include <netlink/netlink.h>
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021
00022
00023
00024
00025
00026 struct rtnl_link_info_ops
00027 {
00028
00029 char * io_name;
00030
00031
00032 int io_refcnt;
00033
00034
00035
00036
00037 int (*io_alloc)(struct rtnl_link *);
00038
00039
00040
00041
00042 int (*io_parse)(struct rtnl_link *,
00043 struct nlattr *,
00044 struct nlattr *);
00045
00046
00047
00048 int (*io_dump[NL_DUMP_MAX+1])(struct rtnl_link *,
00049 struct nl_dump_params *, int);
00050
00051
00052
00053 int (*io_clone)(struct rtnl_link *, struct rtnl_link *);
00054
00055
00056
00057 int (*io_put_attrs)(struct nl_msg *, struct rtnl_link *);
00058
00059
00060
00061 void (*io_free)(struct rtnl_link *);
00062
00063 struct rtnl_link_info_ops * io_next;
00064 };
00065
00066 extern struct rtnl_link_info_ops *rtnl_link_info_ops_lookup(const char *);
00067
00068 extern int rtnl_link_register_info(struct rtnl_link_info_ops *);
00069 extern int rtnl_link_unregister_info(struct rtnl_link_info_ops *);
00070
00071 #endif