2022-06-25 18:17:31 -07:00
|
|
|
#ifndef COSMOPOLITAN_LIBC_SOCK_STRUCT_MSGHDR_H_
|
|
|
|
#define COSMOPOLITAN_LIBC_SOCK_STRUCT_MSGHDR_H_
|
|
|
|
#include "libc/calls/struct/iovec.h"
|
|
|
|
COSMOPOLITAN_C_START_
|
|
|
|
|
|
|
|
struct msghdr { /* Linux+NT ABI */
|
|
|
|
void *msg_name; /* optional address */
|
|
|
|
uint32_t msg_namelen; /* size of msg_name */
|
|
|
|
struct iovec *msg_iov; /* scatter/gather array */
|
2023-02-03 02:09:15 -08:00
|
|
|
uint64_t msg_iovlen; /* # elements in msg_iov */
|
2022-10-11 21:06:27 -07:00
|
|
|
void *msg_control; /* ancillary data c. cmsghdr */
|
2023-02-03 02:09:15 -08:00
|
|
|
uint64_t msg_controllen; /* ancillary data buffer len */
|
|
|
|
uint32_t msg_flags; /* MSG_XXX */
|
2022-06-25 18:17:31 -07:00
|
|
|
};
|
|
|
|
|
2022-08-06 03:51:50 -07:00
|
|
|
ssize_t recvmsg(int, struct msghdr *, int);
|
|
|
|
ssize_t sendmsg(int, const struct msghdr *, int);
|
|
|
|
|
2022-06-25 18:17:31 -07:00
|
|
|
COSMOPOLITAN_C_END_
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_SOCK_STRUCT_MSGHDR_H_ */
|