Subject: Re: draft-ietf-ipngwg-scopedaddr-format-00.txt

From: "Steven M. Bellovin" <[email-masked]>
Date: Wed, 10 Nov 1999 17:09:38 -0500

In message <[email-masked]>, Francis Dupont writes:
> In your previous mail you wrote:
>
>   Personally, I find it very ugly
>
>=> I agree, this is ugly but some of them *don't* want to update the API.
>
>   and hard to maintain, especially across multiple platforms where
>   the mechanism for setting that flag may be different.
>   
>=> I don't understand your concern. I propose to optionally add
>#define before some #include. Of course the name of the flag
>will be the same everywhere (if nobody finds something better :-).
>Perhaps you'd prefer (??) to add a -Dxxx in CFLAGS in Makefiles?

That latter was what I thought you were implying.  I'm still not fond of
#ifdefs for things like that, but it's better than my misinterpretation of
your idea.

		--Steve Bellovin

--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [email-masked]
--------------------------------------------------------------------

---

From: [email-masked] (Niels Möller)
Date: 11 Nov 1999 20:40:57 +0100

> #ifdefs for things like that, but it's better than my misinterpretation of

I agree with this. Quite strongly. If there are parallell lookup
mechanism with similar but different semantics, it is inevitable that
some program will want to use both of them. Consider a perl
interpreter with a zillion of modules compiled in, with some shared
recursivly included file needing to include some system headers. Using
defines *inside* the system header file to choose the right behaviour,
for each module, will cause head-aches. Please also consider the
typical #define-guards against multiple inclusions...

It's better to use distinct names (say, getipnodebyname and
getipnodebyname_with_scope_id). Programs that only want the
scope_id-behaviour can still do

  #define getipnodebyname getipnodebyname_with_scope_id

if they really want, but the effects of this are easier to avoid or
localize.

Having two distinct and well-specified names also makes it
straight-forward to detect them with tools like autoconf.

/Niels