From patchwork Wed Jun 2 13:41:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luciano Coelho X-Patchwork-Id: 54372 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1D580B7D12 for ; Wed, 2 Jun 2010 23:47:46 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758177Ab0FBNri (ORCPT ); Wed, 2 Jun 2010 09:47:38 -0400 Received: from smtp.nokia.com ([192.100.105.134]:26957 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755062Ab0FBNrh (ORCPT ); Wed, 2 Jun 2010 09:47:37 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o52DebEO025110; Wed, 2 Jun 2010 08:41:05 -0500 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 2 Jun 2010 16:41:03 +0300 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 2 Jun 2010 16:41:03 +0300 Received: from localhost.localdomain (chilepepper.research.nokia.com [172.21.50.167]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o52Df2NP010607; Wed, 2 Jun 2010 16:41:02 +0300 From: Luciano Coelho To: netdev@vger.kernel.org Cc: netfilter-devel@vger.kernel.org, kaber@trash.net, jengelh@medozas.de, Timo Teras Subject: [PATCH v2] netfilter: Xtables: idletimer target implementation Date: Wed, 2 Jun 2010 16:41:02 +0300 Message-Id: <1275486062-23753-1-git-send-email-luciano.coelho@nokia.com> X-Mailer: git-send-email 1.6.3.3 X-OriginalArrivalTime: 02 Jun 2010 13:41:03.0353 (UTC) FILETIME=[3E771E90:01CB0259] X-Nokia-AV: Clean Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch implements an idletimer Xtables target that can be used to identify when interfaces have been idle for a certain period of time. Timers are identified by labels and are created when a rule is set with a new label. The rules also take a timeout value (in seconds) as an option. If more than one rule uses the same timer label, the timer will be restarted whenever any of the rules get a hit. One entry for each timer is created in sysfs. This attribute contains the timer remaining for the timer to expire. The attributes are located under the module's object: /sys/module/xt_IDLETIMER/idletimer/