tech-net archive

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

Re: patch: sockaddr instead of mbuf to carry addresses



On Tue, 24 Mar 2015, Christos Zoulas wrote:
| If it is better to increase the size of struct sockaddr_storage shoot me
| a preferred updated structure definition and I'll go with that.

I am not sure which is less of a pain to do... (binary compatibility?)

I like the idea of making struct sockaddr_storage the largest of
all the sockaddr_foo types.

sockaddr_storage is used in struct ifreq, which is used in a bunch of ioctls. It is also mentioned in a few other places in /usr/include/**. If we increased the size of struct sockaddr_storage, then we'd need to provide binary compatibility, which is tedious but not difficult in most cases.

The difficult cases are that struct sockaddr_storage is embedded in struct utmpx and struct lastlogx, which are stored on disk in /var/run/utmpx, /var/log/wtmpx, and /var/log/lastlogx. I don't see an
easy way for a process reading the file to be able to tell whether it
uses the old or new struct sockaddr_storage.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index