This issue may not be suitable for this list, but I kept ccing for
the moment.

>>>>> On Mon, 03 Jul 2000 19:16:34 +0900, 
>>>>> Hideaki YOSHIFUJI <[EMAIL PROTECTED]> said:

> Similar question: How about getifaddrs()?

> The getifaddrs(NULL) included in KAME kit doesn't raise an error, does it?

No.

> Why don't you have it raise a SEGV signal as you do in freeaddrinfo()?

> void freeifaddrs(struct ifaddrs *ifp){
>     if (!ifp) raise(SIG_SEGV);
>     free(ifp);
> }

Just for clarfication: the current KAME's code of freeaddrinfo() does
not explicitly raise the SEGV signal against the NULL pointer. It
simply omits validation for the argument. SEGV is just a consequence of
this behavior. From this standpoint, there's no difference
between KAME's freeaddrinfo() and KAME's freeifaddrs(). The latter
also just assumes that the argument is a simple (valid) pointer, and
just frees the pointer without validation.

> I think freeifaddrs(NULL) should be allowed, too; again, to avoid confusion.

I don't have a strong opinion about particular behavior (including
whether the two functions should do the same reaction against the NULL
pointer). But, IMO, the most important thing is to document the
behavior, and, if possible, it would be better to standardize it.

                                        JINMEI, Tatuya
                                        Communication Platform Lab.
                                        Corporate R&D Center, Toshiba Corp.
                                        [EMAIL PROTECTED]
--------------------------------------------------------------------
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 PROTECTED]
--------------------------------------------------------------------

Reply via email to