diff options
author | Thomas Graf <tgraf@suug.ch> | 2011-04-10 08:22:01 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2011-04-10 08:22:01 (GMT) |
commit | ef327ffd44dbef02446255fe370d91e256ad927b (patch) | |
tree | 661ca161f301660764cea167ddbce0011fa60c8a /lib | |
parent | 2dbe7d7cfc591e4e279f91409dca92f235b92c1b (diff) | |
download | libnl-ef327ffd44dbef02446255fe370d91e256ad927b.zip libnl-ef327ffd44dbef02446255fe370d91e256ad927b.tar.gz libnl-ef327ffd44dbef02446255fe370d91e256ad927b.tar.bz2 |
Provide nl_object_dump_buf() to easily dump to buffers
Diffstat (limited to 'lib')
-rw-r--r-- | lib/object.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/object.c b/lib/object.c index 4a1b356..3bf02ea 100644 --- a/lib/object.c +++ b/lib/object.c @@ -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 |