
Linux源码研究之内核态TCP
研究学习内核态下的TCP实现
H21520153412
这个作者很懒,什么都没留下…
展开
-
Linux内核写入数据到文件,将数组序列化到文件
内核已经提供了相应函数。实例如下:#include <linux/module.h>#include <linux/init.h>#include <linux/fs.h>#include <linux/uaccess.h>static char buf[] ="hello. \n";static char buf1[100]; int __init hello_init(void){ struct file *fp; lof原创 2021-06-21 09:33:58 · 613 阅读 · 0 评论 -
TCP socket系统调用实现源码分析
欢迎一起聊~系统调用入口:int __sys_socket(int family, int type, int protocol)// net/socket.c{ retval = sock_create(family, type, protocol, &sock);// if (retval < 0) return retval; return sock_map_fd(sock, flags & (O_CLOEXEC | O_NONBLOCK));}第一个函数原创 2021-01-07 14:25:47 · 253 阅读 · 0 评论 -
TCP setsockopt系统调用过程分析
整个过程是从用户态的socket 查找到内核态对应的 sock。__sys_setsockopt(net/socket.c)该函数中: else err = sock->ops->setsockopt(sock, level, optname, optval, optlen); //根据sock对应 proto_ops结构中的 setsockopt函数执行对于IPv6 sock来说,结构体实体是:proto_ops ine原创 2021-01-06 22:13:42 · 462 阅读 · 0 评论