Add WakeupController and NFLogListener
These classes work together to parse and dispatch NFLOG messages in
response to inbound packets annotated by the WiFi driver.
Test: as follows
- built
- flashed
- booted
- netd_unit_test passes
Change-Id: Id26d62858bf4bc4186ae66850f08077adf6fc2ac
diff --git a/libnetdutils/Status.cpp b/libnetdutils/Status.cpp
index 9df2367..e36889b 100644
--- a/libnetdutils/Status.cpp
+++ b/libnetdutils/Status.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <sstream>
#include "netdutils/Status.h"
#include "android-base/stringprintf.h"
@@ -28,6 +29,12 @@
return Status(err, base::StringPrintf("%d : [%s] : %s", err, strerror(err), msg.c_str()));
}
+std::string toString(const Status status) {
+ std::stringstream ss;
+ ss << status;
+ return ss.str();
+}
+
std::ostream& operator<<(std::ostream& os, const Status& s) {
return os << "Status[code: " << s.code() << ", msg: " << s.msg() << "]";
}