From patchwork Tue Jun 15 09:21:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luciano Coelho X-Patchwork-Id: 55620 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 E38C6B7D1B for ; Tue, 15 Jun 2010 19:21:54 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753041Ab0FOJVo (ORCPT ); Tue, 15 Jun 2010 05:21:44 -0400 Received: from smtp.nokia.com ([192.100.122.233]:60683 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751988Ab0FOJVm (ORCPT ); Tue, 15 Jun 2010 05:21:42 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o5F9LOa7029713; Tue, 15 Jun 2010 12:21:29 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 15 Jun 2010 12:21:21 +0300 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 15 Jun 2010 12:21:21 +0300 Received: from localhost.localdomain (chilepepper.research.nokia.com [172.21.50.167]) by mgw-sa02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o5F9LJjA026493; Tue, 15 Jun 2010 12:21:20 +0300 From: Luciano Coelho To: netfilter-devel@vger.kernel.org Cc: netdev@vger.kernel.org, kaber@trash.net, jengelh@medozas.de, Timo Teras Subject: [PATCH v5] netfilter: Xtables: idletimer target implementation Date: Tue, 15 Jun 2010 12:21:19 +0300 Message-Id: <1276593679-9576-1-git-send-email-luciano.coelho@nokia.com> X-Mailer: git-send-email 1.6.3.3 X-OriginalArrivalTime: 15 Jun 2010 09:21:21.0314 (UTC) FILETIME=[1E376820:01CB0C6C] 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 xt_idletimer class: /sys/class/xt_idletimer/timers/