12 #ifndef NETLINK_OBJECT_H_ 13 #define NETLINK_OBJECT_H_ 15 #include <netlink/netlink.h> 16 #include <netlink/utils.h> 26 #define OBJ_CAST(ptr) ((struct nl_object *) (ptr)) 45 uint32_t attrs,
char *buf,
56 extern int nl_object_get_refcnt(
struct nl_object *);
57 extern struct nl_cache * nl_object_get_cache(
struct nl_object *);
58 static inline void * nl_object_priv(
struct nl_object *obj)
char * nl_object_attr_list(struct nl_object *, char *, size_t)
Return list of attributes present in an object.
struct nl_object * nl_object_alloc(struct nl_object_ops *)
Allocate a new object of kind specified by the operations handle.
void nl_object_get(struct nl_object *)
Acquire a reference on a object.
int nl_object_shared(struct nl_object *)
Check whether this object is used by multiple users.
void nl_object_unmark(struct nl_object *)
Remove mark from object.
void nl_object_free(struct nl_object *)
Free a cacheable object.
void nl_object_dump(struct nl_object *, struct nl_dump_params *)
Dump this object according to the specified parameters.
void nl_object_put(struct nl_object *)
Release a reference from an object.
int nl_object_identical(struct nl_object *, struct nl_object *)
Check if the identifiers of two objects are identical.
struct nl_object * nl_object_alloc_name(const char *)
Allocate a new object of kind specified by the name.
int nl_object_match_filter(struct nl_object *, struct nl_object *)
Match a filter against an object.
void nl_object_mark(struct nl_object *)
Add mark to object.
struct nl_object * nl_object_clone(struct nl_object *obj)
Allocate a new object and copy all data from an existing object.
int nl_object_is_marked(struct nl_object *)
Return true if object is marked.
char * nl_object_attrs2str(struct nl_object *, uint32_t attrs, char *buf, size_t)
Convert bitmask of attributes to a character string.
uint32_t nl_object_diff(struct nl_object *, struct nl_object *)
Compute bitmask representing difference in attribute values.