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 3/25/2015 7:27 AM, Alan Barrett wrote:
On Tue, 24 Mar 2015, Christos Zoulas wrote:
I like the idea of making struct sockaddr_storage the largest of
all the sockaddr_foo types.
As it stands today it already is.
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.
After thinking about it for a couple of days I don't see how changing
the size of sockaddr_storage has any benefit. As you point out doing so
would require even more change for ABI compatibility.
The only gain appears to be avoiding definition of a new structure that
would be used only in the kernel. Maybe there's more?
In the absence of any outright objection to a new structure I think I'd
prefer to stay with what I've done in the patch.
* It allows us to use a single structure consistently within the kernel.
* It has no user-space visible change.
* It decouples the kernel from the user-space structure definitions.
regards,
rtr
Home |
Main Index |
Thread Index |
Old Index