diff options
author | Thomas Graf <tgraf@redhat.com> | 2012-11-08 20:17:32 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@redhat.com> | 2012-11-08 20:17:32 (GMT) |
commit | 665464cde54e9c31f0efa67799b3d4f254a072e2 (patch) | |
tree | 7262cd9ccd2117babcb3b51700e6af8ed18354ca /lib/nl.c | |
parent | b28c25eb236c535017a0d17ceca02f277e20953f (diff) | |
download | libnl-665464cde54e9c31f0efa67799b3d4f254a072e2.zip libnl-665464cde54e9c31f0efa67799b3d4f254a072e2.tar.gz libnl-665464cde54e9c31f0efa67799b3d4f254a072e2.tar.bz2 |
nl: Improve API doc of nl_send_simple()
Signed-off-by: Thomas Graf <tgraf@redhat.com>
Diffstat (limited to 'lib/nl.c')
-rw-r--r-- | lib/nl.c | 27 |
1 files changed, 16 insertions, 11 deletions
@@ -479,18 +479,24 @@ int nl_send_sync(struct nl_sock *sk, struct nl_msg *msg) } /** - * Send simple netlink message using nl_send_auto_complete() - * @arg sk Netlink socket. - * @arg type Netlink message type. - * @arg flags Netlink message flags. - * @arg buf Data buffer. - * @arg size Size of data buffer. + * Construct and transmit a Netlink message + * @arg sk Netlink socket (required) + * @arg type Netlink message type (required) + * @arg flags Netlink message flags (optional) + * @arg buf Data buffer (optional) + * @arg size Size of data buffer (optional) * - * Builds a netlink message with the specified type and flags and - * appends the specified data as payload to the message. + * Allocates a new Netlink message based on `type` and `flags`. If `buf` + * points to payload of length `size` that payload will be appended to the + * message. + * + * Sends out the message using `nl_send_auto()` and frees the message + * afterwards. + * + * @see nl_send_auto() * - * @see nl_send_auto_complete() * @return Number of characters sent on success or a negative error code. + * @retval -NLE_NOMEM Unable to allocate Netlink message */ int nl_send_simple(struct nl_sock *sk, int type, int flags, void *buf, size_t size) @@ -507,9 +513,8 @@ int nl_send_simple(struct nl_sock *sk, int type, int flags, void *buf, if (err < 0) goto errout; } - - err = nl_send_auto_complete(sk, msg); + err = nl_send_auto(sk, msg); errout: nlmsg_free(msg); |