10902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho/* 20902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * linux/include/linux/netfilter/xt_IDLETIMER.h 30902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * 40902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * Header file for Xtables timer target module. 50902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * 60902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * Copyright (C) 2004, 2010 Nokia Corporation 7896976df01f561dbbebf47e781d7688a1d617ccaJP Abgrall * 80902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * Written by Timo Teras <ext-timo.teras@nokia.com> 90902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * 100902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * Converted to x_tables and forward-ported to 2.6.34 110902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * by Luciano Coelho <luciano.coelho@nokia.com> 120902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * 130902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * Contact: Luciano Coelho <luciano.coelho@nokia.com> 140902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * 150902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * This program is free software; you can redistribute it and/or 160902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * modify it under the terms of the GNU General Public License 170902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * version 2 as published by the Free Software Foundation. 180902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * 190902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * This program is distributed in the hope that it will be useful, but 200902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * WITHOUT ANY WARRANTY; without even the implied warranty of 210902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 220902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * General Public License for more details. 230902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * 240902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * You should have received a copy of the GNU General Public License 250902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * along with this program; if not, write to the Free Software 260902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 270902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho * 02110-1301 USA 280902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho */ 290902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho 300902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho#ifndef _XT_IDLETIMER_H 310902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho#define _XT_IDLETIMER_H 320902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho 330902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho#include <linux/types.h> 340902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho 350902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho#define MAX_IDLETIMER_LABEL_SIZE 28 36896976df01f561dbbebf47e781d7688a1d617ccaJP Abgrall#define NLMSG_MAX_SIZE 64 37896976df01f561dbbebf47e781d7688a1d617ccaJP Abgrall 38896976df01f561dbbebf47e781d7688a1d617ccaJP Abgrall#define NL_EVENT_TYPE_INACTIVE 0 39896976df01f561dbbebf47e781d7688a1d617ccaJP Abgrall#define NL_EVENT_TYPE_ACTIVE 1 400902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho 410902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelhostruct idletimer_tg_info { 420902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho __u32 timeout; 430902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho 440902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho char label[MAX_IDLETIMER_LABEL_SIZE]; 450902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho 46896976df01f561dbbebf47e781d7688a1d617ccaJP Abgrall /* Use netlink messages for notification in addition to sysfs */ 47896976df01f561dbbebf47e781d7688a1d617ccaJP Abgrall __u8 send_nl_msg; 48896976df01f561dbbebf47e781d7688a1d617ccaJP Abgrall 490902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho /* for kernel module internal use only */ 5009cd2b99c6cdd1e14e84c1febca2fb91e9f4e5baChangli Gao struct idletimer_tg *timer __attribute__((aligned(8))); 510902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho}; 520902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho 530902b469bd25065aa0688c3cee6f11744c817e7cLuciano Coelho#endif 54