From owner-freebsd-net@FreeBSD.ORG Wed Apr 21 02:47:55 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8AFA16A4CE for ; Wed, 21 Apr 2004 02:47:55 -0700 (PDT) Received: from mail.cs.tu-berlin.de (mail.cs.tu-berlin.de [130.149.17.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1992643D1F for ; Wed, 21 Apr 2004 02:47:55 -0700 (PDT) (envelope-from novo@cs.tu-berlin.de) Received: from 130-149-145-64.dialup.cs.tu-berlin.de (130-149-145-64.dialup.cs.tu-berlin.de [130.149.145.64]) by mail.cs.tu-berlin.de (8.9.3p2/8.9.3) with ESMTP id LAA18751; Wed, 21 Apr 2004 11:45:01 +0200 (MET DST) Date: Wed, 21 Apr 2004 11:45:36 +0200 (CEST) From: Harti Brandt X-X-Sender: novo@130-149-145-64.dialup.cs.tu-berlin.de To: Petri Helenius In-Reply-To: <408613F7.1090806@he.iki.fi> Message-ID: <20040421114416.F640@130-149-145-64.dialup.cs.tu-berlin.de> References: <20040419110912.A71274@xorpc.icir.org> <408613F7.1090806@he.iki.fi> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Luigi Rizzo cc: net@FreeBSD.ORG Subject: Re: what is the story on if_index allocation ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: harti@FreeBSD.ORG List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2004 09:47:56 -0000 On Wed, 21 Apr 2004, Petri Helenius wrote: > Luigi Rizzo wrote: > > >Can someone explain what is the goal ? Reuse a number if an > >interface has the same name of a previously existing one and > >the index is free ? And does it make sense, anyways, or > >we could just simplify that code and just reuse the first > >available entry in ifindex_table[] ? > > > > > The optimal course of action (from management software point of view) is > to retain as static ifName to ifIndex mapping. If the index changes for > the same interface, you're supposed to have lower sysUpTime than on > previous query. That mapping certainly has problems with interface renaming. Currently there is no way of getting at the driver's name of the interface. harti