diff options
author | Manoj Basapathi <manojbm@codeaurora.org> | 2020-04-16 10:23:29 +0530 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-04-16 20:05:14 +0200 |
commit | 85b9ec86154281400e22a233e1247a17764dde3e (patch) | |
tree | bbd1f049215195e6b9fc7a878e4090ac6d486695 /include | |
parent | 18f01acbdefb211ebfefb728d2b6843c59ae06db (diff) |
extensions: IDLETIMER: Add alarm timer option
Introduce "--alarm" option for idletimer rule.
If it is present, hardidle-timer is used, else default timer.
The default idletimer starts a deferrable timer or in other
words the timer will cease to run when cpu is in suspended
state. This change introduces the option to start a
non-deferrable or alarm timer which will continue to run even
when the cpu is in suspended state.
Signed-off-by: Manoj Basapathi <manojbm@codeaurora.org>
Signed-off-by: Sauvik Saha <ssaha@codeaurora.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter/xt_IDLETIMER.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/netfilter/xt_IDLETIMER.h b/include/linux/netfilter/xt_IDLETIMER.h index 208ae938..49ddcdc6 100644 --- a/include/linux/netfilter/xt_IDLETIMER.h +++ b/include/linux/netfilter/xt_IDLETIMER.h @@ -32,6 +32,7 @@ #include <linux/types.h> #define MAX_IDLETIMER_LABEL_SIZE 28 +#define XT_IDLETIMER_ALARM 0x01 struct idletimer_tg_info { __u32 timeout; @@ -42,4 +43,15 @@ struct idletimer_tg_info { struct idletimer_tg *timer __attribute__((aligned(8))); }; +struct idletimer_tg_info_v1 { + __u32 timeout; + + char label[MAX_IDLETIMER_LABEL_SIZE]; + + __u8 send_nl_msg; /* unused: for compatibility with Android */ + __u8 timer_type; + + /* for kernel module internal use only */ + struct idletimer_tg *timer __attribute__((aligned(8))); +}; #endif |