From owner-freebsd-net@FreeBSD.ORG Tue Apr 20 01:05:36 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 CEF9D16A4CE; Tue, 20 Apr 2004 01:05:36 -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 D0CB343D31; Tue, 20 Apr 2004 01:05:35 -0700 (PDT) (envelope-from novo@cs.tu-berlin.de) Received: from 130-149-145-34.dialup.cs.tu-berlin.de (130-149-145-34.dialup.cs.tu-berlin.de [130.149.145.34]) by mail.cs.tu-berlin.de (8.9.3p2/8.9.3) with ESMTP id KAA21046; Tue, 20 Apr 2004 10:00:29 +0200 (MET DST) Date: Tue, 20 Apr 2004 10:01:03 +0200 (CEST) From: Harti Brandt X-X-Sender: novo@130-149-145-34.dialup.cs.tu-berlin.de To: Bill Fumerola In-Reply-To: <20040419224330.GN17862@elvis.mu.org> Message-ID: <20040420095454.S728@130-149-145-34.dialup.cs.tu-berlin.de> References: <20040419110912.A71274@xorpc.icir.org> <20040419224330.GN17862@elvis.mu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Luigi Rizzo cc: Julian Elischer 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: Tue, 20 Apr 2004 08:05:36 -0000 On Mon, 19 Apr 2004, Bill Fumerola wrote: > i disagree that this logic belongs outside the kernel in the snmp agent. > an inconsistant if_index makes it difficult and error prone for using > the index in multiple utilities whose data may be combined/joined/scaled > with information from the snmp agent's IF-MIB/ifXTable tables. The question is based on what do you decide to give an interface the same index? Same hardware name? Same PCI slot? Same MAC address (what about interfaces without MAC addresses and virtual interfaces)? Same IP address (what about interfaces without IP address)? In the bSNMP daemon currently I have two classes of interfaces: real ones and 'dynamic' ones. For real ones I remember their name through the uptime of the daemon and assign them the same index when they re-appear (by loading/unloading the driver) with the same name. Actually I think that an application (statistics or others) should look at the timestamp of the last change of an interface and assume that the interface is another one even if it has the same index if the timestamp changed. harti