fdpass.c revision 5bfa6f45b077220fe4d5fd74aad6fb2820aebf79
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen Copyright (c) 2002 Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Permission is hereby granted, free of charge, to any person obtaining
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen a copy of this software and associated documentation files (the
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen "Software"), to deal in the Software without restriction, including
5fb3bff645380804c9db2510940c41db6b8fdb01Timo Sirainen without limitation the rights to use, copy, modify, merge, publish,
5fb3bff645380804c9db2510940c41db6b8fdb01Timo Sirainen distribute, sublicense, and/or sell copies of the Software, and to
15b9759df8e4f6fb00c115353827a2aebbebfebcTimo Sirainen permit persons to whom the Software is furnished to do so, subject to
15b9759df8e4f6fb00c115353827a2aebbebfebcTimo Sirainen the following conditions:
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen The above copyright notice and this permission notice shall be
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen included in all copies or substantial portions of the Software.
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
d6badc27cd6e8d3398877b6766cb0aaeef3a7800Timo Sirainen SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6ef7e31619edfaa17ed044b45861d106a86191efTimo Sirainen (((len) + sizeof(size_t) - 1) & ~(sizeof(size_t) - 1))
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen (CMSG_ALIGN(len) + CMSG_ALIGN(sizeof(struct cmsghdr)))
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainenint fd_send(int handle, int send_fd, const void *data, int size)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenint fd_read(int handle, void *data, int size, int *fd)