"Brian F. Feldman" <gr...@freebsd.org> writes:
> As I read it, sockaddr is a transparent type (overloaded, as it were).
> So we would use something like:
>       struct jail {
>               ...
>               struct sockaddr;
>               char [SOCK_MAXADDRLEN - sizeof(struct sockaddr)];
>               char [sizeof(int) - SOCK_MAXADDRLEN % sizeof(int)];/* padding */
>               ...
>       }

Yes, that would work, as would:

union {
        struct sockaddr sa;
        struct sockaddr_storage ss;
} u;

I was just trying to say that not all socket addresses fit into a
`struct sockaddr' but they should fit into a `struct
sockaddr_storage'.

/assar


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to