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