From owner-freebsd-hackers Fri Aug 16 5: 8:55 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 B291537B400; Fri, 16 Aug 2002 05:08:49 -0700 (PDT) Received: from mail.otel.net (gw3.OTEL.net [212.36.8.151]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B7FA43E3B; Fri, 16 Aug 2002 05:08:48 -0700 (PDT) (envelope-from ikostov@otel.net) Received: from judicator.otel.net ([212.36.9.113]) by mail.otel.net with esmtp (Exim 3.36 #1) id 17ffu3-000AQU-00; Fri, 16 Aug 2002 15:08:31 +0300 Date: Fri, 16 Aug 2002 15:08:31 +0300 (EEST) From: Iasen Kostov To: Maxim Sobolev Cc: Julian Elischer , Maxim Sobolev , , Subject: Re: Increasing size of if_flags field in the ifnet structure [patch In-Reply-To: <200208161133.g7GBXnIX005225@vega.vega.com> Message-ID: <20020816150159.T18061-100000@shadowhand.OTEL.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Fri, 16 Aug 2002, Maxim Sobolev wrote: > > > > Please take a look at this patch. It implement 1 more flag to if_flags > > and ofcourse it increases size of this flag field by using if_ipending > > which is unused. > > 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. 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