shill: Add message-specific callbacks to the nl80211 code.
This allows users to create a one-off nl80211 message, install a
callback for that message, and then send the message to the kernel.
When the response is issued, the callback will be called and then
removed from the system.
BUG=chromium-os:35129
TEST=Manual and unit tests (including new ones).
Change-Id: I06bf8d16629f3eac226209b49827289e7a9cdca3
Reviewed-on: https://gerrit.chromium.org/gerrit/36904
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Ready: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
diff --git a/netlink_socket.h b/netlink_socket.h
index 0db5c3a..6f0d60e 100644
--- a/netlink_socket.h
+++ b/netlink_socket.h
@@ -116,9 +116,9 @@
// function if NULL).
virtual bool GetMessagesUsingCallback(NetlinkSocket::Callback *callback);
- virtual unsigned int GetSequenceNumber() {
- return nl_socket_use_seq(nl_sock_);
- }
+ // Get the next message sequence number for this socket. Disallow zero so
+ // that we can use that as the 'broadcast' sequence number.
+ virtual unsigned int GetSequenceNumber();
// This method is called |callback_function| to differentiate it from the
// 'callback' method in KernelBoundNlMessage since they return different