diff options
author | Ashish Sharma <ashishsharma@google.com> | 2012-03-29 13:02:27 -0700 |
---|---|---|
committer | JP Abgrall <jpa@google.com> | 2012-04-05 18:32:40 -0700 |
commit | beb914e987cbbd368988d2b94a6661cb907c4d5a (patch) | |
tree | 33f75ade6a9db4bfe6cb89437491ec12368ad108 /include | |
parent | 499149639354dc2ca0ae0f45716511a5c3a8d533 (diff) |
xt_IDLETIMER:
Add new netlink msg type for IDLETIMER.
Send notifications when the label becomes active after an idle period.
Send netlink message notifications in addition to sysfs notifications.
Change-Id: I31677ef00c94b5f82c8457e5bf9e5e584c23c523
Signed-off-by: Ashish Sharma <ashishsharma@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter/xt_IDLETIMER.h | 8 | ||||
-rw-r--r-- | include/linux/netlink.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/netfilter/xt_IDLETIMER.h b/include/linux/netfilter/xt_IDLETIMER.h index 208ae9387331..faaa28b3d061 100644 --- a/include/linux/netfilter/xt_IDLETIMER.h +++ b/include/linux/netfilter/xt_IDLETIMER.h @@ -4,6 +4,7 @@ * Header file for Xtables timer target module. * * Copyright (C) 2004, 2010 Nokia Corporation + * * Written by Timo Teras <ext-timo.teras@nokia.com> * * Converted to x_tables and forward-ported to 2.6.34 @@ -32,12 +33,19 @@ #include <linux/types.h> #define MAX_IDLETIMER_LABEL_SIZE 28 +#define NLMSG_MAX_SIZE 64 + +#define NL_EVENT_TYPE_INACTIVE 0 +#define NL_EVENT_TYPE_ACTIVE 1 struct idletimer_tg_info { __u32 timeout; char label[MAX_IDLETIMER_LABEL_SIZE]; + /* Use netlink messages for notification in addition to sysfs */ + __u8 send_nl_msg; + /* for kernel module internal use only */ struct idletimer_tg *timer __attribute__((aligned(8))); }; diff --git a/include/linux/netlink.h b/include/linux/netlink.h index a9dd89552f9c..f434363a3e6b 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -25,6 +25,7 @@ #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ #define NETLINK_ECRYPTFS 19 #define NETLINK_RDMA 20 +#define NETLINK_IDLETIMER 21 #define MAX_LINKS 32 |