linux由于开源就比win好多了 很简单和3环一样
直接看内核源码 (深入了解用户层到内核层 查看linux 源码 tcpip实现 第20章)
分别在:sk->proto与ops
//net.h
struct socket {
socket_state state;
unsigned long flags;
const struct proto_ops *ops;
struct fasync_struct *fasync_list;
struct file *file;
struct sock *sk;
wait_queue_head_t wait;
short type;
};
//sock.h
struct sock {
.....
struct {
struct sk_buff *head;
struct sk_buff *tail;
} sk_backlog;
struct sk_buff_head sk_error_queue;
struct proto *sk_prot_creator;
......
}
ubuntu 18.10 驱动级socket(ksocket)
ubuntu 18.10 驱动级socket(ksocket)
源码:
https://github.com/haidragon/linuxksocket
效果:
ubuntu 18.10 驱动级socket(ksocket)
https://blog.csdn.net/u010039418/article/details/80628490
©著作权归作者所有:来自51CTO博客作者土匪猿的原创作品,如需转载,请注明出处,否则将追究法律责任
你的鼓励让我更有动力