From ec16b9d47cacb0d873ee0ff80c919f49215c0005 Mon Sep 17 00:00:00 2001 From: "Mike J. Chen" Date: Thu, 23 Jun 2011 14:55:28 -0700 Subject: Revert "Revert "Add NETLINK_ROUTE processing to the netlink client code, so that Ethernet"" This reverts commit 1d504eeb50d980c222572629383bb76315f32ca0. Conflicts: libsysutils/src/NetlinkEvent.cpp Bring back the changes from Stan Chesnutt regarding adding NETLINK_ROUTE processing. The original commit message description was: Add NETLINK_ROUTE processing to the netlink client code, so that Ethernet physical-layer up/down events can be tracked. Upper layers will use these events to enable/disable Ethernet connectivity. The original change was reverted due to an incompatiblity with Motorola's ril.so binary. I'll submit a patch to workaround that incompatiblity separately. Change-Id: I4e97ac98833b10543e654c63ecae3b9b8c7db44f Signed-off-by: Mike J. Chen --- include/sysutils/NetlinkEvent.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/sysutils/NetlinkEvent.h') diff --git a/include/sysutils/NetlinkEvent.h b/include/sysutils/NetlinkEvent.h index b329b09..1ee9849 100644 --- a/include/sysutils/NetlinkEvent.h +++ b/include/sysutils/NetlinkEvent.h @@ -30,17 +30,23 @@ public: const static int NlActionAdd; const static int NlActionRemove; const static int NlActionChange; + const static int NlActionLinkDown; + const static int NlActionLinkUp; NetlinkEvent(); virtual ~NetlinkEvent(); - bool decode(char *buffer, int size); + bool decode(char *buffer, int size, int format); const char *findParam(const char *paramName); const char *getSubsystem() { return mSubsystem; } int getAction() { return mAction; } void dump(); + + protected: + bool parseBinaryNetlinkMessage(char *buffer, int size); + bool parseAsciiNetlinkMessage(char *buffer, int size); }; #endif -- cgit v1.1