source: vendor/current/source3/lib/msghdr.h

Last change on this file was 988, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.3

File size: 1.4 KB
Line 
1/*
2 * Unix SMB/CIFS implementation.
3 * Copyright (C) Volker Lendecke 2014
4 *
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.
9 *
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.
14 *
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/>.
17 */
18
19#ifndef __LIB_MSGHDR_H__
20#define __LIB_MSGHDR_H__
21
22#include <stddef.h>
23#include <stdint.h>
24#include <sys/uio.h>
25#include <sys/socket.h>
26
27ssize_t msghdr_prep_fds(struct msghdr *msg, uint8_t *buf, size_t bufsize,
28 const int *fds, size_t num_fds);
29
30struct msghdr_buf;
31
32ssize_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);
36struct msghdr *msghdr_buf_msghdr(struct msghdr_buf *msg);
37
38size_t msghdr_prep_recv_fds(struct msghdr *msg, uint8_t *buf, size_t bufsize,
39 size_t num_fds);
40size_t msghdr_extract_fds(struct msghdr *msg, int *fds, size_t num_fds);
41
42#endif
Note: See TracBrowser for help on using the repository browser.