00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef NETLINK_OBJECT_H_
00013 #define NETLINK_OBJECT_H_
00014
00015 #include <netlink/netlink.h>
00016 #include <netlink/utils.h>
00017
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021
00022 struct nl_cache;
00023 struct nl_object;
00024 struct nl_object_ops;
00025
00026 #define OBJ_CAST(ptr) ((struct nl_object *) (ptr))
00027
00028
00029 extern struct nl_object * nl_object_alloc(struct nl_object_ops *);
00030 extern struct nl_object * nl_object_alloc_name(const char *);
00031 extern void nl_object_free(struct nl_object *);
00032 extern struct nl_object * nl_object_clone(struct nl_object *obj);
00033 extern void nl_object_get(struct nl_object *);
00034 extern void nl_object_put(struct nl_object *);
00035 extern int nl_object_shared(struct nl_object *);
00036 extern void nl_object_dump(struct nl_object *,
00037 struct nl_dump_params *);
00038 extern int nl_object_identical(struct nl_object *,
00039 struct nl_object *);
00040 extern uint32_t nl_object_diff(struct nl_object *,
00041 struct nl_object *);
00042 extern int nl_object_match_filter(struct nl_object *,
00043 struct nl_object *);
00044 extern char * nl_object_attrs2str(struct nl_object *,
00045 uint32_t attrs, char *buf,
00046 size_t);
00047 extern char * nl_object_attr_list(struct nl_object *,
00048 char *, size_t);
00049
00050
00051 extern void nl_object_mark(struct nl_object *);
00052 extern void nl_object_unmark(struct nl_object *);
00053 extern int nl_object_is_marked(struct nl_object *);
00054
00055
00056 extern int nl_object_get_refcnt(struct nl_object *);
00057 extern struct nl_cache * nl_object_get_cache(struct nl_object *);
00058 extern void * nl_object_priv(struct nl_object *);
00059
00060 #ifdef __cplusplus
00061 }
00062 #endif
00063
00064 #endif