From owner-freebsd-bugs Wed Jun 13 17:20: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D384337B401 for ; Wed, 13 Jun 2001 17:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f5E0K2o98180; Wed, 13 Jun 2001 17:20:02 -0700 (PDT) (envelope-from gnats) Date: Wed, 13 Jun 2001 17:20:02 -0700 (PDT) Message-Id: <200106140020.f5E0K2o98180@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bill Fenner Subject: Re: kern/26546: Add ioctl support to linux emulation and permit ethX syntax Reply-To: Bill Fenner Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/26546; it has been noted by GNATS. From: Bill Fenner To: freebsd-gnats-submit@FreeBSD.org, ambrisko@ambrisko.com Cc: Subject: Re: kern/26546: Add ioctl support to linux emulation and permit ethX syntax Date: Wed, 13 Jun 2001 17:16:13 -0700 What do you think about: - using strtoul(), to allow more than 10 eth%d's. - The value could be the ifindex (won't change if a dynamic interface in the middle of the list is deleted); you can then also use ifindex2ifnet[index] (if index < if_index) instead of walking ifnet. Advantages of using ifindex: mapping is known-map "Link#X" in netstat -ni to "ethX", mapping doesn't change, O(1) to find the right ifnet Disadvantage of using ifindex: you don't get to skip P2P, loopback and non-broadcast interfaces in the mapping. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message