diff options
-rw-r--r-- | include/sysutils/NetlinkEvent.h | 13 | ||||
-rw-r--r-- | libsysutils/src/NetlinkEvent.cpp | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/include/sysutils/NetlinkEvent.h b/include/sysutils/NetlinkEvent.h index b80f3ea..a428d37 100644 --- a/include/sysutils/NetlinkEvent.h +++ b/include/sysutils/NetlinkEvent.h @@ -44,6 +44,19 @@ private: char *mParams[NL_PARAMS_MAX]; public: + // STOPSHIP: remove these deprecated constants once we have updated prebuilts + const static int NlActionUnknown; + const static int NlActionAdd; + const static int NlActionRemove; + const static int NlActionChange; + const static int NlActionLinkDown; + const static int NlActionLinkUp; + const static int NlActionAddressUpdated; + const static int NlActionAddressRemoved; + const static int NlActionRdnss; + const static int NlActionRouteUpdated; + const static int NlActionRouteRemoved; + NetlinkEvent(); virtual ~NetlinkEvent(); diff --git a/libsysutils/src/NetlinkEvent.cpp b/libsysutils/src/NetlinkEvent.cpp index ef30017..29a86d8 100644 --- a/libsysutils/src/NetlinkEvent.cpp +++ b/libsysutils/src/NetlinkEvent.cpp @@ -47,6 +47,19 @@ const int LOCAL_NFLOG_PACKET = NFNL_SUBSYS_ULOG << 8 | NFULNL_MSG_PACKET; #include <netlink/handlers.h> #include <netlink/msg.h> +// STOPSHIP: remove these deprecated constants once we have updated prebuilts +const int NetlinkEvent::NlActionUnknown = static_cast<int>(Action::kUnknown); +const int NetlinkEvent::NlActionAdd = static_cast<int>(Action::kAdd); +const int NetlinkEvent::NlActionRemove = static_cast<int>(Action::kRemove); +const int NetlinkEvent::NlActionChange = static_cast<int>(Action::kChange); +const int NetlinkEvent::NlActionLinkDown = static_cast<int>(Action::kLinkDown); +const int NetlinkEvent::NlActionLinkUp = static_cast<int>(Action::kLinkUp); +const int NetlinkEvent::NlActionAddressUpdated = static_cast<int>(Action::kAddressUpdated); +const int NetlinkEvent::NlActionAddressRemoved = static_cast<int>(Action::kAddressRemoved); +const int NetlinkEvent::NlActionRdnss = static_cast<int>(Action::kRdnss); +const int NetlinkEvent::NlActionRouteUpdated = static_cast<int>(Action::kRouteUpdated); +const int NetlinkEvent::NlActionRouteRemoved = static_cast<int>(Action::kRouteRemoved); + NetlinkEvent::NetlinkEvent() { mAction = Action::kUnknown; memset(mParams, 0, sizeof(mParams)); |