1d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho/*
2d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * linux/include/linux/netfilter/xt_IDLETIMER.h
3d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho *
4d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * Header file for Xtables timer target module.
5d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho *
6d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * Copyright (C) 2004, 2010 Nokia Corporation
7e07e0d31f48d951e0f03ba254d4754810732c241Ashish Sharma *
8d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * Written by Timo Teras <ext-timo.teras@nokia.com>
9d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho *
10d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * Converted to x_tables and forward-ported to 2.6.34
11d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * by Luciano Coelho <luciano.coelho@nokia.com>
12d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho *
13d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * Contact: Luciano Coelho <luciano.coelho@nokia.com>
14d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho *
15d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * This program is free software; you can redistribute it and/or
16d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * modify it under the terms of the GNU General Public License
17d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * version 2 as published by the Free Software Foundation.
18d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho *
19d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * This program is distributed in the hope that it will be useful, but
20d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * WITHOUT ANY WARRANTY; without even the implied warranty of
21d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * General Public License for more details.
23d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho *
24d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * You should have received a copy of the GNU General Public License
25d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * along with this program; if not, write to the Free Software
26d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
27d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho * 02110-1301 USA
28d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho */
29d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho
30d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho#ifndef _XT_IDLETIMER_H
31d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho#define _XT_IDLETIMER_H
32d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho
33d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho#include <linux/types.h>
34d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho
35d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho#define MAX_IDLETIMER_LABEL_SIZE 28
36e07e0d31f48d951e0f03ba254d4754810732c241Ashish Sharma#define NLMSG_MAX_SIZE 64
37e07e0d31f48d951e0f03ba254d4754810732c241Ashish Sharma
38e07e0d31f48d951e0f03ba254d4754810732c241Ashish Sharma#define NL_EVENT_TYPE_INACTIVE 0
39e07e0d31f48d951e0f03ba254d4754810732c241Ashish Sharma#define NL_EVENT_TYPE_ACTIVE 1
40d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho
41d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelhostruct idletimer_tg_info {
42d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho	__u32 timeout;
43d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho
44d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho	char label[MAX_IDLETIMER_LABEL_SIZE];
45d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho
46e07e0d31f48d951e0f03ba254d4754810732c241Ashish Sharma	/* Use netlink messages for notification in addition to sysfs */
47e07e0d31f48d951e0f03ba254d4754810732c241Ashish Sharma	__u8 send_nl_msg;
48e07e0d31f48d951e0f03ba254d4754810732c241Ashish Sharma
49d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho	/* for kernel module internal use only */
50b4af04be14560b3fcc6cf23200148d408014a2f5Jan Engelhardt	struct idletimer_tg *timer __attribute__((aligned(8)));
51d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho};
52d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho
53d96993e50b44b358ea5bd15f3944674eafd62542Luciano Coelho#endif
54