Get rid of passing mangled flag to do_last()
[safe/jmp/linux-2.6] / include / linux / socket.h
index 42a0396..7b3aae2 100644 (file)
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage {
                                /* _SS_MAXSIZE value minus size of ss_family */
 } __attribute__ ((aligned(_K_SS_ALIGNSIZE)));  /* force desired alignment */
 
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
+#ifdef __KERNEL__
 
 #include <asm/socket.h>                        /* arch-dependent defines       */
 #include <linux/sockios.h>             /* the SIOCxxx I/O controls     */
@@ -24,6 +24,9 @@ struct __kernel_sockaddr_storage {
 #include <linux/types.h>               /* pid_t                        */
 #include <linux/compiler.h>            /* __user                       */
 
+#define __sockaddr_check_size(size)    \
+       BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage)))
+
 #ifdef __KERNEL__
 # ifdef CONFIG_PROC_FS
 struct seq_file;
@@ -65,6 +68,12 @@ struct msghdr {
        unsigned        msg_flags;
 };
 
+/* For recvmmsg/sendmmsg */
+struct mmsghdr {
+       struct msghdr   msg_hdr;
+       unsigned        msg_len;
+};
+
 /*
  *     POSIX 1003.1g - ancillary data object information
  *     Ancillary data consits of a sequence of pairs of
@@ -101,21 +110,6 @@ struct cmsghdr {
                              ((char *)(cmsg) - (char *)(mhdr)->msg_control)))
 
 /*
- *     This mess will go away with glibc
- */
-#ifdef __KERNEL__
-#define __KINLINE static inline
-#elif  defined(__GNUC__) 
-#define __KINLINE static __inline__
-#elif defined(__cplusplus)
-#define __KINLINE static inline
-#else
-#define __KINLINE static
-#endif
-
-
-/*
  *     Get the next cmsg header
  *
  *     PLEASE, do not touch this function. If you think, that it is
@@ -128,7 +122,7 @@ struct cmsghdr {
  *     ancillary object DATA.                          --ANK (980731)
  */
  
-__KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
+static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
                                               struct cmsghdr *__cmsg)
 {
        struct cmsghdr * __ptr;
@@ -140,7 +134,7 @@ __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
        return __ptr;
 }
 
-__KINLINE struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg)
+static inline struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg)
 {
        return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg);
 }
@@ -194,7 +188,8 @@ struct ucred {
 #define AF_RXRPC       33      /* RxRPC sockets                */
 #define AF_ISDN                34      /* mISDN sockets                */
 #define AF_PHONET      35      /* Phonet sockets               */
-#define AF_MAX         36      /* For now.. */
+#define AF_IEEE802154  36      /* IEEE802154 sockets           */
+#define AF_MAX         37      /* For now.. */
 
 /* Protocol families, same as address families. */
 #define PF_UNSPEC      AF_UNSPEC
@@ -233,6 +228,7 @@ struct ucred {
 #define PF_RXRPC       AF_RXRPC
 #define PF_ISDN                AF_ISDN
 #define PF_PHONET      AF_PHONET
+#define PF_IEEE802154  AF_IEEE802154
 #define PF_MAX         AF_MAX
 
 /* Maximum queue length specifiable by listen.  */
@@ -303,6 +299,7 @@ struct ucred {
 #define SOL_BLUETOOTH  274
 #define SOL_PNPIPE     275
 #define SOL_RDS                276
+#define SOL_IUCV       277
 
 /* IPX options */
 #define IPX_TYPE       1
@@ -324,6 +321,10 @@ extern int move_addr_to_user(struct sockaddr *kaddr, int klen, void __user *uadd
 extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr *kaddr);
 extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data);
 
+struct timespec;
+
+extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
+                         unsigned int flags, struct timespec *timeout);
 #endif
 #endif /* not kernel and not glibc */
 #endif /* _LINUX_SOCKET_H */