> 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?

Is space-saving an issue?  If not, using sockaddr_storage would allow us
to introduce a set of shared convenience routines and debug routines to do
comparisons and other operations, which would be a nice benefit.

FWIW, this issue came up during the networking API talks a few of us were
involved in several weeks back, and I took an AI to document a best
practice here, so I'm interested in perspectives on this.

-- 
meem
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to