From owner-freebsd-net@FreeBSD.ORG Wed Jan 23 22:16:35 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EA4C16A41B for ; Wed, 23 Jan 2008 22:16:35 +0000 (UTC) (envelope-from yousif@alumni.jmu.edu) Received: from coruscant.far-far-away.us (coruscant.far-far-away.us [70.91.196.65]) by mx1.freebsd.org (Postfix) with SMTP id 3FA3813C465 for ; Wed, 23 Jan 2008 22:16:34 +0000 (UTC) (envelope-from yousif@alumni.jmu.edu) Received: (qmail 22888 invoked from network); 23 Jan 2008 16:44:08 -0500 Received: from pknat1.passkey.com (HELO ?192.168.16.168?) (68.162.198.134) by coruscant.far-far-away.us with SMTP; 23 Jan 2008 16:44:08 -0500 From: Yousif Hassan To: freebsd-net@freebsd.org Content-Type: text/plain Date: Wed, 23 Jan 2008 16:50:22 -0500 Message-Id: <1201125022.2106.67.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: network interface monitoring? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2008 22:16:35 -0000 Net-gurus: I hope this is the right list to write to regarding this question (feel free to redirect me to ports@ if that sounds more appropriate). I'm looking for a facility to automatically detect network interface carrier state changes (a network cable gets plugged/unplugged; a laptop's wireless button gets turned on/off; etc.) and then to run a user script on it. The use case, fairly obvious I guess, is to execute ifconfig and/or DHCP commands upon carrier detection; this will make my laptop that much more useful. ;) NetBSD has ifwatchd - which seems perfectly designed for this use case: http://www.freebsd.org/cgi/man.cgi?query=ifwatchd&apropos=0&sektion=0&manpath=NetBSD+4.0 ifwatchd has not been ported to FreeBSD - does FreeBSD have anything similar? I can't imagine I'm the first to ask this question; it seems almost everyone with a laptop would want this. Thanks for your time/attention...! (please CC me as I am not subscribed here) --Yousif