]> git.ipfire.org Git - thirdparty/libnl.git/commitdiff
rename nl_send_auto_complete() -> nl_send_auto(), nl_auto_complete -> nl_complete_msg()
authorThomas Graf <tgraf@suug.ch>
Thu, 18 Nov 2010 13:13:49 +0000 (14:13 +0100)
committerThomas Graf <tgraf@suug.ch>
Thu, 18 Nov 2010 13:13:49 +0000 (14:13 +0100)
Old symbols left to maintain backwards compatibility

include/netlink/netlink.h
lib/netfilter/queue_msg.c
lib/nl.c

index 1cfe220cc55991630d7d1fb5cd3495bcc75334a5..099a83e1e313094602d426c10336f9dbcff44db4 100644 (file)
@@ -52,8 +52,11 @@ extern int                   nl_sendmsg(struct nl_sock *, struct nl_msg *,
 extern int                     nl_send(struct nl_sock *, struct nl_msg *);
 extern int                     nl_send_iovec(struct nl_sock *, struct nl_msg *,
                                              struct iovec *, unsigned);
+extern void                    nl_complete_msg(struct nl_sock *,
+                                               struct nl_msg *);
 extern void                    nl_auto_complete(struct nl_sock *,
-                                                     struct nl_msg *);
+                                                struct nl_msg *);
+extern int                     nl_send_auto(struct nl_sock *, struct nl_msg *);
 extern int                     nl_send_auto_complete(struct nl_sock *,
                                                      struct nl_msg *);
 extern int                     nl_send_simple(struct nl_sock *, int, int,
index ab0a58be22c9cf796f2401f40e94eb8272e765b1..c40f8c216573221b439902200d06aa55f5754764 100644 (file)
@@ -249,7 +249,7 @@ int nfnl_queue_msg_send_verdict_payload(struct nl_sock *nlh,
        iov[2].iov_base = (void *) payload_data;
        iov[2].iov_len = NLA_ALIGN(payload_len);
 
-       nl_auto_complete(nlh, nlmsg);
+       nl_complete_msg(nlh, nlmsg);
        err = nl_send_iovec(nlh, nlmsg, iov, 3);
 
        nlmsg_free(nlmsg);
index d3fef04a2131877ca0a001649eab639ca0e99abb..cd6e6c725bc59db9ac4ffbcf5c60e908db1ddc9f 100644 (file)
--- a/lib/nl.c
+++ b/lib/nl.c
@@ -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.