aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/socket.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/socket.h')
-rw-r--r--include/linux/socket.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 354cc5617f8b..a8f56e1ec760 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -24,6 +24,9 @@ struct __kernel_sockaddr_storage {
24#include <linux/types.h> /* pid_t */ 24#include <linux/types.h> /* pid_t */
25#include <linux/compiler.h> /* __user */ 25#include <linux/compiler.h> /* __user */
26 26
27struct pid;
28struct cred;
29
27#define __sockaddr_check_size(size) \ 30#define __sockaddr_check_size(size) \
28 BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage))) 31 BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage)))
29 32
@@ -189,7 +192,8 @@ struct ucred {
189#define AF_ISDN 34 /* mISDN sockets */ 192#define AF_ISDN 34 /* mISDN sockets */
190#define AF_PHONET 35 /* Phonet sockets */ 193#define AF_PHONET 35 /* Phonet sockets */
191#define AF_IEEE802154 36 /* IEEE802154 sockets */ 194#define AF_IEEE802154 36 /* IEEE802154 sockets */
192#define AF_MAX 37 /* For now.. */ 195#define AF_CAIF 37 /* CAIF sockets */
196#define AF_MAX 38 /* For now.. */
193 197
194/* Protocol families, same as address families. */ 198/* Protocol families, same as address families. */
195#define PF_UNSPEC AF_UNSPEC 199#define PF_UNSPEC AF_UNSPEC
@@ -229,6 +233,7 @@ struct ucred {
229#define PF_ISDN AF_ISDN 233#define PF_ISDN AF_ISDN
230#define PF_PHONET AF_PHONET 234#define PF_PHONET AF_PHONET
231#define PF_IEEE802154 AF_IEEE802154 235#define PF_IEEE802154 AF_IEEE802154
236#define PF_CAIF AF_CAIF
232#define PF_MAX AF_MAX 237#define PF_MAX AF_MAX
233 238
234/* Maximum queue length specifiable by listen. */ 239/* Maximum queue length specifiable by listen. */
@@ -301,11 +306,14 @@ struct ucred {
301#define SOL_PNPIPE 275 306#define SOL_PNPIPE 275
302#define SOL_RDS 276 307#define SOL_RDS 276
303#define SOL_IUCV 277 308#define SOL_IUCV 277
309#define SOL_CAIF 278
304 310
305/* IPX options */ 311/* IPX options */
306#define IPX_TYPE 1 312#define IPX_TYPE 1
307 313
308#ifdef __KERNEL__ 314#ifdef __KERNEL__
315extern void cred_to_ucred(struct pid *pid, const struct cred *cred, struct ucred *ucred);
316
309extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); 317extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);
310extern int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov, 318extern int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov,
311 int offset, int len); 319 int offset, int len);
@@ -314,7 +322,7 @@ extern int csum_partial_copy_fromiovecend(unsigned char *kdata,
314 int offset, 322 int offset,
315 unsigned int len, __wsum *csump); 323 unsigned int len, __wsum *csump);
316 324
317extern int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr *address, int mode); 325extern long verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr *address, int mode);
318extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len); 326extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len);
319extern int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata, 327extern int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata,
320 int offset, int len); 328 int offset, int len);