diff options
author | Thomas Graf <tgraf@suug.ch> | 2010-11-18 13:13:49 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2010-11-18 13:13:49 (GMT) |
commit | 8a365dbd49f558a61ae2f2de16b62afaa4bc2b79 (patch) | |
tree | 0029fdc87f7daa5c6283d368eefa0e88f3e9b342 /lib/nl.c | |
parent | 063a2ebf5350699406f49036756295eddc74547b (diff) | |
download | libnl-8a365dbd49f558a61ae2f2de16b62afaa4bc2b79.zip libnl-8a365dbd49f558a61ae2f2de16b62afaa4bc2b79.tar.gz libnl-8a365dbd49f558a61ae2f2de16b62afaa4bc2b79.tar.bz2 |
rename nl_send_auto_complete() -> nl_send_auto(), nl_auto_complete -> nl_complete_msg()
Old symbols left to maintain backwards compatibility
Diffstat (limited to 'lib/nl.c')
-rw-r--r-- | lib/nl.c | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -288,7 +288,7 @@ int nl_send(struct nl_sock *sk, struct nl_msg *msg) return nl_send_iovec(sk, msg, &iov, 1); } -void nl_auto_complete(struct nl_sock *sk, struct nl_msg *msg) +void nl_complete_msg(struct nl_sock *sk, struct nl_msg *msg) { struct nlmsghdr *nlh; @@ -308,11 +308,19 @@ void nl_auto_complete(struct nl_sock *sk, struct nl_msg *msg) nlh->nlmsg_flags |= NLM_F_ACK; } +void nl_auto_complete(struct nl_sock *sk, struct nl_msg *msg) +{ + nl_complete_msg(sk, msg); +} + /** - * Send netlink message and check & extend header values as needed. + * Automatically complete and send a netlink message * @arg sk Netlink socket. * @arg msg Netlink message to be sent. * + * This function takes a netlink message and passes it on to + * nl_auto_complete() for completion. + * * Checks the netlink message \c nlh for completness and extends it * as required before sending it out. Checked fields include pid, * sequence nr, and flags. @@ -320,11 +328,11 @@ void nl_auto_complete(struct nl_sock *sk, struct nl_msg *msg) * @see nl_send() * @return Number of characters sent or a negative error code. */ -int nl_send_auto_complete(struct nl_sock *sk, struct nl_msg *msg) +int nl_send_auto(struct nl_sock *sk, struct nl_msg *msg) { struct nl_cb *cb = sk->s_cb; - nl_auto_complete(sk, msg); + nl_complete_msg(sk, msg); if (cb->cb_send_ow) return cb->cb_send_ow(sk, msg); @@ -332,6 +340,11 @@ int nl_send_auto_complete(struct nl_sock *sk, struct nl_msg *msg) return nl_send(sk, msg); } +int nl_send_auto_complete(struct nl_sock *sk, struct nl_msg *msg) +{ + return nl_send_auto(sk, msg); +} + /** * Send simple netlink message using nl_send_auto_complete() * @arg sk Netlink socket. |