1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Add recvmmsg and sendmmsg to the generic glibc API.

This commit is contained in:
Thomas Schwinge
2012-11-03 18:29:46 +01:00
parent cf9a5d1861
commit 123be9deda
13 changed files with 147 additions and 60 deletions

View File

@ -235,16 +235,6 @@ struct msghdr
int msg_flags; /* Flags on received message. */
};
#ifdef __USE_GNU
/* For `recvmmsg' and 'sendmmsg'. */
struct mmsghdr
{
struct msghdr msg_hdr; /* Actual message header. */
unsigned int msg_len; /* Number of received or sent bytes
for the entry. */
};
#endif
/* Structure used for storage of ancillary data object information. */
struct cmsghdr
{
@ -389,27 +379,4 @@ struct linger
int l_linger; /* Time to linger. */
};
__BEGIN_DECLS
#ifdef __USE_GNU
/* Receive up to VLEN messages as described by VMESSAGES 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);
/* Send a VLEN messages as described by VMESSAGES to socket FD.
Return the number of datagrams successfully written or -1 for errors.
This function is a cancellation point and therefore not marked with
__THROW. */
extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags);
#endif
__END_DECLS
#endif /* bits/socket.h */