From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 15 13:07:53 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD2681065688 for ; Wed, 15 Oct 2008 13:07:53 +0000 (UTC) (envelope-from m.jakeman@lancaster.ac.uk) Received: from sideburn.lancs.ac.uk (sideburn.lancs.ac.uk [148.88.17.22]) by mx1.freebsd.org (Postfix) with ESMTP id 72BF78FC26 for ; Wed, 15 Oct 2008 13:07:53 +0000 (UTC) (envelope-from m.jakeman@lancaster.ac.uk) Received: from mail02.lancs.ac.uk ([148.88.1.54]) by sideburn.lancs.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1Kq5lp-00062C-AN for hackers@freebsd.org; Wed, 15 Oct 2008 13:46:33 +0100 Received: from ina044000004.lancs.ac.uk ([148.88.224.46]) by mail02.lancs.ac.uk with esmtp (Exim 4.69) (envelope-from ) id 1Kq5lo-0006HI-Tz for hackers@freebsd.org; Wed, 15 Oct 2008 13:46:32 +0100 From: Matthew Jakeman Organization: Lancaster University To: hackers@freebsd.org Date: Wed, 15 Oct 2008 13:43:28 +0100 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810151343.28136.m.jakeman@lancaster.ac.uk> Cc: Subject: Call function on sysctl value change X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: m.jakeman@lancaster.ac.uk List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2008 13:07:53 -0000 Hi all, I was wondering if it is possible to call a function when a sysctl value is changed. I have added a few sysctl int variables to the kernel and for some of these i only want certain values to be acceptable as input depending on some conditions. I would like to be able to call a function if possible, to validate the value entered via the sysctl command. Thanks in advance Matt