path: root/sys/sys/un.h
diff options
authorDavid Malone <dwmalone@FreeBSD.org>2001-10-04 13:11:48 +0000
committerDavid Malone <dwmalone@FreeBSD.org>2001-10-04 13:11:48 +0000
commit2bc21ed9856748bd3510da944f11597975ef8d81 (patch)
tree6615cc44c88feefec804ce8ebb7cd6284b4483b6 /sys/sys/un.h
parent15821eba77adf38fd4adebfb7a7b842ba54ab861 (diff)
Hopefully improve control message passing over Unix domain sockets.
1) Allow the sending of more than one control message at a time over a unix domain socket. This should cover the PR 29499. 2) This requires that unp_{ex,in}ternalize and unp_scan understand mbufs with more than one control message at a time. 3) Internalize and externalize used to work on the mbuf in-place. This made life quite complicated and the code for sizeof(int) < sizeof(file *) could end up doing the wrong thing. The patch always create a new mbuf/cluster now. This resulted in the change of the prototype for the domain externalise function. 4) You can now send SCM_TIMESTAMP messages. 5) Always use CMSG_DATA(cm) to determine the start where the data in unp_{ex,in}ternalize. It was using ((struct cmsghdr *)cm + 1) in some places, which gives the wrong alignment on the alpha. (NetBSD made this fix some time ago). This results in an ABI change for discriptor passing and creds passing on the alpha. (Probably on the IA64 and Spare ports too). 6) Fix userland programs to use CMSG_* macros too. 7) Be more careful about freeing mbufs containing (file *)s. This is made possible by the prototype change of externalise. PR: 29499 MFC after: 6 weeks
Notes: svn path=/head/; revision=84472
Diffstat (limited to 'sys/sys/un.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/un.h b/sys/sys/un.h
index becf3ffb0b7c..e4ce14cbed5c 100644
--- a/sys/sys/un.h
+++ b/sys/sys/un.h
@@ -59,7 +59,7 @@ int uipc_usrreq __P((struct socket *so, int req, struct mbuf *m,
struct mbuf *nam, struct mbuf *control));
int unp_connect2 __P((struct socket *so, struct socket *so2));
void unp_dispose __P((struct mbuf *m));
-int unp_externalize __P((struct mbuf *rights));
+int unp_externalize __P((struct mbuf *mbuf, struct mbuf **controlp));
void unp_init __P((void));
extern struct pr_usrreqs uipc_usrreqs;
#else /* !_KERNEL */