Subject: (IPng 6637) specifications of if_nametoindex() and if_indextoname()

From: Jeff Trawick <[email-masked]>
Date: Thu, 15 Oct 1998 19:15:16 -0400

Referring to the descriptions in
<draft-ietf-ipngwg-bse-api-new-02.txt>...

A. specification of if_nametoindex()

Was some text inadvertently omitted regarding error
situations?  I just implemented this function for a 
certain platform using an existing ioctl() mechanism; I 
want to handle the various points of failure in a way
consistent with other platforms.

I would like to see error scenarios described in a manner
consistent with if_indextoname().  Consider the following
new description for if_nametoindex():

If the specified interface does not exist, the return value
is 0 and errno is set to ENXIO.  If there was a system
error (such as running out of memory), the return value is
0 and errno is set to the proper value (e.g., ENOMEM).

B. specification of if_indextoname()

if_indextoname() is misspelled (as ifindextoname()) in one
place.

Thanks for consideration...

(Please reply to [email-masked].)

-- 
Jeff Trawick | [email-masked] | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...
--------------------------------------------------------------------
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]
Date: Fri, 16 Oct 1998 01:06:43 -0400

Jeff,

>0 and errno is set to the proper value (e.g., ENOMEM).

This was added in this last round of discussions for if_indextoname.

I could use ENXIO for if_nametoindex, and clearly the system errno hint
as in if_indextoname.  ENXIO was not obvious to me so let it go but
looking at the errno's descriptions again it can work and can be
returned.  What is happening is an interface cannot be found for a name,
so ENXIO will work.

Here is the fix:

-------------------------------------------------
If the specified interface name does not exist, the return value is 0, 
and errno is set to ENXIO.   If there was a system error (such as running 
out of memory), the return value is 0 and errno is set to the proper 
value (e.g., ENOMEM).
-------------------------------------------------

>if_indextoname() is misspelled (as ifindextoname()) in one

Bummer I can't believe I missed that one................

Thanks.............

/jim