linux socket 进程间,linux socket 进程间通信

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值