00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef NETLINK_GENL_MNGT_H_
00013 #define NETLINK_GENL_MNGT_H_
00014
00015 #include <netlink/netlink.h>
00016 #include <netlink/attr.h>
00017 #include <netlink/list.h>
00018
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022
00023 struct nl_cache_ops;
00024
00025
00026
00027
00028
00029 struct genl_cmd
00030 {
00031
00032 int c_id;
00033
00034
00035 char * c_name;
00036
00037
00038
00039
00040
00041 int c_maxattr;
00042
00043 int (*c_msg_parser)(struct nl_cache_ops *,
00044 struct genl_cmd *,
00045 struct genl_info *, void *);
00046
00047
00048
00049
00050 struct nla_policy * c_attr_policy;
00051 };
00052
00053
00054
00055
00056
00057 struct genl_ops
00058 {
00059 int o_family;
00060 int o_id;
00061 char * o_name;
00062 struct nl_cache_ops * o_cache_ops;
00063 struct genl_cmd * o_cmds;
00064 int o_ncmds;
00065
00066
00067 struct nl_list_head o_list;
00068 };
00069
00070
00071 extern int genl_register(struct nl_cache_ops *);
00072 extern void genl_unregister(struct nl_cache_ops *);
00073
00074 #ifdef __cplusplus
00075 }
00076 #endif
00077
00078 #endif