]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add recvmmsg interface.
authorUlrich Drepper <drepper@redhat.com>
Wed, 9 Dec 2009 04:10:46 +0000 (20:10 -0800)
committerUlrich Drepper <drepper@redhat.com>
Wed, 9 Dec 2009 04:10:46 +0000 (20:10 -0800)
ChangeLog
NEWS
sysdeps/unix/sysv/linux/Versions
sysdeps/unix/sysv/linux/bits/socket.h
sysdeps/unix/sysv/linux/syscalls.list

index 1f4d2b2723cb520cbd13c5517a3ac8250dff9e9f..59e4b19241d1240bd55d5ddba639d7bb05fcd19d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-08  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/bits/socket.h: Define mmsghdr and declare
+       recvmmsg.
+       * sysdeps/unix/sysv/linux/syscalls.list: Add entry for recvmmsg.
+       * sysdeps/unix/sysv/linux/Versions: Add recvmmsg for GLIBC_2.12.
+
 2009-12-04  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
 
        * sysdeps/s390/s390-64/dl-trampoline.S: Add CFI for the call saved
diff --git a/NEWS b/NEWS
index db51d5fe94fc43eca887d0864bfe118eaa6d2c33..e1fb6a5766ea42e35f85610c8c5c6d38b5844386 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,14 @@
-GNU C Library NEWS -- history of user-visible changes.  2009-10-30
+GNU C Library NEWS -- history of user-visible changes.  2009-12-8
 Copyright (C) 1992-2008, 2009 Free Software Foundation, Inc.
 See the end for copying conditions.
 
 Please send GNU C library bug reports via <http://sources.redhat.com/bugzilla/>
 using `glibc' in the "product" field.
+\f
+Version 2.12
+
+* New Linux interface: recvmmsg
+
 \f
 Version 2.11
 
index 50c70513ff0c152c6bb8dbaffff7fea451f676ad..f09ef6d983e606fd2efb75cc8f939a2ab1b36d1a 100644 (file)
@@ -146,6 +146,8 @@ libc {
     _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
 
     ntp_gettimex;
+
+    recvmmsg;
   }
   GLIBC_PRIVATE {
     # functions used in other libraries
index f23b338a35415fc2a4a143d3e2737e851fd092f5..aa78087a720e41cb66da48e8f7d6d4972e1029a1 100644 (file)
@@ -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 */
index a87906a4e302b067172b121dfafd9d7f82ad1547..a1a449eb4b727ea68f0cb721935258333fa7b78a 100644 (file)
@@ -53,6 +53,7 @@ prctl         EXTRA   prctl           i:iiiii __prctl         prctl
 putpmsg                -       putpmsg         i:ippii putpmsg
 query_module   EXTRA   query_module    i:sipip query_module
 quotactl       EXTRA   quotactl        i:isip  quotactl
+recvmmsg       EXTRA   recvmmsg        Ci:ipiip        recvmmsg
 remap_file_pages -     remap_file_pages i:piiii        __remap_file_pages remap_file_pages
 sched_getp     -       sched_getparam  i:ip    __sched_getparam        sched_getparam
 sched_gets     -       sched_getscheduler      i:i     __sched_getscheduler    sched_getscheduler