From owner-freebsd-net Sun Aug 26 21:59: 5 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 225BB37B409 for ; Sun, 26 Aug 2001 21:59:01 -0700 (PDT) (envelope-from julian@elischer.org) Received: from elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id WAA71453; Sun, 26 Aug 2001 22:05:36 -0700 (PDT) Message-ID: <3B89D023.8E3762D8@elischer.org> Date: Sun, 26 Aug 2001 21:44:19 -0700 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Keiichi SHIMA Cc: net@freebsd.org, users@ipv6.org, core@kame.net Subject: Re: IPV6/KAME/protosw integration cleanup References: <3B76330E.86A0B689@elischer.org> <86itfajldc.wl@keiichi01.osaka.iij.ad.jp> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Keiichi SHIMA wrote: > > Hi, > > KAME had removed ipprotosw.h from the KAME source repositry (for > FreeBSD4). Though this do not clean up the varargs functions, we > still think this is a better (or not worst at least) comprimise in a > current situation. > > Also, I had made a patch for FreeBSD-CURRENT for the same purpose. > Please see and review the attached patch. If it looks OK, I will > commit it to the CURRENT tree. > These patches seem ok, but I need to ask if this is the way to go.. The removal of the extra argument in the input routines is one way of doing the work (and the use of mtod(m, struct ip)->ip_p instead). The other would be to propose that the inclusion of a protocol identifier is a generically useful thing in a world where tunnellling is becoming more and more common, and to upgrade the standard protosw to include this extra argument in the standard input definition. Before we go this way, are you certain that it is architecturally cleaner to remove the extra arg on these, than to add it to all the other cases..? I'm not worried about whether it exists or not, just that is the same everywhere. as for: in_stf_input(m, va_alist) Why does it need to be varargs? The code specifies (using varargs) that the next argument is an int called "offset" and the correct argument for the standard protocol switch entry is an int called "offset" so why not just declare it as int offset;? why complicate the code with a va_alist? Which OS's have a va_alist? which have "int offset; ?" The only effect I see is to produce a warning message. (which hides real warning messages) I have still not heard any reason for the varargs here.. except "it's needed for portability".. portability with WHO? BSD4.4 certainly didn't have varargs there.... -- +------------------------------------+ ______ _ __ | __--_|\ Julian Elischer | \ U \/ / hard at work in | / \ julian@elischer.org +------>x USA \ a very strange | ( OZ ) \___ ___ | country ! +- X_.---._/ presently in San Francisco \_/ \\ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message