mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Add recvmmsg interface.
This commit is contained in:
@ -234,8 +234,8 @@ enum
|
||||
#define MSG_MORE MSG_MORE
|
||||
|
||||
MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
|
||||
descriptor received through
|
||||
SCM_RIGHTS. */
|
||||
descriptor received through
|
||||
SCM_RIGHTS. */
|
||||
#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
|
||||
};
|
||||
|
||||
@ -259,6 +259,15 @@ struct msghdr
|
||||
int msg_flags; /* Flags on received message. */
|
||||
};
|
||||
|
||||
#ifdef __USE_GNU
|
||||
/* For `recvmmsg'. */
|
||||
struct mmsghdr
|
||||
{
|
||||
struct msghdr msg_hdr; /* Actual message header. */
|
||||
unsigned int msg_len; /* Number of received bytes for the entry. */
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Structure used for storage of ancillary data object information. */
|
||||
struct cmsghdr
|
||||
{
|
||||
@ -403,4 +412,18 @@ struct linger
|
||||
int l_linger; /* Time to linger. */
|
||||
};
|
||||
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Receive a message as described by MESSAGE from socket FD.
|
||||
Returns the number of bytes read or -1 for errors.
|
||||
|
||||
This function is a cancellation point and therefore not marked with
|
||||
__THROW. */
|
||||
extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
|
||||
unsigned int __vlen, int __flags,
|
||||
__const struct timespec *__tmo);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* bits/socket.h */
|
||||
|
Reference in New Issue
Block a user