Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Aug 2001 21:44:19 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Keiichi SHIMA <keiichi@iij.ad.jp>
Cc:        net@freebsd.org, users@ipv6.org, core@kame.net
Subject:   Re: IPV6/KAME/protosw integration cleanup
Message-ID:  <3B89D023.8E3762D8@elischer.org>
References:  <3B76330E.86A0B689@elischer.org> <86itfajldc.wl@keiichi01.osaka.iij.ad.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B89D023.8E3762D8>