Add a class lable parameter to idletimer.
Now the idletimer should be setup by this command:
ndc idletimer add <interface> <timeout> <class label>
Class label can be a number or string to identify device type, such as
mobile or wifi. Idletimer will send label in the netd message instead
of the actual interface name.
Change-Id: Ic8b69dc5e38a4436c74723697905643a1214aa2a
diff --git a/IdletimerController.h b/IdletimerController.h
index a55f7af..6167b48 100644
--- a/IdletimerController.h
+++ b/IdletimerController.h
@@ -24,15 +24,18 @@
int enableIdletimerControl();
int disableIdletimerControl();
- int addInterfaceIdletimer(const char *iface, uint32_t timeout);
- int removeInterfaceIdletimer(const char *iface, uint32_t timeout);
+ int addInterfaceIdletimer(const char *iface, uint32_t timeout,
+ const char *classLabel);
+ int removeInterfaceIdletimer(const char *iface, uint32_t timeout,
+ const char *classLabel);
bool setupIptablesHooks();
private:
enum IptOp { IptOpAdd, IptOpDelete };
int setDefaults();
int runIpxtablesCmd(const char *cmd);
- int modifyInterfaceIdletimer(IptOp op, const char *iface, uint32_t timeout);
+ int modifyInterfaceIdletimer(IptOp op, const char *iface, uint32_t timeout,
+ const char *classLabel);
};
#endif