Object Operations. More...
|Unique name of object type. |
|Size of object including its header. |
|void(*||oo_constructor )(struct nl_object *)|
|Constructor function. |
|void(*||oo_free_data )(struct nl_object *)|
|Destructor function. |
|int(*||oo_clone )(struct nl_object *, struct nl_object *)|
|Cloning function. |
|void(*||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_update )(struct nl_object *, struct nl_object *)|
|update function |
|void(*||oo_keygen )(struct nl_object *, uint32_t *, uint32_t)|
|Hash Key generator function. |
|char *(*||oo_attrs2str )(int, char *, size_t)|
|uint32_t(*||oo_id_attrs_get )(struct nl_object *)|
|Get key attributes by family function. |
|void(* nl_object_ops::oo_constructor)(struct nl_object *)|
|void(* nl_object_ops::oo_free_data)(struct nl_object *)|
Will be called when an object needs to be cloned. Please note that the generic object code will make an exact copy of the object first, therefore you only need to take care of members which require reference counting etc.
May return a negative error code to abort cloning.
Referenced by nl_object_clone().
Will be called when two objects of the same type are compared. It takes the two objects in question, an object specific bitmask defining which attributes should be compared and flags to control the behaviour.
The function must return a bitmask with the relevant bit set for each attribute that mismatches.
Will be called when the object given by first argument needs to be updated with the contents of the second object
The function must return 0 for success and error for failure to update. In case of failure its assumed that the original object is not touched
Referenced by nl_object_update().
|void(* nl_object_ops::oo_keygen)(struct nl_object *, uint32_t *, uint32_t)|
Hash Key generator function.
When called returns a hash key for the object being referenced. This key will be used by higher level hash functions to build association lists. Each object type gets to specify it's own key formulation