Date: Wed, 13 Jun 2001 17:20:02 -0700 (PDT) From: Bill Fenner <fenner@research.att.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/26546: Add ioctl support to linux emulation and permit ethX syntax Message-ID: <200106140020.f5E0K2o98180@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/26546; it has been noted by GNATS. From: Bill Fenner <fenner@research.att.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106140020.f5E0K2o98180>