summaryrefslogtreecommitdiffstats
path: root/include/sysutils/NetlinkEvent.h
diff options
context:
space:
mode:
authorMike J. Chen <mjchen@google.com>2011-06-23 14:55:28 -0700
committerMike J. Chen <mjchen@google.com>2011-06-23 18:59:45 -0700
commitec16b9d47cacb0d873ee0ff80c919f49215c0005 (patch)
tree001ba2be28407e94c0e295890764387a94404cec /include/sysutils/NetlinkEvent.h
parent9661a3aecd39cca95bd07253c52b99521409c147 (diff)
downloadsystem_core-ec16b9d47cacb0d873ee0ff80c919f49215c0005.zip
system_core-ec16b9d47cacb0d873ee0ff80c919f49215c0005.tar.gz
system_core-ec16b9d47cacb0d873ee0ff80c919f49215c0005.tar.bz2
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 <mjchen@google.com>
Diffstat (limited to 'include/sysutils/NetlinkEvent.h')
-rw-r--r--include/sysutils/NetlinkEvent.h8
1 files changed, 7 insertions, 1 deletions
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