[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: updated ipv6 patch for postfix



>>> Sockaddr_in6 does not fit in ifreq{} in BSDs, either. But it doesn't
>>> matter for us if we carefully parse the result of the ioctl.
>
>> I remember that application increments its pointer manually by 
>> sizeof(struct sockaddr_in6) - sizeof(struct sockaddr) bytes, 
>> but it is not good for Linux because we don't know the actual size of 
>> sockaddr_in6 structure returned from kernel
>
>I don't get it. Why can't you just use sizeof(sockaddr_in6) for
>AF_INET6? Are you concerned with padding issues?

The returned structure includes (essentially) an array of `struct sockaddr'.
You can't just vary the size of this structure since the user program would 
then have no way to find elements beyond the first.  (For 4.4BSD this is not a 
problem because you can use sa->sa_len to get this information.)

p.



Reply to: