[EMAIL PROTECTED] wrote on 02/04/2004 11:04:33 PM:

> >>>>> On Thu, 05 Feb 2004 09:33:38 +1100,
> >>>>> [EMAIL PROTECTED] said:

> >> Thanks for the feedback.  Was there ever any discussion in the IPv6
> >> working group in regards to creating a standard set of ioctl() function
> >> calls, similar to the SIOCGIFaaa ioctls, the could either be used wit IPv6
> >> interfaces, or which could be used with both IPv4 and IPv6 interfaces
> >> (i.e., version-neutral)?

> >  Not that I can remember.  Some have getifaddrs(3).  Which is
> >  a little higher.

> I've always been hoping that getifaddrs(3) is officially standardized
> and deployed.  Aside from the portability issue, SIOCGIFxxx ioctl has
> many pitfalls for application programmers.  To name a few:

> - buffer size estimation and try-and-error
> - OS/architecture dependent alignment
> - consideration for the existence (or non-existence) of the sa_len

> member (to advance the pointer in the buffer correctly)

> Many applications I've seen have fallen into some of the pits.  Other
> OS-dependent low-layer interfaces like SIOCGIFxxx have similar
> pitfalls.

> getifaddrs(3) solves all the problems.  If we can widely deploy a
> high-level interface like this one, it would help application
> programmers very much and make applications more accurate and robust.
> (Of course, OS vendors will still need to deal with low-level
> interfaces to implement the library)

> I know the IETF isn't the most appropriate place to discuss this type
> of thing, but does it help to write a short informational I-D
> describing the specification with some recommendation?


We have received many questions from vendors about what APIs can provide the same information as the SIOCGIFaaa ioctls, for IPv6 addresses/interfaces.  I thought that this subject may have been discussed as part of the IPv6 API discussions that produced the basic/advanced socket RFCs.  So, if getifaddrs(3) seems to be the de facto standard for retrieving this information, then I think it would be great if the IPv6 working group published something to try to recommend it as the standard for this function, in order to ensure greater portability of applications.

In regards to getifaddrs(3), for IPv6 I assume that the netmask field contain a 16-octet mask in the sockaddr_in6 structure, correct?  There doesn't appear to be a returned field that contains the prefix length.    

> JINMEI, Tatuya
> Communication Platform Lab.
> Corporate R&D Center, Toshiba Corp.
> [EMAIL PROTECTED]

>
> --------------------------------------------------------------------
> IETF IPv6 working group mailing list
> [EMAIL PROTECTED]
> Administrative Requests: https://www1.ietf.org/mailman/listinfo/ipv6

> --------------------------------------------------------------------

Thanks,

Kristine Adamson
IBM Communications Server for MVS: TCP/IP Development
Internet e-mail:[EMAIL PROTECTED]

Reply via email to