Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

libnl_2: Add nl_socket_set_cb() and nl_socket_get_cb()

Change-Id: Ibc2b4dc9528bd43d3fc85491c4838a33c916330e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
  • Loading branch information...
commit de92239055ac87e51ef7e868ed9697d038a72368 1 parent 984410a
Dmitry Shmidt authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 libnl_2/socket.c
View
12 libnl_2/socket.c
@@ -127,3 +127,15 @@ int nl_socket_get_fd(struct nl_sock *sk)
{
return sk->s_fd;
}
+
+void nl_socket_set_cb(struct nl_sock *sk, struct nl_cb *cb)
+{
+ nl_cb_put(sk->s_cb);
+ sk->s_cb = cb;
+ nl_cb_get(cb);
+}
+
+struct nl_cb *nl_socket_get_cb(struct nl_sock *sk)
+{
+ return nl_cb_get(sk->s_cb);
+}
Please sign in to comment.
Something went wrong with that request. Please try again.