Why size of sockaddr smaller than size of sockaddr_in6?

From: Zheng, Jeff
Date: Thu Nov 06 2003 - 21:05:03 EST



I thought that sockaddr should hold sockaddr_in sockaddr_in6 and any other socket address (or at least sockaddr_in6).
Current definition:
struct sockaddr
{
__SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
char sa_data[14]; /* Address data. */
};

Can be:
struct sockaddr
{
__SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
char sa_data[28]; /* Address data. */
};

Is there any reason not to hold sockaddr_in6 in sockaddr?

Please CC the answers/comments posted to the list in response to my posting to me.


> Thanks
> Jeff Jeff.Zheng@xxxxxxxxx
> BTW, I speak for myself, not for Intel Corp.
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/