aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/net.h')
-rw-r--r--include/linux/net.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/net.h b/include/linux/net.h
index b292a0435571..69be3e6079c8 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -164,6 +164,14 @@ struct proto_ops {
164#endif 164#endif
165 int (*sendmsg) (struct kiocb *iocb, struct socket *sock, 165 int (*sendmsg) (struct kiocb *iocb, struct socket *sock,
166 struct msghdr *m, size_t total_len); 166 struct msghdr *m, size_t total_len);
167 /* Notes for implementing recvmsg:
168 * ===============================
169 * msg->msg_namelen should get updated by the recvmsg handlers
170 * iff msg_name != NULL. It is by default 0 to prevent
171 * returning uninitialized memory to user space. The recvfrom
172 * handlers can assume that msg.msg_name is either NULL or has
173 * a minimum size of sizeof(struct sockaddr_storage).
174 */
167 int (*recvmsg) (struct kiocb *iocb, struct socket *sock, 175 int (*recvmsg) (struct kiocb *iocb, struct socket *sock,
168 struct msghdr *m, size_t total_len, 176 struct msghdr *m, size_t total_len,
169 int flags); 177 int flags);
@@ -173,7 +181,7 @@ struct proto_ops {
173 int offset, size_t size, int flags); 181 int offset, size_t size, int flags);
174 ssize_t (*splice_read)(struct socket *sock, loff_t *ppos, 182 ssize_t (*splice_read)(struct socket *sock, loff_t *ppos,
175 struct pipe_inode_info *pipe, size_t len, unsigned int flags); 183 struct pipe_inode_info *pipe, size_t len, unsigned int flags);
176 void (*set_peek_off)(struct sock *sk, int val); 184 int (*set_peek_off)(struct sock *sk, int val);
177}; 185};
178 186
179#define DECLARE_SOCKADDR(type, dst, src) \ 187#define DECLARE_SOCKADDR(type, dst, src) \