12 #ifndef NETLINK_OBJECT_API_H_
13 #define NETLINK_OBJECT_API_H_
15 #include <netlink/netlink.h>
16 #include <netlink/utils.h>
188 #define NLHDR_COMMON \
190 struct nl_object_ops * ce_ops; \
191 struct nl_cache * ce_cache; \
192 struct nl_list_head ce_list; \
205 #define AVAILABLE(A, B, ATTR) (((A)->ce_mask & (B)->ce_mask) & (ATTR))
222 #define ATTR_MISMATCH(A, B, ATTR, EXPR) (!AVAILABLE(A, B, ATTR) || (EXPR))
245 #define ATTR_DIFF(LIST, ATTR, A, B, EXPR) \
247 if (((LIST) & (ATTR)) && ATTR_MISMATCH(A, B, ATTR, EXPR)) \
267 uint32_t oo_id_attrs;
296 int (*
oo_clone)(
struct nl_object *,
struct nl_object *);
307 int (*
oo_dump[NL_DUMP_MAX+1])(
struct nl_object *,
325 char *(*oo_attrs2str)(int,
char *, size_t);
void(* oo_constructor)(struct nl_object *)
Constructor function.
size_t oo_size
Size of object including its header.
void(* oo_free_data)(struct nl_object *)
Destructor function.
int(* oo_dump[NL_DUMP_MAX+1])(struct nl_object *, struct nl_dump_params *)
Dumping functions.
int(* oo_compare)(struct nl_object *, struct nl_object *, uint32_t, int)
Comparison function.
int(* oo_clone)(struct nl_object *, struct nl_object *)
Cloning function.
char * oo_name
Unique name of object type.