unix_stream_ops
af_unix.c 文件
static const struct file_operations unix_seq_fops = {
.owner = THIS_MODULE,
.open= unix_seq_open,
.read= seq_read,
.llseek = seq_lseek,
.release = seq_release_net,
};
staticconststructfile_operations socket_file_ops={ .owner=THIS_MODULE, .llseek=no_llseek, .aio_read=sock_aio_read, .aio_write=sock_aio_write, .poll=sock_poll, .unlocked_ioctl=sock_ioctl, #ifdefCONFIG_COMPAT .compat_ioctl=compat_sock_ioctl, #endif .mmap=sock_mmap, .open=sock_no_open,/* special open code to disallow open via /proc */ .release=sock_close, .fasync=sock_fasync, .sendpage=sock_sendpage, .splice_write=generic_splice_sendpage, .splice_read=sock_splice_read, };
read write 系统调用:
fs/read_write.c SYSCALL_DEFINE3(read, unsigned int, fd, char __user *, buf, size_t, count)
include/net/sock.h
#define SOCK_MIN_SNDBUF 2048
#define SOCK_MIN_RCVBUF 256
socket 缓冲区大小判断设置:
http://blog.sina.com.cn/s/blog_9cffdcab01019m4f.html
参考资料:
http://danier.iteye.com/blog/575158
http://blog.csdn.net/embeddedfly/article/details/6411714
http://blog.csdn.net/embeddedfly/article/category/762474
http://blog.csdn.net/embeddedfly/article/details/6411905 sedmsg