dect
/
libnl
Archived
13
0
Fork 0

Provide nl_object_dump_buf() to easily dump to buffers

This commit is contained in:
Thomas Graf 2011-04-10 10:22:01 +02:00
parent 2dbe7d7cfc
commit ef327ffd44
2 changed files with 11 additions and 0 deletions

View File

@ -36,6 +36,7 @@ extern void nl_object_put(struct nl_object *);
extern int nl_object_shared(struct nl_object *);
extern void nl_object_dump(struct nl_object *,
struct nl_dump_params *);
extern void nl_object_dump_buf(struct nl_object *, char *, size_t);
extern int nl_object_identical(struct nl_object *,
struct nl_object *);
extern uint32_t nl_object_diff(struct nl_object *,

View File

@ -250,6 +250,16 @@ void nl_object_dump(struct nl_object *obj, struct nl_dump_params *params)
dump_from_ops(obj, params);
}
void nl_object_dump_buf(struct nl_object *obj, char *buf, size_t len)
{
struct nl_dump_params dp = {
.dp_buf = buf,
.dp_buflen = len,
};
return nl_object_dump(obj, &dp);
}
/**
* Check if the identifiers of two objects are identical
* @arg a an object