2 * Unix SMB/CIFS implementation.
3 * Copyright (C) Volker Lendecke 2014
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef __LIB_MSGHDR_H__
20 #define __LIB_MSGHDR_H__
25 #include <sys/socket.h>
27 ssize_t
msghdr_prep_fds(struct msghdr
*msg
, uint8_t *buf
, size_t bufsize
,
28 const int *fds
, size_t num_fds
);
32 ssize_t
msghdr_copy(struct msghdr_buf
*msg
, size_t msgsize
,
33 const void *addr
, socklen_t addrlen
,
34 const struct iovec
*iov
, int iovcnt
,
35 const int *fds
, size_t num_fds
);
36 struct msghdr
*msghdr_buf_msghdr(struct msghdr_buf
*msg
);