From owner-freebsd-net Fri Jan 18 1:42:22 2002 Delivered-To: freebsd-net@freebsd.org Received: from mailhub.fokus.gmd.de (mailhub.fokus.gmd.de [193.174.154.14]) by hub.freebsd.org (Postfix) with ESMTP id 16B4F37B416; Fri, 18 Jan 2002 01:42:00 -0800 (PST) Received: from beagle (beagle [193.175.132.100]) by mailhub.fokus.gmd.de (8.11.6/8.11.6) with ESMTP id g0I9fwR08791; Fri, 18 Jan 2002 10:41:58 +0100 (MET) Date: Fri, 18 Jan 2002 10:41:58 +0100 (CET) From: Harti Brandt To: Ruslan Ermilov Cc: net@FreeBSD.ORG Subject: Re: interface creation notification In-Reply-To: <20020118110956.C1997@sunbay.com> Message-ID: <20020118103502.J97177-100000@beagle.fokus.gmd.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, 18 Jan 2002, Ruslan Ermilov wrote: RE>On Thu, Jan 17, 2002 at 06:58:26PM +0100, Harti Brandt wrote: RE>> RE>> Hi, RE>> RE>> how is a daemon supposed to get informed that a network interface has been RE>> created? I had hoped, that an RTM_IFINFO message would be created on the RE>> routing socket, but this is not the case. If an interface is destroyed, RE>> the routing socket gets a message for whatever reason. Wouldn't it be RE>> simple to just create an RTM_IFINFO message? RE>> RE>It does get created (you can check with the ``route -vn monitor'' command), RE>but please see PR kern/33747 for one small pitfall. That's exactly what I did, but it doesn't work. The only places, that I can find when rt_ifmsg is called are: - interface goes up (if_route) - interface goes down (if_unroute) - change MTU (if_hwioctl) - prom. mode (ifpromisc) - allmulti (if_allmulti) No one seems to call it when I just create an interface. The RTM_IFINFO when I delete it probably comes from the if_unroute. The RTM_IFINFO you see for an ifconfig gif0 create is probably a side effect of setting the MTU or so. I think it would make sense to do an rt_ifmsg somehere in if_attach/if_detach. harti -- harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fhg.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message