diff options
Diffstat (limited to 'include/linux/socket.h')
| -rw-r--r-- | include/linux/socket.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h index 5c19cba34dce..5bf59c8493b7 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -51,6 +51,7 @@ struct msghdr { | |||
| 51 | void *msg_control; /* ancillary data */ | 51 | void *msg_control; /* ancillary data */ |
| 52 | __kernel_size_t msg_controllen; /* ancillary data buffer length */ | 52 | __kernel_size_t msg_controllen; /* ancillary data buffer length */ |
| 53 | unsigned int msg_flags; /* flags on received message */ | 53 | unsigned int msg_flags; /* flags on received message */ |
| 54 | struct kiocb *msg_iocb; /* ptr to iocb for async requests */ | ||
| 54 | }; | 55 | }; |
| 55 | 56 | ||
| 56 | struct user_msghdr { | 57 | struct user_msghdr { |
| @@ -138,6 +139,11 @@ static inline struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr | |||
| 138 | return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg); | 139 | return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg); |
| 139 | } | 140 | } |
| 140 | 141 | ||
| 142 | static inline size_t msg_data_left(struct msghdr *msg) | ||
| 143 | { | ||
| 144 | return iov_iter_count(&msg->msg_iter); | ||
| 145 | } | ||
| 146 | |||
| 141 | /* "Socket"-level control message types: */ | 147 | /* "Socket"-level control message types: */ |
| 142 | 148 | ||
| 143 | #define SCM_RIGHTS 0x01 /* rw: access rights (array of int) */ | 149 | #define SCM_RIGHTS 0x01 /* rw: access rights (array of int) */ |
| @@ -181,6 +187,7 @@ struct ucred { | |||
| 181 | #define AF_WANPIPE 25 /* Wanpipe API Sockets */ | 187 | #define AF_WANPIPE 25 /* Wanpipe API Sockets */ |
| 182 | #define AF_LLC 26 /* Linux LLC */ | 188 | #define AF_LLC 26 /* Linux LLC */ |
| 183 | #define AF_IB 27 /* Native InfiniBand address */ | 189 | #define AF_IB 27 /* Native InfiniBand address */ |
| 190 | #define AF_MPLS 28 /* MPLS */ | ||
| 184 | #define AF_CAN 29 /* Controller Area Network */ | 191 | #define AF_CAN 29 /* Controller Area Network */ |
| 185 | #define AF_TIPC 30 /* TIPC sockets */ | 192 | #define AF_TIPC 30 /* TIPC sockets */ |
| 186 | #define AF_BLUETOOTH 31 /* Bluetooth sockets */ | 193 | #define AF_BLUETOOTH 31 /* Bluetooth sockets */ |
| @@ -226,6 +233,7 @@ struct ucred { | |||
| 226 | #define PF_WANPIPE AF_WANPIPE | 233 | #define PF_WANPIPE AF_WANPIPE |
| 227 | #define PF_LLC AF_LLC | 234 | #define PF_LLC AF_LLC |
| 228 | #define PF_IB AF_IB | 235 | #define PF_IB AF_IB |
| 236 | #define PF_MPLS AF_MPLS | ||
| 229 | #define PF_CAN AF_CAN | 237 | #define PF_CAN AF_CAN |
| 230 | #define PF_TIPC AF_TIPC | 238 | #define PF_TIPC AF_TIPC |
| 231 | #define PF_BLUETOOTH AF_BLUETOOTH | 239 | #define PF_BLUETOOTH AF_BLUETOOTH |
