[EMAIL PROTECTED] wrote:

> - Section 5.1, 5.5: why not use sockaddr_storage instead of explicitly
>   storing address family and a union of in_addr, in6_addr? 


I think the field is used to store an IP address.  A
sockaddr_storage is used to store a socket address,
which also contains things other than the IP address.
In fact, it is large enough to store all types of socket
address with the proper alignment.  Is there a particular
reason why it is preferred to be used to store a single
IP address?


> At the
>   very least, you can typedef a new type that contains
>   typedef struct vrrp_addr {
>       int vrrp_af;
>       union {
>               struct in_addr in4_u;
>               struct in6_addr in6_u;
>       } vrrp_ip_addr
>   };
>   instead of duplicating this.


I think this is a better idea than using sockaddr_storage.




-- 

                                                K. Poon.
                                                [EMAIL PROTECTED]

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to