From owner-freebsd-hackers Fri Aug 16 5:22:35 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE54837B400; Fri, 16 Aug 2002 05:22:29 -0700 (PDT) Received: from baraca.united.net.ua (ns.united.net.ua [193.111.8.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 953C243E65; Fri, 16 Aug 2002 05:22:27 -0700 (PDT) (envelope-from max@vega.com) Received: from vega.vega.com (xDSL-2-2.united.net.ua [193.111.9.226] (may be forged)) by baraca.united.net.ua (8.11.6/8.11.6) with ESMTP id g7GCMEZ81179; Fri, 16 Aug 2002 15:22:14 +0300 (EEST) (envelope-from max@vega.com) Received: from vega.vega.com (max@localhost [127.0.0.1]) by vega.vega.com (8.12.5/8.11.3) with ESMTP id g7GCM8We005389; Fri, 16 Aug 2002 15:22:08 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Received: (from max@localhost) by vega.vega.com (8.12.5/8.12.5/Submit) id g7GCM8Rt005388; Fri, 16 Aug 2002 15:22:08 +0300 (EEST) From: Maxim Sobolev Message-Id: <200208161222.g7GCM8Rt005388@vega.vega.com> Subject: Re: Increasing size of if_flags field in the ifnet structure [patch To: ikostov@otel.net (Iasen Kostov) Date: Fri, 16 Aug 2002 15:22:07 +0300 (EEST) Cc: max@vega.com (Maxim Sobolev), julian@elischer.org (Julian Elischer), sobomax@FreeBSD.ORG (Maxim Sobolev), hackers@FreeBSD.ORG, net@FreeBSD.ORG In-Reply-To: <20020816150159.T18061-100000@shadowhand.OTEL.net> from "Iasen Kostov" at ΑΧΗ 16, 2002 X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > There is no much point in this patch, because it will increase size of > > struct ifreq, which means that no ioctl's from older apps will be accepted > > anyway. Therefore, there is no difference between those two, while my > > approach is obviously cleaner. > > It does not increase size of struct ifreq. > This is a union not a struct as You see. Oh, yes, you are obviously correct. However, I still wonder if your patch is endianless-safe. -Maxim > union { > struct sockaddr ifru_addr; > struct sockaddr ifru_dstaddr; > struct sockaddr ifru_broadaddr; > short ifru_flags[2]; > int ifru_flagslong; > int ifru_metric; > int ifru_mtu; > int ifru_phys; > int ifru_media; > caddr_t ifru_data; > int ifru_cap[2]; > } ifr_ifru; > > > > -Maxim > > > > > > > > On Thu, 15 Aug 2002, Julian Elischer wrote: > > > > > > > you cannot break ABIs in 4.x > > > > in 5.x it will probably be ok until (say) 5.1 or something. > > > > > > > > > > > > On Thu, 15 Aug 2002, Maxim Sobolev wrote: > > > > > > > > > Folks, > > > > > > > > > > When implementing ability to switch interface into promisc mode using > > > > > ifconfig(8) I've stumbled into the problem with already exhausted > > > > > space in the `short if_flags' field in the ifnet structure. I need to > > > > > allocate one new flag, while we already have 16 IFF_* flags, and even > > > > > one additional flag which is implemented using currently free > > > > > if_ipending field of the said structure. Attached patch is aimed at > > > > > increasing size of if_flags to 32 bits, as well as to clean-up > > > > > if_ipending abuse. Granted, it will break backward ABI compatibility, > > > > > but IMO it is not a big problem. > > > > > > > > > > Comments and suggestions are greatly appreciated. Thanks! > > > > > > > > > > -Maxim > > > > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > > > with "unsubscribe freebsd-net" in the body of the message > > > > > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-net" in the body of the message > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message