s3:libads: no longer pass "GSS-SPNEGO" to ads_sasl_spnego_gensec_bind()
[Samba.git] / lib / util / msghdr.h
blobc1676d2e4de8ad01ff9d1ae4965de44f260229f2
1 /*
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__
22 #include <stddef.h>
23 #include <stdint.h>
24 #include <sys/uio.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);
30 struct msghdr_buf;
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);
38 size_t msghdr_prep_recv_fds(struct msghdr *msg, uint8_t *buf, size_t bufsize,
39 size_t num_fds);
40 size_t msghdr_extract_fds(struct msghdr *msg, int *fds, size_t num_fds);
42 #endif