Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2001 10:01:43 -0700
From:      Julian Elischer <julian@elischer.org>
To:        itojun@iijlab.net
Cc:        net@freebsd.org
Subject:   Re: IPV6/KAME/protosw integration cleanup
Message-ID:  <3B76B677.337B5E88@elischer.org>
References:  <4382.997609887@itojun.org>

next in thread | previous in thread | raw e-mail | index | archive | help
itojun@iijlab.net wrote:
> 
> >>When KAME was added the mesh was less that perfect but there was so much to
> >>be done that some shortcuts needed to be taken.
> >>
> >>now that time has passed some of these can be cleaned up.
> >>
> >>1/ Merging ipprotosw.h and protosw.h
> >>2/ removal of all varargs stuff from the kernel
> >>(this revealing the mismatched prototypes they were hiding)
> >>removal of lotso warnings from the KAME stuff.
> >
> >       the change does add pain to KAME integration side on upgrades.
> >       note that KAME codebase uses the same code across multiple *BSDs.
> >       please don't do this.
> 
>         also, IIRC, ipprotosw.h was added just for freebsd, as a result of
>         some "code review" between shin@kame and other folks on freebsd
>         mailig lists.  some of you asked for it.

Well what is there now is plainly unacceptable
I think that it was asked for as a VERY SHORT TERM hack.
But it has been there a long time...
I see no reasons so far to not make most of these changes..

1/ removal of "control" argument from rip6_input and prepend control mbuf
to chain AS IT WAS DESIGNED FOR. This makes rip6_input conform to the proto
type for input. (I have not confirmed that the information in control
is a valid mbuf but it is an mbuf pointer).
2/ remove all var-args.. This is a disgusting hach that makes it impossible
for the compiler to catch mismatched functions and arguments.
NetBSD should know better than this.. they changed it.. they can bear the costs
of compatibility.. we are NOT  going to do that.
3/ define all prototypes in terms of predefined types to allow
the compiler to catch wrong assignments quicker (or to change them quicker).
(this was planned a long time ago but not done for reasons I forget)
4/ Addition of the "proto" field to output to allow ipprotosw to be completely
removed. (the special type for that filed need not be done as I only did that
to ensure that KAME was not using it somewhere to pass something OTHER than
an proto type.) (other protocols can ignore this field).

You have had a long time to clean up the mess, and some of these fixes
needed to be made to the base code for a long time.
We cannot hold off making them forever because of KAME.

Unless given a better excuse for the mess other than "It'll be inconvenient"
I propose to commit these cleanups in 1 week. (minus the protonum_t change)
If KAME applies something similar first then they can the choice as to how 
are done.

Mandatory features:
remove ipprotosw
remove varargs
ALL entries to protosw to conform exactly to their prototypes. (no error
messages)
-error messages from kame code is costing me hours as I do the KSE work as I see 
them going past and have to check each time that they are the same old ones and
that there are no new ones amongst them-
Fix all case of warnings about "discarding 'const' " (or whatever the message
is).



"Pass me that axe poul-henning"


> 
> itojun
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message

-- 
+------------------------------------+       ______ _  __
|   __--_|\  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?3B76B677.337B5E88>