From owner-freebsd-net@FreeBSD.ORG Mon May 21 18:03:03 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 16F2616A400 for ; Mon, 21 May 2007 18:03:03 +0000 (UTC) (envelope-from sastry.tumuluri@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.233]) by mx1.freebsd.org (Postfix) with ESMTP id B884413C448 for ; Mon, 21 May 2007 18:03:02 +0000 (UTC) (envelope-from sastry.tumuluri@gmail.com) Received: by nz-out-0506.google.com with SMTP id s1so2324309nze for ; Mon, 21 May 2007 11:03:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=XRBvR+0LhWG4Esgu+ZI12TzEzfYZo6DH/sFXch6caZJjZyfImTvCF3mI3xuw0p/qQlj7Nsh3KtOspBddxhfyKDkr5J3pHpi/5e8PNGeQpjX1hFIjOsoSB/jQlAAvuM+50TjZ6rzlAe1kWHVUuyooiCvuyvw5OzjIuvnjl/CR4c8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=szwBGPesNOSosqj6kVkNFoEycYwdqH/vwRCEd2RR71V+ybhWA85zAvsc7pMFUQnm/rBpR28JnTRlLZBWEplnYLlQG6QQ8/jNE9tfzr6DDhNkLalf31BhVziaH/+JRwnSWa1/QQJWI6wNZ6bKoadY33JOSeMzvhaQwx5sy10H4Aw= Received: by 10.114.210.2 with SMTP id i2mr2823492wag.1179769125224; Mon, 21 May 2007 10:38:45 -0700 (PDT) Received: by 10.115.54.19 with HTTP; Mon, 21 May 2007 10:38:45 -0700 (PDT) Message-ID: Date: Mon, 21 May 2007 23:08:45 +0530 From: "Sastry Tumuluri" Sender: sastry.tumuluri@gmail.com To: freebsd-net@freebsd.org MIME-Version: 1.0 X-Google-Sender-Auth: 3fd3522ffcab8c07 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Detecting LINK_UP / LINK_DOWN events 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: Mon, 21 May 2007 18:03:03 -0000 Friends, I am trying to catch and do some extra processing on LINK_UP and LINK_DOWN events for my net interfaces (e.g., notify my admin, log the event, ...). Tried this on both FreeBSD 6.1 and on FreeBSD 6.2. I tried using the devd.conf file with the following code (shows LINK_DOWN; wrote similar stuff for LINK_UP): notify 10 { match "type" "LINK_DOWN"; action "logger -s alert: Caught LINK_DOWN on dev: $device-name subsys: $subsystem"; }; Didn't work. I tried the above with both strict match conditions (using vendor, device and class matches) as well as very general (like the above). Didn't work. I ran killed devd and ran it in the foreground with "devd -dD". Then I logged into a different pty and used ifconfig lnc0 down #(lnc0 is my ethernet device). devd doesn't even seem to catch the event (no output at all - both on screen and in syslog). On the other hand, "nomatch" and "attach" messages do seem to get through (I wrote similar stuff for nomatch & attach, and they are showing up at bootup and in syslog). What could I be doing wrong? Regards, ==sas3==